peewee Documentation Release 3.6.0all (except for read uncommitted) connections from accessing the database until the transaction is complete. Example specifying the locking mode: db = SqliteDatabase('app.db') with db.atomic('EXCLUSIVE'): BaseTestCase(unittest.TestCase): def setUp(self): # Bind model classes to test db. Since we have a complete list of # all models, we do not need to recursively bind dependencies. test_db print(sample.key, sample.value) # 'a', 1.75 # 'b', 2.7 # 'b', 2.9 Complex Example For a more complete example, let’s consider the following query which uses multiple CTEs to find per-product sales totals0 码力 | 377 页 | 399.12 KB | 1 年前3
peewee Documentation
Release 3.6.0(except for read uncommitted) connections from access- ing the database until the transaction is complete. Example specifying the locking mode: 24 Chapter 1. Contents: peewee Documentation, Release 3 BaseTestCase(unittest.TestCase): def setUp(self): # Bind model classes to test db. Since we have a complete list of # all models, we do not need to recursively bind dependencies. test_db.bind(MODELS, bind_refs=False 7 # 'b', 2.9 1.7. Querying 83 peewee Documentation, Release 3.6.0 Complex Example For a more complete example, let’s consider the following query which uses multiple CTEs to find per-product sales totals0 码力 | 302 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.5.0all (except for read uncommitted) connections from accessing the database until the transaction is complete. Example specifying the locking mode: db = SqliteDatabase('app.db') with db.atomic('EXCLUSIVE'): BaseTestCase(unittest.TestCase): def setUp(self): # Bind model classes to test db. Since we have a complete list of # all models, we do not need to recursively bind dependencies. for model three parameters: the number of pages remaining, the total page count, and whether the backup is complete. Example: master = CSqliteExtDatabase('master.db') replica = CSqliteExtDatabase('replica.db')0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation Release 3.4.0all (except for read uncommitted) connections from accessing the database until the transaction is complete. Example specifying the locking mode: db = SqliteDatabase('app.db') with db.atomic('EXCLUSIVE'): BaseTestCase(unittest.TestCase): def setUp(self): # Bind model classes to test db. Since we have a complete list of # all models, we do not need to recursively bind dependencies. for model three parameters: the number of pages remaining, the total page count, and whether the backup is complete. Example: master = CSqliteExtDatabase('master.db') replica = CSqliteExtDatabase('replica.db')0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation
Release 3.5.0(except for read uncommitted) connections from access- ing the database until the transaction is complete. Example specifying the locking mode: db = SqliteDatabase('app.db') with db.atomic('EXCLUSIVE'): BaseTestCase(unittest.TestCase): def setUp(self): # Bind model classes to test db. Since we have a complete list of (continues on next page) 30 Chapter 1. Contents: peewee Documentation, Release 3.5.0 three parameters: the number of pages re- maining, the total page count, and whether the backup is complete. Example: master = CSqliteExtDatabase('master.db') replica = CSqliteExtDatabase('replica.db')0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0(except for read uncommitted) connections from access- ing the database until the transaction is complete. 44 Chapter 1. Contents: peewee Documentation, Release 3.4.0 Example specifying the locking mode: BaseTestCase(unittest.TestCase): def setUp(self): # Bind model classes to test db. Since we have a complete list of # all models, we do not need to recursively bind dependencies. for model in MODELS: model three parameters: the number of pages re- maining, the total page count, and whether the backup is complete. Example: master = CSqliteExtDatabase('master.db') replica = CSqliteExtDatabase('replica.db')0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation Release 2.10.2well as blank model definitions for the model names specified on the command line. Here is a more complete example, which will use the PostgresqlExtDatabase with query logging enabled: pskel -l -e postgres_ext search. docs = DocumentIndex.search('search term') for result in docs: print result.title # More complete example. docs = DocumentIndex.search( 'search term', weights={'title': 2.0, 'content': 1 search. docs = DocumentIndex.search('search term') for result in docs: print result.title # More complete example. docs = DocumentIndex.search( 'search term', weights={'title': 2.0, 'content': 10 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation
Release 2.10.2well as blank model definitions for the model names specified on the command line. Here is a more complete example, which will use the PostgresqlExtDatabase with query logging enabled: pskel -l -e postgres_ext search. docs = DocumentIndex.search('search term') for result in docs: print result.title # More complete example. docs = DocumentIndex.search( 'search term', weights={'title': 2.0, 'content': 1.0}, with_score=True search. docs = DocumentIndex.search('search term') for result in docs: print result.title # More complete example. docs = DocumentIndex.search( 'search term', 1.13. Playhouse, extensions to Peewee 890 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation Release 3.1.0all (except for read uncommitted) connections from accessing the database until the transaction is complete. Example specifying the locking mode: db = SqliteDatabase('app.db') with db.atomic('EXCLUSIVE'): BaseTestCase(unittest.TestCase): def setUp(self): # Bind model classes to test db. Since we have a complete list of # all models, we do not need to recursively bind dependencies. for model docs = DocumentIndex.search('search term') for result in docs: print(result.title) # More complete example. docs = DocumentIndex.search( 'search term', weights={'title': 2.0, 'content': 10 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation
Release 3.3.0(except for read uncommitted) connections from access- ing the database until the transaction is complete. Example specifying the locking mode: db = SqliteDatabase('app.db') with db.atomic('EXCLUSIVE'): BaseTestCase(unittest.TestCase): def setUp(self): # Bind model classes to test db. Since we have a complete list of # all models, we do not need to recursively bind dependencies. for model in MODELS: model search. docs = DocumentIndex.search('search term') for result in docs: print(result.title) # More complete example. docs = DocumentIndex.search( 'search term', weights={'title': 2.0, 'content': 1.0}, with_score=True0 码力 | 280 页 | 1.02 MB | 1 年前3
共 13 条
- 1
- 2













