Important: This documentation describes the underlying SQLite C library API, not the JavaScript API exposed by
@photostructure/sqlite. Most functions documented here (likesqlite3_config(),sqlite3_limit(),sqlite3_blob_open()) are not directly callable from JavaScript.For the JavaScript API, see API Reference.
This reference is for understanding the underlying SQLite capabilities and for developers working on the native bindings.
Main index for the SQLite C/C++ API documentation. The API is organized into logical sections for navigation. This is a machine-generated summary of documentation found on sqlite.org, used as a reference during development.
The SQLite C/C++ API provides low-level access to all SQLite functionality. This documentation covers the essential APIs needed for building SQLite library implementations.
Foundation APIs for basic database operations
Prepared statement and data handling
Custom functionality extensions
Specialized APIs for advanced use cases
System configuration and resource management
Getting started
sqlite3_open() - Open databasesqlite3_close() - Close databasesqlite3_exec() - Execute SQL directlysqlite3_errmsg() - Get error messagePrepared Statements
sqlite3_prepare_v2() - Compile SQLsqlite3_step() - Execute statementsqlite3_bind_*() - Bind parameterssqlite3_column_*() - Get resultssqlite3_finalize() - Clean up statementExtensions
sqlite3_create_function_v2() - Create custom functionsqlite3_create_collation_v2() - Create custom collationsqlite3_create_module_v2() - Create virtual tableConfiguration
sqlite3_config() - Global configurationsqlite3_db_config() - Database configurationsqlite3_limit() - Set runtime limitsAPI stability: SQLite maintains strong backward compatibility. Functions are rarely deprecated.
Thread safety: Configure threading mode with sqlite3_config() before using SQLite.
Error checking: Always check return codes. Most functions return SQLITE_OK on success.
Memory management: Understand ownership rules for strings and memory passed to/from SQLite.
Version compatibility: Use sqlite3_libversion() to check SQLite version at runtime.
When implementing a SQLite wrapper or binding: