peewee Documentation Release 0.9.7
Updating existing records Once a model instance has a primary key, any attempt to re-save it will result in an UPDATE rather than another INSERT: >>> blog.save() >>> blog.id 2 >>> blog.save() >>> blog arguments). This method is a shortcut that calls Model.select() with the given query, but limits the result set to 1. Additionally, if no model matches the given query, a DoesNotExist exception will be raised to iterate without caching each model returned, using much less memory when iterating over large result sets: # let's assume we've got 1M stat objects to dump to csv stats_qr = Stat.select().execute()0 码力 | 78 页 | 143.68 KB | 1 年前3peewee Documentation Release 0.9.7
Updating existing records Once a model instance has a primary key, any attempt to re-save it will result in an UPDATE rather than another INSERT: >>> blog.save() >>> blog.id 2 >>> blog.save() >>> blog arguments). This method is a shortcut that calls Model.select() with the given query, but limits the result set to 1. Addition- ally, if no model matches the given query, a DoesNotExist exception will be raised to iterate without caching each model returned, using much less memory when iterating over large result sets: # let’s assume we’ve got 1M stat objects to dump to csv stats_qr = Stat.select().execute()0 码力 | 53 页 | 347.03 KB | 1 年前3peewee Documentation Release 1.0.0
Updating existing records Once a model instance has a primary key, any attempt to re-save it will result in an UPDATE rather than another INSERT: >>> blog.save() >>> blog.id 2 >>> blog.save() >>> blog arguments). This method is a shortcut that calls Model.select() with the given query, but limits the result set to 1. Additionally, if no model matches the given query, a DoesNotExist exception will be raised to iterate without caching each model returned, using much less memory when iterating over large result sets: # let's assume we've got 1M stat objects to dump to csv stats_qr = Stat.select().execute()0 码力 | 101 页 | 163.20 KB | 1 年前3peewee Documentation Release 1.0.0
Updating existing records Once a model instance has a primary key, any attempt to re-save it will result in an UPDATE rather than another INSERT: >>> blog.save() >>> blog.id 2 >>> blog.save() 1.3. Peewee arguments). This method is a shortcut that calls Model.select() with the given query, but limits the result set to 1. Addition- ally, if no model matches the given query, a DoesNotExist exception will be raised to iterate without caching each model returned, using much less memory when iterating over large result sets: # let’s assume we’ve got 1M stat objects to dump to csv stats_qr = Stat.select().execute()0 码力 | 71 页 | 405.29 KB | 1 年前3peewee Documentation Release 3.5.0
implementations of the SQLite date manipulation functions, the REGEXP operator, and full-text search result ranking algorithms. Installing with git The project is hosted at https://github.com/coleifer/peewee Database.close() method: >>> db.close() True Calling close() on an already-closed connection will not result in an exception, but will return False: >>> db.connect() # Open connection. True >>> db.close() Database object safe to use with multiple threads. Each thread will have it’s own connection, and as a result any given thread will only have a single connection open at a given time. Context managers The0 码力 | 347 页 | 380.80 KB | 1 年前3peewee Documentation Release 3.5.0
implementations of the SQLite date manipulation functions, the REG- EXP operator, and full-text search result ranking algorithms. 1.1.1 Installing with git The project is hosted at https://github.com/coleifer/peewee Database.close() method: >>> db.close() True Calling close() on an already-closed connection will not result in an exception, but will return False: >>> db.connect() # Open connection. True >>> db.close() Database object safe to use with multiple threads. Each thread will have it’s own connection, and as a result any given thread will only have a single connection open at a given time. 28 Chapter 1. Contents:0 码力 | 282 页 | 1.02 MB | 1 年前3peewee Documentation Release 3.4.0
implementations of the SQLite date manipulation functions, the REGEXP operator, and full-text search result ranking algorithms. Installing with git The project is hosted at https://github.com/coleifer/peewee Database.close() method: >>> db.close() True Calling close() on an already-closed connection will not result in an exception, but will return False: >>> db.connect() # Open connection. True >>> db.close() wait_write(conn.fileno(), timeout=timeout) else: raise ValueError('poll() returned unexpected result') SQLite, because it is embedded in the Python application itself, does not do any socket operations0 码力 | 349 页 | 382.34 KB | 1 年前3peewee Documentation Release 3.4.0
implementations of the SQLite date manipulation functions, the REG- EXP operator, and full-text search result ranking algorithms. 1.1.1 Installing with git The project is hosted at https://github.com/coleifer/peewee Database.close() method: >>> db.close() True Calling close() on an already-closed connection will not result in an exception, but will return False: >>> db.connect() # Open connection. True >>> db.close() POLL_WRITE: wait_write(conn.fileno(), timeout=timeout) else: raise ValueError('poll() returned unexpected result') SQLite, because it is embedded in the Python application itself, does not do any socket operations0 码力 | 284 页 | 1.03 MB | 1 年前3peewee Documentation Release 3.6.0
implementations of the SQLite date manipulation functions, the REGEXP operator, and full-text search result ranking algorithms. Installing with git The project is hosted at https://github.com/coleifer/peewee Database.close() method: >>> db.close() True Calling close() on an already-closed connection will not result in an exception, but will return False: >>> db.connect() # Open connection. True >>> db.close() Database object safe to use with multiple threads. Each thread will have it’s own connection, and as a result any given thread will only have a single connection open at a given time. Context managers The0 码力 | 377 页 | 399.12 KB | 1 年前3peewee Documentation Release 3.6.0
implementations of the SQLite date manipulation functions, the REG- EXP operator, and full-text search result ranking algorithms. 1.1.1 Installing with git The project is hosted at https://github.com/coleifer/peewee Database.close() method: >>> db.close() True Calling close() on an already-closed connection will not result in an exception, but will return False: >>> db.connect() # Open connection. True >>> db.close() Database object safe to use with multiple threads. Each thread will have it’s own connection, and as a result any given thread will only have a single connection open at a given time. Context managers The0 码力 | 302 页 | 1.02 MB | 1 年前3
共 16 条
- 1
- 2