Method | Description | |
---|---|---|
CanUseAliasInOrderClause ( ) : bool |
Once we've aliased a function (such as COUNT(*)), can we use that alias in the order by clause or do we need to put the function again?
|
|
CaseInsensitiveLikeOperator ( ) : string |
The specific operator for doing case insensitive expressions
|
|
ColumnAliasPrefix ( ) : string |
Some databases want the " AS " keyword, some want the alias in quotes (cough SQLite cough), or square brackets (cough Microsoft cough), or whatever. This provides the database-specific stuff that comes before the alias.
|
|
ColumnAliasSuffix ( ) : string |
Some databases want the " AS " keyword, some want the alias in quotes (cough SQLite cough), or square brackets (cough Microsoft cough), or whatever. This provides the database-specific stuff that comes after the alias.
|
|
CreateDataAccessLayer ( ) : IDaLayer |
Returns the appropriate data access layer for this connection. The default implementation returns a normal SQL data access layer, but this may be overridden in particular DB connection descriptors.
|
|
CreateNewAdapter ( IDbCommand cmd ) : |
This method returns a DbDataAdapter that can be used to fill DataSets.
|
|
CreateNewConnection ( ) : |
This method returns a database connection to the database specified by this connection descriptor. This is not meant to be called by client code, only by the utilities in the Azavea.Database assembly.
|
|
FullOuterJoinKeyword ( ) : string |
Not all databases have the same syntax for full outer joins. Most use "FULL OUTER JOIN" but some do not.
|
|
HasCaseInsensitiveLikeOperator ( ) : bool |
Not all databases have a case insensitive LIKE operator, such as ILIKE in postgres. Some databases (SQL Server/Access) use LIKE as case insensitive by default.
|
|
LowerCaseFunction ( ) : string |
UPPER and LOWER are not actually consistent across databases.
|
|
MakeBitwiseAndClause ( string columnName ) : |
Returns a 'bitwise and' sql string, something like "columnName & value", except that the syntax is DB-specific. Throws NotImplementedException if not yet supported for a particular type of connection.
|
|
MakeCreateIndexCommand ( string indexName, bool isUnique, string tableName, IEnumerable |
Returns the SQL statement to create an index on a table. There may be database-specific additional keywords required (such as "COMPUTE STATISTICS"). The default implementation returns a simple standard-sql create index statement.
|
|
MakeLastAutoGeneratedIdQuery ( string tableName, string idCol ) : string |
Gets the last id generated in an ID column for a table. Some databases can do this more efficiently or correctly than the default way ("select max idcol from table").
|
|
MakeModulusClause ( string columnName ) : |
Returns a modulus sql string, something like "columnName % value", except that the syntax is DB-specific. Throws NotImplementedException if not yet supported for a particular type of connection.
|
|
MakeSequenceValueQuery ( string sequenceName ) : string |
Since different databases have different ideas of what a sequence is, this allows the utility class to support sequences across all different DBs.
|
|
NeedAsForColumnAliases ( ) : bool |
Does the database require the "AS" keyword for aliasing a column? Most do not, but some (MS Access) do.
|
|
NeedToAliasColumns ( ) : bool |
Does this database require that we alias the columns explicitly if we are aliasing the table name? Most DBs will alias the columns for you (I.E. if you "SELECT ID FROM TABLE1 AS ALIAS1" then the column will be called "ALIAS1.ID", etc). However some require that you alias the columns specifically (cough SQLite, Access cough).
|
|
SetParametersOnCommand ( IDbCommand cmd, IEnumerable parameters ) : void |
Each driver seems to have its own way of marking parameters ("?", ":param", "@PARAM", etc). So, the database utilities class always uses "?" and relies on the specific descriptor to replace the ? with the appropriate names in the SQL, and also to set the parameters on the command object.
|
|
SupportsTruncate ( ) : bool |
Nearly every DB in the universe supports truncate, but a few (cough Access cough) do not.
|
|
TableAliasPrefix ( ) : string |
Some databases want the " AS " keyword, some don't (cough Oracle cough). This provides the database-specific stuff that comes before the alias.
|
|
TableAliasSuffix ( ) : string |
Some databases want the " AS " keyword, some don't (cough Oracle cough). This provides the database-specific stuff that comes after the alias.
|
|
UsePooling ( ) : bool |
Depending on the database and connection info, it may not always be appropriate to pool connections. This allows the connection descriptor to decide.
|
public CaseInsensitiveLikeOperator ( ) : string | ||
return | string |
public abstract ColumnAliasPrefix ( ) : string | ||
return | string |
public abstract ColumnAliasSuffix ( ) : string | ||
return | string |
public abstract CreateNewAdapter ( IDbCommand cmd ) : |
||
cmd | IDbCommand | The command that the adapter will be executing. |
return |
public abstract CreateNewConnection ( ) : |
||
return |
public HasCaseInsensitiveLikeOperator ( ) : bool | ||
return | bool |
public MakeBitwiseAndClause ( string columnName ) : |
||
columnName | string | The column used in the clause. |
return |
public MakeCreateIndexCommand ( string indexName, bool isUnique, string tableName, IEnumerable |
||
indexName | string | Name of the index to create. |
isUnique | bool | Is this a unique index? |
tableName | string | What table to create the index on. |
columnNames | IEnumerable |
The columns included in the index. |
return | string |
public MakeLastAutoGeneratedIdQuery ( string tableName, string idCol ) : string | ||
tableName | string | The table the ID column belongs to. |
idCol | string | The ID column for which to get the last generated ID value. |
return | string |
public MakeModulusClause ( string columnName ) : |
||
columnName | string | The column used in the clause. |
return |
public MakeSequenceValueQuery ( string sequenceName ) : string | ||
sequenceName | string | The name of the sequence we're getting an ID from. |
return | string |
public abstract NeedAsForColumnAliases ( ) : bool | ||
return | bool |
public abstract NeedToAliasColumns ( ) : bool | ||
return | bool |
public abstract SetParametersOnCommand ( IDbCommand cmd, IEnumerable parameters ) : void | ||
cmd | IDbCommand | Database command (with .Text already populated with sql) that needs /// the parameters set on it. |
parameters | IEnumerable | The parameter values, in the order that the ?'s appear in the /// command's text. This collection should not be null. |
return | void |
public abstract TableAliasPrefix ( ) : string | ||
return | string |
public abstract TableAliasSuffix ( ) : string | ||
return | string |