6 #ifndef _INC_cSQLConfig_H
7 #define _INC_cSQLConfig_H
12 #include "../GrayLibBase.h"
13 #include "../Variant/cVariantType.h"
70 CMDFLG_DateWrap = 0x10,
78 : m_uCmdFlags(uCmdFlags)
85 return m_uCmdFlags & CMDFLG_MySQL;
90 return m_uCmdFlags & CMDFLG_MySQL;
95 return m_uCmdFlags & CMDFLG_DateWrap;
99 bool ConvertEscapeQuotes(
cStringA& a_cs)
const;
117 : m_bPopulated(false)
118 , m_bAutoCommit(true)
119 , m_bSupportsTransactions(true)
125 m_bPopulated =
false;
126 m_bAutoCommit =
true;
127 m_sDatabaseName.
Empty();
128 m_sDataSourceName.
Empty();
140 return m_sDatabaseName;
147 if (m_sDataSourceName.
IsEmpty())
149 return get_DatabaseName();
151 return m_sDataSourceName;
158 return m_bSupportsTransactions;
164 return m_bAutoCommit;
170 m_bAutoCommit = bAutoCommit;
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
Definition: cSQLConfig.h:55
CMDFLG_TYPE
Definition: cSQLConfig.h:63
UINT m_uCmdFlags
These flags effect how a command might be built. options supported (or not) by drivers.
Definition: cSQLConfig.h:74
bool isConvertEscapes() const noexcept
Definition: cSQLConfig.h:81
bool isUseLIMITCommand() const noexcept
Definition: cSQLConfig.h:87
bool isDateWrap() const noexcept
Definition: cSQLConfig.h:92
cSQLConfigCmd(UINT uCmdFlags=CMDFLG_MSSQL)
Definition: cSQLConfig.h:77
Definition: cSQLConfig.h:103
bool m_bAutoCommit
Definition: cSQLConfig.h:110
bool get_AutoCommit() const
Definition: cSQLConfig.h:161
void put_AutoCommit(bool bAutoCommit)
Definition: cSQLConfig.h:166
bool m_bPopulated
Have we tested the db/connection for capabilities ?
Definition: cSQLConfig.h:109
cStringA m_sDatabaseName
SQL_DATABASE_NAME - Database = reset at each m_bIsConnected.
Definition: cSQLConfig.h:112
cStringA get_DatabaseName() const
Definition: cSQLConfig.h:131
cStringA get_DataSourceName() const
Definition: cSQLConfig.h:142
bool get_SupportsTransactions() const
Definition: cSQLConfig.h:154
void Clear()
Definition: cSQLConfig.h:123
cSQLConfigDB()
Definition: cSQLConfig.h:116
cStringA m_sDataSourceName
SQL_DATA_SOURCE_NAME - DSN = reset at each m_bIsConnected. parsed from m_ConnectionString.
Definition: cSQLConfig.h:113
bool m_bSupportsTransactions
We can do a Rollback?
Definition: cSQLConfig.h:111
void Empty()
Definition: cString.h:193
bool IsEmpty() const noexcept
Definition: cString.h:176
VARTYPE_TYPE
< define types of structure/record elements. (COM uses VARTYPE=VARENUM for this) stored as BYTE
Definition: cVariantType.h:19
@ VARTYPE_NoType
Definition: cVariantType.h:24
unsigned long SQL_SCALE_t
Definition: cSQLConfig.h:25
INT16 SQL_TYPE_t
Internal/Native/driver type code. enum SWORD = SQL_TYPE_NULL = 0, short int.
Definition: cSQLConfig.h:19
Definition: cSQLConfig.h:29
INT16 m_nPrecision
SQL_COLUMN_PRECISION. // SQLULEN = 64 or 32 bit. AKA DecimalDigits.
Definition: cSQLConfig.h:38
SQL_TYPE_t m_nSQLType
SQL_COLUMN_TYPE = ODBC/Driver/Internal data type (SQL_BINARY) VARTYPE_TYPE. See Cvt_ODBCType_to_CType...
Definition: cSQLConfig.h:36
VARTYPE_TYPE m_eVarType
My internal type equiv to m_nSQLType.
Definition: cSQLConfig.h:41
SQL_SCALE_t m_nScale
SQL_COLUMN_SCALE. // AKA ColumnSize, SWORD or SQLSMALLINT. e.g. nvarchar(nScale) for max size of stri...
Definition: cSQLConfig.h:37
bool m_bNullability
SQL_COLUMN_NULLABLE.
Definition: cSQLConfig.h:39
void SetClear() noexcept
Definition: cSQLConfig.h:43
cStringA m_strName
SQL_COLUMN_NAME.
Definition: cSQLConfig.h:35