sqlite library

Classes

DatabaseUpgrader
A mixin whose methods are invoked by the scheme migration as callbacks.
FtsInside
A helper class for composing an inclusive FTS column filter.
FtsNear
A helper class for composing FTS NEAR groups.
FtsOutside
A helper class for composing an exclusive FTS column filter.
FtsPhrase
A helper class for composing FTS phrases.
FtsQuery
A base helper class for composing FTS queries.
FtsSide
A base helper class for composing FTS column filters.
FullId
A subclass of SqlId that has both rowid and keyid unique identifiers.
IndexColumn
A description used within a PartialIndex to define column indexing.
KeyId
A subclass of SqlId that has only the keyid unique identifier.
PagedResult
An Iterable that can be iterated over pages of rows.
PagedResultIterator
An Iterator that can iterate over pages of rows.
PartialIndex
A description used within a Scheme to define a partial index.
Query
Implements the capability of database querying.
RowId
A subclass of SqlId that has only the rowid unique identifier.
Scheme
A description of a configurable part of a database schema.
SchemeElement
A base class for classes that describe aspects of a Scheme.
SchemeMigrationPlan
Determines a sequence of logical actions to create or migrate a scheme.
SearchColumn
A description used within a SearchIndex to define an FTS column.
SearchIndex
A description used within a Scheme to define an FTS index.
SearchIndexUpdater
SQL statements associated with a SearchIndex.
Sql
A base helper class for composing SQL constructs.
SqlCase
A helper class for composing a CASE expression.
SqlFunction
A helper class for composing a function call.
SqlId
A sealed class representing the unique ID of a mapping table row.
SqlIdentifier
A helper class for composing an identifier.
SQLite
A class for creating, opening, querying, and updating databases.
SQLiteQuery
A helper base class for a typical usage scenario of a query.
SqlJsonExtract
A helper class for composing a json_extract function call.
SqlJsonJson
A helper class for composing a json function call.
SqlJsonQuote
A helper class for composing a json_quote function call.
SqlLiteral
A helper class for composing a literal value.
SqlParameter
A helper class for composing a named parameter.
SqlSearch
A helper class for composing an FTS query as an SQL literal.
SqlTable
A helper class for composing a table name or a table-valued function call.
SqlValues
A helper class for composing an expression list.
Transaction
Accumulates edits to the mapping table in a memory buffer.
VirtualColumn
A description used within a Scheme to define a generated virtual column.

Enums

QueryDirection
The direction in which to select rows relative to a starting position.
QueryDistinction
Whether to use rowid or keyid as the last mandatory sorting column.
QuerySorting
Sort the rows of a query in ascending or descending order.

Constants

columnKeyId → const String
The name of the keyid column.
columnKind → const String
The name of the kind virtual column.
columnRank → const String
The name of the rank FTS column.
columnRowId → const String
The name of the rowid column.
columnValue → const String
The name of the value column.
ftsTermJoiner → const String
A special character used by ftsTerm to replace non-token characters.
keyDefinition → const String
The keyid value of the row that contains a stored scheme.
queryDefaultLimit → const int
A limit for SQLite.prepare used internally during scheme migration.
schemaDefaultVersion → const int
The default version of a database schema.
schemaVersion → const int
The version of a database schema.
schemeInitialRevision → const int
The initial (default) revision of a Scheme.
tableMapping → const String
The name of the mapping table.
tableScheme → const String
The name of the scheme table.
tokenCategories → const String
Unicode categories allowed as part of an SQLite FTS token.

Properties

reFtsTermToken RegExp
A regexp matching an extended FTS token.
final
reFtsTextToken RegExp
A regexp matching a standard FTS token.
final

Functions

escapeSingleQuotes(String string) String
Escapes single quotes in a String.
ftsString(String string) String
Escapes and quotes a String for use as an FTS expression string.
ftsTerm(String string, [Level? ll = Level.WARNING]) String
Prepares a String for use as an extended FTS token.
ftsText(String string) String
Prepares ordinary text for assignment to an FTS field.
ftsWords(String string) Iterable<String>
Extracts all standard FTS tokens from a String.
queryOrdering(Sql sql, [QuerySorting sorting = QuerySorting.ascending]) QueryOrdering
Returns a QueryOrdering record initialized with the given arguments.
queryRow(FullId id, QueryRowOrdered ordered, QueryRowColumns columns) QueryRow
Returns a QueryRow record initialized with the given arguments.
queryRowGetPosition(QueryRow row) QueryRowPosition
Returns the QueryRowPosition record for the given row.
quoteWithDoubleQuotes(String string) String
Escapes and quotes a String using double quotes.
quoteWithSingleQuotes(String string) String
Escapes and quotes a String using single quotes.
sqlIdentifier(String name) String
Escapes and quotes a non-empty String for use as an SQLite identifier.
sqlLiteral(Object? value) String
Converts a nullable Object to an SQLite literal value.
unquoteDoubleQuotes(String string) String
Unquotes and unescapes a String escaped and quoted with double quotes.

Typedefs

FtsI = FtsInside
An alias for the FtsInside class.
FtsN = FtsNear
An alias for the FtsNear class.
FtsO = FtsOutside
An alias for the FtsOutside class.
FtsP = FtsPhrase
An alias for the FtsPhrase class.
FtsQ = FtsQuery
An alias for the FtsQuery class.
FullIdIterable = Iterable<FullId>
An Iterable of FullIds.
FullIdWithValue = ({FullId id, Object value})
The return type of the SQLite.select method.
IndexColumns = List<IndexColumn>
A List of IndexColumns.
KindList = List<Kind>
A List of Kinds.
PartialIndexes = List<PartialIndex>
A List of PartialIndexes.
QueryId = int
An ID associated with a Query.
QueryOrdering = ({QuerySorting sorting, Sql sql})
The type of the elements in the order argument of SQLite.prepare.
QueryParameters = Map<String, Object>
A value binding map of named parameters for a query's SQL statement.
QueryRow = ({QueryRowColumns columns, FullId id, QueryRowOrdered ordered})
The type of the elements in a list returned by SQLite.query.
QueryRowColumns = List<Object?>
The type of the columns field of QueryRow.
QueryRowOrdered = List<Kind>
The type of the ordered field of QueryRow.
QueryRowPosition = ({FullId id, QueryRowOrdered ordered})
An identifier of a QueryRow position within a result set.
QueryRows = List<QueryRow>
A List of QueryRows.
SearchColumns = List<SearchColumn>
A List of SearchColumns.
SearchIndexes = List<SearchIndex>
A List of SearchIndexes.
SearchRow = Map<String, Object>
The return type of SearchRowGetter callbacks.
SearchRowGetter = SearchRow Function(Object value)
The signature of a callback that converts a JSON value into a SearchRow.
SearchRowGetters = Map<Kind, SearchRowGetter>
The type of the getters argument to SearchIndex.new.
SearchRowsUpdaters = IList<({SearchIndexUpdater indexUpdater, SearchRowGetter rowGetter})>
An IList of SearchIndexUpdater/SearchRowGetter pairs.
SqlC = SqlCase
An alias for the SqlCase class.
SqlF = SqlFunction
An alias for the SqlFunction class.
SqlI = SqlIdentifier
An alias for the SqlIdentifier class.
SqlJQ = SqlJsonQuote
An alias for the SqlJsonQuote class.
SqlJT = SqlJsonJson
An alias for the SqlJsonJson class.
SqlJX = SqlJsonExtract
An alias for the SqlJsonExtract class.
SqlL = SqlLiteral
An alias for the SqlLiteral class.
SqlP = SqlParameter
An alias for the SqlParameter class.
SqlS = SqlSearch
An alias for the SqlSearch class.
SqlT = SqlTable
An alias for the SqlTable class.
SqlV = SqlValues
An alias for the SqlValues class.
VirtualColumns = List<VirtualColumn>
A List of VirtualColumns.