Class SqlCeSqlBuilder
- Namespace
- LinqToDB.Internal.DataProvider.SqlCe
- Assembly
- linq2db.dll
public class SqlCeSqlBuilder : BasicSqlBuilder, ISqlBuilder
- Inheritance
-
objectSqlCeSqlBuilder
- 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
providerIDataProvidermappingSchemaMappingSchemadataOptionsDataOptionssqlOptimizerISqlOptimizersqlProviderFlagsSqlProviderFlags
Properties
IsValuesSyntaxSupported
If true, provider supports list of VALUES as a source element of merge command.
protected override bool IsValuesSyntaxSupported { get; }
Property Value
OffsetFirst
protected override bool OffsetFirst { get; }
Property Value
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
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
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
statementSqlStatementcommandNumberint
BuildCreateTableIdentityAttribute2(SqlField)
protected override void BuildCreateTableIdentityAttribute2(SqlField field)
Parameters
fieldSqlField
BuildDataTypeFromDataType(DbDataType, bool, bool)
protected override void BuildDataTypeFromDataType(DbDataType type, bool forCreateTable, bool canBeNull)
Parameters
typeDbDataTypeforCreateTableboolcanBeNullboolType could store
NULLvalues (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
exprSqlPredicate.IsDistinct
BuildMergeStatement(SqlMergeStatement)
protected override void BuildMergeStatement(SqlMergeStatement merge)
Parameters
mergeSqlMergeStatement
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
sbStringBuilderString builder for generated object name.
nameSqlObjectNameName of database object (e.g. table, view, procedure or function).
objectTypeConvertTypeType of database object, used to select proper name converter.
escapeboolIf true, apply required escaping to name components. Must be true except rare cases when escaping is not needed.
tableOptionsTableOptionsTable options if called for table. Used to properly generate names for temporary tables.
withoutSuffixboolIf 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
sbparameter value.
BuildTableExtensions(SqlTable, string)
protected override void BuildTableExtensions(SqlTable table, string alias)
Parameters
CommandCount(SqlStatement)
public override int CommandCount(SqlStatement statement)
Parameters
statementSqlStatement
Returns
Convert(StringBuilder, string, ConvertType)
public override StringBuilder Convert(StringBuilder sb, string value, ConvertType convertType)
Parameters
sbStringBuildervaluestringconvertTypeConvertType
Returns
CreateSqlBuilder()
protected override ISqlBuilder CreateSqlBuilder()
Returns
FirstFormat(SelectQuery)
protected override string? FirstFormat(SelectQuery selectQuery)
Parameters
selectQuerySelectQuery
Returns
GetProviderTypeName(IDataContext, DbParameter)
protected override string? GetProviderTypeName(IDataContext dataContext, DbParameter parameter)
Parameters
dataContextIDataContextparameterDbParameter
Returns
LimitFormat(SelectQuery)
protected override string? LimitFormat(SelectQuery selectQuery)
Parameters
selectQuerySelectQuery
Returns
OffsetFormat(SelectQuery)
protected override string OffsetFormat(SelectQuery selectQuery)
Parameters
selectQuerySelectQuery