SqLiteStatementBuilder
This class is the BaseStatementBuilder-derived implementation for SQLite. It is automatically registered by SqliteBootstrap — you do not need to instantiate it directly under normal use.
It generates [table]-quoted, @-parameterized SQL, and uses LIMIT/OFFSET for BatchQuery and the internal skip/take query.
CreateMergeandCreateMergeAllthrowNotImplementedException— SQLite has noMERGEstatement, and theINSERT OR REPLACEfallback for it exists in source only as commented-out code. This normally wouldn’t matter, since Merge/MergeAll never reach these methods for SQLite: SqLiteDbSetting setsIsUseUpserttotrue, which reroutes both operations through anExists-then-Insert/Updateflow instead. The exception only surfaces if you callCreateMerge/CreateMergeAlldirectly, or if a customIDbSettingsetsIsUseUpsertback tofalsefor aSqliteConnection.
For Insert, the newly generated identity or primary key value is returned via CAST(last_insert_rowid() AS ...) (identity column) or the supplied parameter (non-identity primary key). InsertAll instead appends a SQLite RETURNING clause (requires SQLite 3.35+) to read back the generated value per batched row.
Truncate is compiled as DELETE FROM [table] ; VACUUM, since SQLite has no native TRUNCATE TABLE statement.
Constructors
public SqLiteStatementBuilder(IDbSetting dbSetting,
IResolver<Field, IDbSetting, string> convertFieldResolver = null,
IResolver<Type, Type> averageableClientTypeResolver = null)
convertFieldResolver defaults to SqLiteConvertFieldResolver, used to render CAST(...) expressions for typed fields.
Usability
Use StatementBuilderMapper to override it with a custom implementation.
StatementBuilderMapper.Add(typeof(SqliteConnection), new MyCustomSqLiteStatementBuilder(dbSetting), true);