Table of Contents

Class SqlSyntaxOptions

Namespace
Utils.Data.Sql
Assembly
Utils.Data.dll

Provides configuration options controlling how SQL identifiers and parameters are interpreted.

public sealed class SqlSyntaxOptions
Inheritance
SqlSyntaxOptions
Inherited Members
Extension Methods

Constructors

SqlSyntaxOptions(IEnumerable<char>?, char)

Initializes a new instance of the SqlSyntaxOptions class.

public SqlSyntaxOptions(IEnumerable<char>? identifierPrefixes = null, char autoParameterPrefix = '@')

Parameters

identifierPrefixes IEnumerable<char>

Characters that can prefix identifiers such as parameters or temporary tables.

autoParameterPrefix char

The prefix used when automatically generating parameter names.

Properties

AutoParameterPrefix

Gets the prefix appended to automatically generated parameter names.

public char AutoParameterPrefix { get; }

Property Value

char

Default

Gets the default syntax options supporting common SQL Server style prefixes.

public static SqlSyntaxOptions Default { get; }

Property Value

SqlSyntaxOptions

IdentifierPrefixes

Gets the characters that can prefix identifiers.

public IReadOnlyCollection<char> IdentifierPrefixes { get; }

Property Value

IReadOnlyCollection<char>

Methods

IsIdentifierPrefix(char)

Determines whether the provided character is configured as an identifier prefix.

public bool IsIdentifierPrefix(char value)

Parameters

value char

The character to check.

Returns

bool

true when the character is a known prefix; otherwise, false.