JavaScript is not enabled. It is needed for this website to work.
peewee 3.11.2 documentation
Index
Index
Table Of Contents
Installing and Testing
Installing with git
Running tests
Optional dependencies
Note on the SQLite extensions
Quickstart
Model Definition
Storing data
Retrieving Data
Getting single records
Lists of records
Sorting
Combining filter expressions
Aggregates and Prefetch
SQL Functions
Database
Working with existing databases
What next?
Example app
Running the example
Diving into the code
Models
Creating tables
Establishing a database connection
Making queries
Creating new objects
Performing subqueries
Other topics of interest
More examples
Using Peewee Interactively
Contributing
Patches
Bugs
Questions
Database
Initializing a Database
Using Postgresql
Isolation level
Using SQLite
PRAGMA statements
Recommended Settings
User-defined functions
Set locking mode for transaction
APSW, an Advanced SQLite Driver
Using MySQL
Error 2006: MySQL server has gone away
Connecting using a Database URL
Run-time database configuration
Dynamically defining a database
Setting the database at run-time
Connection Management
Using autoconnect
Thread Safety
Context managers
DB-API Connection Object
Connection Pooling
Testing Peewee Applications
Async with Gevent
Framework Integration
Flask
Django
Bottle
Web.py
Tornado
Wheezy.web
Falcon
Pyramid
CherryPy
Sanic
Other frameworks
Executing Queries
Managing Transactions
Context manager
Decorator
Nesting Transactions
Explicit transaction
Explicit Savepoints
Autocommit Mode
Database Errors
Logging queries
Adding a new Database Driver
Models and Fields
Fields
Field types table
Field initialization arguments
Some fields take special parameters…
Default field values
ForeignKeyField
ForeignKeyField Back-references
DateTimeField, DateField and TimeField
BitField and BigBitField
BareField
Creating a custom field
Field-naming conflicts
Creating model tables
Model options and table metadata
Meta.primary_key
Table Names
Indexes and Constraints
Single-column indexes and constraints
Multi-column indexes
Advanced Index Creation
Table constraints
Primary Keys, Composite Keys and other Tricks
Non-integer primary keys
Composite primary keys
Manually specifying primary keys
Models without a Primary Key
Self-referential foreign keys
Circular foreign key dependencies
Querying
Creating a new record
Bulk inserts
Inserting rows in batches
Alternatives
Bulk-loading from another table
Updating existing records
Atomic updates
Upsert
Deleting records
Selecting a single record
Create or get
Selecting multiple records
Iterating over large result-sets
Filtering records
More query examples
Sorting records
Getting random records
Paginating records
Counting records
Aggregating records
Retrieving Scalar Values
Window functions
Ordered Windows
Partitioned Windows
Bounded windows
Filtered Aggregates
Reusing Window Definitions
Multiple window definitions
Frame types: RANGE vs ROWS vs GROUPS
Retrieving row tuples / dictionaries / namedtuples
Returning Clause
Common Table Expressions
Simple Example
Complex Example
Recursive CTEs
Foreign Keys and Joins
Query operators
Three valued logic
Adding user-defined operators
Expressions
Row values
SQL Functions
Nesting function calls
SQL Helper
Security and SQL Injection
Relationships and Joins
Model definitions
Creating test data
Performing simple joins
Joining multiple tables
Selecting from multiple sources
More complex example
Subqueries
Common-table Expressions
Multiple foreign-keys to the same Model
Joining on arbitrary fields
Self-joins
Using model aliases
Using subqueries
Implementing Many to Many
ManyToManyField
Avoiding the N+1 problem
List recent tweets
List users and all their tweets
Using prefetch
API Documentation
Database
Query-builder
Fields
Schema Manager
Model
Query-builder Internals
Constants and Helpers
SQLite Extensions
Getting started
APIs
Additional Features
Playhouse, extensions to Peewee
Sqlite Extensions
SqliteQ
Transactions
Code sample
Sqlite User-Defined Functions
Functions, listed by collection name
apsw, an advanced sqlite driver
How to use the APSWDatabase
apsw_ext API notes
Sqlcipher backend
sqlcipher_ext API notes
Postgresql Extensions
JSON Support
hstore support
Using hstore
Interval support
Server-side cursors
Full-text search
postgres_ext API notes
MySQL Extensions
DataSet
Getting started
Storing data
Importing data
Using transactions
Inspecting the database
Reading data
Exporting data
API
Fields
Hybrid Attributes
Hybrid API
Key/Value Store
Shortcuts
Signal support
Connecting handlers
Signal API
pwiz, a model generator
Command-line options
pwiz examples
Schema Migrations
Example usage
Supported Operations
Migrations API
Reflection
Database URL
Connection pool
Pool APIs
Test Utils
Flask Utils
Database Wrapper
Database with Application Factory
Query utilities
Query Examples
Model Definitions
Schema Creation
Basic Exercises
Retrieve everything
Retrieve specific columns from a table
Control which rows are retrieved
Control which rows are retrieved - part 2
Basic string searches
Matching against multiple possible values
Classify results into buckets
Working with dates
Removing duplicates, and ordering results
Combining results from multiple queries
Simple aggregation
More aggregation
Joins and Subqueries
Retrieve the start times of members’ bookings
Work out the start times of bookings for tennis courts
Produce a list of all members who have recommended another member
Produce a list of all members, along with their recommender
Produce a list of all members who have used a tennis court
Produce a list of costly bookings
Produce a list of all members, along with their recommender, using no joins.
Produce a list of costly bookings, using a subquery
Modifying Data
Insert some data into a table
Insert multiple rows of data into a table
Insert calculated data into a table
Update some existing data
Update multiple rows and columns at the same time
Update a row based on the contents of another row
Delete all bookings
Delete a member from the cd.members table
Delete based on a subquery
Aggregation
Count the number of facilities
Count the number of expensive facilities
Count the number of recommendations each member makes.
List the total slots booked per facility
List the total slots booked per facility in a given month
List the total slots booked per facility per month
Find the count of members who have made at least one booking
List facilities with more than 1000 slots booked
Find the total revenue of each facility
Find facilities with a total revenue less than 1000
Output the facility id that has the highest number of slots booked
List the total slots booked per facility per month, part 2
List the total hours booked per named facility
List each member’s first booking after September 1st 2012
Produce a list of member names, with each row containing the total member count
Produce a numbered list of members
Output the facility id that has the highest number of slots booked, again
Rank members by (rounded) hours used
Find the top three revenue generating facilities
Classify facilities by value
Recursion
Find the upward recommendation chain for member ID 27
Query Builder
Declaring tables
Select queries
Insert queries
Update queries
Delete queries
Query Objects
More
Hacks
Optimistic Locking
Top object per group
Top N objects per group
Postgres lateral joins
Window functions
Other methods
Writing custom functions with SQLite
Date math
Changes in 3.0
Backwards-incompatible
Database
Model Meta options
Models
Fields
Querying
Removed Extensions
SQLite Extension
Postgresql Extension
Signals Extension
New stuff
SQLite
SQLite Extension
Installing and Testing
Installing with git
Running tests
Optional dependencies
Note on the SQLite extensions
Quickstart
Model Definition
Storing data
Retrieving Data
Getting single records
Lists of records
Sorting
Combining filter expressions
Aggregates and Prefetch
SQL Functions
Database
Working with existing databases
What next?
Example app
Running the example
Diving into the code
Models
Creating tables
Establishing a database connection
Making queries
Creating new objects
Performing subqueries
Other topics of interest
More examples
Using Peewee Interactively
Contributing
Patches
Bugs
Questions
Database
Initializing a Database
Using Postgresql
Isolation level
Using SQLite
PRAGMA statements
Recommended Settings
User-defined functions
Set locking mode for transaction
APSW, an Advanced SQLite Driver
Using MySQL
Error 2006: MySQL server has gone away
Connecting using a Database URL
Run-time database configuration
Dynamically defining a database
Setting the database at run-time
Connection Management
Using autoconnect
Thread Safety
Context managers
DB-API Connection Object
Connection Pooling
Testing Peewee Applications
Async with Gevent
Framework Integration
Flask
Django
Bottle
Web.py
Tornado
Wheezy.web
Falcon
Pyramid
CherryPy
Sanic
Other frameworks
Executing Queries
Managing Transactions
Context manager
Decorator
Nesting Transactions
Explicit transaction
Explicit Savepoints
Autocommit Mode
Database Errors
Logging queries
Adding a new Database Driver
Models and Fields
Fields
Field types table
Field initialization arguments
Some fields take special parameters…
Default field values
ForeignKeyField
ForeignKeyField Back-references
DateTimeField, DateField and TimeField
BitField and BigBitField
BareField
Creating a custom field
Field-naming conflicts
Creating model tables
Model options and table metadata
Meta.primary_key
Table Names
Indexes and Constraints
Single-column indexes and constraints
Multi-column indexes
Advanced Index Creation
Table constraints
Primary Keys, Composite Keys and other Tricks
Non-integer primary keys
Composite primary keys
Manually specifying primary keys
Models without a Primary Key
Self-referential foreign keys
Circular foreign key dependencies
Querying
Creating a new record
Bulk inserts
Inserting rows in batches
Alternatives
Bulk-loading from another table
Updating existing records
Atomic updates
Upsert
Deleting records
Selecting a single record
Create or get
Selecting multiple records
Iterating over large result-sets
Filtering records
More query examples
Sorting records
Getting random records
Paginating records
Counting records
Aggregating records
Retrieving Scalar Values
Window functions
Ordered Windows
Partitioned Windows
Bounded windows
Filtered Aggregates
Reusing Window Definitions
Multiple window definitions
Frame types: RANGE vs ROWS vs GROUPS
Retrieving row tuples / dictionaries / namedtuples
Returning Clause
Common Table Expressions
Simple Example
Complex Example
Recursive CTEs
Foreign Keys and Joins
Query operators
Three valued logic
Adding user-defined operators
Expressions
Row values
SQL Functions
Nesting function calls
SQL Helper
Security and SQL Injection
Relationships and Joins
Model definitions
Creating test data
Performing simple joins
Joining multiple tables
Selecting from multiple sources
More complex example
Subqueries
Common-table Expressions
Multiple foreign-keys to the same Model
Joining on arbitrary fields
Self-joins
Using model aliases
Using subqueries
Implementing Many to Many
ManyToManyField
Avoiding the N+1 problem
List recent tweets
List users and all their tweets
Using prefetch
API Documentation
Database
Query-builder
Fields
Schema Manager
Model
Query-builder Internals
Constants and Helpers
SQLite Extensions
Getting started
APIs
Additional Features
Playhouse, extensions to Peewee
Sqlite Extensions
SqliteQ
Transactions
Code sample
Sqlite User-Defined Functions
Functions, listed by collection name
apsw, an advanced sqlite driver
How to use the APSWDatabase
apsw_ext API notes
Sqlcipher backend
sqlcipher_ext API notes
Postgresql Extensions
JSON Support
hstore support
Using hstore
Interval support
Server-side cursors
Full-text search
postgres_ext API notes
MySQL Extensions
DataSet
Getting started
Storing data
Importing data
Using transactions
Inspecting the database
Reading data
Exporting data
API
Fields
Hybrid Attributes
Hybrid API
Key/Value Store
Shortcuts
Signal support
Connecting handlers
Signal API
pwiz, a model generator
Command-line options
pwiz examples
Schema Migrations
Example usage
Supported Operations
Migrations API
Reflection
Database URL
Connection pool
Pool APIs
Test Utils
Flask Utils
Database Wrapper
Database with Application Factory
Query utilities
Query Examples
Model Definitions
Schema Creation
Basic Exercises
Retrieve everything
Retrieve specific columns from a table
Control which rows are retrieved
Control which rows are retrieved - part 2
Basic string searches
Matching against multiple possible values
Classify results into buckets
Working with dates
Removing duplicates, and ordering results
Combining results from multiple queries
Simple aggregation
More aggregation
Joins and Subqueries
Retrieve the start times of members’ bookings
Work out the start times of bookings for tennis courts
Produce a list of all members who have recommended another member
Produce a list of all members, along with their recommender
Produce a list of all members who have used a tennis court
Produce a list of costly bookings
Produce a list of all members, along with their recommender, using no joins.
Produce a list of costly bookings, using a subquery
Modifying Data
Insert some data into a table
Insert multiple rows of data into a table
Insert calculated data into a table
Update some existing data
Update multiple rows and columns at the same time
Update a row based on the contents of another row
Delete all bookings
Delete a member from the cd.members table
Delete based on a subquery
Aggregation
Count the number of facilities
Count the number of expensive facilities
Count the number of recommendations each member makes.
List the total slots booked per facility
List the total slots booked per facility in a given month
List the total slots booked per facility per month
Find the count of members who have made at least one booking
List facilities with more than 1000 slots booked
Find the total revenue of each facility
Find facilities with a total revenue less than 1000
Output the facility id that has the highest number of slots booked
List the total slots booked per facility per month, part 2
List the total hours booked per named facility
List each member’s first booking after September 1st 2012
Produce a list of member names, with each row containing the total member count
Produce a numbered list of members
Output the facility id that has the highest number of slots booked, again
Rank members by (rounded) hours used
Find the top three revenue generating facilities
Classify facilities by value
Recursion
Find the upward recommendation chain for member ID 27
Query Builder
Declaring tables
Select queries
Insert queries
Update queries
Delete queries
Query Objects
More
Hacks
Optimistic Locking
Top object per group
Top N objects per group
Postgres lateral joins
Window functions
Other methods
Writing custom functions with SQLite
Date math
Changes in 3.0
Backwards-incompatible
Database
Model Meta options
Models
Fields
Querying
Removed Extensions
SQLite Extension
Postgresql Extension
Signals Extension
New stuff
SQLite
SQLite Extension
Index
_
|
A
|
B
|
C
|
D
|
E
|
F
|
G
|
H
|
I
|
J
|
K
|
L
|
M
|
N
|
O
|
P
|
Q
|
R
|
S
|
T
|
U
|
V
|
W
|
Y
|
Z
_
__add__() (BaseTable method)
(SelectQuery method)
__and__() (BaseTable method)
(SelectQuery method)
__contains__() (KeyValue method)
__delitem__() (KeyValue method)
__enter__() (Database method)
__getattr__() (Entity method)
__getitem__() (BaseQuery method)
(DataSet method)
(JSONField method)
(JSONPath method)
(KeyValue method)
__invert__() (ColumnBase method)
__iter__() (BaseQuery method)
(Model method)
__len__() (BaseQuery method)
(KeyValue method)
(Model method)
__mul__() (BaseTable method)
__or__() (BaseTable method)
(SelectQuery method)
__setitem__() (AliasManager method)
(KeyValue method)
__sub__() (BaseTable method)
(SelectQuery method)
_WriteQuery (built-in class)
A
add() (AliasManager method)
(ManyToManyField method)
add_column() (SchemaMigrator method)
add_constraint() (SchemaMigrator method)
add_index() (Model class method)
(SchemaMigrator method)
add_not_null() (SchemaMigrator method)
add_unique() (SchemaMigrator method)
aggregate() (SqliteDatabase method)
Alias (built-in class)
alias() (Alias method)
(ColumnBase method)
(Model class method)
(Source method)
(Window method)
AliasManager (built-in class)
all() (Table method)
alter_column_type() (SchemaMigrator method)
ancestors() (BaseClosureTable method)
APSWDatabase (built-in class)
ArrayField (built-in class)
as_groups() (Window method)
as_range() (Window method)
as_rows() (Window method)
Asc()
built-in function
asc() (ColumnBase method)
AsIs()
built-in function
assert_query_count()
built-in function
atomic() (Database method)
attach() (SqliteDatabase method)
attach_callback() (Proxy method)
autocommit (CSqliteExtDatabase attribute)
AutoField (built-in class)
AutoIncrementField (built-in class)
avgrange()
built-in function
avgtdiff()
built-in function
B
backup() (CSqliteExtDatabase method)
backup_to_file() (CSqliteExtDatabase method)
BareField (built-in class)
BaseClosureTable (built-in class)
BaseQuery (built-in class)
BaseTable (built-in class)
batch_commit() (Database method)
begin() (Database method)
BigAutoField (built-in class)
BigBitField (built-in class)
BigIntegerField (built-in class)
BinaryJSONField (built-in class)
BinaryUUIDField (built-in class)
bind() (BaseQuery method)
(Database method)
(Model class method)
(Table method)
bind_ctx() (Database method)
(Model class method)
(Table method)
BitField (built-in class)
Blob (built-in class)
blob_open() (CSqliteExtDatabase method)
BlobField (built-in class)
bm25() (FTS5Model class method)
(FTSModel class method)
bm25f() (FTSModel class method)
BooleanField (built-in class)
built-in function
Asc()
AsIs()
assert_query_count()
avgrange()
avgtdiff()
Case()
Check()
chunked()
clear_settings()
clear_toggles()
ClosureTable()
CommaNodeList()
connect()
damerau_levenshtein_dist()
date_series()
Desc()
dict_to_model()
duration()
EnclosedNodeList()
file_ext()
file_read()
fn()
gauss_distribution()
generate_models()
get_object_or_404()
gunzip()
gzip()
hostname()
humandelta()
if_then_else()
levenshtein_dist()
Match()
,
[1]
median()
migrate()
minrange()
mintdiff()
mode()
model_to_dict()
object_list()
parse()
prefetch()
print_model()
print_table_sql()
randomrange()
range()
regex_search()
register_database()
ServerSide()
setting()
sqrt()
str_dist()
strip_chars()
strip_tz()
substr_count()
toggle()
tonumber()
update_model_from_dict()
bulk_create() (Model class method)
bulk_update() (Model class method)
C
cache_size (SqliteDatabase attribute)
Case()
built-in function
Cast (built-in class)
cast() (ColumnBase method)
changes() (CSqliteExtDatabase method)
CharField (built-in class)
Check()
built-in function
children() (JSONField method)
(JSONPath method)
chunked()
built-in function
clear() (KeyValue method)
(ManyToManyField method)
clear_bit() (BigBitField method)
clear_settings()
built-in function
clear_toggles()
built-in function
close() (Blob method)
(Database method)
(DataSet method)
close_all() (PooledDatabase method)
close_idle() (PooledDatabase method)
close_stale() (PooledDatabase method)
ClosureTable()
built-in function
coerce() (Field method)
(Function method)
collate() (Ordering method)
collation() (SqliteDatabase method)
Column (built-in class)
column (Field attribute)
ColumnBase (built-in class)
columns (Table attribute)
(TableFunction attribute)
columns() (Select method)
(ValuesList method)
CommaNodeList()
built-in function
commit() (Database method)
CompositeKey (built-in class)
CompoundSelectQuery (built-in class)
CompressedField (built-in class)
concat() (BinaryJSONField method)
conflict_constraint() (OnConflict method)
conflict_target() (OnConflict method)
conflict_where() (OnConflict method)
connect()
built-in function
connect() (Database method)
(DataSet method)
(Signal method)
connection() (Database method)
connection_context() (Database method)
contained_by() (BinaryJSONField method)
contains() (ArrayField method)
(BinaryJSONField method)
(HStoreField method)
contains_all() (BinaryJSONField method)
contains_any() (ArrayField method)
(BinaryJSONField method)
(HStoreField method)
Context (built-in class)
copy() (Node static method)
count (count_queries attribute)
count() (SelectBase method)
count_queries (built-in class)
create() (Model class method)
create_all() (SchemaManager method)
create_foreign_key() (SchemaManager method)
create_index() (Table method)
create_indexes() (SchemaManager method)
create_sequence() (SchemaManager method)
create_table() (Model class method)
(SchemaManager method)
create_tables() (Database method)
CSqliteExtDatabase (built-in class)
CTE (built-in class)
cte() (SelectQuery method)
CURRENT_ROW (Window attribute)
cursor() (Database method)
D
damerau_levenshtein_dist()
built-in function
Database (built-in class)
DatabaseProxy (built-in class)
DataSet (built-in class)
date_series()
built-in function
DateField (built-in class)
DateTimeField (built-in class)
DateTimeTZField (built-in class)
day (DateField attribute)
(DateTimeField attribute)
db_value() (Field method)
DecimalField (built-in class)
DeferredForeignKey (built-in class)
DeferredThroughModel (built-in class)
defined() (HStoreField method)
Delete (built-in class)
delete() (HStoreField method)
(Model class method)
(Table method)
,
[1]
delete_by_id() (Model class method)
delete_instance() (Model method)
dependencies() (Model method)
depth (BaseClosureTable attribute)
Desc()
built-in function
desc() (ColumnBase method)
descendants() (BaseClosureTable method)
detach() (SqliteDatabase method)
dict_to_model()
built-in function
dicts() (BaseQuery method)
dirty_fields (Model attribute)
disconnect() (Signal method)
distinct() (Select method)
DocIDField (built-in class)
DoubleField (built-in class)
DQ (built-in class)
drop_all() (SchemaManager method)
drop_column() (SchemaMigrator method)
drop_constraint() (SchemaMigrator method)
drop_index() (SchemaMigrator method)
drop_indexes() (SchemaManager method)
drop_not_null() (SchemaMigrator method)
drop_sequence() (SchemaManager method)
drop_table() (Model class method)
(SchemaManager method)
drop_tables() (Database method)
duration()
built-in function
E
EnclosedNodeList()
built-in function
Entity (built-in class)
except_() (SelectQuery method)
exclude() (Window method)
EXCLUDED (built-in class)
execute() (BaseQuery method)
(Database method)
execute_sql() (Database method)
exists() (HStoreField method)
(SelectBase method)
Expression (built-in class)
expression() (hybrid_method method)
extends() (Window method)
extract_date() (Database method)
F
Field (built-in class)
file_ext()
built-in function
file_read()
built-in function
filter() (Function method)
(Model class method)
(ModelSelect method)
find() (Table method)
find_one() (Table method)
first() (SelectBase method)
FixedCharField (built-in class)
flag() (BitField method)
FloatField (built-in class)
fn()
built-in function
following() (Window static method)
for_update() (Select method)
foreign_keys (SqliteDatabase attribute)
ForeignKeyField (built-in class)
freeze() (DataSet method)
(Table method)
from_() (Select method)
(Update method)
from_database() (Introspector class method)
fts5_installed() (FTS5Model class method)
FTS5Model (built-in class)
FTSModel (built-in class)
func() (SqliteDatabase method)
Function (built-in class)
G
gauss_distribution()
built-in function
generate_models()
built-in function
generate_models() (Introspector method)
get() (AliasManager method)
(KeyValue method)
(Model class method)
(SelectBase method)
get_by_id() (Model class method)
get_columns() (Database method)
get_foreign_keys() (Database method)
get_id() (Model method)
get_indexes() (Database method)
get_object_list() (PaginatedQuery method)
get_object_or_404()
built-in function
get_or_create() (Model class method)
get_or_none() (Model class method)
get_page() (PaginatedQuery method)
get_page_count() (PaginatedQuery method)
get_primary_keys() (Database method)
get_queries() (count_queries method)
get_tables() (Database method)
get_through_model() (ManyToManyField method)
get_views() (Database method)
GROUP (Window attribute)
group_by() (Select method)
group_by_extend() (Select method)
GROUPS (Window attribute)
gunzip()
built-in function
gzip()
built-in function
H
has_key() (BinaryJSONField method)
having() (Select method)
hostname()
built-in function
hour (DateTimeField attribute)
(TimeField attribute)
HStoreField (built-in class)
humandelta()
built-in function
hybrid_method (built-in class)
hybrid_property (built-in class)
I
id (BaseClosureTable attribute)
IdentityField (built-in class)
if_then_else()
built-in function
in_transaction() (Database method)
Index (built-in class)
index() (Model class method)
init() (Database method)
initialize() (Proxy method)
(TableFunction method)
Insert (built-in class)
insert() (Model class method)
(Table method)
,
[1]
insert_from() (Model class method)
insert_many() (Model class method)
IntegerField (built-in class)
intersect() (SelectQuery method)
IntervalField (built-in class)
Introspector (built-in class)
IPField (built-in class)
is_alias() (Node method)
is_closed() (Database method)
is_dirty() (Model method)
is_set() (BigBitField method)
items() (HStoreField method)
(KeyValue method)
iterate() (TableFunction method)
iterator() (BaseQuery method)
J
Join (built-in class)
join() (ModelSelect method)
(Select method)
(Source method)
join_from() (ModelSelect method)
journal_mode (SqliteDatabase attribute)
journal_size_limit (SqliteDatabase attribute)
json_type() (JSONField method)
(JSONPath method)
JSONField (built-in class)
,
[1]
,
[2]
JSONPath (built-in class)
K
keys() (HStoreField method)
(KeyValue method)
KeyValue (built-in class)
L
last_insert_id() (Database method)
left_outer_join() (Source method)
length() (JSONField method)
(JSONPath method)
levenshtein_dist()
built-in function
limit() (Query method)
literal() (Context method)
load_extension() (SqliteDatabase method)
LSMTable (built-in class)
lucene() (FTSModel class method)
M
manual_close() (PooledDatabase method)
manual_commit() (Database method)
ManyToManyField (built-in class)
map_models() (SubclassAwareMetadata method)
Match()
built-in function
,
[1]
match() (FTSModel class method)
(SearchField method)
(TSVectorField method)
median()
built-in function
Metadata (built-in class)
migrate()
built-in function
minrange()
built-in function
mintdiff()
built-in function
minute (DateTimeField attribute)
(TimeField attribute)
mmap_size (SqliteDatabase attribute)
mode()
built-in function
Model (built-in class)
model (Field attribute)
model_class (Table attribute)
model_graph() (Metadata method)
model_to_dict()
built-in function
ModelAlias (built-in class)
ModelIndex (built-in class)
ModelSelect (built-in class)
month (DateField attribute)
(DateTimeField attribute)
MySQLDatabase (built-in class)
MySQLMigrator (built-in class)
N
name (Field attribute)
(TableFunction attribute)
namedtuples() (BaseQuery method)
Negated (built-in class)
NO_OTHERS (Window attribute)
Node (built-in class)
NodeList (built-in class)
O
object_list()
built-in function
objects() (BaseQuery method)
(ModelSelect method)
offset() (Query method)
on() (Join method)
on_commit() (CSqliteExtDatabase method)
on_conflict() (Insert method)
on_conflict_ignore() (Insert method)
on_conflict_replace() (Insert method)
on_rollback() (CSqliteExtDatabase method)
on_update() (CSqliteExtDatabase method)
OnConflict (built-in class)
optimize() (FTSModel class method)
order_by() (Query method)
order_by_extend() (Query method)
Ordering (built-in class)
orwhere() (Query method)
over() (Function method)
P
page_size (SqliteDatabase attribute)
paginate() (Query method)
PaginatedQuery (built-in class)
params (TableFunction attribute)
parentheses (Context attribute)
parse()
built-in function
parse() (Context method)
peek() (SelectBase method)
PickleField (built-in class)
PooledDatabase (built-in class)
PooledMySQLDatabase (built-in class)
PooledPostgresqlDatabase (built-in class)
PooledPostgresqlExtDatabase (built-in class)
PooledSqliteDatabase (built-in class)
PooledSqliteExtDatabase (built-in class)
pop() (AliasManager method)
(KeyValue method)
PostgresqlDatabase (built-in class)
PostgresqlExtDatabase (built-in class)
PostgresqlMigrator (built-in class)
pragma() (SqliteDatabase method)
preceding() (Window static method)
prefetch()
built-in function
prefetch() (ModelSelect method)
preserve() (OnConflict method)
print_model()
built-in function
print_table_sql()
built-in function
Proxy (built-in class)
push() (AliasManager method)
python_value() (Field method)
(Function method)
Q
Query (built-in class)
query() (Context method)
(DataSet method)
R
random() (Database method)
randomrange()
built-in function
RANGE (Window attribute)
range()
built-in function
rank() (FTS5Model class method)
(FTSModel class method)
raw() (Model class method)
RawQuery (built-in class)
read() (Blob method)
read_uncommitted (SqliteDatabase attribute)
rebuild() (FTSModel class method)
regex_search()
built-in function
register() (TableFunction class method)
register_aggregate() (SqliteDatabase method)
register_collation() (SqliteDatabase method)
register_database()
built-in function
register_function() (SqliteDatabase method)
register_module() (APSWDatabase method)
register_window_function() (SqliteDatabase method)
rekey() (SqlCipherDatabase method)
remove() (BinaryJSONField method)
(JSONField method)
(JSONPath method)
(ManyToManyField method)
rename_column() (SchemaMigrator method)
rename_table() (SchemaMigrator method)
reopen() (Blob method)
replace() (Model class method)
(Table method)
replace_many() (Model class method)
returning() (_WriteQuery method)
rollback() (Database method)
root (BaseClosureTable attribute)
RowIDField (built-in class)
ROWS (Window attribute)
rows_affected() (Database method)
S
safe() (Index method)
save() (Model method)
savepoint() (Database method)
scalar() (SelectBase method)
SchemaManager (built-in class)
SchemaMigrator (built-in class)
scope (Context attribute)
scope_column() (Context method)
scope_cte() (Context method)
scope_normal() (Context method)
scope_source() (Context method)
scope_values() (Context method)
search() (FTS5Model class method)
(FTSModel class method)
search_bm25() (FTS5Model class method)
(FTSModel class method)
search_bm25f() (FTSModel class method)
search_lucene() (FTSModel class method)
SearchField (built-in class)
second (DateTimeField attribute)
(TimeField attribute)
seek() (Blob method)
Select (built-in class)
select() (Model class method)
(Select method)
(Source method)
(Table method)
select_extend() (Select method)
select_from() (CTE method)
(SelectQuery method)
SelectBase (built-in class)
SelectQuery (built-in class)
send() (Signal method)
sequence_exists() (Database method)
ServerSide()
built-in function
session_commit() (Database method)
session_rollback() (Database method)
session_start() (Database method)
set() (JSONField method)
(JSONPath method)
set_bit() (BigBitField method)
set_by_id() (Model class method)
set_database() (Metadata method)
set_search_path() (PostgresqlMigrator method)
set_table_name() (Metadata method)
set_time_zone() (PostgresqlDatabase method)
setting()
built-in function
siblings() (BaseClosureTable method)
Signal (built-in class)
slice() (HStoreField method)
SmallIntegerField (built-in class)
Source (built-in class)
SQL (built-in class)
sql() (BaseQuery method)
(Context method)
SqlCipherDatabase (built-in class)
SqliteDatabase (built-in class)
SqliteExtDatabase (built-in class)
SqliteMigrator (built-in class)
sqrt()
built-in function
State (built-in class)
str_dist()
built-in function
strip_chars()
built-in function
strip_tz()
built-in function
SubclassAwareMetadata (built-in class)
subquery (Context attribute)
substr_count()
built-in function
switch() (ModelSelect method)
synchronous (SqliteDatabase attribute)
T
Table (built-in class)
,
[1]
table (Metadata attribute)
table_exists() (Database method)
(Model class method)
table_function() (SqliteDatabase method)
TableFunction (built-in class)
tables (DataSet attribute)
tell() (Blob method)
TextField (built-in class)
thaw() (DataSet method)
(Table method)
through_model (ManyToManyField attribute)
TIES (Window attribute)
TimeField (built-in class)
timeout (SqliteDatabase attribute)
TimestampField (built-in class)
to_timestamp() (DateField method)
(DateTimeField method)
toggle()
built-in function
toggle_bit() (BigBitField method)
tonumber()
built-in function
transaction() (Database method)
(DataSet method)
(SqliteDatabase method)
tree() (JSONField method)
(JSONPath method)
truncate() (DateField method)
(DateTimeField method)
truncate_date() (Database method)
truncate_table() (Model method)
(SchemaManager method)
TSVectorField (built-in class)
Tuple (built-in class)
tuples() (BaseQuery method)
U
union() (SelectQuery method)
union_all() (CTE method)
(SelectQuery method)
unregister_aggregate() (SqliteDatabase method)
unregister_collation() (SqliteDatabase method)
unregister_function() (SqliteDatabase method)
unregister_module() (APSWDatabase method)
unregister_table_function() (SqliteDatabase method)
unwrap() (Node method)
Update (built-in class)
update() (HStoreField method)
(JSONField method)
(JSONPath method)
(KeyValue method)
(Model class method)
(OnConflict method)
(Table method)
,
[1]
update_model_from_dict()
built-in function
using() (Index method)
UUIDField (built-in class)
V
Value (built-in class)
values() (HStoreField method)
(KeyValue method)
ValuesList (built-in class)
VirtualModel (built-in class)
VocabModel() (FTS5Model class method)
W
wal_autocheckpoint (SqliteDatabase attribute)
where() (Index method)
(OnConflict method)
(Query method)
Window (built-in class)
window() (Select method)
window_function() (SqliteDatabase method)
with_cte() (Query method)
write() (Blob method)
Y
year (DateField attribute)
(DateTimeField attribute)
Z
ZeroBlob (built-in class)