DatabaseProfile

Overview

DatabaseProfile is a class that stores the database profile known to the server application.

This class is used by other classes in the RemObjects.DataAbstract.Server assembly to obtain database specific information, such as SQL querying for acquiring lists of tables or quoted identifiers. In most cases, you will not use this class directly, but if you wish to add your own database driver, you can describe its profile as shown in this article.

Location

 

constructor

Creates a new instance of DatabaseProfile and loads information from the aXmlNode parameter. If the configuration settings are invalid, the DAConfigurationError exception will be raised.

 

constructor(node: XmlNode; changeNotification: INameChangeNotification)

 

DatabaseProfile(XmlNode node, INameChangeNotification changeNotification)

 

Sub New(node As XmlNode, changeNotification As INameChangeNotification)

Parameters:

  • node:
  • changeNotification:

DatabaseLocationFileMask

Property that holds the file mask for the database file (for example, for the Interbase profile, the value is "Interbase files (.gdb, .fdb)|.gdb;.fdb").

 

property DatabaseLocationFileMask: String read;

 

String DatabaseLocationFileMask { get; }

 

ReadOnly Property DatabaseLocationFileMask() As String

DatabaseLocationType

Specifies what sort of UI Schema Modeler will be used at design-time to let the user select a database. Options include:

  • Select - GetDatabaseNames will be used to obtain a list of databases from the server (a drop-down list will be presented).
  • File - Databases are file based, and a Browse dialog is provided. DatabaseLocationFileMask will specify the file extension filter to use.
  • Folder - Databases are folder-based, and a Browse for Folder dialog will be provided.

 

property DatabaseLocationType: String read;

 

String DatabaseLocationType { get; }

 

ReadOnly Property DatabaseLocationType() As String

DataTypeToDbType

 

method DataTypeToDbType(aDataType: DataType): DbType

 

DbType DataTypeToDbType(DataType aDataType)

 

Function DataTypeToDbType(aDataType As DataType) As DbType

Parameters:

  • aDataType:

GetDatabaseNamesSQL

This property, as well as other Get*SQL properties defined in the SQL code, is used to obtain a list of specific objects. These queries must all return data in a single column called "Name" and are only used at design-time in Schema Modeler (for example, for the MSSQL profile, the value is "SELECT name as Name FROM master.dbo.sysdatabases").

 

property GetDatabaseNamesSQL: String read;

 

String GetDatabaseNamesSQL { get; }

 

ReadOnly Property GetDatabaseNamesSQL() As String

GetForeignKeysSQL

 

property GetForeignKeysSQL: String read;

 

String GetForeignKeysSQL { get; }

 

ReadOnly Property GetForeignKeysSQL() As String

GetGeneratorNamesSQL

 

property GetGeneratorNamesSQL: String read;

 

String GetGeneratorNamesSQL { get; }

 

ReadOnly Property GetGeneratorNamesSQL() As String

GetLastAutoIncSQL

 

property GetLastAutoIncSQL: String read;

 

String GetLastAutoIncSQL { get; }

 

ReadOnly Property GetLastAutoIncSQL() As String

GetStoredProcedureNamesSQL

 

property GetStoredProcedureNamesSQL: String read;

 

String GetStoredProcedureNamesSQL { get; }

 

ReadOnly Property GetStoredProcedureNamesSQL() As String

GetTableNamesSQL

 

property GetTableNamesSQL: String read;

 

String GetTableNamesSQL { get; }

 

ReadOnly Property GetTableNamesSQL() As String

GetViewsNamesSQL

 

property GetViewsNamesSQL: String read;

 

String GetViewsNamesSQL { get; }

 

ReadOnly Property GetViewsNamesSQL() As String

IdentifierIsQuoted

 

method IdentifierIsQuoted(identifier: String): Boolean

 

Boolean IdentifierIsQuoted(String identifier)

 

Function IdentifierIsQuoted(identifier As String) As Boolean

Parameters:

  • identifier:

IdentifierNeedsQuoting

 

method IdentifierNeedsQuoting(identifier: String): Boolean

 

Boolean IdentifierNeedsQuoting(String identifier)

 

Function IdentifierNeedsQuoting(identifier As String) As Boolean

Parameters:

  • identifier:

MacroProcessor

Specifies the MacroProcessor used by this profile. If no values were specified in the configuration, the DefaultSqlMacroProcessor is used.

 

property MacroProcessor: ISqlMacroProcessor read;

 

ISqlMacroProcessor MacroProcessor { get; }

 

ReadOnly Property MacroProcessor() As ISqlMacroProcessor

QuoteIdentifier

 

method QuoteIdentifier(identifier: String): String

 

String QuoteIdentifier(String identifier)

 

Function QuoteIdentifier(identifier As String) As String

Parameters:

  • identifier:

QuoteIdentifierIfNeeded

 

method QuoteIdentifierIfNeeded(identifier: String): String

 

String QuoteIdentifierIfNeeded(String identifier)

 

Function QuoteIdentifierIfNeeded(identifier As String) As String

Parameters:

  • identifier:

QuotingIdentifiers

This property specifies the two characters that will be used to quote identifiers that need quoting. These can be two different characters for the start and end of a quote (such as the square brackets used by SQL Server), or a single character can be repeated (such as the double-quotes used by most other databases).

 

property QuotingIdentifiers: array of Char read;

 

Char[] QuotingIdentifiers { get; }

 

ReadOnly Property QuotingIdentifiers() As Char()

SelectSPSyntaxWithArguments

Specifies the syntax to be used to execute stored procedures on the backend database.

 

property SelectSPSyntaxWithArguments: String read;

 

String SelectSPSyntaxWithArguments { get; }

 

ReadOnly Property SelectSPSyntaxWithArguments() As String

SelectSPSyntaxWithoutArguments

 

property SelectSPSyntaxWithoutArguments: String read;

 

String SelectSPSyntaxWithoutArguments { get; }

 

ReadOnly Property SelectSPSyntaxWithoutArguments() As String

SqlExpressionGenerator

 

property SqlExpressionGenerator: ISqlExpressionGenerator read;

 

ISqlExpressionGenerator SqlExpressionGenerator { get; }

 

ReadOnly Property SqlExpressionGenerator() As ISqlExpressionGenerator

SupportsAutoIncs

 

property SupportsAutoIncs: Boolean read;

 

Boolean SupportsAutoIncs { get; }

 

ReadOnly Property SupportsAutoIncs() As Boolean

UseDateTime2

 

property UseDateTime2: Boolean read;

 

Boolean UseDateTime2 { get; }

 

ReadOnly Property UseDateTime2() As Boolean

Validate

 

method Validate

 

void Validate()

 

Sub Validate()

 

DatabaseLocationFileMask

Property that holds the file mask for the database file (for example, for the Interbase profile, the value is "Interbase files (.gdb, .fdb)|.gdb;.fdb").

 

property DatabaseLocationFileMask: String read;

 

String DatabaseLocationFileMask { get; }

 

ReadOnly Property DatabaseLocationFileMask() As String

DatabaseLocationType

Specifies what sort of UI Schema Modeler will be used at design-time to let the user select a database. Options include:

  • Select - GetDatabaseNames will be used to obtain a list of databases from the server (a drop-down list will be presented).
  • File - Databases are file based, and a Browse dialog is provided. DatabaseLocationFileMask will specify the file extension filter to use.
  • Folder - Databases are folder-based, and a Browse for Folder dialog will be provided.

 

property DatabaseLocationType: String read;

 

String DatabaseLocationType { get; }

 

ReadOnly Property DatabaseLocationType() As String

GetDatabaseNamesSQL

This property, as well as other Get*SQL properties defined in the SQL code, is used to obtain a list of specific objects. These queries must all return data in a single column called "Name" and are only used at design-time in Schema Modeler (for example, for the MSSQL profile, the value is "SELECT name as Name FROM master.dbo.sysdatabases").

 

property GetDatabaseNamesSQL: String read;

 

String GetDatabaseNamesSQL { get; }

 

ReadOnly Property GetDatabaseNamesSQL() As String

GetForeignKeysSQL

 

property GetForeignKeysSQL: String read;

 

String GetForeignKeysSQL { get; }

 

ReadOnly Property GetForeignKeysSQL() As String

GetGeneratorNamesSQL

 

property GetGeneratorNamesSQL: String read;

 

String GetGeneratorNamesSQL { get; }

 

ReadOnly Property GetGeneratorNamesSQL() As String

GetLastAutoIncSQL

 

property GetLastAutoIncSQL: String read;

 

String GetLastAutoIncSQL { get; }

 

ReadOnly Property GetLastAutoIncSQL() As String

GetStoredProcedureNamesSQL

 

property GetStoredProcedureNamesSQL: String read;

 

String GetStoredProcedureNamesSQL { get; }

 

ReadOnly Property GetStoredProcedureNamesSQL() As String

GetTableNamesSQL

 

property GetTableNamesSQL: String read;

 

String GetTableNamesSQL { get; }

 

ReadOnly Property GetTableNamesSQL() As String

GetViewsNamesSQL

 

property GetViewsNamesSQL: String read;

 

String GetViewsNamesSQL { get; }

 

ReadOnly Property GetViewsNamesSQL() As String

MacroProcessor

Specifies the MacroProcessor used by this profile. If no values were specified in the configuration, the DefaultSqlMacroProcessor is used.

 

property MacroProcessor: ISqlMacroProcessor read;

 

ISqlMacroProcessor MacroProcessor { get; }

 

ReadOnly Property MacroProcessor() As ISqlMacroProcessor

QuotingIdentifiers

This property specifies the two characters that will be used to quote identifiers that need quoting. These can be two different characters for the start and end of a quote (such as the square brackets used by SQL Server), or a single character can be repeated (such as the double-quotes used by most other databases).

 

property QuotingIdentifiers: array of Char read;

 

Char[] QuotingIdentifiers { get; }

 

ReadOnly Property QuotingIdentifiers() As Char()

SelectSPSyntaxWithArguments

Specifies the syntax to be used to execute stored procedures on the backend database.

 

property SelectSPSyntaxWithArguments: String read;

 

String SelectSPSyntaxWithArguments { get; }

 

ReadOnly Property SelectSPSyntaxWithArguments() As String

SelectSPSyntaxWithoutArguments

 

property SelectSPSyntaxWithoutArguments: String read;

 

String SelectSPSyntaxWithoutArguments { get; }

 

ReadOnly Property SelectSPSyntaxWithoutArguments() As String

SqlExpressionGenerator

 

property SqlExpressionGenerator: ISqlExpressionGenerator read;

 

ISqlExpressionGenerator SqlExpressionGenerator { get; }

 

ReadOnly Property SqlExpressionGenerator() As ISqlExpressionGenerator

SupportsAutoIncs

 

property SupportsAutoIncs: Boolean read;

 

Boolean SupportsAutoIncs { get; }

 

ReadOnly Property SupportsAutoIncs() As Boolean

UseDateTime2

 

property UseDateTime2: Boolean read;

 

Boolean UseDateTime2 { get; }

 

ReadOnly Property UseDateTime2() As Boolean

 

constructor

Creates a new instance of DatabaseProfile and loads information from the aXmlNode parameter. If the configuration settings are invalid, the DAConfigurationError exception will be raised.

 

constructor(node: XmlNode; changeNotification: INameChangeNotification)

 

DatabaseProfile(XmlNode node, INameChangeNotification changeNotification)

 

Sub New(node As XmlNode, changeNotification As INameChangeNotification)

Parameters:

  • node:
  • changeNotification:

DataTypeToDbType

 

method DataTypeToDbType(aDataType: DataType): DbType

 

DbType DataTypeToDbType(DataType aDataType)

 

Function DataTypeToDbType(aDataType As DataType) As DbType

Parameters:

  • aDataType:

IdentifierIsQuoted

 

method IdentifierIsQuoted(identifier: String): Boolean

 

Boolean IdentifierIsQuoted(String identifier)

 

Function IdentifierIsQuoted(identifier As String) As Boolean

Parameters:

  • identifier:

IdentifierNeedsQuoting

 

method IdentifierNeedsQuoting(identifier: String): Boolean

 

Boolean IdentifierNeedsQuoting(String identifier)

 

Function IdentifierNeedsQuoting(identifier As String) As Boolean

Parameters:

  • identifier:

QuoteIdentifier

 

method QuoteIdentifier(identifier: String): String

 

String QuoteIdentifier(String identifier)

 

Function QuoteIdentifier(identifier As String) As String

Parameters:

  • identifier:

QuoteIdentifierIfNeeded

 

method QuoteIdentifierIfNeeded(identifier: String): String

 

String QuoteIdentifierIfNeeded(String identifier)

 

Function QuoteIdentifierIfNeeded(identifier As String) As String

Parameters:

  • identifier:

Validate

 

method Validate

 

void Validate()

 

Sub Validate()