📄 idapi.h
字号:
#define stmtAUXTBLS 0x00060026l //rw BOOL True if QBE to create CHANGED, etc.
#define stmtTBLVECTOR 0x00060027l //ro UINT16 Vector of tables generated by query.
#define stmtALLPROPS 0x00060028l //rw QueryLowProps
#define stmtALLPROPSSIZE 0x00060029l //rw INT16 size of QueryLowProps
#define stmtANSNAME 0x00060030l //rw pBYTE Answer Table Name.
#define stmtCONSTRAINED 0x00060031l //rw BOOL Constrain input
#define stmtFIELDDESCS 0x00060032l //rw pFLDDESC Answer FieldDescs
#define stmtCURPROPS 0x00060033l //rw pCURProps Answer Curprops
#define stmtDEFDBNAME 0x00060034l //rw pCURProps Answer Curprops
#define stmtXLTMODE 0x00060035l //rw XLTMode Xltmode
#define stmtINSTBLNAME 0x00060036l //ro DBITBLNAME INSERT table's name
#define stmtINSERRTBLNAME 0x00060037l //ro DBITBLNAME ERRINS table's name
#define stmtUPDTBLNAME 0x00060038l //ro DBITBLNAME UPDATE table's name
#define stmtUPDERRTBLNAME 0x00060039l //ro DBITBLNAME ERRUPD table's name
#define stmtDELTBLNAME 0x00060040l //ro DBITBLNAME DELETED table's name
#define stmtDELERRTBLNAME 0x00060041l //ro DBITBLNAME ERRDEL table's name
#define stmtCANNEDREADONLY 0x00060042l //ro BOOL canned answers are readonly
//============================================================================
// Transactions
//============================================================================
// Transaction support
typedef enum // Transaction isolation levels
{
xilDIRTYREAD, // Uncommitted changes read
xilREADCOMMITTED, // Committed changes, no phantoms
xilREPEATABLEREAD // Full read repeatability
} eXILType;
typedef enum // Transaction end control
{
xendCOMMIT, // Commit transaction
xendCOMMITKEEP, // Commit transaction, keep cursors
xendABORT // Rollback transaction
} eXEnd;
typedef enum // Transaction end control
{
xsINACTIVE, // Transaction inactive
xsACTIVE // Transaction active
} eXState;
typedef struct
{
eXState exState; // xsActive, xsInactive
eXILType eXIL; // Xact isolation level
UINT16 uNests; // Xact children
} XInfo, *pXInfo;
//============================================================================
// BookMark compares
//============================================================================
typedef enum // Compare BookMark Results
{
CMPLess = -1, // Bkm1 < Bkm2
CMPEql = 0, // BookMarks are exactly the same
CMPGtr = 1, // Bkm1 > Bkm2
CMPKeyEql = 2 // Only Bkm1.key_val = Bkm2.key_val
} CMPBkMkRslt;
typedef CMPBkMkRslt far *pCMPBkMkRslt;
//===========================================================================
// Key searches
//===========================================================================
typedef enum { // Search condition for keys
keySEARCHEQ = 0, // =
keySEARCHGT = 1, // >
keySEARCHGEQ = 2, // >=
} DBISearchCond;
//============================================================================
// Create/Restructure descriptor
//============================================================================
typedef enum // Create/Restruct Operation type
{
crNOOP = 0,
crADD = 1, // Add a new element.
crCOPY = 2, // Copy an existing element.
crMODIFY = 3, // Modify an element.
crDROP = 4, // Removes an element.
crREDO = 5, // Reconstruct an element.
crTABLE = 6, // Not used
crGROUP = 7, // Not used
crFAMILY = 8, // Not used
crDONE = 9, // Used internally
crDROPADD = 10 // Used internally
} CROpType;
typedef CROpType far *pCROpType;
typedef struct // Create/Restruct Table descr
{
DBITBLNAME szTblName; // TableName incl. optional path & ext
DBINAME szTblType; // Driver type (optional)
DBIPATH szErrTblName; // Error Table name (optional)
DBINAME szUserName; // User name (if applicable)
DBINAME szPassword; // Password (optional)
BOOL16 bProtected; // Master password supplied in szPassword
BOOL16 bPack; // Pack table (restructure only)
UINT16 iFldCount; // Number of field defs supplied
pCROpType pecrFldOp; // Array of field ops
pFLDDesc pfldDesc; // Array of field descriptors
UINT16 iIdxCount; // Number of index defs supplied
pCROpType pecrIdxOp; // Array of index ops
pIDXDesc pidxDesc; // Array of index descriptors
UINT16 iSecRecCount; // Number of security defs supplied
pCROpType pecrSecOp; // Array of security ops
pSECDesc psecDesc; // Array of security descriptors
UINT16 iValChkCount; // Number of val checks
pCROpType pecrValChkOp; // Array of val check ops
pVCHKDesc pvchkDesc; // Array of val check descs
UINT16 iRintCount; // Number of ref int specs
pCROpType pecrRintOp; // Array of ref int ops
pRINTDesc printDesc; // Array of ref int specs
UINT16 iOptParams; // Number of optional parameters
pFLDDesc pfldOptParams; // Array of field descriptors
pBYTE pOptData; // Optional parameters
} CRTblDesc;
typedef CRTblDesc far *pCRTblDesc;
//============================================================================
// Batch
//============================================================================
typedef struct // Batch Table definition struct
{
hDBIDb hDb; // Database
DBIPATH szTblName; // Table name
DBINAME szTblType; // Optional Driver type
DBINAME szUserName; // Optional User name
DBINAME szPassword; // Optional Pass word
} BATTblDesc;
typedef BATTblDesc far *pBATTblDesc;
typedef enum // Batch mode for DBIBatchMove
{
batAPPEND = 0,
batUPDATE = 1,
batAPPENDUPDATE = 2,
batSUBTRACT = 3,
batCOPY = 4
} eBATMode;
typedef enum // Sort Order
{
sortASCEND = 0, // ascending (default)
sortDESCEND = 1, // descending
} SORTOrder;
typedef SORTOrder far *pSORTOrder;
typedef INT16 (DBIFN * pfSORTCompFn) // pntr to client compare fn
(
pVOID pLdObj, // Language driver, if needed
pVOID pValue1, // first value
pVOID pValue2, // second value
UINT16 iLen // Length, if needed
);
// Returns: -1 if (Value 1 < Value 2),
// 0 if (Value 1 == Value 2),
// +1 if (Value 1 > Value 2)
//===========================================================================
// Types/Structs for Capabilities
//===========================================================================
typedef enum // Driver Category
{
drvFILE = 1, // File based (Paradox, xBASE)
drvOTHERSERVER = 2, // Other kind of server (IMS ?)
drvSQLBASEDSERVER = 3 // SQL Based Server
} DRVCat;
typedef enum // Config info & Optional Parameters
{
opDBCREATE = 3,
opDBOPEN = 4,
opTBLCREATE = 5,
opTBLOPEN = 6
} OPType;
typedef struct // Driver Description/Capabilities
{
DBINAME szType; // Symbolic name to identify
DBINAME szText; // Descriptive text
DRVCat edrvCat; // Driver category
BOOL16 bTrueDb; // Supports True Db concept
DBINAME szDbType; // Db Type to be used
BOOL16 bMultiUser; // Supports Multi-user access
BOOL16 bReadWrite; // Read Write or Read-only
BOOL16 bTrans; // Supports Transactions
BOOL16 bPassThruSQL; // Supports Pass-thru SQL
BOOL16 bLogIn; // Requires explicit login
BOOL16 bCreateDb; // Can reate a Database
BOOL16 bDeleteDb; // Can drop database
BOOL16 bCreateTable; // Can create a Table
BOOL16 bDeleteTable; // Can delete a Table
BOOL16 bMultiplePWs; // Multiple passwords
UINT16 iDriverVersion; // Driver version 1..n
BOOL16 bSQLRowid; // Supports SQL rowid
UINT16 iUnUsed[15];
} DRVType;
typedef DRVType far *pDRVType;
typedef struct // Table Capabilities
{
UINT16 iId; // Id of Table Type
DBINAME szName; // Symbolic name; eg "dBASE"
DBINAME szText; // Descriptive text
DBINAME szFormat; // Format; eg "HEAP"
BOOL16 bReadWrite; // User can Read/Write
BOOL16 bCreate; // Can create new tables
BOOL16 bRestructure; // Can restructure this table
BOOL16 bValChecks; // Val Checks can be specified
BOOL16 bSecurity; // Can be protected
BOOL16 bRefIntegrity; // Can participate in ref integrity
BOOL16 bPrimaryKey; // Supports primary key concept
BOOL16 bIndexing; // Can have other indexes
UINT16 iFldTypes; // Number of Phy Field types supported
UINT16 iMaxRecSize; // Max record size
UINT16 iMaxFldsInTable; // Max fields in a table
UINT16 iMaxFldNameLen; // Maximum field name length
UINT16 iTblLevel; // Driver dependent table level (version)
UINT16 iUnUsed[16];
} TBLType;
typedef TBLType far *pTBLType;
typedef struct
{
UINT16 iId; // Id of Index Type
DBINAME szName; // Symbolic name
DBINAME szText; // Descriptive text
DBINAME szFormat; // Optional format(BTREE, HASH etc)
BOOL16 bComposite; // Supports composite keys
BOOL16 bPrimary; // True, if primary index
BOOL16 bUnique; // True, No duplicates supported
BOOL16 bKeyDescending; // If whole key can be descending
BOOL16 bFldDescending; // Field level descending
BOOL16 bMaintained; // Supports maintained option
BOOL16 bSubset; // Supports Subset expression
BOOL16 bKeyExpr; // If Key can be expres
BOOL16 bCaseInsensitive; // Supports Caseinsensitive indexes
UINT16 iUnUsed[16];
} IDXType;
typedef IDXType far *pIDXType;
typedef struct
{
UINT16 iId; // Id of Field Type
DBINAME szName; // Symbolic name; eg "ALPHA"
DBINAME szText; // Descriptive text
UINT16 iPhyType; // Physical/Native type
UINT16 iXltType; // Default xlated type
UINT16 iXltSubType; // Default xlated sub type
UINT16 iMaxUnits1; // Max units allowed (1)
UINT16 iMaxUnits2; // Max units allowed (2)
UINT16 iPhySize; // Physical size in bytes (per unit)
BOOL16 bRequired; // Supports 'required' option
BOOL16 bDefaultVal; // Supports user specified 'default'
BOOL16 bMinVal; // Supports MIN Val constraint
BOOL16 bMaxVal; // Supports MAX Val constraint
BOOL16 bRefIntegrity; // Can participate in ref integrity
BOOL16 bOtherChecks; // Supports other kinds of checks
BOOL16 bKeyed; // The field type can be keyed
BOOL16 bMultiplePerTable; // Table can have more than 1 of this type
UINT16 iMinUnits1; // Min units required (1)
UINT16 iMinUnits2; // Min units required (2)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -