Privex Python Database Wrappers
latest
Main:
Privex Python Database Wrappers (privex-db) documentation
Installing Privex Python DB Wrappers
Download and install from PyPi using pipenv / pip (recommended)
(Alternative) Manual install from Git
Examples / Basic Usage
Using the SQLite3 Manager + Query Builder
Basic / direct usage of SqliteWrapper
Using the query builder (SqliteQueryBuilder)
Sub-classing SqliteWrapper for your app
Using the query builder from your sub-class
Code Documentation:
privex.db.base
CursorManager
Methods
__init__
close
execute
fetchall
fetchmany
fetchone
Attributes
description
lastrowid
rowcount
DBExecution
Methods
Attributes
GenericDBWrapper
Methods
__init__
action
close_cursor
create_schema
create_schemas
drop_schemas
drop_table
drop_tables
fetch
fetchall
fetchone
get_cursor
list_tables
make_connection
query
recreate_schemas
table_exists
Attributes
AUTO_ZIP_COLS
DEFAULT_ENABLE_EXECUTION_LOG
DEFAULT_QUERY_MODE
DEFAULT_TABLE_LIST_QUERY
DEFAULT_TABLE_QUERY
SCHEMAS
conn
cursor
tables_created
privex.db.postgres
PostgresWrapper
Methods
__init__
builder
drop_table
last_insert_id
list_tables
query
table_exists
Attributes
AUTO_ZIP_COLS
DEFAULT_DB
DEFAULT_QUERY_MODE
DEFAULT_TABLE_LIST_QUERY
DEFAULT_TABLE_QUERY
conn
cursor_cls
cursor_map
privex.db.sqlite
SqliteWrapper
Methods
__init__
builder
Attributes
DEFAULT_DB
DEFAULT_DB_FOLDER
DEFAULT_DB_NAME
DEFAULT_TABLE_LIST_QUERY
DEFAULT_TABLE_QUERY
conn
privex.db.types
GenericConnection
Methods
__init__
close
commit
cursor
rollback
GenericCursor
Methods
__init__
close
execute
executemany
fetchall
fetchmany
fetchone
privex.db.query
privex.db.query.base
BaseQueryBuilder
Methods
__init__
all
build_query
close_cursor
execute
fetch
fetch_next
get_cursor
group_by
limit
order
order_by
select
where
where_or
Attributes
Q_DEFAULT_PLACEHOLDER
Q_GROUP_BY_CLAUSE
Q_LIMIT_CLAUSE
Q_OFFSET_CLAUSE
Q_ORDER_CLAUSE
Q_POST_QUERY
Q_PRE_QUERY
Q_SELECT_CLAUSE
Q_WHERE_CLAUSE
connection
cursor
QueryMode
Attributes
DEFAULT
ROW_DICT
ROW_TUPLE
privex.db.query.postgres
PostgresQueryBuilder
Methods
__init__
all
build_query
fetch
fetch_next
get_cursor
query_mode_cursor
select_date
Attributes
Q_DEFAULT_PLACEHOLDER
Q_PRE_QUERY
conn
cursor
privex.db.query.sqlite
SqliteQueryBuilder
Methods
all
build_query
fetch
fetch_next
Attributes
Q_DEFAULT_PLACEHOLDER
Q_PRE_QUERY
conn
connection
Unit Testing
How to use the unit tests
Testing pre-requisites
Running via PyTest
Running individual test modules
Unit Test List / Overview
tests.base
ExampleWrapper
Methods
__init__
Attributes
DEFAULT_DB
SCHEMAS
PrivexDBTestBase
Methods
setUp
tearDown
Attributes
User
Methods
Attributes
tests.test_postgres
BasePostgresTest
Methods
setUp
setUpClass
tearDown
Attributes
conn
ExamplePostgresWrapper
Methods
__init__
find_user
insert_user
Attributes
DEFAULT_DB
SCHEMAS
TestPostgresBuilder
Methods
test_all_call
test_generator_builder
test_group_call
test_index_builder
test_iterate_builder
test_query_all
test_query_select_col_where
test_query_select_col_where_group
test_query_select_col_where_order
test_query_where_first_name_last_name
test_where_call
Attributes
pytestmark
TestPostgresWrapper
Methods
test_action_update
test_find_user_dict_mode
test_find_user_nonexistent
test_get_users_dict
test_get_users_tuple
test_insert_find_user
test_tables_created
test_tables_drop
Attributes
pytestmark
tests.test_sqlite_builder
TestSQLiteBuilder
Methods
test_all_call
test_generator_builder
test_group_call
test_index_builder
test_iterate_builder
test_query_all
test_query_select_col_where
test_query_select_col_where_group
test_query_select_col_where_order
test_query_where_first_name_last_name
test_where_call
Attributes
tests.test_sqlite_wrapper
TestSQLiteWrapper
Methods
test_action_update
test_find_user_dict_mode
test_find_user_nonexistent
test_get_users_dict
test_get_users_tuple
test_insert_find_user
test_tables_created
test_tables_drop
Attributes
Privex Python Database Wrappers
Docs
»
<no title>
»
privex.db.types
»
GenericConnection
»
commit
Edit on GitHub
commit
¶
GenericConnection.
commit
(
*args
,
**kwargs
)
[source]
¶
Read the Docs
v: latest
Versions
latest
stable
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds
Free document hosting provided by
Read the Docs
.