Loading...
Searching...
No Matches
FreetdsSqlUtil::FreetdsTable Class Reference

provides the FreeTDS-specific implementation of the SqlUtil::AbstractTable interface More...

Inherits SqlUtil::AbstractTable.

## Public Member Functions

private | doSelectOrderByWithOffsetSqlUnlockedImpl (reference< hash< QueryInfo > > info, reference< string > sql, list< auto > coll)
| processes a string for use in SQL select statements when there is an "order by" and "offset" argument
string | getColumnSqlName (string col)
| returns the column name for use in SQL strings; subclasses can return a special string in case the column name is a reserved word
list | getColumnSqlNames (softlist cols)
| returns a list of column names for use in SQL strings; subclasses can process the argument list in case a column name is a reserved word
hash< auto > | getExpressionMap ()
| Returns the expression map for FreeTDS.
string | getSchemaName ()
| returns the schema name
string | getSqlName ()
| returns the name of the table to be used in SQL (with a possible qualifiers for schema, etc)
*string | getTablespaceName ()
| returns the data filegroup name for the table or NOTHING if none is known
code | getUpsertClosure (hash< auto > row, int upsert_strategy=UpsertAuto, *hash opt)
| returns a closure for performing upserts More...
hash< auto > | getWhereOperatorMap ()
| returns the "where" operator map for FreeTDS
bool | hasArrayBind ()
| returns False because the freetds driver does not support array binds / bulk DML operations

## Public Attributes

const | FreetdsCopMap = ...
| column operator specializations for FreeTDS
const | FreetdsExpressionMap
| FreeTDS Expression map.
const | FreetdsIopMap = ...
| a hash of default value operator descriptions for FreeTDS
const | FreetdsOpMap
| where operator specializations for FreeTDS
const | FreetdsSelectOptions = ...
| select options supported by FreetdsSqlUtil
const | FreetdsTableDescriptionHashOptions = AbstractTable::TableDescriptionHashOptions
| equal to SqlUtil::AbstractTable::TableDescriptionHashOptions
const | FreetdsTruncDate = ...
| Map SqlUtil::cop_trunc_date() constants to FreeTDS internal masks.
const | FreetdsTypeMap = ...
| maps postgresql type names to type configurations
const | FreetdsUopMap = ...
| a hash of default update operator definitions for FreeTDS
bool | is_sybase
| sybase flag
const | MsQoreTypeMap
| maps qore type names to MS SQL Server type names
const | MsSqlServerTableHints = ...
| query hints
const | QoreTypeMap = ...
| maps qore type names to DB type names
bool | ss_has_merge = False
| "has merge" flag for SQL server
bool | ss_has_sequences = False
| "has sequences" flag for SQL server
const | SybaseQoreTypeMap
| maps qore type names to Sybase/SAP type names

## Protected Member Functions

| clearImpl ()
| clears FreeTDS-specific table information
bool | constraintsLinkedToIndexesImpl ()
| returns True if the database links constraints to indexes (ie dropping the constraint drops the index, etc)
| copyImpl (AbstractTable old)
| db-specific copy actions
| doSelectLimitOnlyUnlockedImpl (reference< hash< QueryInfo > > info, reference< string > sql)
| processes a string for use in SQL select statements with "limit" but no "orderby" or "offset"
hash | getColumnOperatorMapImpl ()
| returns the column operator map for this object
string | getCreateSqlImpl (list l)
| returns a string that can be used to create the table in the database
string | getCreateTableSqlImpl (*hash opt)
| returns a string that can be used to create the table in the database
hash | getInsertOperatorMap ()
| returns the insert operator map for this object
AbstractDataProviderType | getNumericTypeImpl (string native_type, bool nullable, *hash< auto > options)
| returns the type for number / numeric columns for the database so that data conversions can be handled properly
hash | getRawUpdateOperatorMap ()
| returns the raw (default) update operator map for this object
AbstractSavepointHelper | getSavepointHelperImpl (*string savepoint)
| get DB-specific savepoint helper More...
hash | getSelectOptions ()
| returns the select options for this driver
*string | getSqlValueImpl (auto v)
| returns a string for use in SQL queries representing the DB-specific value of the argument More...
bool | isDuplicateRowErrorImpl (hash< ExceptionInfo > ex)
| Returns True if the exception was raised because of a duplicate row / key error. More...
bool | supportsTablespacesImpl ()
| returns True if the database support tablespaces
auto | tryExecArgsImpl (string sql, *softlist< auto > args)
| tries to execute a command so that if an error occurs the current transaction status is not lost
auto | tryExecRawImpl (string sql, *softlist< auto > args)
| tries to execute a command so that if an error occurs the current transaction status is not lost
bool | uniqueIndexCreatesConstraintImpl ()
| returns True if the database automatically creates a unique constraint with a unique index

## Protected Attributes

string | default_schema = "dbo"
| the default schema for the user
*string | filegroup
| filegroup name for the table, if known
string | schema
| schema name for the table
Functions | triggerFunctions
| contains any trigger functions supporting triggers on the table

## Detailed Description

provides the FreeTDS-specific implementation of the SqlUtil::AbstractTable interface

## Member Function Documentation

## getSavepointHelperImpl()

AbstractSavepointHelper FreetdsSqlUtil::FreetdsTable::getSavepointHelperImpl | ( | *string | savepoint | ) |

protected

get DB-specific savepoint helper

Parameters

  savepoint | the savepoint string, if not given a unique savepoint string will be generated

Since
  SqlUtil 1.6

## getSqlValueImpl()

*string FreetdsSqlUtil::FreetdsTable::getSqlValueImpl | ( | auto | v | ) |

protected

returns a string for use in SQL queries representing the DB-specific value of the argument

returns NOTHING if the type cannot be converted to an SQL string

## getUpsertClosure()

code FreetdsSqlUtil::FreetdsTable::getUpsertClosure | ( | hash< auto > | row,
|  | int | upsert_strategy = `UpsertAuto`,
|  | *hash | opt
| ) |  |

returns a closure for performing upserts

if the underlying dataserver supports an optimized `MERGE` statement (Microsoft SQL Server 2008+), the upsert_strategy argument is ignored and a closure using a merge statement is returned, otherwise the standard upsert closure is returned according to SqlUtil::AbstractTable::getUpsertClosure()

## isDuplicateRowErrorImpl()

bool FreetdsSqlUtil::FreetdsTable::isDuplicateRowErrorImpl | ( | hash< ExceptionInfo > | ex | ) |

protected

Returns True if the exception was raised because of a duplicate row / key error.

Since
  FreetdsSqlUtil 1.4.1