FunctionMappingProviderBase
Base implementation for function mapping providers
public abstract class FunctionMappingProviderBase : IFunctionMappingProvider
Constructors
FunctionMappingProviderBase
protected FunctionMappingProviderBase(Func<ImmutableDictionary<string, FunctionMap>> functionMappingsFactory, Func<SqlSyntaxMapping> syntaxMappingFactory)
Initializes a new instance of the FunctionMappingProviderBase class
| Parameter | Type | Description |
|---|---|---|
functionMappingsFactory |
FunctionMap>> |
Factory for creating function mappings |
syntaxMappingFactory |
SqlSyntaxMapping> |
Factory for creating syntax mapping |
Methods
GetFunctionMapping(string)
public FunctionMap? GetFunctionMapping(string lqlFunction)
Gets the function mapping for a specific Lql function
Parameters:
| Name | Type | Description |
|---|---|---|
lqlFunction |
String |
The Lql function name |
Returns: FunctionMap - The function mapping or null if not found
GetSyntaxMapping()
public SqlSyntaxMapping GetSyntaxMapping()
Gets the syntax mapping for this provider
Returns: SqlSyntaxMapping - The syntax mapping
TranspileFunction(string, params string[])
public string TranspileFunction(string functionName, params string[] arguments)
Transpiles a function call from Lql to the target dialect
Parameters:
| Name | Type | Description |
|---|---|---|
functionName |
String |
The function name |
arguments |
String[] |
The function arguments |
Returns: String - The transpiled function call
FormatLimitClause(string)
public string FormatLimitClause(string count)
Formats a LIMIT clause for the target dialect
Parameters:
| Name | Type | Description |
|---|---|---|
count |
String |
The limit count |
Returns: String - The formatted LIMIT clause
FormatOffsetClause(string)
public string FormatOffsetClause(string count)
Formats an OFFSET clause for the target dialect
Parameters:
| Name | Type | Description |
|---|---|---|
count |
String |
The offset count |
Returns: String - The formatted OFFSET clause
FormatIdentifier(string)
public string FormatIdentifier(string identifier)
Formats an identifier for the target dialect
Parameters:
| Name | Type | Description |
|---|---|---|
identifier |
String |
The identifier name |
Returns: String - The formatted identifier