The Session Extension
(sessionintro.html)
3.1. Capturing a Changeset
... Pointer to changeset blob */
){
sqlite3_session *pSession = 0;
int rc;
/* Create a new session object */
rc = sqlite3session_create(db, "main", &pSession);
/* Configure the session object to record changes to all tables */
if( rc==SQLITE_OK ) rc = sqlite3session_attach(pSession, NULL);
/* Execute the SQL script ...
|
C API: SQL Keyword Checking
(c3ref/keyword_check.html)
sqlite3_keyword_count(), sqlite3_keyword_name(), sqlite3_keyword_check()
... For example, the statement
"CREATE TABLE BEGIN(REPLACE,PRAGMA,END);" is accepted by SQLite, and
creates a new table named "BEGIN" with three columns named
"REPLACE", "PRAGMA", and "END". Nevertheless, best practice is to avoid
using keywords as identifiers. Common ...
|
SQL Features That SQLite Does Not Implement
(omitted.html)
... Complete ALTER TABLE support
Only the RENAME TABLE, ADD COLUMN, RENAME COLUMN, and DROP COLUMN
variants of the ALTER TABLE command are supported. Other kinds of
ALTER TABLE operations such as
ALTER COLUMN, ADD CONSTRAINT, and so forth are ...
|
Application-Defined SQL Functions
(appfunc.html)
3. Security Implications
... ALTER TABLE tab1 RENAME TO tab1_real;
CREATE VIEW tab1 AS SELECT * FROM tab1 WHERE system('rm -rf *') IS NOT NULL;
Then, when the application attempts to open the database, register the
system() function, then run an innocent query against the ...
|
DELETE
(lang_delete.html)
... Restrictions on DELETE Statements Within CREATE TRIGGER
The following restrictions apply to DELETE statements that occur within the
body of a CREATE TRIGGER statement:
The table-name specified as part of a
DELETE statement within
a trigger body must be ...
|
The SQLITE_MEMSTAT Virtual Table
(memstat.html)
2. Usage
... The SQLITE_MEMSTAT table appears to have the following schema:
CREATE TABLE sqlite_memstat(
name TEXT,
schema TEXT,
value INT,
hiwtr INT
);
Each row of the SQLITE_MEMSTAT table corresponds to a single call to
one of the sqlite3_status64() or sqlite3_db_status() interfaces.
The ...
|
C API: Convenience Routines For Running Queries
(c3ref/free_table.html)
sqlite3_get_table(), sqlite3_free_table()
... A result table is memory data structure created by the
sqlite3_get_table() interface. A result table records the
complete query results from one or more queries.
The table conceptually has a number of rows and columns. But
these numbers are not ...
|
C API: Database Connection Configuration Options
(c3ref/c_dbconfig_defensive.html)
SQLITE_DBCONFIG_MAINDBNAME, SQLITE_DBCONFIG_LOOKASIDE, SQLITE_DBCONFIG_ENABLE_FKEY, SQLITE_DBCONFIG_ENABLE_TRIGGER, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION ...
... SQLITE_DBCONFIG_DQS_DDL
The SQLITE_DBCONFIG_DQS option activates or deactivates
the legacy double-quoted string literal misfeature for DDL statements,
such as CREATE TABLE and CREATE INDEX. The
default value of this setting is determined by the -DSQLITE_DQS
compile-time option.
SQLITE_DBCONFIG_TRUSTED_SCHEMA
The ...
|
An Introduction To The SQLite C/C++ Interface
(cintro.html)
8. Extending SQLite
... sqlite3_create_collation()
sqlite3_create_function()
sqlite3_create_module()
sqlite3_vfs_register()
The sqlite3_create_collation() interface is used to create new
collating sequences for sorting text.
The sqlite3_create_module() interface is used to register new
virtual table implementations.
The sqlite3_vfs_register() interface creates new VFSes.
The sqlite3_create_function() interface creates new SQL ...
|
Query Planning
(queryplanner.html)
1.1. Tables Without Indices
... CREATE TABLE FruitsForSale(
Fruit TEXT,
State TEXT,
Price REAL
);
With some (arbitrary) data, such a table might be logically stored on disk
as shown in figure 1:
Figure 1: Logical Layout Of Table "FruitsForSale"
In this example, the rowids are ...
|
Page generated by FTS5 in about 241.82 ms.