DefaultSqlMacroProcessor

Overview

DefaultSqlMacroProcessor is an "empty" macro processor which is assigned to the DatabaseProfile when no macro processor is defined in the driver profile configuration. This macro processor is used by Data Abstract if the backend database does not support macros. All its methods return an empty string.

Location

 

constructor

 

constructor

 

DefaultSqlMacroProcessor()

 

Sub New()

constructor (String, String, Boolean, String)  protected    (declared in SqlMacroProcessor)

 

constructor(dateFormat: String; datetimeFormat: String; doubleQuoteStrings: Boolean; parameterPrefix: String)

 

DefaultSqlMacroProcessor(String dateFormat, String datetimeFormat, Boolean doubleQuoteStrings, String parameterPrefix)

 

Sub New(dateFormat As String, datetimeFormat As String, doubleQuoteStrings As Boolean, parameterPrefix As String)

Parameters:

  • dateFormat:
  • datetimeFormat:
  • doubleQuoteStrings:
  • parameterPrefix:

AddTime  protected

 

method AddTime(parameters: array of String): String

 

String AddTime(String[] parameters)

 

Function AddTime(parameters As String()) As String

Parameters:

  • parameters:

AddVariable    (declared in MacroParser)

 

method AddVariable(name: String): MacroVariable

 

MacroVariable AddVariable(String name)

 

Function AddVariable(name As String) As MacroVariable

Parameters:

  • name:

ClassSuffix    (declared in SqlMacroProcessor)

 

const ClassSuffix: String = "MacroProcessor";

 

const String ClassSuffix = "MacroProcessor"

 

Dim ClassSuffix As String = "MacroProcessor"

ClearMacros    (declared in MacroParser)

 

method ClearMacros

 

void ClearMacros()

 

Sub ClearMacros()

ClearVariables    (declared in MacroParser)

Clears the internal list of registered macro variables.

 

method ClearVariables

 

void ClearVariables()

 

Sub ClearVariables()

ComposeMacroCall    (declared in SqlMacroProcessor)

 

method ComposeMacroCall(macroKind: MacroKind; params args: array of String): String

 

String ComposeMacroCall(MacroKind macroKind, params String[] args)

 

Function ComposeMacroCall(macroKind As MacroKind, ParamArray args As String()) As String

Parameters:

  • macroKind:
  • args:

Copy  protected

 

method Copy(parameters: array of String): String

 

String Copy(String[] parameters)

 

Function Copy(parameters As String()) As String

Parameters:

  • parameters:

CustomMacroHandler    (declared in MacroParser)

 

property CustomMacroHandler: CustomMacroCallback read write;

 

CustomMacroCallback CustomMacroHandler { get; set; }

 

Property CustomMacroHandler() As CustomMacroCallback

Date  protected    (declared in SqlMacroProcessor)

 

method Date(parameters: array of String): String

 

String Date(String[] parameters)

 

Function Date(parameters As String()) As String

Parameters:

  • parameters:

DateFormat    (declared in SqlMacroProcessor)

Gets the date format for the current database.

 

property DateFormat: String read;

 

String DateFormat { get; }

 

ReadOnly Property DateFormat() As String

DatePart  protected

 

method DatePart(parameters: array of String): String

 

String DatePart(String[] parameters)

 

Function DatePart(parameters As String()) As String

Parameters:

  • parameters:

DateTime  protected

 

method DateTime(parameters: array of String): String

 

String DateTime(String[] parameters)

 

Function DateTime(parameters As String()) As String

Parameters:

  • parameters:

DateTimeFormat    (declared in SqlMacroProcessor)

Gets the datetime format for the current database.

 

property DateTimeFormat: String read;

 

String DateTimeFormat { get; }

 

ReadOnly Property DateTimeFormat() As String

DoubleQuoteStrings    (declared in SqlMacroProcessor)

Gets the quote string for the date and datetime formats for the current database. If this property is true, the datetime format is represented as "datetime", otherwise as 'datetime'.

 

property DoubleQuoteStrings: Boolean read;

 

Boolean DoubleQuoteStrings { get; }

 

ReadOnly Property DoubleQuoteStrings() As Boolean

Eval    (declared in MacroParser)

Creates a new macro variable and adds it to the internal macro variables list.

 

method Eval(source: String; delimiter: Char): String

 

String Eval(String source, Char delimiter)

 

Function Eval(source As String, delimiter As Char) As String

Parameters:

  • source: Expression to process
  • delimiter: String constants delimiter

EvalToken    (declared in MacroParser)

Creates a new macro variable and adds it to the internal macro variables list.

 

method EvalToken(source: String): String

 

String EvalToken(String source)

 

Function EvalToken(source As String) As String

Parameters:

  • source: Variable name

FindVariable    (declared in MacroParser)

 

method FindVariable(name: String): MacroVariable

 

MacroVariable FindVariable(String name)

 

Function FindVariable(name As String) As MacroVariable

Parameters:

  • name:

FormatDate  protected    (declared in SqlMacroProcessor)

 

method FormatDate(parameters: array of String): String

 

String FormatDate(String[] parameters)

 

Function FormatDate(parameters As String()) As String

Parameters:

  • parameters:

FormatDateTime  protected    (declared in SqlMacroProcessor)

 

method FormatDateTime(parameters: array of String): String

 

String FormatDateTime(String[] parameters)

 

Function FormatDateTime(parameters As String()) As String

Parameters:

  • parameters:

GetNewInstance

 

method GetNewInstance: SqlMacroProcessor

 

SqlMacroProcessor GetNewInstance()

 

Function GetNewInstance() As SqlMacroProcessor

GetTrimChar  protected    (declared in SqlMacroProcessor)

 

class method GetTrimChar(parameters: array of String): String

 

static String GetTrimChar(String[] parameters)

 

Shared Function GetTrimChar(parameters As String()) As String

Parameters:

  • parameters:

IsTrimCharSet  protected    (declared in SqlMacroProcessor)

 

class method IsTrimCharSet(parameters: array of String): Boolean

 

static Boolean IsTrimCharSet(String[] parameters)

 

Shared Function IsTrimCharSet(parameters As String()) As Boolean

Parameters:

  • parameters:

Length  protected

 

method Length(parameters: array of String): String

 

String Length(String[] parameters)

 

Function Length(parameters As String()) As String

Parameters:

  • parameters:

LowerCase  protected

 

method LowerCase(parameters: array of String): String

 

String LowerCase(String[] parameters)

 

Function LowerCase(parameters As String()) As String

Parameters:

  • parameters:

NoLock  protected    (declared in SqlMacroProcessor)

 

method NoLock(parameters: array of String): String

 

String NoLock(String[] parameters)

 

Function NoLock(parameters As String()) As String

Parameters:

  • parameters:

RegisterMacro    (declared in MacroParser)

 

method RegisterMacro(name: String; callback: Func<array of String, String>; paramCount: Int32)

 

void RegisterMacro(String name, Func<array of String, String> callback, Int32 paramCount)

 

Sub RegisterMacro(name As String, callback As Func (Of String(), String), paramCount As Int32)

Parameters:

  • name:
  • callback:
  • paramCount:

RegisterMacros  protected    (declared in SqlMacroProcessor)

Registers the existing standard macros:

  • Date
  • DateTime
  • AddTime
  • FormatDateTime
  • FormatDate
  • Length
  • LowerCase
  • UpperCase
  • TrimLeft
  • TrimRight
  • Copy
  • NoLock

 

method RegisterMacros

 

void RegisterMacros()

 

Sub RegisterMacros()

Session  protected    (declared in SqlMacroProcessor)

 

method Session(parameters: array of String): String

 

String Session(String[] parameters)

 

Function Session(parameters As String()) As String

Parameters:

  • parameters:

StoredProcedurePrefix    (declared in SqlMacroProcessor)

Gets the prefix for stored procedures for the current database.

 

property StoredProcedurePrefix: String read;

 

String StoredProcedurePrefix { get; }

 

ReadOnly Property StoredProcedurePrefix() As String

StoredProcParamPrefix    (declared in SqlMacroProcessor)

Gets the prefix for stored procedure params for the current database.

 

property StoredProcParamPrefix: String read;

 

String StoredProcParamPrefix { get; }

 

ReadOnly Property StoredProcParamPrefix() As String

Time  protected    (declared in SqlMacroProcessor)

 

method Time(parameters: array of String): String

 

String Time(String[] parameters)

 

Function Time(parameters As String()) As String

Parameters:

  • parameters:

Trim  protected

 

method Trim(parameters: array of String): String

 

String Trim(String[] parameters)

 

Function Trim(parameters As String()) As String

Parameters:

  • parameters:

TrimLeft  protected

 

method TrimLeft(parameters: array of String): String

 

String TrimLeft(String[] parameters)

 

Function TrimLeft(parameters As String()) As String

Parameters:

  • parameters:

TrimRight  protected

 

method TrimRight(parameters: array of String): String

 

String TrimRight(String[] parameters)

 

Function TrimRight(parameters As String()) As String

Parameters:

  • parameters:

UpperCase  protected

 

method UpperCase(parameters: array of String): String

 

String UpperCase(String[] parameters)

 

Function UpperCase(parameters As String()) As String

Parameters:

  • parameters:

 

ClassSuffix    (declared in SqlMacroProcessor)

 

const ClassSuffix: String = "MacroProcessor";

 

const String ClassSuffix = "MacroProcessor"

 

Dim ClassSuffix As String = "MacroProcessor"

 

CustomMacroHandler    (declared in MacroParser)

 

property CustomMacroHandler: CustomMacroCallback read write;

 

CustomMacroCallback CustomMacroHandler { get; set; }

 

Property CustomMacroHandler() As CustomMacroCallback

DateFormat    (declared in SqlMacroProcessor)

Gets the date format for the current database.

 

property DateFormat: String read;

 

String DateFormat { get; }

 

ReadOnly Property DateFormat() As String

DateTimeFormat    (declared in SqlMacroProcessor)

Gets the datetime format for the current database.

 

property DateTimeFormat: String read;

 

String DateTimeFormat { get; }

 

ReadOnly Property DateTimeFormat() As String

DoubleQuoteStrings    (declared in SqlMacroProcessor)

Gets the quote string for the date and datetime formats for the current database. If this property is true, the datetime format is represented as "datetime", otherwise as 'datetime'.

 

property DoubleQuoteStrings: Boolean read;

 

Boolean DoubleQuoteStrings { get; }

 

ReadOnly Property DoubleQuoteStrings() As Boolean

StoredProcedurePrefix    (declared in SqlMacroProcessor)

Gets the prefix for stored procedures for the current database.

 

property StoredProcedurePrefix: String read;

 

String StoredProcedurePrefix { get; }

 

ReadOnly Property StoredProcedurePrefix() As String

StoredProcParamPrefix    (declared in SqlMacroProcessor)

Gets the prefix for stored procedure params for the current database.

 

property StoredProcParamPrefix: String read;

 

String StoredProcParamPrefix { get; }

 

ReadOnly Property StoredProcParamPrefix() As String

 

GetTrimChar  protected    (declared in SqlMacroProcessor)

 

class method GetTrimChar(parameters: array of String): String

 

static String GetTrimChar(String[] parameters)

 

Shared Function GetTrimChar(parameters As String()) As String

Parameters:

  • parameters:

IsTrimCharSet  protected    (declared in SqlMacroProcessor)

 

class method IsTrimCharSet(parameters: array of String): Boolean

 

static Boolean IsTrimCharSet(String[] parameters)

 

Shared Function IsTrimCharSet(parameters As String()) As Boolean

Parameters:

  • parameters:

 

constructor

 

constructor

 

DefaultSqlMacroProcessor()

 

Sub New()

constructor (String, String, Boolean, String)  protected    (declared in SqlMacroProcessor)

 

constructor(dateFormat: String; datetimeFormat: String; doubleQuoteStrings: Boolean; parameterPrefix: String)

 

DefaultSqlMacroProcessor(String dateFormat, String datetimeFormat, Boolean doubleQuoteStrings, String parameterPrefix)

 

Sub New(dateFormat As String, datetimeFormat As String, doubleQuoteStrings As Boolean, parameterPrefix As String)

Parameters:

  • dateFormat:
  • datetimeFormat:
  • doubleQuoteStrings:
  • parameterPrefix:

AddTime  protected

 

method AddTime(parameters: array of String): String

 

String AddTime(String[] parameters)

 

Function AddTime(parameters As String()) As String

Parameters:

  • parameters:

AddVariable    (declared in MacroParser)

 

method AddVariable(name: String): MacroVariable

 

MacroVariable AddVariable(String name)

 

Function AddVariable(name As String) As MacroVariable

Parameters:

  • name:

ClearMacros    (declared in MacroParser)

 

method ClearMacros

 

void ClearMacros()

 

Sub ClearMacros()

ClearVariables    (declared in MacroParser)

Clears the internal list of registered macro variables.

 

method ClearVariables

 

void ClearVariables()

 

Sub ClearVariables()

ComposeMacroCall    (declared in SqlMacroProcessor)

 

method ComposeMacroCall(macroKind: MacroKind; params args: array of String): String

 

String ComposeMacroCall(MacroKind macroKind, params String[] args)

 

Function ComposeMacroCall(macroKind As MacroKind, ParamArray args As String()) As String

Parameters:

  • macroKind:
  • args:

Copy  protected

 

method Copy(parameters: array of String): String

 

String Copy(String[] parameters)

 

Function Copy(parameters As String()) As String

Parameters:

  • parameters:

Date  protected    (declared in SqlMacroProcessor)

 

method Date(parameters: array of String): String

 

String Date(String[] parameters)

 

Function Date(parameters As String()) As String

Parameters:

  • parameters:

DatePart  protected

 

method DatePart(parameters: array of String): String

 

String DatePart(String[] parameters)

 

Function DatePart(parameters As String()) As String

Parameters:

  • parameters:

DateTime  protected

 

method DateTime(parameters: array of String): String

 

String DateTime(String[] parameters)

 

Function DateTime(parameters As String()) As String

Parameters:

  • parameters:

Eval    (declared in MacroParser)

Creates a new macro variable and adds it to the internal macro variables list.

 

method Eval(source: String; delimiter: Char): String

 

String Eval(String source, Char delimiter)

 

Function Eval(source As String, delimiter As Char) As String

Parameters:

  • source: Expression to process
  • delimiter: String constants delimiter

EvalToken    (declared in MacroParser)

Creates a new macro variable and adds it to the internal macro variables list.

 

method EvalToken(source: String): String

 

String EvalToken(String source)

 

Function EvalToken(source As String) As String

Parameters:

  • source: Variable name

FindVariable    (declared in MacroParser)

 

method FindVariable(name: String): MacroVariable

 

MacroVariable FindVariable(String name)

 

Function FindVariable(name As String) As MacroVariable

Parameters:

  • name:

FormatDate  protected    (declared in SqlMacroProcessor)

 

method FormatDate(parameters: array of String): String

 

String FormatDate(String[] parameters)

 

Function FormatDate(parameters As String()) As String

Parameters:

  • parameters:

FormatDateTime  protected    (declared in SqlMacroProcessor)

 

method FormatDateTime(parameters: array of String): String

 

String FormatDateTime(String[] parameters)

 

Function FormatDateTime(parameters As String()) As String

Parameters:

  • parameters:

GetNewInstance

 

method GetNewInstance: SqlMacroProcessor

 

SqlMacroProcessor GetNewInstance()

 

Function GetNewInstance() As SqlMacroProcessor

Length  protected

 

method Length(parameters: array of String): String

 

String Length(String[] parameters)

 

Function Length(parameters As String()) As String

Parameters:

  • parameters:

LowerCase  protected

 

method LowerCase(parameters: array of String): String

 

String LowerCase(String[] parameters)

 

Function LowerCase(parameters As String()) As String

Parameters:

  • parameters:

NoLock  protected    (declared in SqlMacroProcessor)

 

method NoLock(parameters: array of String): String

 

String NoLock(String[] parameters)

 

Function NoLock(parameters As String()) As String

Parameters:

  • parameters:

RegisterMacro    (declared in MacroParser)

 

method RegisterMacro(name: String; callback: Func<array of String, String>; paramCount: Int32)

 

void RegisterMacro(String name, Func<array of String, String> callback, Int32 paramCount)

 

Sub RegisterMacro(name As String, callback As Func (Of String(), String), paramCount As Int32)

Parameters:

  • name:
  • callback:
  • paramCount:

RegisterMacros  protected    (declared in SqlMacroProcessor)

Registers the existing standard macros:

  • Date
  • DateTime
  • AddTime
  • FormatDateTime
  • FormatDate
  • Length
  • LowerCase
  • UpperCase
  • TrimLeft
  • TrimRight
  • Copy
  • NoLock

 

method RegisterMacros

 

void RegisterMacros()

 

Sub RegisterMacros()

Session  protected    (declared in SqlMacroProcessor)

 

method Session(parameters: array of String): String

 

String Session(String[] parameters)

 

Function Session(parameters As String()) As String

Parameters:

  • parameters:

Time  protected    (declared in SqlMacroProcessor)

 

method Time(parameters: array of String): String

 

String Time(String[] parameters)

 

Function Time(parameters As String()) As String

Parameters:

  • parameters:

Trim  protected

 

method Trim(parameters: array of String): String

 

String Trim(String[] parameters)

 

Function Trim(parameters As String()) As String

Parameters:

  • parameters:

TrimLeft  protected

 

method TrimLeft(parameters: array of String): String

 

String TrimLeft(String[] parameters)

 

Function TrimLeft(parameters As String()) As String

Parameters:

  • parameters:

TrimRight  protected

 

method TrimRight(parameters: array of String): String

 

String TrimRight(String[] parameters)

 

Function TrimRight(parameters As String()) As String

Parameters:

  • parameters:

UpperCase  protected

 

method UpperCase(parameters: array of String): String

 

String UpperCase(String[] parameters)

 

Function UpperCase(parameters As String()) As String

Parameters:

  • parameters: