Table of Contents

Class SqlCeSqlBuilder

Namespace
LinqToDB.Internal.DataProvider.SqlCe
Assembly
linq2db.dll
public class SqlCeSqlBuilder : BasicSqlBuilder, ISqlBuilder
Inheritance
object
SqlCeSqlBuilder
Implements
Inherited Members
Extension Methods

Constructors

SqlCeSqlBuilder(IDataProvider?, MappingSchema, DataOptions, ISqlOptimizer, SqlProviderFlags)

public SqlCeSqlBuilder(IDataProvider? provider, MappingSchema mappingSchema, DataOptions dataOptions, ISqlOptimizer sqlOptimizer, SqlProviderFlags sqlProviderFlags)

Parameters

provider IDataProvider
mappingSchema MappingSchema
dataOptions DataOptions
sqlOptimizer ISqlOptimizer
sqlProviderFlags SqlProviderFlags

Properties

IsValuesSyntaxSupported

If true, provider supports list of VALUES as a source element of merge command.

protected override bool IsValuesSyntaxSupported { get; }

Property Value

bool

OffsetFirst

protected override bool OffsetFirst { get; }

Property Value

bool

RequiresConstantColumnAliases

If true, provider require column aliases for each column. E.g. as table_alias (column_alias1, column_alias2).

protected override bool RequiresConstantColumnAliases { get; }

Property Value

bool

RequiresUniqueRootColumnNames

true when the provider's final SELECT cannot contain two columns that render with the same result-set name. Such providers force final aliases for a root column-name collision (see CanSkipRootAliases(SqlStatement)) instead of skipping root aliases.

protected override bool RequiresUniqueRootColumnNames { 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

BuildCreateTableIdentityAttribute2(SqlField)

protected override void BuildCreateTableIdentityAttribute2(SqlField field)

Parameters

field SqlField

BuildDataTypeFromDataType(DbDataType, bool, bool)

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

Parameters

type DbDataType
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).

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 = ConvertType.NameToQueryTable, bool escape = true, TableOptions tableOptions = TableOptions.NotSet, bool withoutSuffix = false)

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.

BuildTableExtensions(SqlTable, string)

protected override void BuildTableExtensions(SqlTable table, string alias)

Parameters

table SqlTable
alias string

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

FirstFormat(SelectQuery)

protected override string? FirstFormat(SelectQuery selectQuery)

Parameters

selectQuery SelectQuery

Returns

string

GetProviderTypeName(IDataContext, DbParameter)

protected override string? GetProviderTypeName(IDataContext dataContext, DbParameter parameter)

Parameters

dataContext IDataContext
parameter DbParameter

Returns

string

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