Class SQLiteSqlBuilder
- Namespace
- LinqToDB.DataProvider.SQLite
- Assembly
- linq2db.dll
public class SQLiteSqlBuilder : BasicSqlBuilder, ISqlBuilder
- Inheritance
-
SQLiteSqlBuilder
- Implements
- Inherited Members
- Extension Methods
Constructors
SQLiteSqlBuilder(IDataProvider?, MappingSchema, DataOptions, ISqlOptimizer, SqlProviderFlags)
public SQLiteSqlBuilder(IDataProvider? provider, MappingSchema mappingSchema, DataOptions dataOptions, ISqlOptimizer sqlOptimizer, SqlProviderFlags sqlProviderFlags)
Parameters
provider
IDataProvidermappingSchema
MappingSchemadataOptions
DataOptionssqlOptimizer
ISqlOptimizersqlProviderFlags
SqlProviderFlags
Properties
IsNestedJoinSupported
public override bool IsNestedJoinSupported { get; }
Property Value
SupportsColumnAliasesInSource
If true, provider supports column aliases specification after table alias. E.g. as table_alias (column_alias1, column_alias2).
protected override bool SupportsColumnAliasesInSource { get; }
Property Value
Methods
BuildCommand(SqlStatement, int)
protected override void BuildCommand(SqlStatement statement, int commandNumber)
Parameters
statement
SqlStatementcommandNumber
int
BuildCreateTableCommand(SqlTable)
protected override void BuildCreateTableCommand(SqlTable table)
Parameters
table
SqlTable
BuildCreateTableIdentityAttribute2(SqlField)
protected override void BuildCreateTableIdentityAttribute2(SqlField field)
Parameters
field
SqlField
BuildCreateTablePrimaryKey(SqlCreateTableStatement, string, IEnumerable<string>)
protected override void BuildCreateTablePrimaryKey(SqlCreateTableStatement createTable, string pkName, IEnumerable<string> fieldNames)
Parameters
createTable
SqlCreateTableStatementpkName
stringfieldNames
IEnumerable<string>
BuildDataTypeFromDataType(SqlDataType, bool, bool)
protected override void BuildDataTypeFromDataType(SqlDataType type, bool forCreateTable, bool canBeNull)
Parameters
type
SqlDataTypeforCreateTable
boolcanBeNull
boolType could store
NULL
values (could be used for column table type generation or for databases with explicit typee nullability like ClickHouse).
BuildDropTableStatement(SqlDropTableStatement)
protected override void BuildDropTableStatement(SqlDropTableStatement dropTable)
Parameters
dropTable
SqlDropTableStatement
BuildIsDistinctPredicate(IsDistinct)
protected override void BuildIsDistinctPredicate(SqlPredicate.IsDistinct expr)
Parameters
expr
SqlPredicate.IsDistinct
BuildMergeStatement(SqlMergeStatement)
protected override void BuildMergeStatement(SqlMergeStatement merge)
Parameters
merge
SqlMergeStatement
BuildObjectName(StringBuilder, SqlObjectName, ConvertType, bool, TableOptions, bool)
Writes database object name into provided StringBuilder instance.
public override StringBuilder BuildObjectName(StringBuilder sb, SqlObjectName name, ConvertType objectType, bool escape, TableOptions tableOptions, bool withoutSuffix)
Parameters
sb
StringBuilderString builder for generated object name.
name
SqlObjectNameName of database object (e.g. table, view, procedure or function).
objectType
ConvertTypeType of database object, used to select proper name converter.
escape
boolIf
true
, apply required escaping to name components. Must betrue
except rare cases when escaping is not needed.tableOptions
TableOptionsTable options if called for table. Used to properly generate names for temporary tables.
withoutSuffix
boolIf object name have suffix, which could be detached from main name, this parameter disables suffix generation (enables generation of only main name part).
Returns
- StringBuilder
sb
parameter value.
BuildSqlValuesTable(SqlValuesTable, string, out bool)
protected override void BuildSqlValuesTable(SqlValuesTable valuesTable, string alias, out bool aliasBuilt)
Parameters
valuesTable
SqlValuesTablealias
stringaliasBuilt
bool
BuildTableExtensions(SqlTable, string)
protected override void BuildTableExtensions(SqlTable table, string alias)
Parameters
BuildUpdateTableName(SelectQuery, SqlUpdateClause)
protected override void BuildUpdateTableName(SelectQuery selectQuery, SqlUpdateClause updateClause)
Parameters
selectQuery
SelectQueryupdateClause
SqlUpdateClause
CommandCount(SqlStatement)
public override int CommandCount(SqlStatement statement)
Parameters
statement
SqlStatement
Returns
Convert(StringBuilder, string, ConvertType)
public override StringBuilder Convert(StringBuilder sb, string value, ConvertType convertType)
Parameters
sb
StringBuildervalue
stringconvertType
ConvertType
Returns
CreateSqlBuilder()
protected override ISqlBuilder CreateSqlBuilder()
Returns
LimitFormat(SelectQuery)
protected override string LimitFormat(SelectQuery selectQuery)
Parameters
selectQuery
SelectQuery
Returns
OffsetFormat(SelectQuery)
protected override string OffsetFormat(SelectQuery selectQuery)
Parameters
selectQuery
SelectQuery