Table of Contents

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 IDataProvider
mappingSchema MappingSchema
dataOptions DataOptions
sqlOptimizer ISqlOptimizer
sqlProviderFlags SqlProviderFlags

Properties

IsNestedJoinSupported

public override bool IsNestedJoinSupported { get; }

Property Value

bool

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

bool

Methods

BuildCommand(SqlStatement, int)

protected override void BuildCommand(SqlStatement statement, int commandNumber)

Parameters

statement SqlStatement
commandNumber 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 SqlCreateTableStatement
pkName string
fieldNames IEnumerable<string>

BuildDataTypeFromDataType(SqlDataType, bool, bool)

protected override void BuildDataTypeFromDataType(SqlDataType type, bool forCreateTable, bool canBeNull)

Parameters

type SqlDataType
forCreateTable bool
canBeNull bool

Type 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 StringBuilder

String builder for generated object name.

name SqlObjectName

Name of database object (e.g. table, view, procedure or function).

objectType ConvertType

Type of database object, used to select proper name converter.

escape bool

If true, apply required escaping to name components. Must be true except rare cases when escaping is not needed.

tableOptions TableOptions

Table options if called for table. Used to properly generate names for temporary tables.

withoutSuffix bool

If 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 SqlValuesTable
alias string
aliasBuilt bool

BuildTableExtensions(SqlTable, string)

protected override void BuildTableExtensions(SqlTable table, string alias)

Parameters

table SqlTable
alias string

BuildUpdateTableName(SelectQuery, SqlUpdateClause)

protected override void BuildUpdateTableName(SelectQuery selectQuery, SqlUpdateClause updateClause)

Parameters

selectQuery SelectQuery
updateClause SqlUpdateClause

CommandCount(SqlStatement)

public override int CommandCount(SqlStatement statement)

Parameters

statement SqlStatement

Returns

int

Convert(StringBuilder, string, ConvertType)

public override StringBuilder Convert(StringBuilder sb, string value, ConvertType convertType)

Parameters

sb StringBuilder
value string
convertType ConvertType

Returns

StringBuilder

CreateSqlBuilder()

protected override ISqlBuilder CreateSqlBuilder()

Returns

ISqlBuilder

LimitFormat(SelectQuery)

protected override string LimitFormat(SelectQuery selectQuery)

Parameters

selectQuery SelectQuery

Returns

string

OffsetFormat(SelectQuery)

protected override string OffsetFormat(SelectQuery selectQuery)

Parameters

selectQuery SelectQuery

Returns

string