Classes | Macros | Typedefs
dbserver.h File Reference
#include "dbdefs.h"
#include "dberrs.h"
#include "mselems.h"
#include "database.h"

Go to the source code of this file.

Classes

struct  DBClient
 
struct  DatabaseApplicationElement
 
struct  UCMArg
 
struct  RequestStatus
 
struct  RequestHeader
 
struct  DBMessage
 
struct  Ver4RequestHeader
 
struct  Ver4DBMessage
 
struct  Ver42RequestHeader
 
struct  Ver42DBMessage
 
struct  DBServerInformation
 
struct  TableDescr
 
struct  SQLStatedata
 
struct  DescrMessageHdr
 
struct  DescriptorMessage
 
struct  Ver4DescrMessageHdr
 
struct  Ver4DescriptorMessage
 
struct  PCVer4DescriptorMessage
 
struct  DBLogin
 
struct  DeleteTableRowRequest
 
struct  NullRowRequest
 
struct  GetRowRequest
 
struct  GetColumnRequest
 
struct  GetColumnAck
 
struct  EditColumnRequest
 
struct  NewRowRequest
 
struct  UpdateRowRequest
 
struct  ScanColumn
 
struct  ScanEntityRequest
 
struct  ScanEntityAck
 
struct  GetFormatRequest
 
struct  GetFormatAck
 
struct  GetMaxRequest
 
struct  GetMaxAck
 
struct  FieldNameRequest
 
struct  FieldNameAck
 
struct  JoinColumnRequest
 
struct  JoinColumnAck
 
struct  DABuffer
 
struct  ColumnReadRequest
 
struct  ColumnReadAck
 
struct  ColumnWriteRequest
 
struct  DeleteRowRequest
 
struct  BuildLinkRequest
 
struct  AttributeMod
 
struct  CreateEntityAck
 
struct  OpenCursorMessage
 
struct  DBServer
 
struct  Generic_link
 
struct  DMRS_link
 
struct  MDLCallBack
 
struct  DBMDLCallback
 
struct  UnpackState
 
struct  MDLOperationState
 
struct  CursorRequest
 
struct  CursorDescriptor
 

Macros

#define __dbserverH__
 
#define MALFORMED_STMT   1
 
#define UNKNOWN_STMT   2
 
#define SELECT_STMT   3
 
#define UPDATE_STMT   4
 
#define CONNECT_STMT   5
 
#define DISCONNECT_STMT   6
 
#define SQLFORMS_STMT   7
 
#define RELOAD_STMT   8
 
#define INSERT_STMT   9
 
#define COMMIT_STMT   10
 
#define ROLLBACK_STMT   11
 
#define HANDLES_STMT   12
 
#define DELETE_STMT   13
 
#define FORMS_NONE   0x0000
 
#define FORMS_DIALOG   0x0101
 
#define FORMS_TEXT   0x0001
 
#define MAX_MB_CHAR_LEN   10 /* MB character maximum */
 
#define APPEND_LINK   0 /* add linkage to existing links */
 
#define REPLACE_LINK   1 /* replace linkages with current link */
 
#define ACTIVATE_FILTER   1 /* turn on fence filter */
 
#define DEACTIVATE_FILTER   2 /* turn off fence filter */
 
#define MAX_DB_APPS   126 /* maximum number of application tasks */
 
#define DB_MSG_CHAR_DATA   1 /* set type of data in msg to chars */
 
#define DB_MSG_SHORT_DATA   2 /* set type of data in msg to shorts */
 
#define DB_BUFFER_SIZE   2048 /* size (bytes) of request buffer */
 
#define DA_DATA_SIZE   (DB_BUFFER_SIZE - sizeof (long))
 
#define DB_VERSION_5   1 /* indicates Version 5 of MS */
 
#define MAX_UCM_FIELDS   32 /* max columns for DBREAD/DBWRITE */
 
#define MAX_LINES   65535 /* DA; maximum lines */
 
#define MAX_CHARS   2048 /* DA; maximum chars */
 
#define NEWLINE   10 /* ASCII newline */
 
#define CARRIAGERETURN   13 /* ASCII carriage return */
 
#define MAX_STATEMENT   2048 /* maximum SQL statement size */
 
#define DB_MAX_ERROR_DISPLAY   MAX_ERROR_LENGTH
 
#define NEXT_MODE_MAX   1 /* Locks Table to add Max mslink */
 
#define NEXT_MODE_LARGEST   3 /* Don't use locking to add the mslink */
 
#define DB_MAX_ATTEMPTS   10 /* Default maximum number of Attempts to update mslink */
 
#define ATTACH_AE   239
 
#define DELETE_LINK   240
 
#define REVIEW_SINGLE   241
 
#define FENCE_REPORT   243
 
#define DEFINE_AE   246
 
#define DEFINE_DB   247
 
#define EDIT_AE   248
 
#define LOCATE_AE   249
 
#define SHOW_AE   250
 
#define FENCE_ATTACH   255
 
#define FENCE_DETACH   256
 
#define CREATE_ENTITY   257
 
#define ATTACH_DA   399
 
#define LOAD_DA   400
 
#define FENCE_LOAD   401
 
#define GENERATE_DA   402
 
#define FIRST_MESSAGE   0 /* request for 1st message on queue */
 
#define DB_USTN_MSG   1 /* MicroStation request for services */
 
#define DB_USTN_ACK   2 /* server response to DB_USTN_MSG */
 
#define DB_APP_MSG   16 /* application request for services */
 
#define DB_APP_ACK   17 /* server response to DB_APP_MSG */
 
#define NO_MESSAGE   0
 
#define NO_FIELD   0
 
#define STATUS_FIELD   1
 
#define MESSAGE_FIELD   2
 
#define COMMAND_FIELD   3
 
#define PROMPT_FIELD   4
 
#define KEYIN_FIELD   5
 
#define ERROR_FIELD   6
 
#define DB_STARTUP   1 /* start up and initialize database */
 
#define DB_TERMINATE   2 /* terminate database server */
 
#define DB_ATTACH_AE   10 /* attach the AE to an element */
 
#define DB_OPEN_REPORT   11 /* inititialize a database fence report */
 
#define DB_CLOSE_REPORT   12 /* close a database fence report */
 
#define DB_ELEMENT_REPORT   13 /* process element for fence report */
 
#define DB_REVIEW_ATTRIBUTES   14 /* review attributes of an element */
 
#define DB_DETACH_LINK   15 /* remove database linkages from element */
 
#define DB_SELECT_AE   16 /* select the active entity graphically */
 
#define DB_DELETE_ELEMENT   18 /* process linkages for deleted element */
 
#define DB_ELEMENT_FILTER   19 /* filter function for single element op */
 
#define DB_FENCE_FILTER   20 /* database fence filter function */
 
#define DB_UCM_READ   21 /* process user command DBREAD operator */
 
#define DB_UCM_WRITE   22 /* process user command DBWRITE operator */
 
#define DB_INITIALIZE_TCB   24 /* set up TCB during drawing init */
 
#define DB_DEFINE_APPL_ELM   25 /* define application element for scan */
 
#define DB_PROCESS_APPL_ELM   26 /* process application element */
 
#define DB_SHUTDOWN   28 /* shut down and close the database */
 
#define DB_COPY_ELEMENT   30 /* copy element */
 
#define DB_LOGIN   41 /* MicroStation log on message */
 
#define DB_UCM_ADD   46 /* process user command DBADD operator */
 
#define DB_UCM_DELETE   47 /* process user command DBDELETE operator*/
 
#define DB_ATTACH_DA   48 /* attach linkage to existing text node */
 
#define DB_LOAD_DA   49 /* load linkage text to text node */
 
#define DB_GENERATE_DA   50 /* create new textnodes with linkage text*/
 
#define DB_PROCESS_KEYIN   3 /* process a direct database keyin */
 
#define DB_OPTIONS   4 /* database setup tutorial */
 
#define DB_DEFINE   5 /* process a DB= keyin */
 
#define DB_FIND_ENTITY   6 /* locate a record and setup as AE */
 
#define DB_EDIT_AE   7 /* edit the active entity */
 
#define DB_CREATE_ENTITY   8 /* add a record to the database */
 
#define DB_SHOW_AE   9 /* AE=$, display the active entity */
 
#define DB_DEFINE_SEARCH   17 /* process a DS= fence search keyin */
 
#define DB_LINKAGE_MODE   23 /* process an ACTIVE LINK <> keyin */
 
#define DB_DELETE_MODE   27 /* process SET DELETE <> keyin */
 
#define DB_REVIEW_TABLE   29 /* process RA= keyin */
 
#define DB_REPORT_SPEC   31 /* process RS= keyin */
 
#define DB_FORM_COMMAND   59 /* process FORM keyin */
 
#define DB_FORM_DISPLAY   60 /* display form */
 
#define DB_CONFIRM_MODE   65 /* confirmation mode */
 
#define DB_INSERT_AE   66 /* AE = keyin */
 
#define DB_AUTOCOMMIT   67 /* auto commit SQL transactions */
 
#define DB_RELEASE   68 /* release resources on disconnect */
 
#define DB_MDLDIALOGS   69 /* use MDL dialogs for query */
 
#define DB_DEBUG   71 /* server debug mode */
 
#define DB_NULREC   32 /* create a null record and set up as AE */
 
#define DB_GETREC   33 /* retrieves a record and sets up as AE */
 
#define DB_GETFLD   34 /* extracts a field from the AE */
 
#define DB_EDTFLD   35 /* edits a field of the AE */
 
#define DB_NEWREC   36 /* writes the AE as a new record */
 
#define DB_UPDREC   37 /* updates a given record with the AE */
 
#define DB_SCNENT   38 /* scans for a record */
 
#define DB_DELREC   39 /* deletes a record from the database */
 
#define DB_QUEUE   40 /* creates/removes message queues */
 
#define DB_GETFMT   42 /* retrieve type and length of column */
 
#define DB_GETMAX   43 /* retrieve number of columns and rows */
 
#define DB_FLDNAME   44 /* retrieve column names of a table */
 
#define DB_JNDCOL   45 /* codelist lookup */
 
#define DB_DECODE_LINK   51 /* decode user data linkage */
 
#define DB_READ_COLUMN   52 /* read column from table */
 
#define DB_WRITE_COLUMN   53 /* write column from table */
 
#define DB_LARGEST_MSLINK   54 /* largest MSLINK key in table */
 
#define DB_BUILD_LINK   55 /* construct linkage */
 
#define DB_DELETE_ROW   56 /* delete row from table */
 
#define DB_ADD_ROW   57 /* add a new row to a table */
 
#define DB_QUERY   58 /* query the database */
 
#define DB_DESCRIBE_TABLE   61 /* describe a database table */
 
#define DB_OPEN_CURSOR   62 /* open cursor for query by mdl */
 
#define DB_FETCH_ROW   63 /* fetch row from a table */
 
#define DB_CLOSE_CURSOR   64 /* close cursor used by mdl */
 
#define DB_ERRORTEXT   70 /* retrieve error text */
 
#define DB_BUILD_DA_LINK   72 /* build DA linkage */
 
#define DB_AE_FROM_LINK   73 /* setup AE from linkage */
 
#define DB_ENCODE_LINK   74 /* convert linkage to external format */
 
#define DB_CREATE_ENT_ROW   75 /* create new entity row with new mslink */
 
#define DB_REGISTER_QUERY   76 /* load UCM registers with query */
 
#define DB_COPY_ROW   77 /* copy existing row and generate MSLINK */
 
#define DB_GENERIC   78 /* a general request that developers can define */
 
#define CC_EQ   1
 
#define CC_LT   2
 
#define CC_GT   3
 
#define CC_NE   4
 
#define CC_LE   5
 
#define CC_GE   6
 
#define REQUEST_WITHOUT_CURSORID   0
 
#define REQUEST_WITH_CURSORID   1
 
#define GENERICLINK
 
#define DMRSLINK
 
#define IXLINKAGE
 
#define DBLINKAGE
 
#define ORACLELINKAGE
 
#define MDLCALLBACK_BUFFER   640
 
#define CALLBACK_DisplayDebugMsg   1
 
#define CALLBACK_DisplayInfoBox   2
 
#define PACK_FINISHED   1
 
#define PACK_COL_NAMES   2
 
#define PACK_COL_TYPES   3
 
#define PACK_COL_LENGTHS   4
 
#define PACK_COL_DATA   5
 
#define PACK_ABORT   1
 

Typedefs

typedef short FormToggle
 
typedef struct Generic_link GenericLink
 
typedef struct DMRS_link DMRSLink
 
typedef Generic_link IX_link
 
typedef Generic_link IXLink
 
typedef Generic_link dB_link
 
typedef Generic_link dBASELink
 
typedef Generic_link Oracle_link
 
typedef Generic_link OracleLink
 

Macro Definition Documentation

#define __dbserverH__
#define ACTIVATE_FILTER   1 /* turn on fence filter */
#define APPEND_LINK   0 /* add linkage to existing links */
#define ATTACH_AE   239
#define ATTACH_DA   399
#define CALLBACK_DisplayDebugMsg   1
#define CALLBACK_DisplayInfoBox   2
#define CARRIAGERETURN   13 /* ASCII carriage return */
#define CC_EQ   1
#define CC_GE   6
#define CC_GT   3
#define CC_LE   5
#define CC_LT   2
#define CC_NE   4
#define COMMAND_FIELD   3
#define COMMIT_STMT   10
#define CONNECT_STMT   5
#define CREATE_ENTITY   257
#define DA_DATA_SIZE   (DB_BUFFER_SIZE - sizeof (long))
#define DB_ADD_ROW   57 /* add a new row to a table */
#define DB_AE_FROM_LINK   73 /* setup AE from linkage */
#define DB_APP_ACK   17 /* server response to DB_APP_MSG */
#define DB_APP_MSG   16 /* application request for services */
#define DB_ATTACH_AE   10 /* attach the AE to an element */
#define DB_ATTACH_DA   48 /* attach linkage to existing text node */
#define DB_AUTOCOMMIT   67 /* auto commit SQL transactions */
#define DB_BUFFER_SIZE   2048 /* size (bytes) of request buffer */
#define DB_BUILD_DA_LINK   72 /* build DA linkage */
#define DB_BUILD_LINK   55 /* construct linkage */
#define DB_CLOSE_CURSOR   64 /* close cursor used by mdl */
#define DB_CLOSE_REPORT   12 /* close a database fence report */
#define DB_CONFIRM_MODE   65 /* confirmation mode */
#define DB_COPY_ELEMENT   30 /* copy element */
#define DB_COPY_ROW   77 /* copy existing row and generate MSLINK */
#define DB_CREATE_ENT_ROW   75 /* create new entity row with new mslink */
#define DB_CREATE_ENTITY   8 /* add a record to the database */
#define DB_DEBUG   71 /* server debug mode */
#define DB_DECODE_LINK   51 /* decode user data linkage */
#define DB_DEFINE   5 /* process a DB= keyin */
#define DB_DEFINE_APPL_ELM   25 /* define application element for scan */
#define DB_DEFINE_SEARCH   17 /* process a DS= fence search keyin */
#define DB_DELETE_ELEMENT   18 /* process linkages for deleted element */
#define DB_DELETE_MODE   27 /* process SET DELETE <> keyin */
#define DB_DELETE_ROW   56 /* delete row from table */
#define DB_DELREC   39 /* deletes a record from the database */
#define DB_DESCRIBE_TABLE   61 /* describe a database table */
#define DB_DETACH_LINK   15 /* remove database linkages from element */
#define DB_EDIT_AE   7 /* edit the active entity */
#define DB_EDTFLD   35 /* edits a field of the AE */
#define DB_ELEMENT_FILTER   19 /* filter function for single element op */
#define DB_ELEMENT_REPORT   13 /* process element for fence report */
#define DB_ENCODE_LINK   74 /* convert linkage to external format */
#define DB_ERRORTEXT   70 /* retrieve error text */
#define DB_FENCE_FILTER   20 /* database fence filter function */
#define DB_FETCH_ROW   63 /* fetch row from a table */
#define DB_FIND_ENTITY   6 /* locate a record and setup as AE */
#define DB_FLDNAME   44 /* retrieve column names of a table */
#define DB_FORM_COMMAND   59 /* process FORM keyin */
#define DB_FORM_DISPLAY   60 /* display form */
#define DB_GENERATE_DA   50 /* create new textnodes with linkage text*/
#define DB_GENERIC   78 /* a general request that developers can define */
#define DB_GETFLD   34 /* extracts a field from the AE */
#define DB_GETFMT   42 /* retrieve type and length of column */
#define DB_GETMAX   43 /* retrieve number of columns and rows */
#define DB_GETREC   33 /* retrieves a record and sets up as AE */
#define DB_INITIALIZE_TCB   24 /* set up TCB during drawing init */
#define DB_INSERT_AE   66 /* AE = keyin */
#define DB_JNDCOL   45 /* codelist lookup */
#define DB_LARGEST_MSLINK   54 /* largest MSLINK key in table */
#define DB_LINKAGE_MODE   23 /* process an ACTIVE LINK <> keyin */
#define DB_LOAD_DA   49 /* load linkage text to text node */
#define DB_LOGIN   41 /* MicroStation log on message */
#define DB_MAX_ATTEMPTS   10 /* Default maximum number of Attempts to update mslink */
#define DB_MAX_ERROR_DISPLAY   MAX_ERROR_LENGTH
#define DB_MDLDIALOGS   69 /* use MDL dialogs for query */
#define DB_MSG_CHAR_DATA   1 /* set type of data in msg to chars */
#define DB_MSG_SHORT_DATA   2 /* set type of data in msg to shorts */
#define DB_NEWREC   36 /* writes the AE as a new record */
#define DB_NULREC   32 /* create a null record and set up as AE */
#define DB_OPEN_CURSOR   62 /* open cursor for query by mdl */
#define DB_OPEN_REPORT   11 /* inititialize a database fence report */
#define DB_OPTIONS   4 /* database setup tutorial */
#define DB_PROCESS_APPL_ELM   26 /* process application element */
#define DB_PROCESS_KEYIN   3 /* process a direct database keyin */
#define DB_QUERY   58 /* query the database */
#define DB_QUEUE   40 /* creates/removes message queues */
#define DB_READ_COLUMN   52 /* read column from table */
#define DB_REGISTER_QUERY   76 /* load UCM registers with query */
#define DB_RELEASE   68 /* release resources on disconnect */
#define DB_REPORT_SPEC   31 /* process RS= keyin */
#define DB_REVIEW_ATTRIBUTES   14 /* review attributes of an element */
#define DB_REVIEW_TABLE   29 /* process RA= keyin */
#define DB_SCNENT   38 /* scans for a record */
#define DB_SELECT_AE   16 /* select the active entity graphically */
#define DB_SHOW_AE   9 /* AE=$, display the active entity */
#define DB_SHUTDOWN   28 /* shut down and close the database */
#define DB_STARTUP   1 /* start up and initialize database */
#define DB_TERMINATE   2 /* terminate database server */
#define DB_UCM_ADD   46 /* process user command DBADD operator */
#define DB_UCM_DELETE   47 /* process user command DBDELETE operator*/
#define DB_UCM_READ   21 /* process user command DBREAD operator */
#define DB_UCM_WRITE   22 /* process user command DBWRITE operator */
#define DB_UPDREC   37 /* updates a given record with the AE */
#define DB_USTN_ACK   2 /* server response to DB_USTN_MSG */
#define DB_USTN_MSG   1 /* MicroStation request for services */
#define DB_VERSION_5   1 /* indicates Version 5 of MS */
#define DB_WRITE_COLUMN   53 /* write column from table */
#define DBLINKAGE
#define DEACTIVATE_FILTER   2 /* turn off fence filter */
#define DEFINE_AE   246
#define DEFINE_DB   247
#define DELETE_LINK   240
#define DELETE_STMT   13
#define DISCONNECT_STMT   6
#define DMRSLINK
#define EDIT_AE   248
#define ERROR_FIELD   6
#define FENCE_ATTACH   255
#define FENCE_DETACH   256
#define FENCE_LOAD   401
#define FENCE_REPORT   243
#define FIRST_MESSAGE   0 /* request for 1st message on queue */
#define FORMS_DIALOG   0x0101
#define FORMS_NONE   0x0000
#define FORMS_TEXT   0x0001
#define GENERATE_DA   402
#define GENERICLINK
#define HANDLES_STMT   12
#define INSERT_STMT   9
#define IXLINKAGE
#define KEYIN_FIELD   5
#define LOAD_DA   400
#define LOCATE_AE   249
#define MALFORMED_STMT   1
#define MAX_CHARS   2048 /* DA; maximum chars */
#define MAX_DB_APPS   126 /* maximum number of application tasks */
#define MAX_LINES   65535 /* DA; maximum lines */
#define MAX_MB_CHAR_LEN   10 /* MB character maximum */
#define MAX_STATEMENT   2048 /* maximum SQL statement size */
#define MAX_UCM_FIELDS   32 /* max columns for DBREAD/DBWRITE */
#define MDLCALLBACK_BUFFER   640
#define MESSAGE_FIELD   2
#define NEWLINE   10 /* ASCII newline */
#define NEXT_MODE_LARGEST   3 /* Don't use locking to add the mslink */
#define NEXT_MODE_MAX   1 /* Locks Table to add Max mslink */
#define NO_FIELD   0
#define NO_MESSAGE   0
#define ORACLELINKAGE
#define PACK_ABORT   1
#define PACK_COL_DATA   5
#define PACK_COL_LENGTHS   4
#define PACK_COL_NAMES   2
#define PACK_COL_TYPES   3
#define PACK_FINISHED   1
#define PROMPT_FIELD   4
#define RELOAD_STMT   8
#define REPLACE_LINK   1 /* replace linkages with current link */
#define REQUEST_WITH_CURSORID   1
#define REQUEST_WITHOUT_CURSORID   0
#define REVIEW_SINGLE   241
#define ROLLBACK_STMT   11
#define SELECT_STMT   3
#define SHOW_AE   250
#define SQLFORMS_STMT   7
#define STATUS_FIELD   1
#define UNKNOWN_STMT   2
#define UPDATE_STMT   4

Typedef Documentation

typedef struct DMRS_link DMRSLink
typedef short FormToggle
typedef struct Generic_link GenericLink

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.