diff --git a/doc/db.html b/doc/db.html index 3cf2c4e..e490791 100644 --- a/doc/db.html +++ b/doc/db.html @@ -156,9 +156,9 @@
-db = Database("test.db") ++table = db.get_memory_table("sample_table")Database abstraction layer
Nexus uses a custom abstraction layer for SQLite database operations. It has a NoSQL-like API, meaning that objects work like dicts or lists where possible and appropriate.The abstraction layer can be used by importing nexus.core.db.Important: All tables that this abstraction layer is used for, must have a ROWID alias named id.Table of contents
- Database([filename]) Creates a new Database connection representing an SQLite database with the given...
- Database.setup() Attempts to set up the tables needed for Nexus in the database. If the tables...
- Database.query(query[, params=params]) Runs a custom query against the database, and returns an sqlite3.cursor object,...
- Database[table_name] Retrieves a DatabaseTable object representing the table in the database with the... (also: Database.get_database_table(table_name))
- Database.get_memory_table(table_name) Retrieves a MemoryTable object representing the specified table. A MemoryTable,...
- DatabaseTable[row_id] Retrieves a Row object representing the row in the table with the specified... (also: MemoryTable[row_id])
- DatabaseTable[row_id] = row Inserts a new row into the database. This can not be used to edit an... (also: MemoryTable[row_id] = row)
- DatabaseTable.append(row) Inserts a new row into the table, and lets SQLite assign it an identifier. This... (also: MemoryTable.append(row))
- DatabaseTable.purge() Purges the internal row cache of a DatabaseTable.
- MemoryTable.refresh() Replaces the current copy of the table in memory, with a newly retrieved copy....
- Row() Creates a new Row object. You'll only need to use this if you want to insert a...
- Row[column_name] Returns the value of the specified column in the row.
- Row[column_name] = value Sets (or changes) the data for the given column in the row.
- Row.commit() Process all changes you have made to the column data for the row. This will run...
- Row.rollback() Cancels all the changes you have made to the column data for the row, and...