Apache ShardingSphere Shadow DB 及在 CyborgFlow 中的应用 - 侯阳
侯阳 2022年1月15日 01 SphereEx 中间件研发工程师 Apache ShardingSphere Contributor 目前专注于 Shadow DB 及全链路压测相关的设计和研发 Apache ShardingSphere 发展和现状 Apache ShardingSphere 架构设计 Apache ShardingSphere Roadmap 1.x (2016) Apache ShardingSphere Overview Shadow DB 应用场景 Shadow DB 架构设计 全链路压测:流量规划,比如双 11,618 等 灰度发布:指定测试用户的体验版本发布 服务预热:预热数据隔离 对比测试:基于版本的对比测试 Shadow DB Scenes 4.1.1 Shadow DB API rules: - !SHADOW column: shadowMappings: ds: shadow_ds Shadow DB 重构的原因 5.0.0 Shadow DB API rules: - !SHADOW enable: true dataSources:: sourceDataSourceName: ds shadowDataSourceName: shadow_ds 0 码力 | 22 页 | 3.83 MB | 1 年前3peewee Documentation Release 3.4.0
extension in the postgres test database: -- install the hstore extension on the peewee_test postgres db. CREATE EXTENSION hstore; Optional dependencies Note To use Peewee, you typically won’t need anything by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses0 码力 | 349 页 | 382.34 KB | 1 年前3peewee Documentation Release 3.3.0
extension in the postgres test database: -- install the hstore extension on the peewee_test postgres db. CREATE EXTENSION hstore; 1.1.3 Optional dependencies Note: To use Peewee, you typically won’t need by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses the "people.db" database0 码力 | 280 页 | 1.02 MB | 1 年前3peewee Documentation Release 3.4.0
extension in the postgres test database: -- install the hstore extension on the peewee_test postgres db. CREATE EXTENSION hstore; 1.1.3 Optional dependencies Note: To use Peewee, you typically won’t need by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses the "people.db" database0 码力 | 284 页 | 1.03 MB | 1 年前3peewee Documentation Release 3.1.0
extension in the postgres test database: -- install the hstore extension on the peewee_test postgres db. CREATE EXTENSION hstore; Optional dependencies Note To use Peewee, you typically won’t need anything by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses0 码力 | 332 页 | 370.77 KB | 1 年前3peewee Documentation Release 3.0.0
extension in the postgres test database: -- install the hstore extension on the peewee_test postgres db. CREATE EXTENSION hstore; Optional dependencies Note To use Peewee, you typically won’t need anything by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses0 码力 | 319 页 | 361.50 KB | 1 年前3peewee Documentation Release 3.5.0
extension in the postgres test database: -- install the hstore extension on the peewee_test postgres db. CREATE EXTENSION hstore; Optional dependencies Note To use Peewee, you typically won’t need anything by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses0 码力 | 347 页 | 380.80 KB | 1 年前3peewee Documentation Release 3.5.0
extension in the postgres test database: -- install the hstore extension on the peewee_test postgres db. CREATE EXTENSION hstore; 1.1.3 Optional dependencies Note: To use Peewee, you typically won’t need by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses the "people.db" database0 码力 | 282 页 | 1.02 MB | 1 年前3peewee Documentation Release 2.10.2
by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses uses the "people.db" database. Note Note that we named our model Person instead of People. This is a convention you should follow – even though the table will contain multiple people, we always name0 码力 | 275 页 | 276.96 KB | 1 年前3peewee Documentation Release 2.10.2
by running import sqlite3 in the Python console. If you wish to use another database, there are many DB-API 2.0-compatible drivers out there, such as pymysql or psycopg2 for MySQL and Postgres respectively import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This model uses the "people.db" database related_name='pets') name = CharField() animal_type = CharField() class Meta: database = db # this model uses the "people.db" database Now that we have our models, let’s connect to the database. Although it’s0 码力 | 221 页 | 844.06 KB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100