 peewee Documentation Release 2.10.2every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database provides special features like: Virtual tables, virtual file-systems, Blob I/O, backups and file control. Connections can be shared across threads without any additional locking. Transactions are managed user='postgres') For even more control over initializing your database, see the next section, Dynamically defining a database. Dynamically defining a database For even more control over how your database is0 码力 | 275 页 | 276.96 KB | 1 年前3 peewee Documentation Release 2.10.2every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database provides special features like: Virtual tables, virtual file-systems, Blob I/O, backups and file control. Connections can be shared across threads without any additional locking. Transactions are managed user='postgres') For even more control over initializing your database, see the next section, Dynamically defining a database. Dynamically defining a database For even more control over how your database is0 码力 | 275 页 | 276.96 KB | 1 年前3
 peewee Documentation
Release 2.0.2incrementing integer • if you specify a primary key and it is anything else peewee assumes you are in control and will stay out of the way. The API for specifying a non-auto-incrementing primary key changed: I started with is the QueryCompiler and the data structures it uses. You can see it start to take shape in my first commit. It takes the data structures from peewee and spits out SQL. It works recursively rollback() raise else: db.commit() finally: db.set_autocommit(True) If you would like to manually control every transaction, simply turn autocommit off when instantiating your database: db = SqliteDatabase(’:memory:’0 码力 | 65 页 | 315.33 KB | 1 年前3 peewee Documentation
Release 2.0.2incrementing integer • if you specify a primary key and it is anything else peewee assumes you are in control and will stay out of the way. The API for specifying a non-auto-incrementing primary key changed: I started with is the QueryCompiler and the data structures it uses. You can see it start to take shape in my first commit. It takes the data structures from peewee and spits out SQL. It works recursively rollback() raise else: db.commit() finally: db.set_autocommit(True) If you would like to manually control every transaction, simply turn autocommit off when instantiating your database: db = SqliteDatabase(’:memory:’0 码力 | 65 页 | 315.33 KB | 1 年前3
 peewee Documentation Release 3.0.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database select(Facility.name, Facility.membercost) # To iterate: for facility in query: print(facility.name) Control which rows are retrieved Retrieve list of facilities that have a cost to members. SELECT * FROM FROM facilities WHERE membercost > 0 query = Facility.select().where(Facility.membercost > 0) Control which rows are retrieved - part 2 Retrieve list of facilities that have a cost to members, and that0 码力 | 319 页 | 361.50 KB | 1 年前3 peewee Documentation Release 3.0.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database select(Facility.name, Facility.membercost) # To iterate: for facility in query: print(facility.name) Control which rows are retrieved Retrieve list of facilities that have a cost to members. SELECT * FROM FROM facilities WHERE membercost > 0 query = Facility.select().where(Facility.membercost > 0) Control which rows are retrieved - part 2 Retrieve list of facilities that have a cost to members, and that0 码力 | 319 页 | 361.50 KB | 1 年前3
 peewee Documentation
Release 3.5.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database provides special features like: Virtual tables, virtual file-systems, Blob I/O, backups and file control. Connections can be shared across threads without any additional locking. Transactions are managed user='postgres') For even more control over initializing your database, see the next section, Dynamically defining a database. Dynamically defining a database For even more control over how your database is0 码力 | 347 页 | 380.80 KB | 1 年前3 peewee Documentation
Release 3.5.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database provides special features like: Virtual tables, virtual file-systems, Blob I/O, backups and file control. Connections can be shared across threads without any additional locking. Transactions are managed user='postgres') For even more control over initializing your database, see the next section, Dynamically defining a database. Dynamically defining a database For even more control over how your database is0 码力 | 347 页 | 380.80 KB | 1 年前3
 peewee Documentation Release 3.4.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database select(Facility.name, Facility.membercost) # To iterate: for facility in query: print(facility.name) Control which rows are retrieved Retrieve list of facilities that have a cost to members. SELECT * FROM FROM facilities WHERE membercost > 0 query = Facility.select().where(Facility.membercost > 0) Control which rows are retrieved - part 2 Retrieve list of facilities that have a cost to members, and that0 码力 | 349 页 | 382.34 KB | 1 年前3 peewee Documentation Release 3.4.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database select(Facility.name, Facility.membercost) # To iterate: for facility in query: print(facility.name) Control which rows are retrieved Retrieve list of facilities that have a cost to members. SELECT * FROM FROM facilities WHERE membercost > 0 query = Facility.select().where(Facility.membercost > 0) Control which rows are retrieved - part 2 Retrieve list of facilities that have a cost to members, and that0 码力 | 349 页 | 382.34 KB | 1 年前3
 peewee Documentation Release 3.1.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database select(Facility.name, Facility.membercost) # To iterate: for facility in query: print(facility.name) Control which rows are retrieved Retrieve list of facilities that have a cost to members. SELECT * FROM FROM facilities WHERE membercost > 0 query = Facility.select().where(Facility.membercost > 0) Control which rows are retrieved - part 2 Retrieve list of facilities that have a cost to members, and that0 码力 | 332 页 | 370.77 KB | 1 年前3 peewee Documentation Release 3.1.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database select(Facility.name, Facility.membercost) # To iterate: for facility in query: print(facility.name) Control which rows are retrieved Retrieve list of facilities that have a cost to members. SELECT * FROM FROM facilities WHERE membercost > 0 query = Facility.select().where(Facility.membercost > 0) Control which rows are retrieved - part 2 Retrieve list of facilities that have a cost to members, and that0 码力 | 332 页 | 370.77 KB | 1 年前3
 peewee Documentation Release 3.6.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database provides special features like: Virtual tables, virtual file-systems, Blob I/O, backups and file control. Connections can be shared across threads without any additional locking. Transactions are managed user='postgres') For even more control over initializing your database, see the next section, Dynamically defining a database. Dynamically defining a database For even more control over how your database is0 码力 | 377 页 | 399.12 KB | 1 年前3 peewee Documentation Release 3.6.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database provides special features like: Virtual tables, virtual file-systems, Blob I/O, backups and file control. Connections can be shared across threads without any additional locking. Transactions are managed user='postgres') For even more control over initializing your database, see the next section, Dynamically defining a database. Dynamically defining a database For even more control over how your database is0 码力 | 377 页 | 399.12 KB | 1 年前3
 peewee Documentation
Release 3.5.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database provides special features like: • Virtual tables, virtual file-systems, Blob I/O, backups and file control. • Connections can be shared across threads without any additional locking. • Transactions are user='postgres') For even more control over initializing your database, see the next section, Dynamically defining a database. 1.5.7 Dynamically defining a database For even more control over how your database0 码力 | 282 页 | 1.02 MB | 1 年前3 peewee Documentation
Release 3.5.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database provides special features like: • Virtual tables, virtual file-systems, Blob I/O, backups and file control. • Connections can be shared across threads without any additional locking. • Transactions are user='postgres') For even more control over initializing your database, see the next section, Dynamically defining a database. 1.5.7 Dynamically defining a database For even more control over how your database0 码力 | 282 页 | 1.02 MB | 1 年前3
 peewee Documentation
Release 3.4.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database select(Facility.name, Facility.membercost) # To iterate: for facility in query: print(facility.name) Control which rows are retrieved Retrieve list of facilities that have a cost to members. SELECT * FROM FROM facilities WHERE membercost > 0 query = Facility.select().where(Facility.membercost > 0) Control which rows are retrieved - part 2 Retrieve list of facilities that have a cost to members, and that0 码力 | 284 页 | 1.03 MB | 1 年前3 peewee Documentation
Release 3.4.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database select(Facility.name, Facility.membercost) # To iterate: for facility in query: print(facility.name) Control which rows are retrieved Retrieve list of facilities that have a cost to members. SELECT * FROM FROM facilities WHERE membercost > 0 query = Facility.select().where(Facility.membercost > 0) Control which rows are retrieved - part 2 Retrieve list of facilities that have a cost to members, and that0 码力 | 284 页 | 1.03 MB | 1 年前3
 peewee Documentation
Release 3.3.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database select(Facility.name, Facility.membercost) # To iterate: for facility in query: print(facility.name) Control which rows are retrieved Retrieve list of facilities that have a cost to members. SELECT * FROM FROM facilities WHERE membercost > 0 query = Facility.select().where(Facility.membercost > 0) Control which rows are retrieved - part 2 Retrieve list of facilities that have a cost to members, and that0 码力 | 280 页 | 1.02 MB | 1 年前3 peewee Documentation
Release 3.3.0every model to specify which database it uses. There are many Meta options you can specify which control the behavior of your model. This is a peewee idiom: DATABASE = 'tweepee.db' # Create a database select(Facility.name, Facility.membercost) # To iterate: for facility in query: print(facility.name) Control which rows are retrieved Retrieve list of facilities that have a cost to members. SELECT * FROM FROM facilities WHERE membercost > 0 query = Facility.select().where(Facility.membercost > 0) Control which rows are retrieved - part 2 Retrieve list of facilities that have a cost to members, and that0 码力 | 280 页 | 1.02 MB | 1 年前3
共 16 条
- 1
- 2














