FirebirdMacroProcessor Class

From RemObjects Wiki
Jump to: navigation, search

This is a Library topic for Data Abstract for .NET
This page is generated from external data, please do not update

NamespacesInterfacesClassesEnumsImplements

Contents

Overview

The FirebirdMacroProcessor class provides Firebird SQL-specific definitions for SQL functions defined in the SqlMacroProcessor class.

The FirebirdMacroProcessor class is used to process macros in Schema statements that have their ConnectionType set to Interbase. Look at the following statement:

SELECT
  *
FROM
  Orders 
WHERE
  order_date = {Date()}

will be converted to

SELECT
  *
FROM
  Orders 
WHERE
  order_date = DATE 'NOW'

Note: You can find more about macro processors and macro functions in this article.


Location


Properties

DateFormat     (declared in SqlMacroProcessor)

Gets the date format for the current database.



Prism:   property DateFormat: String read
C#:   String DateFormat { get; }
VB:   Property ReadOnly DateFormat As String


DateTimeFormat     (declared in SqlMacroProcessor)

Gets the datetime format for the current database.



Prism:   property DateTimeFormat: String read
C#:   String DateTimeFormat { get; }
VB:   Property ReadOnly 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'.



Prism:   property DoubleQuoteStrings: Boolean read
C#:   Boolean DoubleQuoteStrings { get; }
VB:   Property ReadOnly DoubleQuoteStrings As Boolean


StoredProcedurePrefix     (declared in SqlMacroProcessor)

Gets the prefix for stored procedures for the current database.



Prism:   property StoredProcedurePrefix: String read
C#:   String StoredProcedurePrefix { get; }
VB:   Property ReadOnly StoredProcedurePrefix As String


StoredProcParamPrefix     (declared in SqlMacroProcessor)

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



Prism:   property StoredProcParamPrefix: String read
C#:   String StoredProcParamPrefix { get; }
VB:   Property ReadOnly StoredProcParamPrefix As String


UnknownIdentifier     (declared in MacroParser)

Points to the method that should be called when an unknown macro function or variable is encountered during expression parsing.

The called method is able to set the value of the otherwise undefined macro variable. For example, this approach is used to provide access to Session values in the {WHERE} of SchemaDataTable statements.



Prism:   property UnknownIdentifier: UnknownIdentifierEventHandler read write
C#:   UnknownIdentifierEventHandler UnknownIdentifier { get; set; }
VB:   Property UnknownIdentifier As UnknownIdentifierEventHandler


Variable     (declared in MacroParser)

Gets the macro variable at the specified index.



Prism:   property Variable[aIndex: Int32]: MacroVar read
C#:   MacroVar Variable[Int32 aIndex] { get; }
VB:   Property ReadOnly Variable[aIndex As Int32] As MacroVar


VariableCount     (declared in MacroParser)

Gets the number of macro variables registered in the current MacroParser instance.



Prism:   property VariableCount: Int32 read
C#:   Int32 VariableCount { get; }
VB:   Property ReadOnly VariableCount As Int32


Instance Methods

constructor ()

Creates a new instance of the FirebirdMacroProcessor class.


Oxygene:   constructor
C#:   constructor()
VB:   Sub New


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



Oxygene:   constructor(dateFormat: String; datetimeFormat: String; doubleQuoteStrings: Boolean; parameterPrefix: String)
C#:   constructor(String dateFormat, String datetimeFormat, Boolean doubleQuoteStrings, String parameterPrefix)
VB:   Sub New (dateFormat As String, datetimeFormat As String, doubleQuoteStrings As Boolean, parameterPrefix As String)


Parameters:

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


AddTime   protected

Converts the {AddTime} macro into a DATEADD function call.


Oxygene:   method AddTime(sender: Object; parameters: array of String): String
C#:   String AddTime(Object sender, array of String parameters)
VB:   Function AddTime(sender As Object, parameters As array of String) As String


Parameters:

  • sender:
  • parameters:


AddVariable     (declared in MacroParser)

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


Oxygene:   method AddVariable(aName: String): MacroVar
C#:   MacroVar AddVariable(String aName)
VB:   Function AddVariable(aName As String) As MacroVar


Parameters:

  • aName:


ClearProcs     (declared in MacroParser)

Clears the internal list of registered macro procedures.


Oxygene:   method ClearProcs
C#:   void ClearProcs()
VB:   Sub ClearProcs


ClearVariables     (declared in MacroParser)

Clears the internal list of registered macro variables.


Oxygene:   method ClearVariables
C#:   void ClearVariables()
VB:   Sub ClearVariables


ComposeLengthCall     (declared in SqlMacroProcessor)



Oxygene:   method ComposeLengthCall(argument: String): String
C#:   String ComposeLengthCall(String argument)
VB:   Function ComposeLengthCall(argument As String) As String


Parameters:

  • argument:


ComposeToLowerCall     (declared in SqlMacroProcessor)



Oxygene:   method ComposeToLowerCall(argument: String): String
C#:   String ComposeToLowerCall(String argument)
VB:   Function ComposeToLowerCall(argument As String) As String


Parameters:

  • argument:


ComposeToUpperCall     (declared in SqlMacroProcessor)



Oxygene:   method ComposeToUpperCall(argument: String): String
C#:   String ComposeToUpperCall(String argument)
VB:   Function ComposeToUpperCall(argument As String) As String


Parameters:

  • argument:


Copy   protected

Converts the {Copy} macro into a SUBSTRING function call.


Oxygene:   method Copy(sender: Object; parameters: array of String): String
C#:   String Copy(Object sender, array of String parameters)
VB:   Function Copy(sender As Object, parameters As array of String) As String


Parameters:

  • sender:
  • parameters:


Date   protected

Converts the {Date} macro into a NOW function call and returns the DATE part of the result.


Oxygene:   method Date(sender: Object; parameters: array of String): String
C#:   String Date(Object sender, array of String parameters)
VB:   Function Date(sender As Object, parameters As array of String) As String


Parameters:

  • sender:
  • parameters:


DateTime   protected

Converts a {DateTime} macro into a NOW function call and returns the TIMESTAMP part of its result.


Oxygene:   method DateTime(sender: Object; parameters: array of String): String
C#:   String DateTime(Object sender, array of String parameters)
VB:   Function DateTime(sender As Object, parameters As array of String) As String


Parameters:

  • sender:
  • parameters:


DeleteVariable     (declared in MacroParser)

Removes the macro variable with the specified name from the internal list of registered variables.


Oxygene:   method DeleteVariable(aIndex: Int32)
C#:   void DeleteVariable(Int32 aIndex)
VB:   Sub DeleteVariable(aIndex As Int32)


Parameters:

  • aIndex:


Eval     (declared in MacroParser)

Evaluates the given expression, substituting macro tags with specific variable values or macro function results.

String constants within provided expressions can be delimited using the TextDelimiter char.


Oxygene:   method Eval(Text: String; TextDelimiter: Char): String
C#:   String Eval(String Text, Char TextDelimiter)
VB:   Function Eval(Text As String, TextDelimiter As Char) As String


Parameters:

  • Text: Expression to process
  • TextDelimiter: String constants delimiter


EvalToken     (declared in MacroParser)

Evaluates the provided macro token. This method calls the macro function or replaces the macro variable placeholder with its value.


Oxygene:   method EvalToken(Text: String): String
C#:   String EvalToken(String Text)
VB:   Function EvalToken(Text As String) As String


Parameters:

  • Text: Macro expression token


FindVariable     (declared in MacroParser)

Gets the macro variable with the specified name from the registered variables. Search is not case-sensitive.

If there is no variable with the provided name, null is returned.


Oxygene:   method FindVariable(aName: String): MacroVar
C#:   MacroVar FindVariable(String aName)
VB:   Function FindVariable(aName As String) As MacroVar


Parameters:

  • aName: Variable name


FormatDate   protected

Formats the provided date using the 'yyyy-MM-dd' date format.


Oxygene:   method FormatDate(sender: Object; parameters: array of String): String
C#:   String FormatDate(Object sender, array of String parameters)
VB:   Function FormatDate(sender As Object, parameters As array of String) As String


Parameters:

  • sender:
  • parameters:


FormatDateTime   protected

Formats the provided datetime using the 'yyyy-MM-dd HH:mm:ss' format.


Oxygene:   method FormatDateTime(sender: Object; parameters: array of String): String
C#:   String FormatDateTime(Object sender, array of String parameters)
VB:   Function FormatDateTime(sender As Object, parameters As array of String) As String


Parameters:

  • sender:
  • parameters:


GetNewInstance

Creates a new instance of the FirebirdMacroProcessor class.


Oxygene:   method GetNewInstance: SqlMacroProcessor
C#:   SqlMacroProcessor GetNewInstance()
VB:   Function GetNewInstance As SqlMacroProcessor


Length   protected

Converts the {Length} macro into a CHAR_LENGTH function call.


Oxygene:   method Length(sender: Object; parameters: array of String): String
C#:   String Length(Object sender, array of String parameters)
VB:   Function Length(sender As Object, parameters As array of String) As String


Parameters:

  • sender:
  • parameters:


LowerCase   protected

Converts the {LowerCase} macro into a LOWER function call.


Oxygene:   method LowerCase(sender: Object; parameters: array of String): String
C#:   String LowerCase(Object sender, array of String parameters)
VB:   Function LowerCase(sender As Object, parameters As array of String) As String


Parameters:

  • sender:
  • parameters:


NoLock   protected     (declared in SqlMacroProcessor)



Oxygene:   method NoLock(sender: Object; parameters: array of String): String
C#:   String NoLock(Object sender, array of String parameters)
VB:   Function NoLock(sender As Object, parameters As array of String) As String


Parameters:

  • sender:
  • parameters:


RegisterMacros   protected     (declared in SqlMacroProcessor)

Registers the existing standard macros:

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


Oxygene:   method RegisterMacros
C#:   void RegisterMacros()
VB:   Sub RegisterMacros


RegisterProc     (declared in MacroParser)

Creates a new macro procedure and adds it to the internal macro procedures list.


Oxygene:   method RegisterProc(aName: String; aExProc: ExternalProcEventHandler; aParamCount: Int32)
C#:   void RegisterProc(String aName, ExternalProcEventHandler aExProc, Int32 aParamCount)
VB:   Sub RegisterProc(aName As String, aExProc As ExternalProcEventHandler, aParamCount As Int32)


Parameters:

  • aName:
  • aExProc:
  • aParamCount: Number of procedure parameters


Session   protected     (declared in SqlMacroProcessor)



Oxygene:   method Session(sender: Object; parameters: array of String): String
C#:   String Session(Object sender, array of String parameters)
VB:   Function Session(sender As Object, parameters As array of String) As String


Parameters:

  • sender:
  • parameters:


Time   protected

Converts the {Date} macro into a NOW function call and returns the TIME part of its result.


Oxygene:   method Time(sender: Object; parameters: array of String): String
C#:   String Time(Object sender, array of String parameters)
VB:   Function Time(sender As Object, parameters As array of String) As String


Parameters:

  • sender:
  • parameters:


TrimLeft   protected

Converts the {TrimLeft} macro into a TRIM(LEADING <argument>) function call.


Oxygene:   method TrimLeft(sender: Object; parameters: array of String): String
C#:   String TrimLeft(Object sender, array of String parameters)
VB:   Function TrimLeft(sender As Object, parameters As array of String) As String


Parameters:

  • sender:
  • parameters:


TrimRight   protected

Converts the {TrimRight} macro into a TRIM(TRAILING <argument>) function call.


Oxygene:   method TrimRight(sender: Object; parameters: array of String): String
C#:   String TrimRight(Object sender, array of String parameters)
VB:   Function TrimRight(sender As Object, parameters As array of String) As String


Parameters:

  • sender:
  • parameters:


UpperCase   protected

Converts the {UpperCase} macro into an UPPER function call.


Oxygene:   method UpperCase(sender: Object; parameters: array of String): String
C#:   String UpperCase(Object sender, array of String parameters)
VB:   Function UpperCase(sender As Object, parameters As array of String) As String


Parameters:

  • sender:
  • parameters:


See Also


Product: RemObjects Data Abstract
Available Editions: Data Abstract for .NET, Delphi and Xcode

GlossaryArticlesFeaturesLibrarySamples

Personal tools
Namespaces

Variants
Actions
Navigation
products
platforms
special
Toolbox