The Virtual Table Mechanism Of SQLite
(vtab.html)
1.4. Creating New Virtual Table Implementations
Follow these steps to create your own virtual table:
Write all necessary methods.
Create an instance of the sqlite3_module structure containing pointers
to all the methods from step 1.
Register your sqlite3_module structure using one of the
sqlite3_create_module() or sqlite3_create_module_v2 ...
|
Database Object Name Resolution
(lang_naming.html)
... For example:
/* Add a table named 't1' to the temp, main and an attached database */
ATTACH 'file.db' AS aux;
CREATE TABLE t1(x, y);
CREATE TEMP TABLE t1(x, y);
CREATE TABLE aux.t1(x, y);
DROP TABLE t1 ...
|
DROP TRIGGER
(lang_droptrigger.html)
The DROP TRIGGER statement removes a trigger created by the
CREATE TRIGGER statement. Once removed, the trigger definition is no
longer present in the sqlite_schema (or sqlite_temp_schema) table and is
not fired by any subsequent INSERT, UPDATE or DELETE statements ...
|
Automatic Undo/Redo With SQLite
(undoredo.html)
... For example, suppose you wanted undo/redo on a class (table)
that looks like this:
CREATE TABLE ex1(a,b,c);
Triggers to record changes to table EX1 might look like this:
CREATE TEMP TRIGGER ex1_it AFTER INSERT ON ex1 ...
|
Temporary Files Used By SQLite
(tempfiles.html)
2.6. TEMP Databases
Tables created using the "CREATE TEMP TABLE" syntax are only
visible to the database connection in which the "CREATE TEMP TABLE"
statement is originally evaluated. These TEMP tables, together
with any associated indices, triggers, and views, are collectively
stored in ...
|
ALTER TABLE
(lang_altertable.html)
... Create new table
Copy data
Drop old table
Rename new into old
Rename old table
Create new table
Copy data
Drop old table
↑Correct
↑Incorrect
The 12-step generalized ALTER TABLE procedure
above will work even if the ...
|
Syntax Diagrams For SQLite
(syntaxdiagrams.html)
... Used by: common-table-expression create-table-stmt create-trigger-stmt create-view-stmt expr insert-stmt sql-stmt table-or-subquery   ...
|
CREATE VIEW
(lang_createview.html)
... Once the view is created, it can be used in the FROM clause
of another SELECT in place of a table name.
If the "TEMP" or "TEMPORARY" keyword occurs in between "CREATE"
and "VIEW" then the view that is created ...
|
INSERT
(lang_insert.html)
... INSERT INTO table VALUES(...);
The first form (with the "VALUES" keyword) creates one or more
new rows in
an existing table. If the column-name list after
table-name is omitted then the number
of values inserted into each row ...
|
The SQLite Zipfile Module
(zipfile.html)
3.2. Virtual Table Interface (read/write access)
In order to create or modify an existing zip file, a "zipfile" virtual
table must be created in the database schema. The CREATE VIRTUAL TABLE
statement expects a path to the zip file as its only argument. For example, to ...
|
Page generated by FTS5 in about 257.27 ms.