diff --git a/packages/node-firebird-native-api/src/generate-files/firebird.cloop.json b/packages/node-firebird-native-api/src/generate-files/firebird.cloop.json index 95bb68b..ec928e3 100644 --- a/packages/node-firebird-native-api/src/generate-files/firebird.cloop.json +++ b/packages/node-firebird-native-api/src/generate-files/firebird.cloop.json @@ -1,10438 +1,11023 @@ { - "library": { - "interfaces": [ - { - "name": "Versioned", - "version": 1, - "constants": [], - "methods": [] - }, - { - "name": "ReferenceCounted", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "addRef", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "release", - "version": 2, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "Disposable", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "dispose", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "Status", - "version": 3, - "extends": "Disposable", - "constants": [ - { - "name": "STATE_WARNINGS", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "STATE_ERRORS", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - }, - { - "name": "RESULT_ERROR", - "type": { "name": "int", "isPointer": false, "isConst": false }, - "expr": { - "type": "-", - "args": [{ "type": "int-literal", "value": 1 }] - } - }, - { - "name": "RESULT_OK", - "type": { "name": "int", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 0 } - }, - { - "name": "RESULT_NO_DATA", - "type": { "name": "int", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "RESULT_SEGMENT", - "type": { "name": "int", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - } - ], - "methods": [ - { - "name": "init", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getState", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "setErrors2", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "value", - "type": { "name": "intptr", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "setWarnings2", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "value", - "type": { "name": "intptr", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "setErrors", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "value", - "type": { "name": "intptr", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "setWarnings", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "value", - "type": { "name": "intptr", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "getErrors", - "version": 3, - "returnType": { - "name": "intptr", - "isPointer": true, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getWarnings", - "version": 3, - "returnType": { - "name": "intptr", - "isPointer": true, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "clone", - "version": 3, - "returnType": { - "name": "Status", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "Master", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "getStatus", - "version": 2, - "returnType": { - "name": "Status", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getDispatcher", - "version": 2, - "returnType": { - "name": "Provider", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getPluginManager", - "version": 2, - "returnType": { - "name": "PluginManager", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getTimerControl", - "version": 2, - "returnType": { - "name": "TimerControl", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getDtc", - "version": 2, - "returnType": { - "name": "Dtc", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "registerAttachment", - "version": 2, - "returnType": { - "name": "Attachment", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "provider", - "type": { - "name": "Provider", - "isPointer": false, - "isConst": false - } - }, - { - "name": "attachment", - "type": { - "name": "Attachment", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "registerTransaction", - "version": 2, - "returnType": { - "name": "Transaction", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "attachment", - "type": { - "name": "Attachment", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getMetadataBuilder", - "version": 2, - "returnType": { - "name": "MetadataBuilder", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "fieldCount", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "serverMode", - "version": 2, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "mode", - "type": { "name": "int", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "getUtilInterface", - "version": 2, - "returnType": { - "name": "Util", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getConfigManager", - "version": 2, - "returnType": { - "name": "ConfigManager", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getProcessExiting", - "version": 2, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "PluginBase", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "setOwner", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "r", - "type": { - "name": "ReferenceCounted", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getOwner", - "version": 3, - "returnType": { - "name": "ReferenceCounted", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "PluginSet", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "getName", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getModuleName", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getPlugin", - "version": 3, - "returnType": { - "name": "PluginBase", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "next", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "set", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "s", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - } - ] - }, - { - "name": "ConfigEntry", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "getName", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getValue", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getIntValue", - "version": 3, - "returnType": { - "name": "int64", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getBoolValue", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getSubConfig", - "version": 3, - "returnType": { - "name": "Config", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "Config", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "find", - "version": 3, - "returnType": { - "name": "ConfigEntry", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "name", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - }, - { - "name": "findValue", - "version": 3, - "returnType": { - "name": "ConfigEntry", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "name", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "value", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - }, - { - "name": "findPos", - "version": 3, - "returnType": { - "name": "ConfigEntry", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "name", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "pos", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - } - ] - }, - { - "name": "FirebirdConf", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "getKey", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "name", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - }, - { - "name": "asInteger", - "version": 3, - "returnType": { - "name": "int64", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "key", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "asString", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [ - { - "name": "key", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "asBoolean", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "key", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - } - ] - }, - { - "name": "PluginConfig", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "getConfigFileName", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getDefaultConfig", - "version": 3, - "returnType": { - "name": "Config", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getFirebirdConf", - "version": 3, - "returnType": { - "name": "FirebirdConf", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "setReleaseDelay", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "microSeconds", - "type": { - "name": "uint64", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "PluginFactory", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "createPlugin", - "version": 2, - "returnType": { - "name": "PluginBase", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "factoryParameter", - "type": { - "name": "PluginConfig", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "PluginModule", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "doClean", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "PluginManager", - "version": 2, - "extends": "Versioned", - "constants": [ - { - "name": "TYPE_PROVIDER", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "TYPE_FIRST_NON_LIB", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - }, - { - "name": "TYPE_AUTH_SERVER", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 3 } - }, - { - "name": "TYPE_AUTH_CLIENT", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 4 } - }, - { - "name": "TYPE_AUTH_USER_MANAGEMENT", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 5 } - }, - { - "name": "TYPE_EXTERNAL_ENGINE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 6 } - }, - { - "name": "TYPE_TRACE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 7 } - }, - { - "name": "TYPE_WIRE_CRYPT", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 8 } - }, - { - "name": "TYPE_DB_CRYPT", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 9 } - }, - { - "name": "TYPE_KEY_HOLDER", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 10 } - }, - { - "name": "TYPE_COUNT", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 11 } - } - ], - "methods": [ - { - "name": "registerPluginFactory", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "pluginType", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "defaultName", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "factory", - "type": { - "name": "PluginFactory", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "registerModule", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "cleanup", - "type": { - "name": "PluginModule", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "unregisterModule", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "cleanup", - "type": { - "name": "PluginModule", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getPlugins", - "version": 2, - "returnType": { - "name": "PluginSet", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "pluginType", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "namesList", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "firebirdConf", - "type": { - "name": "FirebirdConf", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getConfig", - "version": 2, - "returnType": { - "name": "Config", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "filename", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - }, - { - "name": "releasePlugin", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "plugin", - "type": { - "name": "PluginBase", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "CryptKey", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "setSymmetric", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "type", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "keyLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "key", - "type": { "name": "void", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "setAsymmetric", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "type", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "encryptKeyLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "encryptKey", - "type": { "name": "void", "isPointer": true, "isConst": true } - }, - { - "name": "decryptKeyLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "decryptKey", - "type": { "name": "void", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "getEncryptKey", - "version": 2, - "returnType": { - "name": "void", - "isPointer": true, - "isConst": true - }, - "mayThrow": false, - "parameters": [ - { - "name": "length", - "type": { "name": "uint", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "getDecryptKey", - "version": 2, - "returnType": { - "name": "void", - "isPointer": true, - "isConst": true - }, - "mayThrow": false, - "parameters": [ - { - "name": "length", - "type": { "name": "uint", "isPointer": true, "isConst": false } - } - ] - } - ] - }, - { - "name": "ConfigManager", - "version": 2, - "extends": "Versioned", - "constants": [ - { - "name": "DIR_BIN", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 0 } - }, - { - "name": "DIR_SBIN", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "DIR_CONF", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - }, - { - "name": "DIR_LIB", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 3 } - }, - { - "name": "DIR_INC", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 4 } - }, - { - "name": "DIR_DOC", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 5 } - }, - { - "name": "DIR_UDF", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 6 } - }, - { - "name": "DIR_SAMPLE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 7 } - }, - { - "name": "DIR_SAMPLEDB", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 8 } - }, - { - "name": "DIR_HELP", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 9 } - }, - { - "name": "DIR_INTL", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 10 } - }, - { - "name": "DIR_MISC", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 11 } - }, - { - "name": "DIR_SECDB", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 12 } - }, - { - "name": "DIR_MSG", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 13 } - }, - { - "name": "DIR_LOG", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 14 } - }, - { - "name": "DIR_GUARD", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 15 } - }, - { - "name": "DIR_PLUGINS", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 16 } - }, - { - "name": "DIR_COUNT", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 17 } - } - ], - "methods": [ - { - "name": "getDirectory", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [ - { - "name": "code", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "getFirebirdConf", - "version": 2, - "returnType": { - "name": "FirebirdConf", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getDatabaseConf", - "version": 2, - "returnType": { - "name": "FirebirdConf", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "dbName", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - }, - { - "name": "getPluginConfig", - "version": 2, - "returnType": { - "name": "Config", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "configuredPlugin", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - }, - { - "name": "getInstallDirectory", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getRootDirectory", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "EventCallback", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "eventCallbackFunction", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "events", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - } - ] - }, - { - "name": "Blob", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "getInfo", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "itemsLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "items", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "bufferLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "buffer", - "type": { "name": "uchar", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "getSegment", - "version": 3, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "notImplementedExpr": { - "type": "constant", - "interface": "Status", - "name": "RESULT_ERROR" - }, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "bufferLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "buffer", - "type": { "name": "void", "isPointer": true, "isConst": false } - }, - { - "name": "segmentLength", - "type": { "name": "uint", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "putSegment", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "buffer", - "type": { "name": "void", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "cancel", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "close", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "seek", - "version": 3, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "mode", - "type": { "name": "int", "isPointer": false, "isConst": false } - }, - { - "name": "offset", - "type": { "name": "int", "isPointer": false, "isConst": false } - } - ] - } - ] - }, - { - "name": "Transaction", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "getInfo", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "itemsLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "items", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "bufferLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "buffer", - "type": { "name": "uchar", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "prepare", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "msgLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "message", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "commit", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "commitRetaining", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "rollback", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "rollbackRetaining", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "disconnect", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "join", - "version": 3, - "returnType": { - "name": "Transaction", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "validate", - "version": 3, - "returnType": { - "name": "Transaction", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "attachment", - "type": { - "name": "Attachment", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "enterDtc", - "version": 3, - "returnType": { - "name": "Transaction", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "MessageMetadata", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "getCount", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getField", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "getRelation", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "getOwner", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "getAlias", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "getType", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "isNullable", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "getSubType", - "version": 3, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "getLength", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "getScale", - "version": 3, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "getCharSet", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "getOffset", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "getNullOffset", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "getBuilder", - "version": 3, - "returnType": { - "name": "MetadataBuilder", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getMessageLength", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "MetadataBuilder", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "setType", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "type", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "setSubType", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "subType", - "type": { "name": "int", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "setLength", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "setCharSet", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "charSet", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "setScale", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "scale", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "truncate", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "count", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "moveNameToIndex", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "name", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "remove", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "addField", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getMetadata", - "version": 3, - "returnType": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "ResultSet", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "fetchNext", - "version": 3, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "notImplementedExpr": { - "type": "constant", - "interface": "Status", - "name": "RESULT_ERROR" - }, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "message", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "fetchPrior", - "version": 3, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "notImplementedExpr": { - "type": "constant", - "interface": "Status", - "name": "RESULT_ERROR" - }, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "message", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "fetchFirst", - "version": 3, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "notImplementedExpr": { - "type": "constant", - "interface": "Status", - "name": "RESULT_ERROR" - }, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "message", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "fetchLast", - "version": 3, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "notImplementedExpr": { - "type": "constant", - "interface": "Status", - "name": "RESULT_ERROR" - }, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "message", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "fetchAbsolute", - "version": 3, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "notImplementedExpr": { - "type": "constant", - "interface": "Status", - "name": "RESULT_ERROR" - }, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "position", - "type": { "name": "int", "isPointer": false, "isConst": false } - }, - { - "name": "message", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "fetchRelative", - "version": 3, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "notImplementedExpr": { - "type": "constant", - "interface": "Status", - "name": "RESULT_ERROR" - }, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "offset", - "type": { "name": "int", "isPointer": false, "isConst": false } - }, - { - "name": "message", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "isEof", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "isBof", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getMetadata", - "version": 3, - "returnType": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "close", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "setDelayedOutputFormat", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "format", - "type": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "Statement", - "version": 3, - "extends": "ReferenceCounted", - "constants": [ - { - "name": "PREPARE_PREFETCH_NONE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 0 } - }, - { - "name": "PREPARE_PREFETCH_TYPE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "PREPARE_PREFETCH_INPUT_PARAMETERS", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - }, - { - "name": "PREPARE_PREFETCH_OUTPUT_PARAMETERS", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 4 } - }, - { - "name": "PREPARE_PREFETCH_LEGACY_PLAN", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 8 } - }, - { - "name": "PREPARE_PREFETCH_DETAILED_PLAN", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 16 } - }, - { - "name": "PREPARE_PREFETCH_AFFECTED_RECORDS", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 32 } - }, - { - "name": "PREPARE_PREFETCH_FLAGS", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 64 } - }, - { - "name": "PREPARE_PREFETCH_METADATA", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { - "type": "|", - "args": [ - { - "type": "constant", - "interface": "Statement", - "name": "PREPARE_PREFETCH_TYPE" - }, - { - "type": "|", - "args": [ - { - "type": "constant", - "interface": "Statement", - "name": "PREPARE_PREFETCH_FLAGS" - }, - { - "type": "|", - "args": [ - { - "type": "constant", - "interface": "Statement", - "name": "PREPARE_PREFETCH_INPUT_PARAMETERS" - }, - { - "type": "constant", - "interface": "Statement", - "name": "PREPARE_PREFETCH_OUTPUT_PARAMETERS" - } - ] - } - ] - } - ] - } - }, - { - "name": "PREPARE_PREFETCH_ALL", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { - "type": "|", - "args": [ - { - "type": "constant", - "interface": "Statement", - "name": "PREPARE_PREFETCH_METADATA" - }, - { - "type": "|", - "args": [ - { - "type": "constant", - "interface": "Statement", - "name": "PREPARE_PREFETCH_LEGACY_PLAN" - }, - { - "type": "|", - "args": [ - { - "type": "constant", - "interface": "Statement", - "name": "PREPARE_PREFETCH_DETAILED_PLAN" - }, - { - "type": "constant", - "interface": "Statement", - "name": "PREPARE_PREFETCH_AFFECTED_RECORDS" - } - ] - } - ] - } - ] - } - }, - { - "name": "FLAG_HAS_CURSOR", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "FLAG_REPEAT_EXECUTE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - }, - { - "name": "CURSOR_TYPE_SCROLLABLE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - } - ], - "methods": [ - { - "name": "getInfo", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "itemsLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "items", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "bufferLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "buffer", - "type": { "name": "uchar", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "getType", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getPlan", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "detailed", - "type": { - "name": "boolean", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getAffectedRecords", - "version": 3, - "returnType": { - "name": "uint64", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getInputMetadata", - "version": 3, - "returnType": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getOutputMetadata", - "version": 3, - "returnType": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "execute", - "version": 3, - "returnType": { - "name": "Transaction", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "inMetadata", - "type": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - } - }, - { - "name": "inBuffer", - "type": { "name": "void", "isPointer": true, "isConst": false } - }, - { - "name": "outMetadata", - "type": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - } - }, - { - "name": "outBuffer", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "openCursor", - "version": 3, - "returnType": { - "name": "ResultSet", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "inMetadata", - "type": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - } - }, - { - "name": "inBuffer", - "type": { "name": "void", "isPointer": true, "isConst": false } - }, - { - "name": "outMetadata", - "type": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - } - }, - { - "name": "flags", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "setCursorName", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "name", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - }, - { - "name": "free", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getFlags", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "Request", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "receive", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "level", - "type": { "name": "int", "isPointer": false, "isConst": false } - }, - { - "name": "msgType", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "message", - "type": { "name": "uchar", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "send", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "level", - "type": { "name": "int", "isPointer": false, "isConst": false } - }, - { - "name": "msgType", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "message", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "getInfo", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "level", - "type": { "name": "int", "isPointer": false, "isConst": false } - }, - { - "name": "itemsLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "items", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "bufferLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "buffer", - "type": { "name": "uchar", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "start", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "tra", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "level", - "type": { "name": "int", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "startAndSend", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "tra", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "level", - "type": { "name": "int", "isPointer": false, "isConst": false } - }, - { - "name": "msgType", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "message", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "unwind", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "level", - "type": { "name": "int", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "free", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "Events", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "cancel", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "Attachment", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "getInfo", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "itemsLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "items", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "bufferLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "buffer", - "type": { "name": "uchar", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "startTransaction", - "version": 3, - "returnType": { - "name": "Transaction", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "tpbLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "tpb", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "reconnectTransaction", - "version": 3, - "returnType": { - "name": "Transaction", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "id", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "compileRequest", - "version": 3, - "returnType": { - "name": "Request", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "blrLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "blr", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "transactRequest", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "blrLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "blr", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "inMsgLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "inMsg", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "outMsgLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "outMsg", - "type": { "name": "uchar", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "createBlob", - "version": 3, - "returnType": { - "name": "Blob", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "id", - "type": { - "name": "ISC_QUAD", - "isPointer": true, - "isConst": false - } - }, - { - "name": "bpbLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "bpb", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "openBlob", - "version": 3, - "returnType": { - "name": "Blob", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "id", - "type": { - "name": "ISC_QUAD", - "isPointer": true, - "isConst": false - } - }, - { - "name": "bpbLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "bpb", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "getSlice", - "version": 3, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "id", - "type": { - "name": "ISC_QUAD", - "isPointer": true, - "isConst": false - } - }, - { - "name": "sdlLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "sdl", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "paramLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "param", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "sliceLength", - "type": { "name": "int", "isPointer": false, "isConst": false } - }, - { - "name": "slice", - "type": { "name": "uchar", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "putSlice", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "id", - "type": { - "name": "ISC_QUAD", - "isPointer": true, - "isConst": false - } - }, - { - "name": "sdlLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "sdl", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "paramLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "param", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "sliceLength", - "type": { "name": "int", "isPointer": false, "isConst": false } - }, - { - "name": "slice", - "type": { "name": "uchar", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "executeDyn", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "dyn", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "prepare", - "version": 3, - "returnType": { - "name": "Statement", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "tra", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "stmtLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "sqlStmt", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "dialect", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "flags", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "execute", - "version": 3, - "returnType": { - "name": "Transaction", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "stmtLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "sqlStmt", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "dialect", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "inMetadata", - "type": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - } - }, - { - "name": "inBuffer", - "type": { "name": "void", "isPointer": true, "isConst": false } - }, - { - "name": "outMetadata", - "type": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - } - }, - { - "name": "outBuffer", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "openCursor", - "version": 3, - "returnType": { - "name": "ResultSet", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "stmtLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "sqlStmt", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "dialect", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "inMetadata", - "type": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - } - }, - { - "name": "inBuffer", - "type": { "name": "void", "isPointer": true, "isConst": false } - }, - { - "name": "outMetadata", - "type": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - } - }, - { - "name": "cursorName", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "cursorFlags", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "queEvents", - "version": 3, - "returnType": { - "name": "Events", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "callback", - "type": { - "name": "EventCallback", - "isPointer": false, - "isConst": false - } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "events", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "cancelOperation", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "option", - "type": { "name": "int", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "ping", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "detach", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "dropDatabase", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "Service", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "detach", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "query", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "sendLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "sendItems", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "receiveLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "receiveItems", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "bufferLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "buffer", - "type": { "name": "uchar", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "start", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "spbLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "spb", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - } - ] - }, - { - "name": "Provider", - "version": 4, - "extends": "PluginBase", - "constants": [], - "methods": [ - { - "name": "attachDatabase", - "version": 4, - "returnType": { - "name": "Attachment", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "fileName", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "dpbLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "dpb", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "createDatabase", - "version": 4, - "returnType": { - "name": "Attachment", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "fileName", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "dpbLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "dpb", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "attachServiceManager", - "version": 4, - "returnType": { - "name": "Service", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "service", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "spbLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "spb", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "shutdown", - "version": 4, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "timeout", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "reason", - "type": { "name": "int", "isPointer": false, "isConst": true } - } - ] - }, - { - "name": "setDbCryptCallback", - "version": 4, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "cryptCallback", - "type": { - "name": "CryptKeyCallback", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "DtcStart", - "version": 3, - "extends": "Disposable", - "constants": [], - "methods": [ - { - "name": "addAttachment", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "att", - "type": { - "name": "Attachment", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "addWithTpb", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "att", - "type": { - "name": "Attachment", - "isPointer": false, - "isConst": false - } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "tpb", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "start", - "version": 3, - "returnType": { - "name": "Transaction", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "Dtc", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "join", - "version": 2, - "returnType": { - "name": "Transaction", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "one", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "two", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "startBuilder", - "version": 2, - "returnType": { - "name": "DtcStart", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "Auth", - "version": 4, - "extends": "PluginBase", - "constants": [ - { - "name": "AUTH_FAILED", - "type": { "name": "int", "isPointer": false, "isConst": false }, - "expr": { - "type": "-", - "args": [{ "type": "int-literal", "value": 1 }] - } - }, - { - "name": "AUTH_SUCCESS", - "type": { "name": "int", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 0 } - }, - { - "name": "AUTH_MORE_DATA", - "type": { "name": "int", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "AUTH_CONTINUE", - "type": { "name": "int", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - } - ], - "methods": [] - }, - { - "name": "Writer", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "reset", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "add", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "name", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - }, - { - "name": "setType", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "value", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - }, - { - "name": "setDb", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "value", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - } - ] - }, - { - "name": "ServerBlock", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "getLogin", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getData", - "version": 2, - "returnType": { - "name": "uchar", - "isPointer": true, - "isConst": true - }, - "mayThrow": false, - "parameters": [ - { - "name": "length", - "type": { "name": "uint", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "putData", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "data", - "type": { "name": "void", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "newKey", - "version": 2, - "returnType": { - "name": "CryptKey", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "ClientBlock", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "getLogin", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getPassword", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getData", - "version": 3, - "returnType": { - "name": "uchar", - "isPointer": true, - "isConst": true - }, - "mayThrow": false, - "parameters": [ - { - "name": "length", - "type": { "name": "uint", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "putData", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "data", - "type": { "name": "void", "isPointer": true, "isConst": true } - } - ] - }, - { - "name": "newKey", - "version": 3, - "returnType": { - "name": "CryptKey", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "Server", - "version": 5, - "extends": "Auth", - "constants": [], - "methods": [ - { - "name": "authenticate", - "version": 5, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "notImplementedExpr": { - "type": "constant", - "interface": "Auth", - "name": "AUTH_FAILED" - }, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "sBlock", - "type": { - "name": "ServerBlock", - "isPointer": false, - "isConst": false - } - }, - { - "name": "writerInterface", - "type": { - "name": "Writer", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "Client", - "version": 5, - "extends": "Auth", - "constants": [], - "methods": [ - { - "name": "authenticate", - "version": 5, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "notImplementedExpr": { - "type": "constant", - "interface": "Auth", - "name": "AUTH_FAILED" - }, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "cBlock", - "type": { - "name": "ClientBlock", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "UserField", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "entered", - "version": 2, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "specified", - "version": 2, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "setEntered", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "newValue", - "type": { "name": "int", "isPointer": false, "isConst": false } - } - ] - } - ] - }, - { - "name": "CharUserField", - "version": 3, - "extends": "UserField", - "constants": [], - "methods": [ - { - "name": "get", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "set", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "newValue", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - } - ] - }, - { - "name": "IntUserField", - "version": 3, - "extends": "UserField", - "constants": [], - "methods": [ - { - "name": "get", - "version": 3, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "set", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "newValue", - "type": { "name": "int", "isPointer": false, "isConst": false } - } - ] - } - ] - }, - { - "name": "User", - "version": 2, - "extends": "Versioned", - "constants": [ - { - "name": "OP_USER_ADD", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "OP_USER_MODIFY", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - }, - { - "name": "OP_USER_DELETE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 3 } - }, - { - "name": "OP_USER_DISPLAY", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 4 } - }, - { - "name": "OP_USER_SET_MAP", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 5 } - }, - { - "name": "OP_USER_DROP_MAP", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 6 } - } - ], - "methods": [ - { - "name": "operation", - "version": 2, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "userName", - "version": 2, - "returnType": { - "name": "CharUserField", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "password", - "version": 2, - "returnType": { - "name": "CharUserField", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "firstName", - "version": 2, - "returnType": { - "name": "CharUserField", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "lastName", - "version": 2, - "returnType": { - "name": "CharUserField", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "middleName", - "version": 2, - "returnType": { - "name": "CharUserField", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "comment", - "version": 2, - "returnType": { - "name": "CharUserField", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "attributes", - "version": 2, - "returnType": { - "name": "CharUserField", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "active", - "version": 2, - "returnType": { - "name": "IntUserField", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "admin", - "version": 2, - "returnType": { - "name": "IntUserField", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "clear", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "ListUsers", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "list", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "user", - "type": { "name": "User", "isPointer": false, "isConst": false } - } - ] - } - ] - }, - { - "name": "LogonInfo", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "name", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "role", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "networkProtocol", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "remoteAddress", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "authBlock", - "version": 2, - "returnType": { - "name": "uchar", - "isPointer": true, - "isConst": true - }, - "mayThrow": false, - "parameters": [ - { - "name": "length", - "type": { "name": "uint", "isPointer": true, "isConst": false } - } - ] - } - ] - }, - { - "name": "Management", - "version": 4, - "extends": "PluginBase", - "constants": [], - "methods": [ - { - "name": "start", - "version": 4, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "logonInfo", - "type": { - "name": "LogonInfo", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "execute", - "version": 4, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "user", - "type": { "name": "User", "isPointer": false, "isConst": false } - }, - { - "name": "callback", - "type": { - "name": "ListUsers", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "commit", - "version": 4, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "rollback", - "version": 4, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "WireCryptPlugin", - "version": 4, - "extends": "PluginBase", - "constants": [], - "methods": [ - { - "name": "getKnownTypes", - "version": 4, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "setKey", - "version": 4, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "key", - "type": { - "name": "CryptKey", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "encrypt", - "version": 4, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "from", - "type": { "name": "void", "isPointer": true, "isConst": true } - }, - { - "name": "to", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "decrypt", - "version": 4, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "from", - "type": { "name": "void", "isPointer": true, "isConst": true } - }, - { - "name": "to", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - } - ] - }, - { - "name": "CryptKeyCallback", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "callback", - "version": 2, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "dataLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "data", - "type": { "name": "void", "isPointer": true, "isConst": true } - }, - { - "name": "bufferLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "buffer", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - } - ] - }, - { - "name": "KeyHolderPlugin", - "version": 4, - "extends": "PluginBase", - "constants": [], - "methods": [ - { - "name": "keyCallback", - "version": 4, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "callback", - "type": { - "name": "CryptKeyCallback", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "keyHandle", - "version": 4, - "returnType": { - "name": "CryptKeyCallback", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "keyName", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - } - ] - }, - { - "name": "DbCryptPlugin", - "version": 4, - "extends": "PluginBase", - "constants": [], - "methods": [ - { - "name": "setKey", - "version": 4, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "sources", - "type": { - "name": "KeyHolderPlugin", - "isPointer": true, - "isConst": false - } - }, - { - "name": "keyName", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - }, - { - "name": "encrypt", - "version": 4, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "from", - "type": { "name": "void", "isPointer": true, "isConst": true } - }, - { - "name": "to", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "decrypt", - "version": 4, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "from", - "type": { "name": "void", "isPointer": true, "isConst": true } - }, - { - "name": "to", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - } - ] - }, - { - "name": "ExternalContext", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "getMaster", - "version": 2, - "returnType": { - "name": "Master", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getEngine", - "version": 2, - "returnType": { - "name": "ExternalEngine", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getAttachment", - "version": 2, - "returnType": { - "name": "Attachment", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getTransaction", - "version": 2, - "returnType": { - "name": "Transaction", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getUserName", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getDatabaseName", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getClientCharSet", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "obtainInfoCode", - "version": 2, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getInfo", - "version": 2, - "returnType": { - "name": "void", - "isPointer": true, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "code", - "type": { "name": "int", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "setInfo", - "version": 2, - "returnType": { - "name": "void", - "isPointer": true, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "code", - "type": { "name": "int", "isPointer": false, "isConst": false } - }, - { - "name": "value", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - } - ] - }, - { - "name": "ExternalResultSet", - "version": 3, - "extends": "Disposable", - "constants": [], - "methods": [ - { - "name": "fetch", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "ExternalFunction", - "version": 3, - "extends": "Disposable", - "constants": [], - "methods": [ - { - "name": "getCharSet", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "name", - "type": { - "name": "string", - "isPointer": false, - "isConst": false - } - }, - { - "name": "nameSize", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "execute", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "inMsg", - "type": { "name": "void", "isPointer": true, "isConst": false } - }, - { - "name": "outMsg", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - } - ] - }, - { - "name": "ExternalProcedure", - "version": 3, - "extends": "Disposable", - "constants": [], - "methods": [ - { - "name": "getCharSet", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "name", - "type": { - "name": "string", - "isPointer": false, - "isConst": false - } - }, - { - "name": "nameSize", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "open", - "version": 3, - "returnType": { - "name": "ExternalResultSet", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "inMsg", - "type": { "name": "void", "isPointer": true, "isConst": false } - }, - { - "name": "outMsg", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - } - ] - }, - { - "name": "ExternalTrigger", - "version": 3, - "extends": "Disposable", - "constants": [ - { - "name": "TYPE_BEFORE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "TYPE_AFTER", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - }, - { - "name": "TYPE_DATABASE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 3 } - }, - { - "name": "ACTION_INSERT", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "ACTION_UPDATE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - }, - { - "name": "ACTION_DELETE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 3 } - }, - { - "name": "ACTION_CONNECT", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 4 } - }, - { - "name": "ACTION_DISCONNECT", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 5 } - }, - { - "name": "ACTION_TRANS_START", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 6 } - }, - { - "name": "ACTION_TRANS_COMMIT", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 7 } - }, - { - "name": "ACTION_TRANS_ROLLBACK", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 8 } - }, - { - "name": "ACTION_DDL", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 9 } - } - ], - "methods": [ - { - "name": "getCharSet", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "name", - "type": { - "name": "string", - "isPointer": false, - "isConst": false - } - }, - { - "name": "nameSize", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "execute", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "action", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "oldMsg", - "type": { "name": "void", "isPointer": true, "isConst": false } - }, - { - "name": "newMsg", - "type": { "name": "void", "isPointer": true, "isConst": false } - } - ] - } - ] - }, - { - "name": "RoutineMetadata", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "getPackage", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getName", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getEntryPoint", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getBody", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getInputMetadata", - "version": 2, - "returnType": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getOutputMetadata", - "version": 2, - "returnType": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getTriggerMetadata", - "version": 2, - "returnType": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getTriggerTable", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getTriggerType", - "version": 2, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "ExternalEngine", - "version": 4, - "extends": "PluginBase", - "constants": [], - "methods": [ - { - "name": "open", - "version": 4, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "charSet", - "type": { - "name": "string", - "isPointer": false, - "isConst": false - } - }, - { - "name": "charSetSize", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "openAttachment", - "version": 4, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "closeAttachment", - "version": 4, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "makeFunction", - "version": 4, - "returnType": { - "name": "ExternalFunction", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "metadata", - "type": { - "name": "RoutineMetadata", - "isPointer": false, - "isConst": false - } - }, - { - "name": "inBuilder", - "type": { - "name": "MetadataBuilder", - "isPointer": false, - "isConst": false - } - }, - { - "name": "outBuilder", - "type": { - "name": "MetadataBuilder", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "makeProcedure", - "version": 4, - "returnType": { - "name": "ExternalProcedure", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "metadata", - "type": { - "name": "RoutineMetadata", - "isPointer": false, - "isConst": false - } - }, - { - "name": "inBuilder", - "type": { - "name": "MetadataBuilder", - "isPointer": false, - "isConst": false - } - }, - { - "name": "outBuilder", - "type": { - "name": "MetadataBuilder", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "makeTrigger", - "version": 4, - "returnType": { - "name": "ExternalTrigger", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "metadata", - "type": { - "name": "RoutineMetadata", - "isPointer": false, - "isConst": false - } - }, - { - "name": "fieldsBuilder", - "type": { - "name": "MetadataBuilder", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "Timer", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "handler", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TimerControl", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "start", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "timer", - "type": { - "name": "Timer", - "isPointer": false, - "isConst": false - } - }, - { - "name": "microSeconds", - "type": { - "name": "uint64", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "stop", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "timer", - "type": { - "name": "Timer", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "VersionCallback", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "callback", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "text", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - } - ] - }, - { - "name": "Util", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "getFbVersion", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "att", - "type": { - "name": "Attachment", - "isPointer": false, - "isConst": false - } - }, - { - "name": "callback", - "type": { - "name": "VersionCallback", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "loadBlob", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "blobId", - "type": { - "name": "ISC_QUAD", - "isPointer": true, - "isConst": false - } - }, - { - "name": "att", - "type": { - "name": "Attachment", - "isPointer": false, - "isConst": false - } - }, - { - "name": "tra", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "file", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "txt", - "type": { - "name": "boolean", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "dumpBlob", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "blobId", - "type": { - "name": "ISC_QUAD", - "isPointer": true, - "isConst": false - } - }, - { - "name": "att", - "type": { - "name": "Attachment", - "isPointer": false, - "isConst": false - } - }, - { - "name": "tra", - "type": { - "name": "Transaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "file", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "txt", - "type": { - "name": "boolean", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getPerfCounters", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "att", - "type": { - "name": "Attachment", - "isPointer": false, - "isConst": false - } - }, - { - "name": "countersSet", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "counters", - "type": { "name": "int64", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "executeCreateDatabase", - "version": 2, - "returnType": { - "name": "Attachment", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "stmtLength", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "creatDBstatement", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "dialect", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "stmtIsCreateDb", - "type": { - "name": "boolean", - "isPointer": true, - "isConst": false - } - } - ] - }, - { - "name": "decodeDate", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "date", - "type": { - "name": "ISC_DATE", - "isPointer": false, - "isConst": false - } - }, - { - "name": "year", - "type": { "name": "uint", "isPointer": true, "isConst": false } - }, - { - "name": "month", - "type": { "name": "uint", "isPointer": true, "isConst": false } - }, - { - "name": "day", - "type": { "name": "uint", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "decodeTime", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "time", - "type": { - "name": "ISC_TIME", - "isPointer": false, - "isConst": false - } - }, - { - "name": "hours", - "type": { "name": "uint", "isPointer": true, "isConst": false } - }, - { - "name": "minutes", - "type": { "name": "uint", "isPointer": true, "isConst": false } - }, - { - "name": "seconds", - "type": { "name": "uint", "isPointer": true, "isConst": false } - }, - { - "name": "fractions", - "type": { "name": "uint", "isPointer": true, "isConst": false } - } - ] - }, - { - "name": "encodeDate", - "version": 2, - "returnType": { - "name": "ISC_DATE", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "year", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "month", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "day", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "encodeTime", - "version": 2, - "returnType": { - "name": "ISC_TIME", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "hours", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "minutes", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "seconds", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "fractions", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "formatStatus", - "version": 2, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "buffer", - "type": { - "name": "string", - "isPointer": false, - "isConst": false - } - }, - { - "name": "bufferSize", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getClientVersion", - "version": 2, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getXpbBuilder", - "version": 2, - "returnType": { - "name": "XpbBuilder", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "kind", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "buf", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "len", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "setOffsets", - "version": 2, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "metadata", - "type": { - "name": "MessageMetadata", - "isPointer": false, - "isConst": false - } - }, - { - "name": "callback", - "type": { - "name": "OffsetsCallback", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "OffsetsCallback", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "setOffset", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "index", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "offset", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "nullOffset", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - } - ] - }, - { - "name": "XpbBuilder", - "version": 3, - "extends": "Disposable", - "constants": [ - { - "name": "DPB", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "SPB_ATTACH", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - }, - { - "name": "SPB_START", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 3 } - }, - { - "name": "TPB", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 4 } - } - ], - "methods": [ - { - "name": "clear", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "removeCurrent", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "insertInt", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "tag", - "type": { - "name": "uchar", - "isPointer": false, - "isConst": false - } - }, - { - "name": "value", - "type": { "name": "int", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "insertBigInt", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "tag", - "type": { - "name": "uchar", - "isPointer": false, - "isConst": false - } - }, - { - "name": "value", - "type": { - "name": "int64", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "insertBytes", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "tag", - "type": { - "name": "uchar", - "isPointer": false, - "isConst": false - } - }, - { - "name": "bytes", - "type": { "name": "void", "isPointer": true, "isConst": true } - }, - { - "name": "length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "insertString", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "tag", - "type": { - "name": "uchar", - "isPointer": false, - "isConst": false - } - }, - { - "name": "str", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - }, - { - "name": "insertTag", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "tag", - "type": { - "name": "uchar", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "isEof", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "moveNext", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "rewind", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "findFirst", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "tag", - "type": { - "name": "uchar", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "findNext", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getTag", - "version": 3, - "returnType": { - "name": "uchar", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getLength", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getInt", - "version": 3, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getBigInt", - "version": 3, - "returnType": { - "name": "int64", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getString", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getBytes", - "version": 3, - "returnType": { - "name": "uchar", - "isPointer": true, - "isConst": true - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getBufferLength", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "getBuffer", - "version": 3, - "returnType": { - "name": "uchar", - "isPointer": true, - "isConst": true - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "TraceConnection", - "version": 2, - "extends": "Versioned", - "constants": [ - { - "name": "KIND_DATABASE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "KIND_SERVICE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - } - ], - "methods": [ - { - "name": "getKind", - "version": 2, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getProcessID", - "version": 2, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getUserName", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getRoleName", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getCharSet", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getRemoteProtocol", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getRemoteAddress", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getRemoteProcessID", - "version": 2, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getRemoteProcessName", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TraceDatabaseConnection", - "version": 3, - "extends": "TraceConnection", - "constants": [], - "methods": [ - { - "name": "getConnectionID", - "version": 3, - "returnType": { - "name": "int64", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getDatabaseName", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TraceTransaction", - "version": 2, - "extends": "Versioned", - "constants": [ - { - "name": "ISOLATION_CONSISTENCY", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "ISOLATION_CONCURRENCY", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - }, - { - "name": "ISOLATION_READ_COMMITTED_RECVER", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 3 } - }, - { - "name": "ISOLATION_READ_COMMITTED_NORECVER", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 4 } - } - ], - "methods": [ - { - "name": "getTransactionID", - "version": 2, - "returnType": { - "name": "int64", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getReadOnly", - "version": 2, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getWait", - "version": 2, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getIsolation", - "version": 2, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getPerf", - "version": 2, - "returnType": { - "name": "PerformanceInfo", - "isPointer": true, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TraceParams", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "getCount", - "version": 2, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getParam", - "version": 2, - "returnType": { "name": "dsc", "isPointer": true, "isConst": true }, - "mayThrow": false, - "parameters": [ - { - "name": "idx", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - } - ] - }, - { - "name": "TraceStatement", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "getStmtID", - "version": 2, - "returnType": { - "name": "int64", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getPerf", - "version": 2, - "returnType": { - "name": "PerformanceInfo", - "isPointer": true, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TraceSQLStatement", - "version": 3, - "extends": "TraceStatement", - "constants": [], - "methods": [ - { - "name": "getText", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getPlan", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getInputs", - "version": 3, - "returnType": { - "name": "TraceParams", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getTextUTF8", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getExplainedPlan", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TraceBLRStatement", - "version": 3, - "extends": "TraceStatement", - "constants": [], - "methods": [ - { - "name": "getData", - "version": 3, - "returnType": { - "name": "uchar", - "isPointer": true, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getDataLength", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getText", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TraceDYNRequest", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "getData", - "version": 2, - "returnType": { - "name": "uchar", - "isPointer": true, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getDataLength", - "version": 2, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getText", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TraceContextVariable", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "getNameSpace", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getVarName", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getVarValue", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TraceProcedure", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "getProcName", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getInputs", - "version": 2, - "returnType": { - "name": "TraceParams", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getPerf", - "version": 2, - "returnType": { - "name": "PerformanceInfo", - "isPointer": true, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TraceFunction", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "getFuncName", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getInputs", - "version": 2, - "returnType": { - "name": "TraceParams", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getResult", - "version": 2, - "returnType": { - "name": "TraceParams", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getPerf", - "version": 2, - "returnType": { - "name": "PerformanceInfo", - "isPointer": true, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TraceTrigger", - "version": 2, - "extends": "Versioned", - "constants": [ - { - "name": "TYPE_ALL", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 0 } - }, - { - "name": "TYPE_BEFORE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "TYPE_AFTER", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - } - ], - "methods": [ - { - "name": "getTriggerName", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getRelationName", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getAction", - "version": 2, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getWhich", - "version": 2, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getPerf", - "version": 2, - "returnType": { - "name": "PerformanceInfo", - "isPointer": true, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TraceServiceConnection", - "version": 3, - "extends": "TraceConnection", - "constants": [], - "methods": [ - { - "name": "getServiceID", - "version": 3, - "returnType": { - "name": "void", - "isPointer": true, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getServiceMgr", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getServiceName", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TraceStatusVector", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "hasError", - "version": 2, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "hasWarning", - "version": 2, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getStatus", - "version": 2, - "returnType": { - "name": "Status", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getText", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TraceSweepInfo", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "getOIT", - "version": 2, - "returnType": { - "name": "int64", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getOST", - "version": 2, - "returnType": { - "name": "int64", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getOAT", - "version": 2, - "returnType": { - "name": "int64", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getNext", - "version": 2, - "returnType": { - "name": "int64", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getPerf", - "version": 2, - "returnType": { - "name": "PerformanceInfo", - "isPointer": true, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TraceLogWriter", - "version": 3, - "extends": "ReferenceCounted", - "constants": [], - "methods": [ - { - "name": "write", - "version": 3, - "returnType": { - "name": "uint", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [ - { - "name": "buf", - "type": { "name": "void", "isPointer": true, "isConst": true } - }, - { - "name": "size", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - } - ] - }, - { - "name": "TraceInitInfo", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "getConfigText", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getTraceSessionID", - "version": 2, - "returnType": { - "name": "int", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getTraceSessionName", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getFirebirdRootDirectory", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getDatabaseName", - "version": 2, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getConnection", - "version": 2, - "returnType": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "getLogWriter", - "version": 2, - "returnType": { - "name": "TraceLogWriter", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - } - ] - }, - { - "name": "TracePlugin", - "version": 3, - "extends": "ReferenceCounted", - "constants": [ - { - "name": "RESULT_SUCCESS", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 0 } - }, - { - "name": "RESULT_FAILED", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "RESULT_UNAUTHORIZED", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - }, - { - "name": "SWEEP_STATE_STARTED", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "SWEEP_STATE_FINISHED", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - }, - { - "name": "SWEEP_STATE_FAILED", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 3 } - }, - { - "name": "SWEEP_STATE_PROGRESS", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 4 } - } - ], - "methods": [ - { - "name": "trace_get_error", - "version": 3, - "returnType": { - "name": "string", - "isPointer": false, - "isConst": true - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "trace_attach", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "create_db", - "type": { - "name": "boolean", - "isPointer": false, - "isConst": false - } - }, - { - "name": "att_result", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_detach", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "drop_db", - "type": { - "name": "boolean", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "trace_transaction_start", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "TraceTransaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "tpb_length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "tpb", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "tra_result", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_transaction_end", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "TraceTransaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "commit", - "type": { - "name": "boolean", - "isPointer": false, - "isConst": false - } - }, - { - "name": "retain_context", - "type": { - "name": "boolean", - "isPointer": false, - "isConst": false - } - }, - { - "name": "tra_result", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_proc_execute", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "TraceTransaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "procedure", - "type": { - "name": "TraceProcedure", - "isPointer": false, - "isConst": false - } - }, - { - "name": "started", - "type": { - "name": "boolean", - "isPointer": false, - "isConst": false - } - }, - { - "name": "proc_result", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_trigger_execute", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "TraceTransaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "trigger", - "type": { - "name": "TraceTrigger", - "isPointer": false, - "isConst": false - } - }, - { - "name": "started", - "type": { - "name": "boolean", - "isPointer": false, - "isConst": false - } - }, - { - "name": "trig_result", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_set_context", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "TraceTransaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "variable", - "type": { - "name": "TraceContextVariable", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "trace_dsql_prepare", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "TraceTransaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "statement", - "type": { - "name": "TraceSQLStatement", - "isPointer": false, - "isConst": false - } - }, - { - "name": "time_millis", - "type": { - "name": "int64", - "isPointer": false, - "isConst": false - } - }, - { - "name": "req_result", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_dsql_free", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "statement", - "type": { - "name": "TraceSQLStatement", - "isPointer": false, - "isConst": false - } - }, - { - "name": "option", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_dsql_execute", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "TraceTransaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "statement", - "type": { - "name": "TraceSQLStatement", - "isPointer": false, - "isConst": false - } - }, - { - "name": "started", - "type": { - "name": "boolean", - "isPointer": false, - "isConst": false - } - }, - { - "name": "req_result", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_blr_compile", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "TraceTransaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "statement", - "type": { - "name": "TraceBLRStatement", - "isPointer": false, - "isConst": false - } - }, - { - "name": "time_millis", - "type": { - "name": "int64", - "isPointer": false, - "isConst": false - } - }, - { - "name": "req_result", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_blr_execute", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "TraceTransaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "statement", - "type": { - "name": "TraceBLRStatement", - "isPointer": false, - "isConst": false - } - }, - { - "name": "req_result", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_dyn_execute", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "TraceTransaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "request", - "type": { - "name": "TraceDYNRequest", - "isPointer": false, - "isConst": false - } - }, - { - "name": "time_millis", - "type": { - "name": "int64", - "isPointer": false, - "isConst": false - } - }, - { - "name": "req_result", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_service_attach", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "service", - "type": { - "name": "TraceServiceConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "att_result", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_service_start", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "service", - "type": { - "name": "TraceServiceConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "switches_length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "switches", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "start_result", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_service_query", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "service", - "type": { - "name": "TraceServiceConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "send_item_length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "send_items", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "recv_item_length", - "type": { "name": "uint", "isPointer": false, "isConst": false } - }, - { - "name": "recv_items", - "type": { "name": "uchar", "isPointer": true, "isConst": true } - }, - { - "name": "query_result", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_service_detach", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "service", - "type": { - "name": "TraceServiceConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "detach_result", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_event_error", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "status", - "type": { - "name": "TraceStatusVector", - "isPointer": false, - "isConst": false - } - }, - { - "name": "function", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - } - ] - }, - { - "name": "trace_event_sweep", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "sweep", - "type": { - "name": "TraceSweepInfo", - "isPointer": false, - "isConst": false - } - }, - { - "name": "sweep_state", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - }, - { - "name": "trace_func_execute", - "version": 3, - "returnType": { - "name": "boolean", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "notImplementedExpr": { "type": "boolean-literal", "value": true }, - "parameters": [ - { - "name": "connection", - "type": { - "name": "TraceDatabaseConnection", - "isPointer": false, - "isConst": false - } - }, - { - "name": "transaction", - "type": { - "name": "TraceTransaction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "function", - "type": { - "name": "TraceFunction", - "isPointer": false, - "isConst": false - } - }, - { - "name": "started", - "type": { - "name": "boolean", - "isPointer": false, - "isConst": false - } - }, - { - "name": "func_result", - "type": { "name": "uint", "isPointer": false, "isConst": false } - } - ] - } - ] - }, - { - "name": "TraceFactory", - "version": 4, - "extends": "PluginBase", - "constants": [ - { - "name": "TRACE_EVENT_ATTACH", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 0 } - }, - { - "name": "TRACE_EVENT_DETACH", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 1 } - }, - { - "name": "TRACE_EVENT_TRANSACTION_START", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 2 } - }, - { - "name": "TRACE_EVENT_TRANSACTION_END", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 3 } - }, - { - "name": "TRACE_EVENT_SET_CONTEXT", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 4 } - }, - { - "name": "TRACE_EVENT_PROC_EXECUTE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 5 } - }, - { - "name": "TRACE_EVENT_TRIGGER_EXECUTE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 6 } - }, - { - "name": "TRACE_EVENT_DSQL_PREPARE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 7 } - }, - { - "name": "TRACE_EVENT_DSQL_FREE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 8 } - }, - { - "name": "TRACE_EVENT_DSQL_EXECUTE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 9 } - }, - { - "name": "TRACE_EVENT_BLR_COMPILE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 10 } - }, - { - "name": "TRACE_EVENT_BLR_EXECUTE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 11 } - }, - { - "name": "TRACE_EVENT_DYN_EXECUTE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 12 } - }, - { - "name": "TRACE_EVENT_SERVICE_ATTACH", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 13 } - }, - { - "name": "TRACE_EVENT_SERVICE_START", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 14 } - }, - { - "name": "TRACE_EVENT_SERVICE_QUERY", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 15 } - }, - { - "name": "TRACE_EVENT_SERVICE_DETACH", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 16 } - }, - { - "name": "TRACE_EVENT_ERROR", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 17 } - }, - { - "name": "TRACE_EVENT_SWEEP", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 18 } - }, - { - "name": "TRACE_EVENT_FUNC_EXECUTE", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 19 } - }, - { - "name": "TRACE_EVENT_MAX", - "type": { "name": "uint", "isPointer": false, "isConst": false }, - "expr": { "type": "int-literal", "value": 20 } - } - ], - "methods": [ - { - "name": "trace_needs", - "version": 4, - "returnType": { - "name": "uint64", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "trace_create", - "version": 4, - "returnType": { - "name": "TracePlugin", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "init_info", - "type": { - "name": "TraceInitInfo", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "UdrFunctionFactory", - "version": 3, - "extends": "Disposable", - "constants": [], - "methods": [ - { - "name": "setup", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "metadata", - "type": { - "name": "RoutineMetadata", - "isPointer": false, - "isConst": false - } - }, - { - "name": "inBuilder", - "type": { - "name": "MetadataBuilder", - "isPointer": false, - "isConst": false - } - }, - { - "name": "outBuilder", - "type": { - "name": "MetadataBuilder", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "newItem", - "version": 3, - "returnType": { - "name": "ExternalFunction", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "metadata", - "type": { - "name": "RoutineMetadata", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "UdrProcedureFactory", - "version": 3, - "extends": "Disposable", - "constants": [], - "methods": [ - { - "name": "setup", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "metadata", - "type": { - "name": "RoutineMetadata", - "isPointer": false, - "isConst": false - } - }, - { - "name": "inBuilder", - "type": { - "name": "MetadataBuilder", - "isPointer": false, - "isConst": false - } - }, - { - "name": "outBuilder", - "type": { - "name": "MetadataBuilder", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "newItem", - "version": 3, - "returnType": { - "name": "ExternalProcedure", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "metadata", - "type": { - "name": "RoutineMetadata", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "UdrTriggerFactory", - "version": 3, - "extends": "Disposable", - "constants": [], - "methods": [ - { - "name": "setup", - "version": 3, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "metadata", - "type": { - "name": "RoutineMetadata", - "isPointer": false, - "isConst": false - } - }, - { - "name": "fieldsBuilder", - "type": { - "name": "MetadataBuilder", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "newItem", - "version": 3, - "returnType": { - "name": "ExternalTrigger", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "context", - "type": { - "name": "ExternalContext", - "isPointer": false, - "isConst": false - } - }, - { - "name": "metadata", - "type": { - "name": "RoutineMetadata", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - }, - { - "name": "UdrPlugin", - "version": 2, - "extends": "Versioned", - "constants": [], - "methods": [ - { - "name": "getMaster", - "version": 2, - "returnType": { - "name": "Master", - "isPointer": false, - "isConst": false - }, - "mayThrow": false, - "parameters": [] - }, - { - "name": "registerFunction", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "name", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "factory", - "type": { - "name": "UdrFunctionFactory", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "registerProcedure", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "name", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "factory", - "type": { - "name": "UdrProcedureFactory", - "isPointer": false, - "isConst": false - } - } - ] - }, - { - "name": "registerTrigger", - "version": 2, - "returnType": { - "name": "void", - "isPointer": false, - "isConst": false - }, - "mayThrow": true, - "parameters": [ - { - "name": "status", - "type": { - "name": "Status", - "isPointer": false, - "isConst": false - } - }, - { - "name": "name", - "type": { - "name": "string", - "isPointer": false, - "isConst": true - } - }, - { - "name": "factory", - "type": { - "name": "UdrTriggerFactory", - "isPointer": false, - "isConst": false - } - } - ] - } - ] - } - ] - } + "library": + { + "interfaces": + [ + { + "name": "Versioned", + "version": 1, + "constants": + [ + ], + "methods": + [ + ] + }, + { + "name": "ReferenceCounted", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "addRef", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "release", + "version": 2, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "Disposable", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "dispose", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "Status", + "version": 3, + "extends": "Disposable", + "constants": + [ + { + "name": "STATE_WARNINGS", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "STATE_ERRORS", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "RESULT_ERROR", + "type": { "name": "int", "isPointer": false, "isConst": false }, + "expr": { "type": "-", "args": [ { "type": "int-literal", "value": 1 } ] } + }, + { + "name": "RESULT_OK", + "type": { "name": "int", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 0 } + }, + { + "name": "RESULT_NO_DATA", + "type": { "name": "int", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "RESULT_SEGMENT", + "type": { "name": "int", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + } + ], + "methods": + [ + { + "name": "init", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getState", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "setErrors2", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "value", + "type": { "name": "intptr", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "setWarnings2", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "value", + "type": { "name": "intptr", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "setErrors", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "value", + "type": { "name": "intptr", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "setWarnings", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "value", + "type": { "name": "intptr", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "getErrors", + "version": 3, + "returnType": { "name": "intptr", "isPointer": true, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getWarnings", + "version": 3, + "returnType": { "name": "intptr", "isPointer": true, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "clone", + "version": 3, + "returnType": { "name": "Status", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "Master", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getStatus", + "version": 2, + "returnType": { "name": "Status", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getDispatcher", + "version": 2, + "returnType": { "name": "Provider", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getPluginManager", + "version": 2, + "returnType": { "name": "PluginManager", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getTimerControl", + "version": 2, + "returnType": { "name": "TimerControl", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getDtc", + "version": 2, + "returnType": { "name": "Dtc", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "registerAttachment", + "version": 2, + "returnType": { "name": "Attachment", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "provider", + "type": { "name": "Provider", "isPointer": false, "isConst": false } + }, + { + "name": "attachment", + "type": { "name": "Attachment", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "registerTransaction", + "version": 2, + "returnType": { "name": "Transaction", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "attachment", + "type": { "name": "Attachment", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getMetadataBuilder", + "version": 2, + "returnType": { "name": "MetadataBuilder", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "fieldCount", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "serverMode", + "version": 2, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "mode", + "type": { "name": "int", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getUtilInterface", + "version": 2, + "returnType": { "name": "Util", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getConfigManager", + "version": 2, + "returnType": { "name": "ConfigManager", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getProcessExiting", + "version": 2, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "PluginBase", + "version": 3, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "setOwner", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "r", + "type": { "name": "ReferenceCounted", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getOwner", + "version": 3, + "returnType": { "name": "ReferenceCounted", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "PluginSet", + "version": 3, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "getName", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getModuleName", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getPlugin", + "version": 3, + "returnType": { "name": "PluginBase", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "next", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "set", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "s", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + } + ] + }, + { + "name": "ConfigEntry", + "version": 3, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "getName", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getValue", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getIntValue", + "version": 3, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getBoolValue", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getSubConfig", + "version": 3, + "returnType": { "name": "Config", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "Config", + "version": 3, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "find", + "version": 3, + "returnType": { "name": "ConfigEntry", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "findValue", + "version": 3, + "returnType": { "name": "ConfigEntry", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "value", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "findPos", + "version": 3, + "returnType": { "name": "ConfigEntry", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "pos", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "FirebirdConf", + "version": 4, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "getKey", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "asInteger", + "version": 3, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "key", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "asString", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + { + "name": "key", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "asBoolean", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "key", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getVersion", + "version": 4, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "PluginConfig", + "version": 3, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "getConfigFileName", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getDefaultConfig", + "version": 3, + "returnType": { "name": "Config", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getFirebirdConf", + "version": 3, + "returnType": { "name": "FirebirdConf", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setReleaseDelay", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "microSeconds", + "type": { "name": "uint64", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "PluginFactory", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "createPlugin", + "version": 2, + "returnType": { "name": "PluginBase", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "factoryParameter", + "type": { "name": "PluginConfig", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "PluginModule", + "version": 3, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "doClean", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "threadDetach", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "PluginManager", + "version": 2, + "extends": "Versioned", + "constants": + [ + { + "name": "TYPE_PROVIDER", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "TYPE_FIRST_NON_LIB", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "TYPE_AUTH_SERVER", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 3 } + }, + { + "name": "TYPE_AUTH_CLIENT", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 4 } + }, + { + "name": "TYPE_AUTH_USER_MANAGEMENT", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 5 } + }, + { + "name": "TYPE_EXTERNAL_ENGINE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 6 } + }, + { + "name": "TYPE_TRACE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 7 } + }, + { + "name": "TYPE_WIRE_CRYPT", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 8 } + }, + { + "name": "TYPE_DB_CRYPT", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 9 } + }, + { + "name": "TYPE_KEY_HOLDER", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 10 } + }, + { + "name": "TYPE_REPLICATOR", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 11 } + }, + { + "name": "TYPE_PROFILER", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 12 } + }, + { + "name": "TYPE_COUNT", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 13 } + } + ], + "methods": + [ + { + "name": "registerPluginFactory", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "pluginType", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "defaultName", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "factory", + "type": { "name": "PluginFactory", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "registerModule", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "cleanup", + "type": { "name": "PluginModule", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "unregisterModule", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "cleanup", + "type": { "name": "PluginModule", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getPlugins", + "version": 2, + "returnType": { "name": "PluginSet", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "pluginType", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "namesList", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "firebirdConf", + "type": { "name": "FirebirdConf", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getConfig", + "version": 2, + "returnType": { "name": "Config", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "filename", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "releasePlugin", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "plugin", + "type": { "name": "PluginBase", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "CryptKey", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "setSymmetric", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "type", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "keyLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "key", + "type": { "name": "void", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "setAsymmetric", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "type", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "encryptKeyLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "encryptKey", + "type": { "name": "void", "isPointer": true, "isConst": true } + }, + { + "name": "decryptKeyLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "decryptKey", + "type": { "name": "void", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "getEncryptKey", + "version": 2, + "returnType": { "name": "void", "isPointer": true, "isConst": true }, + "mayThrow": false, + "parameters": + [ + { + "name": "length", + "type": { "name": "uint", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "getDecryptKey", + "version": 2, + "returnType": { "name": "void", "isPointer": true, "isConst": true }, + "mayThrow": false, + "parameters": + [ + { + "name": "length", + "type": { "name": "uint", "isPointer": true, "isConst": false } + } + ] + } + ] + }, + { + "name": "ConfigManager", + "version": 3, + "extends": "Versioned", + "constants": + [ + { + "name": "DIR_BIN", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 0 } + }, + { + "name": "DIR_SBIN", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "DIR_CONF", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "DIR_LIB", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 3 } + }, + { + "name": "DIR_INC", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 4 } + }, + { + "name": "DIR_DOC", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 5 } + }, + { + "name": "DIR_UDF", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 6 } + }, + { + "name": "DIR_SAMPLE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 7 } + }, + { + "name": "DIR_SAMPLEDB", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 8 } + }, + { + "name": "DIR_HELP", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 9 } + }, + { + "name": "DIR_INTL", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 10 } + }, + { + "name": "DIR_MISC", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 11 } + }, + { + "name": "DIR_SECDB", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 12 } + }, + { + "name": "DIR_MSG", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 13 } + }, + { + "name": "DIR_LOG", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 14 } + }, + { + "name": "DIR_GUARD", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 15 } + }, + { + "name": "DIR_PLUGINS", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 16 } + }, + { + "name": "DIR_TZDATA", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 17 } + }, + { + "name": "DIR_COUNT", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 18 } + } + ], + "methods": + [ + { + "name": "getDirectory", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + { + "name": "code", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getFirebirdConf", + "version": 2, + "returnType": { "name": "FirebirdConf", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getDatabaseConf", + "version": 2, + "returnType": { "name": "FirebirdConf", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "dbName", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "getPluginConfig", + "version": 2, + "returnType": { "name": "Config", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "configuredPlugin", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "getInstallDirectory", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getRootDirectory", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getDefaultSecurityDb", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "EventCallback", + "version": 3, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "eventCallbackFunction", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "events", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + } + ] + }, + { + "name": "Blob", + "version": 4, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "getInfo", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "itemsLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "items", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "bufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "buffer", + "type": { "name": "uchar", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "getSegment", + "version": 3, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "notImplementedExpr": { "type": "constant", "interface": "Status", "name": "RESULT_ERROR" }, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "bufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "buffer", + "type": { "name": "void", "isPointer": true, "isConst": false } + }, + { + "name": "segmentLength", + "type": { "name": "uint", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "putSegment", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "buffer", + "type": { "name": "void", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "deprecatedCancel", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "deprecatedClose", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "seek", + "version": 3, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "mode", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "offset", + "type": { "name": "int", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "cancel", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "close", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "Transaction", + "version": 4, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "getInfo", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "itemsLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "items", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "bufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "buffer", + "type": { "name": "uchar", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "prepare", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "msgLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "message", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "deprecatedCommit", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "commitRetaining", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "deprecatedRollback", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "rollbackRetaining", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "deprecatedDisconnect", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "join", + "version": 3, + "returnType": { "name": "Transaction", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "validate", + "version": 3, + "returnType": { "name": "Transaction", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "attachment", + "type": { "name": "Attachment", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "enterDtc", + "version": 3, + "returnType": { "name": "Transaction", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "commit", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "rollback", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "disconnect", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "MessageMetadata", + "version": 4, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "getCount", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getField", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getRelation", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getOwner", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getAlias", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getType", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "isNullable", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getSubType", + "version": 3, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getLength", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getScale", + "version": 3, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getCharSet", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getOffset", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getNullOffset", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getBuilder", + "version": 3, + "returnType": { "name": "MetadataBuilder", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getMessageLength", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getAlignment", + "version": 4, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getAlignedLength", + "version": 4, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "MetadataBuilder", + "version": 4, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "setType", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "type", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setSubType", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "subType", + "type": { "name": "int", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setLength", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setCharSet", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "charSet", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setScale", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "scale", + "type": { "name": "int", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "truncate", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "count", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "moveNameToIndex", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "remove", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "addField", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getMetadata", + "version": 3, + "returnType": { "name": "MessageMetadata", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setField", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "field", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "setRelation", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "relation", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "setOwner", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "owner", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "setAlias", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "alias", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + } + ] + }, + { + "name": "ResultSet", + "version": 5, + "extends": "ReferenceCounted", + "constants": + [ + { + "name": "INF_RECORD_COUNT", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 10 } + } + ], + "methods": + [ + { + "name": "fetchNext", + "version": 3, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "notImplementedExpr": { "type": "constant", "interface": "Status", "name": "RESULT_ERROR" }, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "message", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "fetchPrior", + "version": 3, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "notImplementedExpr": { "type": "constant", "interface": "Status", "name": "RESULT_ERROR" }, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "message", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "fetchFirst", + "version": 3, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "notImplementedExpr": { "type": "constant", "interface": "Status", "name": "RESULT_ERROR" }, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "message", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "fetchLast", + "version": 3, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "notImplementedExpr": { "type": "constant", "interface": "Status", "name": "RESULT_ERROR" }, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "message", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "fetchAbsolute", + "version": 3, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "notImplementedExpr": { "type": "constant", "interface": "Status", "name": "RESULT_ERROR" }, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "position", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "message", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "fetchRelative", + "version": 3, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "notImplementedExpr": { "type": "constant", "interface": "Status", "name": "RESULT_ERROR" }, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "offset", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "message", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "isEof", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "isBof", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getMetadata", + "version": 3, + "returnType": { "name": "MessageMetadata", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "deprecatedClose", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setDelayedOutputFormat", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "format", + "type": { "name": "MessageMetadata", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "close", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getInfo", + "version": 5, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "itemsLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "items", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "bufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "buffer", + "type": { "name": "uchar", "isPointer": true, "isConst": false } + } + ] + } + ] + }, + { + "name": "Statement", + "version": 6, + "extends": "ReferenceCounted", + "constants": + [ + { + "name": "PREPARE_PREFETCH_NONE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 0 } + }, + { + "name": "PREPARE_PREFETCH_TYPE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "PREPARE_PREFETCH_INPUT_PARAMETERS", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "PREPARE_PREFETCH_OUTPUT_PARAMETERS", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 4 } + }, + { + "name": "PREPARE_PREFETCH_LEGACY_PLAN", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 8 } + }, + { + "name": "PREPARE_PREFETCH_DETAILED_PLAN", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 16 } + }, + { + "name": "PREPARE_PREFETCH_AFFECTED_RECORDS", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 32 } + }, + { + "name": "PREPARE_PREFETCH_FLAGS", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 64 } + }, + { + "name": "PREPARE_PREFETCH_METADATA", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "|", "args": [ { "type": "constant", "interface": "Statement", "name": "PREPARE_PREFETCH_TYPE" }, { "type": "|", "args": [ { "type": "constant", "interface": "Statement", "name": "PREPARE_PREFETCH_FLAGS" }, { "type": "|", "args": [ { "type": "constant", "interface": "Statement", "name": "PREPARE_PREFETCH_INPUT_PARAMETERS" }, { "type": "constant", "interface": "Statement", "name": "PREPARE_PREFETCH_OUTPUT_PARAMETERS" } ] } ] } ] } + }, + { + "name": "PREPARE_PREFETCH_ALL", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "|", "args": [ { "type": "constant", "interface": "Statement", "name": "PREPARE_PREFETCH_METADATA" }, { "type": "|", "args": [ { "type": "constant", "interface": "Statement", "name": "PREPARE_PREFETCH_LEGACY_PLAN" }, { "type": "|", "args": [ { "type": "constant", "interface": "Statement", "name": "PREPARE_PREFETCH_DETAILED_PLAN" }, { "type": "constant", "interface": "Statement", "name": "PREPARE_PREFETCH_AFFECTED_RECORDS" } ] } ] } ] } + }, + { + "name": "FLAG_HAS_CURSOR", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "FLAG_REPEAT_EXECUTE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "CURSOR_TYPE_SCROLLABLE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + } + ], + "methods": + [ + { + "name": "getInfo", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "itemsLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "items", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "bufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "buffer", + "type": { "name": "uchar", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "getType", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getPlan", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "detailed", + "type": { "name": "boolean", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getAffectedRecords", + "version": 3, + "returnType": { "name": "uint64", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getInputMetadata", + "version": 3, + "returnType": { "name": "MessageMetadata", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getOutputMetadata", + "version": 3, + "returnType": { "name": "MessageMetadata", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "execute", + "version": 3, + "returnType": { "name": "Transaction", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "inMetadata", + "type": { "name": "MessageMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "inBuffer", + "type": { "name": "void", "isPointer": true, "isConst": false } + }, + { + "name": "outMetadata", + "type": { "name": "MessageMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "outBuffer", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "openCursor", + "version": 3, + "returnType": { "name": "ResultSet", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "inMetadata", + "type": { "name": "MessageMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "inBuffer", + "type": { "name": "void", "isPointer": true, "isConst": false } + }, + { + "name": "outMetadata", + "type": { "name": "MessageMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "flags", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setCursorName", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "deprecatedFree", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getFlags", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getTimeout", + "version": 4, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setTimeout", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "timeOut", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "createBatch", + "version": 4, + "returnType": { "name": "Batch", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "inMetadata", + "type": { "name": "MessageMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "parLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "par", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "free", + "version": 5, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getMaxInlineBlobSize", + "version": 6, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setMaxInlineBlobSize", + "version": 6, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "size", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "Batch", + "version": 4, + "extends": "ReferenceCounted", + "constants": + [ + { + "name": "VERSION1", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "CURRENT_VERSION", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "constant", "interface": "Batch", "name": "VERSION1" } + }, + { + "name": "TAG_MULTIERROR", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "TAG_RECORD_COUNTS", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "TAG_BUFFER_BYTES_SIZE", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 3 } + }, + { + "name": "TAG_BLOB_POLICY", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 4 } + }, + { + "name": "TAG_DETAILED_ERRORS", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 5 } + }, + { + "name": "INF_BUFFER_BYTES_SIZE", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 10 } + }, + { + "name": "INF_DATA_BYTES_SIZE", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 11 } + }, + { + "name": "INF_BLOBS_BYTES_SIZE", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 12 } + }, + { + "name": "INF_BLOB_ALIGNMENT", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 13 } + }, + { + "name": "INF_BLOB_HEADER", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 14 } + }, + { + "name": "BLOB_NONE", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 0 } + }, + { + "name": "BLOB_ID_ENGINE", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "BLOB_ID_USER", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "BLOB_STREAM", + "type": { "name": "uchar", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 3 } + }, + { + "name": "BLOB_SEGHDR_ALIGN", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + } + ], + "methods": + [ + { + "name": "add", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "count", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "inBuffer", + "type": { "name": "void", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "addBlob", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "inBuffer", + "type": { "name": "void", "isPointer": true, "isConst": true } + }, + { + "name": "blobId", + "type": { "name": "ISC_QUAD", "isPointer": true, "isConst": false } + }, + { + "name": "parLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "par", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "appendBlobData", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "inBuffer", + "type": { "name": "void", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "addBlobStream", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "inBuffer", + "type": { "name": "void", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "registerBlob", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "existingBlob", + "type": { "name": "ISC_QUAD", "isPointer": true, "isConst": true } + }, + { + "name": "blobId", + "type": { "name": "ISC_QUAD", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "execute", + "version": 3, + "returnType": { "name": "BatchCompletionState", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "cancel", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getBlobAlignment", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getMetadata", + "version": 3, + "returnType": { "name": "MessageMetadata", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setDefaultBpb", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "parLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "par", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "deprecatedClose", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "close", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getInfo", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "itemsLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "items", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "bufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "buffer", + "type": { "name": "uchar", "isPointer": true, "isConst": false } + } + ] + } + ] + }, + { + "name": "BatchCompletionState", + "version": 3, + "extends": "Disposable", + "constants": + [ + { + "name": "EXECUTE_FAILED", + "type": { "name": "int", "isPointer": false, "isConst": false }, + "expr": { "type": "-", "args": [ { "type": "int-literal", "value": 1 } ] } + }, + { + "name": "SUCCESS_NO_INFO", + "type": { "name": "int", "isPointer": false, "isConst": false }, + "expr": { "type": "-", "args": [ { "type": "int-literal", "value": 2 } ] } + }, + { + "name": "NO_MORE_ERRORS", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 4294967295 } + } + ], + "methods": + [ + { + "name": "getSize", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getState", + "version": 3, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "pos", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "findError", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "pos", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getStatus", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "to", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "pos", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "Replicator", + "version": 4, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "process", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "data", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "deprecatedClose", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "close", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "Request", + "version": 4, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "receive", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "level", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "msgType", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "message", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "send", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "level", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "msgType", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "message", + "type": { "name": "void", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "getInfo", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "level", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "itemsLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "items", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "bufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "buffer", + "type": { "name": "uchar", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "start", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "tra", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "level", + "type": { "name": "int", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "startAndSend", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "tra", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "level", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "msgType", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "message", + "type": { "name": "void", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "unwind", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "level", + "type": { "name": "int", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "deprecatedFree", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "free", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "Events", + "version": 4, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "deprecatedCancel", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "cancel", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "Attachment", + "version": 6, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "getInfo", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "itemsLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "items", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "bufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "buffer", + "type": { "name": "uchar", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "startTransaction", + "version": 3, + "returnType": { "name": "Transaction", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "tpbLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "tpb", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "reconnectTransaction", + "version": 3, + "returnType": { "name": "Transaction", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "id", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "compileRequest", + "version": 3, + "returnType": { "name": "Request", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "blrLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "blr", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "transactRequest", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "blrLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "blr", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "inMsgLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "inMsg", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "outMsgLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "outMsg", + "type": { "name": "uchar", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "createBlob", + "version": 3, + "returnType": { "name": "Blob", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "id", + "type": { "name": "ISC_QUAD", "isPointer": true, "isConst": false } + }, + { + "name": "bpbLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "bpb", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "openBlob", + "version": 3, + "returnType": { "name": "Blob", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "id", + "type": { "name": "ISC_QUAD", "isPointer": true, "isConst": false } + }, + { + "name": "bpbLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "bpb", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "getSlice", + "version": 3, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "id", + "type": { "name": "ISC_QUAD", "isPointer": true, "isConst": false } + }, + { + "name": "sdlLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "sdl", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "paramLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "param", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "sliceLength", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "slice", + "type": { "name": "uchar", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "putSlice", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "id", + "type": { "name": "ISC_QUAD", "isPointer": true, "isConst": false } + }, + { + "name": "sdlLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "sdl", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "paramLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "param", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "sliceLength", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "slice", + "type": { "name": "uchar", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "executeDyn", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "dyn", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "prepare", + "version": 3, + "returnType": { "name": "Statement", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "tra", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "stmtLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "sqlStmt", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "dialect", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "flags", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "execute", + "version": 3, + "returnType": { "name": "Transaction", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "stmtLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "sqlStmt", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "dialect", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "inMetadata", + "type": { "name": "MessageMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "inBuffer", + "type": { "name": "void", "isPointer": true, "isConst": false } + }, + { + "name": "outMetadata", + "type": { "name": "MessageMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "outBuffer", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "openCursor", + "version": 3, + "returnType": { "name": "ResultSet", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "stmtLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "sqlStmt", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "dialect", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "inMetadata", + "type": { "name": "MessageMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "inBuffer", + "type": { "name": "void", "isPointer": true, "isConst": false } + }, + { + "name": "outMetadata", + "type": { "name": "MessageMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "cursorName", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "cursorFlags", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "queEvents", + "version": 3, + "returnType": { "name": "Events", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "callback", + "type": { "name": "EventCallback", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "events", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "cancelOperation", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "option", + "type": { "name": "int", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "ping", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "deprecatedDetach", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "deprecatedDropDatabase", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getIdleTimeout", + "version": 4, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setIdleTimeout", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "timeOut", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getStatementTimeout", + "version": 4, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setStatementTimeout", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "timeOut", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "createBatch", + "version": 4, + "returnType": { "name": "Batch", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "stmtLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "sqlStmt", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "dialect", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "inMetadata", + "type": { "name": "MessageMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "parLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "par", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "createReplicator", + "version": 4, + "returnType": { "name": "Replicator", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "detach", + "version": 5, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "dropDatabase", + "version": 5, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getMaxBlobCacheSize", + "version": 6, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setMaxBlobCacheSize", + "version": 6, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "size", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getMaxInlineBlobSize", + "version": 6, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setMaxInlineBlobSize", + "version": 6, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "size", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "Service", + "version": 5, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "deprecatedDetach", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "query", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "sendLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "sendItems", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "receiveLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "receiveItems", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "bufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "buffer", + "type": { "name": "uchar", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "start", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "spbLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "spb", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "detach", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "cancel", + "version": 5, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "Provider", + "version": 4, + "extends": "PluginBase", + "constants": + [ + ], + "methods": + [ + { + "name": "attachDatabase", + "version": 4, + "returnType": { "name": "Attachment", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "fileName", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "dpbLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "dpb", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "createDatabase", + "version": 4, + "returnType": { "name": "Attachment", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "fileName", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "dpbLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "dpb", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "attachServiceManager", + "version": 4, + "returnType": { "name": "Service", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "service", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "spbLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "spb", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "shutdown", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "timeout", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "reason", + "type": { "name": "int", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "setDbCryptCallback", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "cryptCallback", + "type": { "name": "CryptKeyCallback", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "DtcStart", + "version": 3, + "extends": "Disposable", + "constants": + [ + ], + "methods": + [ + { + "name": "addAttachment", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "att", + "type": { "name": "Attachment", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "addWithTpb", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "att", + "type": { "name": "Attachment", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "tpb", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "start", + "version": 3, + "returnType": { "name": "Transaction", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "Dtc", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "join", + "version": 2, + "returnType": { "name": "Transaction", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "one", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "two", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "startBuilder", + "version": 2, + "returnType": { "name": "DtcStart", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "Auth", + "version": 4, + "extends": "PluginBase", + "constants": + [ + { + "name": "AUTH_FAILED", + "type": { "name": "int", "isPointer": false, "isConst": false }, + "expr": { "type": "-", "args": [ { "type": "int-literal", "value": 1 } ] } + }, + { + "name": "AUTH_SUCCESS", + "type": { "name": "int", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 0 } + }, + { + "name": "AUTH_MORE_DATA", + "type": { "name": "int", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "AUTH_CONTINUE", + "type": { "name": "int", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "AUTH_SUCCESS_WITH_DATA", + "type": { "name": "int", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 3 } + } + ], + "methods": + [ + ] + }, + { + "name": "Writer", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "reset", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "add", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "setType", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "value", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "setDb", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "value", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + } + ] + }, + { + "name": "ServerBlock", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getLogin", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getData", + "version": 2, + "returnType": { "name": "uchar", "isPointer": true, "isConst": true }, + "mayThrow": false, + "parameters": + [ + { + "name": "length", + "type": { "name": "uint", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "putData", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "data", + "type": { "name": "void", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "newKey", + "version": 2, + "returnType": { "name": "CryptKey", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "ClientBlock", + "version": 4, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "getLogin", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getPassword", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getData", + "version": 3, + "returnType": { "name": "uchar", "isPointer": true, "isConst": true }, + "mayThrow": false, + "parameters": + [ + { + "name": "length", + "type": { "name": "uint", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "putData", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "data", + "type": { "name": "void", "isPointer": true, "isConst": true } + } + ] + }, + { + "name": "newKey", + "version": 3, + "returnType": { "name": "CryptKey", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getAuthBlock", + "version": 4, + "returnType": { "name": "AuthBlock", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "Server", + "version": 6, + "extends": "Auth", + "constants": + [ + ], + "methods": + [ + { + "name": "authenticate", + "version": 5, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "notImplementedExpr": { "type": "constant", "interface": "Auth", "name": "AUTH_FAILED" }, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "sBlock", + "type": { "name": "ServerBlock", "isPointer": false, "isConst": false } + }, + { + "name": "writerInterface", + "type": { "name": "Writer", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setDbCryptCallback", + "version": 6, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "cryptCallback", + "type": { "name": "CryptKeyCallback", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "Client", + "version": 5, + "extends": "Auth", + "constants": + [ + ], + "methods": + [ + { + "name": "authenticate", + "version": 5, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "notImplementedExpr": { "type": "constant", "interface": "Auth", "name": "AUTH_FAILED" }, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "cBlock", + "type": { "name": "ClientBlock", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "UserField", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "entered", + "version": 2, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "specified", + "version": 2, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "setEntered", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "newValue", + "type": { "name": "int", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "CharUserField", + "version": 3, + "extends": "UserField", + "constants": + [ + ], + "methods": + [ + { + "name": "get", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "set", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "newValue", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + } + ] + }, + { + "name": "IntUserField", + "version": 3, + "extends": "UserField", + "constants": + [ + ], + "methods": + [ + { + "name": "get", + "version": 3, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "set", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "newValue", + "type": { "name": "int", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "User", + "version": 2, + "extends": "Versioned", + "constants": + [ + { + "name": "OP_USER_ADD", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "OP_USER_MODIFY", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "OP_USER_DELETE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 3 } + }, + { + "name": "OP_USER_DISPLAY", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 4 } + }, + { + "name": "OP_USER_SET_MAP", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 5 } + }, + { + "name": "OP_USER_DROP_MAP", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 6 } + } + ], + "methods": + [ + { + "name": "operation", + "version": 2, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "userName", + "version": 2, + "returnType": { "name": "CharUserField", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "password", + "version": 2, + "returnType": { "name": "CharUserField", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "firstName", + "version": 2, + "returnType": { "name": "CharUserField", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "lastName", + "version": 2, + "returnType": { "name": "CharUserField", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "middleName", + "version": 2, + "returnType": { "name": "CharUserField", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "comment", + "version": 2, + "returnType": { "name": "CharUserField", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "attributes", + "version": 2, + "returnType": { "name": "CharUserField", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "active", + "version": 2, + "returnType": { "name": "IntUserField", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "admin", + "version": 2, + "returnType": { "name": "IntUserField", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "clear", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "ListUsers", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "list", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "user", + "type": { "name": "User", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "LogonInfo", + "version": 3, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "name", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "role", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "networkProtocol", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "remoteAddress", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "authBlock", + "version": 2, + "returnType": { "name": "uchar", "isPointer": true, "isConst": true }, + "mayThrow": false, + "parameters": + [ + { + "name": "length", + "type": { "name": "uint", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "attachment", + "version": 3, + "returnType": { "name": "Attachment", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "transaction", + "version": 3, + "returnType": { "name": "Transaction", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "Management", + "version": 4, + "extends": "PluginBase", + "constants": + [ + ], + "methods": + [ + { + "name": "start", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "logonInfo", + "type": { "name": "LogonInfo", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "execute", + "version": 4, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "user", + "type": { "name": "User", "isPointer": false, "isConst": false } + }, + { + "name": "callback", + "type": { "name": "ListUsers", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "commit", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "rollback", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "AuthBlock", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getType", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getName", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getPlugin", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getSecurityDb", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getOriginalPlugin", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "next", + "version": 2, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "first", + "version": 2, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "WireCryptPlugin", + "version": 5, + "extends": "PluginBase", + "constants": + [ + ], + "methods": + [ + { + "name": "getKnownTypes", + "version": 4, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setKey", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "key", + "type": { "name": "CryptKey", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "encrypt", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "from", + "type": { "name": "void", "isPointer": true, "isConst": true } + }, + { + "name": "to", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "decrypt", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "from", + "type": { "name": "void", "isPointer": true, "isConst": true } + }, + { + "name": "to", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "getSpecificData", + "version": 5, + "returnType": { "name": "uchar", "isPointer": true, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "keyType", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "setSpecificData", + "version": 5, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "keyType", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "data", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + } + ] + } + ] + }, + { + "name": "CryptKeyCallback", + "version": 3, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "callback", + "version": 2, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "dataLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "data", + "type": { "name": "void", "isPointer": true, "isConst": true } + }, + { + "name": "bufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "buffer", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "dummy1", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "dummy2", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getHashLength", + "version": 3, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "notImplementedExpr": { "type": "-", "args": [ { "type": "int-literal", "value": 1 } ] }, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getHashData", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "hash", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + } + ] + }, + { + "name": "KeyHolderPlugin", + "version": 5, + "extends": "PluginBase", + "constants": + [ + ], + "methods": + [ + { + "name": "keyCallback", + "version": 4, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "callback", + "type": { "name": "CryptKeyCallback", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "keyHandle", + "version": 4, + "returnType": { "name": "CryptKeyCallback", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "keyName", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "useOnlyOwnKeys", + "version": 5, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "chainHandle", + "version": 5, + "returnType": { "name": "CryptKeyCallback", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "DbCryptInfo", + "version": 3, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "getDatabaseFullPath", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "DbCryptPlugin", + "version": 5, + "extends": "PluginBase", + "constants": + [ + ], + "methods": + [ + { + "name": "setKey", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "sources", + "type": { "name": "KeyHolderPlugin", "isPointer": true, "isConst": false } + }, + { + "name": "keyName", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "encrypt", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "from", + "type": { "name": "void", "isPointer": true, "isConst": true } + }, + { + "name": "to", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "decrypt", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "from", + "type": { "name": "void", "isPointer": true, "isConst": true } + }, + { + "name": "to", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "setInfo", + "version": 5, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "info", + "type": { "name": "DbCryptInfo", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "ExternalContext", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getMaster", + "version": 2, + "returnType": { "name": "Master", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getEngine", + "version": 2, + "returnType": { "name": "ExternalEngine", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getAttachment", + "version": 2, + "returnType": { "name": "Attachment", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getTransaction", + "version": 2, + "returnType": { "name": "Transaction", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getUserName", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getDatabaseName", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getClientCharSet", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "obtainInfoCode", + "version": 2, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getInfo", + "version": 2, + "returnType": { "name": "void", "isPointer": true, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "code", + "type": { "name": "int", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setInfo", + "version": 2, + "returnType": { "name": "void", "isPointer": true, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "code", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "value", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + } + ] + }, + { + "name": "ExternalResultSet", + "version": 3, + "extends": "Disposable", + "constants": + [ + ], + "methods": + [ + { + "name": "fetch", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "ExternalFunction", + "version": 3, + "extends": "Disposable", + "constants": + [ + ], + "methods": + [ + { + "name": "getCharSet", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": false } + }, + { + "name": "nameSize", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "execute", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "inMsg", + "type": { "name": "void", "isPointer": true, "isConst": false } + }, + { + "name": "outMsg", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + } + ] + }, + { + "name": "ExternalProcedure", + "version": 3, + "extends": "Disposable", + "constants": + [ + ], + "methods": + [ + { + "name": "getCharSet", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": false } + }, + { + "name": "nameSize", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "open", + "version": 3, + "returnType": { "name": "ExternalResultSet", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "inMsg", + "type": { "name": "void", "isPointer": true, "isConst": false } + }, + { + "name": "outMsg", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + } + ] + }, + { + "name": "ExternalTrigger", + "version": 3, + "extends": "Disposable", + "constants": + [ + { + "name": "TYPE_BEFORE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "TYPE_AFTER", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "TYPE_DATABASE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 3 } + }, + { + "name": "ACTION_INSERT", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "ACTION_UPDATE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "ACTION_DELETE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 3 } + }, + { + "name": "ACTION_CONNECT", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 4 } + }, + { + "name": "ACTION_DISCONNECT", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 5 } + }, + { + "name": "ACTION_TRANS_START", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 6 } + }, + { + "name": "ACTION_TRANS_COMMIT", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 7 } + }, + { + "name": "ACTION_TRANS_ROLLBACK", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 8 } + }, + { + "name": "ACTION_DDL", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 9 } + } + ], + "methods": + [ + { + "name": "getCharSet", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": false } + }, + { + "name": "nameSize", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "execute", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "action", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "oldMsg", + "type": { "name": "void", "isPointer": true, "isConst": false } + }, + { + "name": "newMsg", + "type": { "name": "void", "isPointer": true, "isConst": false } + } + ] + } + ] + }, + { + "name": "RoutineMetadata", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getPackage", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getName", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getEntryPoint", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getBody", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getInputMetadata", + "version": 2, + "returnType": { "name": "MessageMetadata", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getOutputMetadata", + "version": 2, + "returnType": { "name": "MessageMetadata", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getTriggerMetadata", + "version": 2, + "returnType": { "name": "MessageMetadata", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getTriggerTable", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getTriggerType", + "version": 2, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "ExternalEngine", + "version": 4, + "extends": "PluginBase", + "constants": + [ + ], + "methods": + [ + { + "name": "open", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "charSet", + "type": { "name": "string", "isPointer": false, "isConst": false } + }, + { + "name": "charSetSize", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "openAttachment", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "closeAttachment", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "makeFunction", + "version": 4, + "returnType": { "name": "ExternalFunction", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "metadata", + "type": { "name": "RoutineMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "inBuilder", + "type": { "name": "MetadataBuilder", "isPointer": false, "isConst": false } + }, + { + "name": "outBuilder", + "type": { "name": "MetadataBuilder", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "makeProcedure", + "version": 4, + "returnType": { "name": "ExternalProcedure", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "metadata", + "type": { "name": "RoutineMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "inBuilder", + "type": { "name": "MetadataBuilder", "isPointer": false, "isConst": false } + }, + { + "name": "outBuilder", + "type": { "name": "MetadataBuilder", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "makeTrigger", + "version": 4, + "returnType": { "name": "ExternalTrigger", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "metadata", + "type": { "name": "RoutineMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "fieldsBuilder", + "type": { "name": "MetadataBuilder", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "Timer", + "version": 3, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "handler", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TimerControl", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "start", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "timer", + "type": { "name": "Timer", "isPointer": false, "isConst": false } + }, + { + "name": "microSeconds", + "type": { "name": "uint64", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "stop", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "timer", + "type": { "name": "Timer", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "VersionCallback", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "callback", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "text", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + } + ] + }, + { + "name": "Util", + "version": 4, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getFbVersion", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "att", + "type": { "name": "Attachment", "isPointer": false, "isConst": false } + }, + { + "name": "callback", + "type": { "name": "VersionCallback", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "loadBlob", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "blobId", + "type": { "name": "ISC_QUAD", "isPointer": true, "isConst": false } + }, + { + "name": "att", + "type": { "name": "Attachment", "isPointer": false, "isConst": false } + }, + { + "name": "tra", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "file", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "txt", + "type": { "name": "boolean", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "dumpBlob", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "blobId", + "type": { "name": "ISC_QUAD", "isPointer": true, "isConst": false } + }, + { + "name": "att", + "type": { "name": "Attachment", "isPointer": false, "isConst": false } + }, + { + "name": "tra", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "file", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "txt", + "type": { "name": "boolean", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getPerfCounters", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "att", + "type": { "name": "Attachment", "isPointer": false, "isConst": false } + }, + { + "name": "countersSet", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "counters", + "type": { "name": "int64", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "executeCreateDatabase", + "version": 2, + "returnType": { "name": "Attachment", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "stmtLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "creatDBstatement", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "dialect", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "stmtIsCreateDb", + "type": { "name": "boolean", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "decodeDate", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "date", + "type": { "name": "ISC_DATE", "isPointer": false, "isConst": false } + }, + { + "name": "year", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "month", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "day", + "type": { "name": "uint", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "decodeTime", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "time", + "type": { "name": "ISC_TIME", "isPointer": false, "isConst": false } + }, + { + "name": "hours", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "minutes", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "seconds", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "fractions", + "type": { "name": "uint", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "encodeDate", + "version": 2, + "returnType": { "name": "ISC_DATE", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "year", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "month", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "day", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "encodeTime", + "version": 2, + "returnType": { "name": "ISC_TIME", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "hours", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "minutes", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "seconds", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "fractions", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "formatStatus", + "version": 2, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "buffer", + "type": { "name": "string", "isPointer": false, "isConst": false } + }, + { + "name": "bufferSize", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getClientVersion", + "version": 2, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getXpbBuilder", + "version": 2, + "returnType": { "name": "XpbBuilder", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "kind", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "buf", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "len", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setOffsets", + "version": 2, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "metadata", + "type": { "name": "MessageMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "callback", + "type": { "name": "OffsetsCallback", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getDecFloat16", + "version": 3, + "returnType": { "name": "DecFloat16", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getDecFloat34", + "version": 3, + "returnType": { "name": "DecFloat34", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "decodeTimeTz", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "timeTz", + "type": { "name": "ISC_TIME_TZ", "isPointer": true, "isConst": true } + }, + { + "name": "hours", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "minutes", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "seconds", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "fractions", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "timeZoneBufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "timeZoneBuffer", + "type": { "name": "string", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "decodeTimeStampTz", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "timeStampTz", + "type": { "name": "ISC_TIMESTAMP_TZ", "isPointer": true, "isConst": true } + }, + { + "name": "year", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "month", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "day", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "hours", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "minutes", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "seconds", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "fractions", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "timeZoneBufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "timeZoneBuffer", + "type": { "name": "string", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "encodeTimeTz", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "timeTz", + "type": { "name": "ISC_TIME_TZ", "isPointer": true, "isConst": false } + }, + { + "name": "hours", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "minutes", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "seconds", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "fractions", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "timeZone", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "encodeTimeStampTz", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "timeStampTz", + "type": { "name": "ISC_TIMESTAMP_TZ", "isPointer": true, "isConst": false } + }, + { + "name": "year", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "month", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "day", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "hours", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "minutes", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "seconds", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "fractions", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "timeZone", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "getInt128", + "version": 4, + "returnType": { "name": "Int128", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "decodeTimeTzEx", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "timeTz", + "type": { "name": "ISC_TIME_TZ_EX", "isPointer": true, "isConst": true } + }, + { + "name": "hours", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "minutes", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "seconds", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "fractions", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "timeZoneBufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "timeZoneBuffer", + "type": { "name": "string", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "decodeTimeStampTzEx", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "timeStampTz", + "type": { "name": "ISC_TIMESTAMP_TZ_EX", "isPointer": true, "isConst": true } + }, + { + "name": "year", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "month", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "day", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "hours", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "minutes", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "seconds", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "fractions", + "type": { "name": "uint", "isPointer": true, "isConst": false } + }, + { + "name": "timeZoneBufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "timeZoneBuffer", + "type": { "name": "string", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "OffsetsCallback", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "setOffset", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "offset", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "nullOffset", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "XpbBuilder", + "version": 3, + "extends": "Disposable", + "constants": + [ + { + "name": "DPB", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "SPB_ATTACH", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "SPB_START", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 3 } + }, + { + "name": "TPB", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 4 } + }, + { + "name": "BATCH", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 5 } + }, + { + "name": "BPB", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 6 } + }, + { + "name": "SPB_SEND", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 7 } + }, + { + "name": "SPB_RECEIVE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 8 } + }, + { + "name": "SPB_RESPONSE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 9 } + }, + { + "name": "INFO_SEND", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 10 } + }, + { + "name": "INFO_RESPONSE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 11 } + } + ], + "methods": + [ + { + "name": "clear", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "removeCurrent", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "insertInt", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "tag", + "type": { "name": "uchar", "isPointer": false, "isConst": false } + }, + { + "name": "value", + "type": { "name": "int", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "insertBigInt", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "tag", + "type": { "name": "uchar", "isPointer": false, "isConst": false } + }, + { + "name": "value", + "type": { "name": "int64", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "insertBytes", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "tag", + "type": { "name": "uchar", "isPointer": false, "isConst": false } + }, + { + "name": "bytes", + "type": { "name": "void", "isPointer": true, "isConst": true } + }, + { + "name": "length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "insertString", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "tag", + "type": { "name": "uchar", "isPointer": false, "isConst": false } + }, + { + "name": "str", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "insertTag", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "tag", + "type": { "name": "uchar", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "isEof", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "moveNext", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "rewind", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "findFirst", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "tag", + "type": { "name": "uchar", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "findNext", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getTag", + "version": 3, + "returnType": { "name": "uchar", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getLength", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getInt", + "version": 3, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getBigInt", + "version": 3, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getString", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getBytes", + "version": 3, + "returnType": { "name": "uchar", "isPointer": true, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getBufferLength", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getBuffer", + "version": 3, + "returnType": { "name": "uchar", "isPointer": true, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "TraceConnection", + "version": 2, + "extends": "Versioned", + "constants": + [ + { + "name": "KIND_DATABASE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "KIND_SERVICE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + } + ], + "methods": + [ + { + "name": "getKind", + "version": 2, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getProcessID", + "version": 2, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getUserName", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getRoleName", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getCharSet", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getRemoteProtocol", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getRemoteAddress", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getRemoteProcessID", + "version": 2, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getRemoteProcessName", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TraceDatabaseConnection", + "version": 3, + "extends": "TraceConnection", + "constants": + [ + ], + "methods": + [ + { + "name": "getConnectionID", + "version": 3, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getDatabaseName", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TraceTransaction", + "version": 3, + "extends": "Versioned", + "constants": + [ + { + "name": "ISOLATION_CONSISTENCY", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "ISOLATION_CONCURRENCY", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "ISOLATION_READ_COMMITTED_RECVER", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 3 } + }, + { + "name": "ISOLATION_READ_COMMITTED_NORECVER", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 4 } + }, + { + "name": "ISOLATION_READ_COMMITTED_READ_CONSISTENCY", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 5 } + } + ], + "methods": + [ + { + "name": "getTransactionID", + "version": 2, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getReadOnly", + "version": 2, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getWait", + "version": 2, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getIsolation", + "version": 2, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getPerf", + "version": 2, + "returnType": { "name": "PerformanceInfo", "isPointer": true, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getInitialID", + "version": 3, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getPreviousID", + "version": 3, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TraceParams", + "version": 3, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getCount", + "version": 2, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getParam", + "version": 2, + "returnType": { "name": "dsc", "isPointer": true, "isConst": true }, + "mayThrow": false, + "parameters": + [ + { + "name": "idx", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getTextUTF8", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "idx", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "TraceStatement", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getStmtID", + "version": 2, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getPerf", + "version": 2, + "returnType": { "name": "PerformanceInfo", "isPointer": true, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TraceSQLStatement", + "version": 3, + "extends": "TraceStatement", + "constants": + [ + ], + "methods": + [ + { + "name": "getText", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getPlan", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getInputs", + "version": 3, + "returnType": { "name": "TraceParams", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getTextUTF8", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getExplainedPlan", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TraceBLRStatement", + "version": 3, + "extends": "TraceStatement", + "constants": + [ + ], + "methods": + [ + { + "name": "getData", + "version": 3, + "returnType": { "name": "uchar", "isPointer": true, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getDataLength", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getText", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TraceDYNRequest", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getData", + "version": 2, + "returnType": { "name": "uchar", "isPointer": true, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getDataLength", + "version": 2, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getText", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TraceContextVariable", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getNameSpace", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getVarName", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getVarValue", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TraceProcedure", + "version": 3, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getProcName", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getInputs", + "version": 2, + "returnType": { "name": "TraceParams", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getPerf", + "version": 2, + "returnType": { "name": "PerformanceInfo", "isPointer": true, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getStmtID", + "version": 3, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getPlan", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getExplainedPlan", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TraceFunction", + "version": 3, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getFuncName", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getInputs", + "version": 2, + "returnType": { "name": "TraceParams", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getResult", + "version": 2, + "returnType": { "name": "TraceParams", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getPerf", + "version": 2, + "returnType": { "name": "PerformanceInfo", "isPointer": true, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getStmtID", + "version": 3, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getPlan", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getExplainedPlan", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TraceTrigger", + "version": 3, + "extends": "Versioned", + "constants": + [ + { + "name": "TYPE_ALL", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 0 } + }, + { + "name": "TYPE_BEFORE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "TYPE_AFTER", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + } + ], + "methods": + [ + { + "name": "getTriggerName", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getRelationName", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getAction", + "version": 2, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getWhich", + "version": 2, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getPerf", + "version": 2, + "returnType": { "name": "PerformanceInfo", "isPointer": true, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getStmtID", + "version": 3, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getPlan", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getExplainedPlan", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TraceServiceConnection", + "version": 3, + "extends": "TraceConnection", + "constants": + [ + ], + "methods": + [ + { + "name": "getServiceID", + "version": 3, + "returnType": { "name": "void", "isPointer": true, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getServiceMgr", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getServiceName", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TraceStatusVector", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "hasError", + "version": 2, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "hasWarning", + "version": 2, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getStatus", + "version": 2, + "returnType": { "name": "Status", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getText", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TraceSweepInfo", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getOIT", + "version": 2, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getOST", + "version": 2, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getOAT", + "version": 2, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getNext", + "version": 2, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getPerf", + "version": 2, + "returnType": { "name": "PerformanceInfo", "isPointer": true, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TraceLogWriter", + "version": 4, + "extends": "ReferenceCounted", + "constants": + [ + ], + "methods": + [ + { + "name": "write", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "buf", + "type": { "name": "void", "isPointer": true, "isConst": true } + }, + { + "name": "size", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "write_s", + "version": 4, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "buf", + "type": { "name": "void", "isPointer": true, "isConst": true } + }, + { + "name": "size", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "TraceInitInfo", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getConfigText", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getTraceSessionID", + "version": 2, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getTraceSessionName", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getFirebirdRootDirectory", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getDatabaseName", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getConnection", + "version": 2, + "returnType": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getLogWriter", + "version": 2, + "returnType": { "name": "TraceLogWriter", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "TracePlugin", + "version": 5, + "extends": "ReferenceCounted", + "constants": + [ + { + "name": "RESULT_SUCCESS", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 0 } + }, + { + "name": "RESULT_FAILED", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "RESULT_UNAUTHORIZED", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "SWEEP_STATE_STARTED", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "SWEEP_STATE_FINISHED", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "SWEEP_STATE_FAILED", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 3 } + }, + { + "name": "SWEEP_STATE_PROGRESS", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 4 } + } + ], + "methods": + [ + { + "name": "trace_get_error", + "version": 3, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "trace_attach", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "create_db", + "type": { "name": "boolean", "isPointer": false, "isConst": false } + }, + { + "name": "att_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_detach", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "drop_db", + "type": { "name": "boolean", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_transaction_start", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "TraceTransaction", "isPointer": false, "isConst": false } + }, + { + "name": "tpb_length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "tpb", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "tra_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_transaction_end", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "TraceTransaction", "isPointer": false, "isConst": false } + }, + { + "name": "commit", + "type": { "name": "boolean", "isPointer": false, "isConst": false } + }, + { + "name": "retain_context", + "type": { "name": "boolean", "isPointer": false, "isConst": false } + }, + { + "name": "tra_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_proc_execute", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "TraceTransaction", "isPointer": false, "isConst": false } + }, + { + "name": "procedure", + "type": { "name": "TraceProcedure", "isPointer": false, "isConst": false } + }, + { + "name": "started", + "type": { "name": "boolean", "isPointer": false, "isConst": false } + }, + { + "name": "proc_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_trigger_execute", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "TraceTransaction", "isPointer": false, "isConst": false } + }, + { + "name": "trigger", + "type": { "name": "TraceTrigger", "isPointer": false, "isConst": false } + }, + { + "name": "started", + "type": { "name": "boolean", "isPointer": false, "isConst": false } + }, + { + "name": "trig_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_set_context", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "TraceTransaction", "isPointer": false, "isConst": false } + }, + { + "name": "variable", + "type": { "name": "TraceContextVariable", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_dsql_prepare", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "TraceTransaction", "isPointer": false, "isConst": false } + }, + { + "name": "statement", + "type": { "name": "TraceSQLStatement", "isPointer": false, "isConst": false } + }, + { + "name": "time_millis", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "req_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_dsql_free", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "statement", + "type": { "name": "TraceSQLStatement", "isPointer": false, "isConst": false } + }, + { + "name": "option", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_dsql_execute", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "TraceTransaction", "isPointer": false, "isConst": false } + }, + { + "name": "statement", + "type": { "name": "TraceSQLStatement", "isPointer": false, "isConst": false } + }, + { + "name": "started", + "type": { "name": "boolean", "isPointer": false, "isConst": false } + }, + { + "name": "req_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_blr_compile", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "TraceTransaction", "isPointer": false, "isConst": false } + }, + { + "name": "statement", + "type": { "name": "TraceBLRStatement", "isPointer": false, "isConst": false } + }, + { + "name": "time_millis", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "req_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_blr_execute", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "TraceTransaction", "isPointer": false, "isConst": false } + }, + { + "name": "statement", + "type": { "name": "TraceBLRStatement", "isPointer": false, "isConst": false } + }, + { + "name": "req_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_dyn_execute", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "TraceTransaction", "isPointer": false, "isConst": false } + }, + { + "name": "request", + "type": { "name": "TraceDYNRequest", "isPointer": false, "isConst": false } + }, + { + "name": "time_millis", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "req_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_service_attach", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "service", + "type": { "name": "TraceServiceConnection", "isPointer": false, "isConst": false } + }, + { + "name": "att_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_service_start", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "service", + "type": { "name": "TraceServiceConnection", "isPointer": false, "isConst": false } + }, + { + "name": "switches_length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "switches", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "start_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_service_query", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "service", + "type": { "name": "TraceServiceConnection", "isPointer": false, "isConst": false } + }, + { + "name": "send_item_length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "send_items", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "recv_item_length", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "recv_items", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "query_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_service_detach", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "service", + "type": { "name": "TraceServiceConnection", "isPointer": false, "isConst": false } + }, + { + "name": "detach_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_event_error", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceConnection", "isPointer": false, "isConst": false } + }, + { + "name": "status", + "type": { "name": "TraceStatusVector", "isPointer": false, "isConst": false } + }, + { + "name": "function", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "trace_event_sweep", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "sweep", + "type": { "name": "TraceSweepInfo", "isPointer": false, "isConst": false } + }, + { + "name": "sweep_state", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_func_execute", + "version": 3, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "TraceTransaction", "isPointer": false, "isConst": false } + }, + { + "name": "function", + "type": { "name": "TraceFunction", "isPointer": false, "isConst": false } + }, + { + "name": "started", + "type": { "name": "boolean", "isPointer": false, "isConst": false } + }, + { + "name": "func_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_dsql_restart", + "version": 4, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "TraceTransaction", "isPointer": false, "isConst": false } + }, + { + "name": "statement", + "type": { "name": "TraceSQLStatement", "isPointer": false, "isConst": false } + }, + { + "name": "number", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_proc_compile", + "version": 5, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "procedure", + "type": { "name": "TraceProcedure", "isPointer": false, "isConst": false } + }, + { + "name": "time_millis", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "proc_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_func_compile", + "version": 5, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "function", + "type": { "name": "TraceFunction", "isPointer": false, "isConst": false } + }, + { + "name": "time_millis", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "func_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "trace_trigger_compile", + "version": 5, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": false, + "notImplementedExpr": { "type": "boolean-literal", "value": true }, + "parameters": + [ + { + "name": "connection", + "type": { "name": "TraceDatabaseConnection", "isPointer": false, "isConst": false } + }, + { + "name": "trigger", + "type": { "name": "TraceTrigger", "isPointer": false, "isConst": false } + }, + { + "name": "time_millis", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "trig_result", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "TraceFactory", + "version": 4, + "extends": "PluginBase", + "constants": + [ + { + "name": "TRACE_EVENT_ATTACH", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 0 } + }, + { + "name": "TRACE_EVENT_DETACH", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "TRACE_EVENT_TRANSACTION_START", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + }, + { + "name": "TRACE_EVENT_TRANSACTION_END", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 3 } + }, + { + "name": "TRACE_EVENT_SET_CONTEXT", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 4 } + }, + { + "name": "TRACE_EVENT_PROC_EXECUTE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 5 } + }, + { + "name": "TRACE_EVENT_TRIGGER_EXECUTE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 6 } + }, + { + "name": "TRACE_EVENT_DSQL_PREPARE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 7 } + }, + { + "name": "TRACE_EVENT_DSQL_FREE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 8 } + }, + { + "name": "TRACE_EVENT_DSQL_EXECUTE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 9 } + }, + { + "name": "TRACE_EVENT_BLR_COMPILE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 10 } + }, + { + "name": "TRACE_EVENT_BLR_EXECUTE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 11 } + }, + { + "name": "TRACE_EVENT_DYN_EXECUTE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 12 } + }, + { + "name": "TRACE_EVENT_SERVICE_ATTACH", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 13 } + }, + { + "name": "TRACE_EVENT_SERVICE_START", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 14 } + }, + { + "name": "TRACE_EVENT_SERVICE_QUERY", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 15 } + }, + { + "name": "TRACE_EVENT_SERVICE_DETACH", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 16 } + }, + { + "name": "TRACE_EVENT_ERROR", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 17 } + }, + { + "name": "TRACE_EVENT_SWEEP", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 18 } + }, + { + "name": "TRACE_EVENT_FUNC_EXECUTE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 19 } + }, + { + "name": "TRACE_EVENT_PROC_COMPILE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 20 } + }, + { + "name": "TRACE_EVENT_FUNC_COMPILE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 21 } + }, + { + "name": "TRACE_EVENT_TRIGGER_COMPILE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 22 } + }, + { + "name": "TRACE_EVENT_MAX", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 23 } + } + ], + "methods": + [ + { + "name": "trace_needs", + "version": 4, + "returnType": { "name": "uint64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "trace_create", + "version": 4, + "returnType": { "name": "TracePlugin", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "init_info", + "type": { "name": "TraceInitInfo", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "UdrFunctionFactory", + "version": 3, + "extends": "Disposable", + "constants": + [ + ], + "methods": + [ + { + "name": "setup", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "metadata", + "type": { "name": "RoutineMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "inBuilder", + "type": { "name": "MetadataBuilder", "isPointer": false, "isConst": false } + }, + { + "name": "outBuilder", + "type": { "name": "MetadataBuilder", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "newItem", + "version": 3, + "returnType": { "name": "ExternalFunction", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "metadata", + "type": { "name": "RoutineMetadata", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "UdrProcedureFactory", + "version": 3, + "extends": "Disposable", + "constants": + [ + ], + "methods": + [ + { + "name": "setup", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "metadata", + "type": { "name": "RoutineMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "inBuilder", + "type": { "name": "MetadataBuilder", "isPointer": false, "isConst": false } + }, + { + "name": "outBuilder", + "type": { "name": "MetadataBuilder", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "newItem", + "version": 3, + "returnType": { "name": "ExternalProcedure", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "metadata", + "type": { "name": "RoutineMetadata", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "UdrTriggerFactory", + "version": 3, + "extends": "Disposable", + "constants": + [ + ], + "methods": + [ + { + "name": "setup", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "metadata", + "type": { "name": "RoutineMetadata", "isPointer": false, "isConst": false } + }, + { + "name": "fieldsBuilder", + "type": { "name": "MetadataBuilder", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "newItem", + "version": 3, + "returnType": { "name": "ExternalTrigger", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "context", + "type": { "name": "ExternalContext", "isPointer": false, "isConst": false } + }, + { + "name": "metadata", + "type": { "name": "RoutineMetadata", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "UdrPlugin", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getMaster", + "version": 2, + "returnType": { "name": "Master", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "registerFunction", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "factory", + "type": { "name": "UdrFunctionFactory", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "registerProcedure", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "factory", + "type": { "name": "UdrProcedureFactory", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "registerTrigger", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "factory", + "type": { "name": "UdrTriggerFactory", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "DecFloat16", + "version": 2, + "extends": "Versioned", + "constants": + [ + { + "name": "BCD_SIZE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 16 } + }, + { + "name": "STRING_SIZE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 24 } + } + ], + "methods": + [ + { + "name": "toBcd", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "from", + "type": { "name": "FB_DEC16", "isPointer": true, "isConst": true } + }, + { + "name": "sign", + "type": { "name": "int", "isPointer": true, "isConst": false } + }, + { + "name": "bcd", + "type": { "name": "uchar", "isPointer": true, "isConst": false } + }, + { + "name": "exp", + "type": { "name": "int", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "toString", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "from", + "type": { "name": "FB_DEC16", "isPointer": true, "isConst": true } + }, + { + "name": "bufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "buffer", + "type": { "name": "string", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "fromBcd", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "sign", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "bcd", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "exp", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "to", + "type": { "name": "FB_DEC16", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "fromString", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "from", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "to", + "type": { "name": "FB_DEC16", "isPointer": true, "isConst": false } + } + ] + } + ] + }, + { + "name": "DecFloat34", + "version": 2, + "extends": "Versioned", + "constants": + [ + { + "name": "BCD_SIZE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 34 } + }, + { + "name": "STRING_SIZE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 43 } + } + ], + "methods": + [ + { + "name": "toBcd", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "from", + "type": { "name": "FB_DEC34", "isPointer": true, "isConst": true } + }, + { + "name": "sign", + "type": { "name": "int", "isPointer": true, "isConst": false } + }, + { + "name": "bcd", + "type": { "name": "uchar", "isPointer": true, "isConst": false } + }, + { + "name": "exp", + "type": { "name": "int", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "toString", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "from", + "type": { "name": "FB_DEC34", "isPointer": true, "isConst": true } + }, + { + "name": "bufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "buffer", + "type": { "name": "string", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "fromBcd", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "sign", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "bcd", + "type": { "name": "uchar", "isPointer": true, "isConst": true } + }, + { + "name": "exp", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "to", + "type": { "name": "FB_DEC34", "isPointer": true, "isConst": false } + } + ] + }, + { + "name": "fromString", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "from", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "to", + "type": { "name": "FB_DEC34", "isPointer": true, "isConst": false } + } + ] + } + ] + }, + { + "name": "Int128", + "version": 2, + "extends": "Versioned", + "constants": + [ + { + "name": "STRING_SIZE", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 46 } + } + ], + "methods": + [ + { + "name": "toString", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "from", + "type": { "name": "FB_I128", "isPointer": true, "isConst": true } + }, + { + "name": "scale", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "bufferLength", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "buffer", + "type": { "name": "string", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "fromString", + "version": 2, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "scale", + "type": { "name": "int", "isPointer": false, "isConst": false } + }, + { + "name": "from", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "to", + "type": { "name": "FB_I128", "isPointer": true, "isConst": false } + } + ] + } + ] + }, + { + "name": "ReplicatedField", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getName", + "version": 2, + "returnType": { "name": "string", "isPointer": false, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getType", + "version": 2, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getSubType", + "version": 2, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getScale", + "version": 2, + "returnType": { "name": "int", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getLength", + "version": 2, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getCharSet", + "version": 2, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getData", + "version": 2, + "returnType": { "name": "void", "isPointer": true, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "ReplicatedRecord", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getCount", + "version": 2, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getField", + "version": 2, + "returnType": { "name": "ReplicatedField", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "index", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "getRawLength", + "version": 2, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getRawData", + "version": 2, + "returnType": { "name": "uchar", "isPointer": true, "isConst": true }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + }, + { + "name": "ReplicatedTransaction", + "version": 3, + "extends": "Disposable", + "constants": + [ + ], + "methods": + [ + { + "name": "prepare", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "commit", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "rollback", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "startSavepoint", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "releaseSavepoint", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "rollbackSavepoint", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "insertRecord", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "record", + "type": { "name": "ReplicatedRecord", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "updateRecord", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "orgRecord", + "type": { "name": "ReplicatedRecord", "isPointer": false, "isConst": false } + }, + { + "name": "newRecord", + "type": { "name": "ReplicatedRecord", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "deleteRecord", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "record", + "type": { "name": "ReplicatedRecord", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "executeSql", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "sql", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "executeSqlIntl", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "charset", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "sql", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + } + ] + }, + { + "name": "ReplicatedSession", + "version": 4, + "extends": "PluginBase", + "constants": + [ + ], + "methods": + [ + { + "name": "init", + "version": 4, + "returnType": { "name": "boolean", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "attachment", + "type": { "name": "Attachment", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "startTransaction", + "version": 4, + "returnType": { "name": "ReplicatedTransaction", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "transaction", + "type": { "name": "Transaction", "isPointer": false, "isConst": false } + }, + { + "name": "number", + "type": { "name": "int64", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "cleanupTransaction", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "number", + "type": { "name": "int64", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "setSequence", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "value", + "type": { "name": "int64", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "ProfilerPlugin", + "version": 4, + "extends": "PluginBase", + "constants": + [ + ], + "methods": + [ + { + "name": "init", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "attachment", + "type": { "name": "Attachment", "isPointer": false, "isConst": false } + }, + { + "name": "ticksFrequency", + "type": { "name": "uint64", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "startSession", + "version": 4, + "returnType": { "name": "ProfilerSession", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "description", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "options", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "timestamp", + "type": { "name": "ISC_TIMESTAMP_TZ", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "flush", + "version": 4, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "ProfilerSession", + "version": 3, + "extends": "Disposable", + "constants": + [ + { + "name": "FLAG_BEFORE_EVENTS", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 1 } + }, + { + "name": "FLAG_AFTER_EVENTS", + "type": { "name": "uint", "isPointer": false, "isConst": false }, + "expr": { "type": "int-literal", "value": 2 } + } + ], + "methods": + [ + { + "name": "getId", + "version": 3, + "returnType": { "name": "int64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "getFlags", + "version": 3, + "returnType": { "name": "uint", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + }, + { + "name": "cancel", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "finish", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "timestamp", + "type": { "name": "ISC_TIMESTAMP_TZ", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "defineStatement", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "statementId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "parentStatementId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "type", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "packageName", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "routineName", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "sqlText", + "type": { "name": "string", "isPointer": false, "isConst": true } + } + ] + }, + { + "name": "defineCursor", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "statementId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "cursorId", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "name", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "line", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "column", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "defineRecordSource", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "statementId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "cursorId", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "recSourceId", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "level", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "accessPath", + "type": { "name": "string", "isPointer": false, "isConst": true } + }, + { + "name": "parentRecSourceId", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "onRequestStart", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "statementId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "requestId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "callerStatementId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "callerRequestId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "timestamp", + "type": { "name": "ISC_TIMESTAMP_TZ", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "onRequestFinish", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": true, + "parameters": + [ + { + "name": "status", + "type": { "name": "Status", "isPointer": false, "isConst": false } + }, + { + "name": "statementId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "requestId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "timestamp", + "type": { "name": "ISC_TIMESTAMP_TZ", "isPointer": false, "isConst": false } + }, + { + "name": "stats", + "type": { "name": "ProfilerStats", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "beforePsqlLineColumn", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "statementId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "requestId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "line", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "column", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "afterPsqlLineColumn", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "statementId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "requestId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "line", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "column", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "stats", + "type": { "name": "ProfilerStats", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "beforeRecordSourceOpen", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "statementId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "requestId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "cursorId", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "recSourceId", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "afterRecordSourceOpen", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "statementId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "requestId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "cursorId", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "recSourceId", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "stats", + "type": { "name": "ProfilerStats", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "beforeRecordSourceGetRecord", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "statementId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "requestId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "cursorId", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "recSourceId", + "type": { "name": "uint", "isPointer": false, "isConst": false } + } + ] + }, + { + "name": "afterRecordSourceGetRecord", + "version": 3, + "returnType": { "name": "void", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + { + "name": "statementId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "requestId", + "type": { "name": "int64", "isPointer": false, "isConst": false } + }, + { + "name": "cursorId", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "recSourceId", + "type": { "name": "uint", "isPointer": false, "isConst": false } + }, + { + "name": "stats", + "type": { "name": "ProfilerStats", "isPointer": false, "isConst": false } + } + ] + } + ] + }, + { + "name": "ProfilerStats", + "version": 2, + "extends": "Versioned", + "constants": + [ + ], + "methods": + [ + { + "name": "getElapsedTicks", + "version": 2, + "returnType": { "name": "uint64", "isPointer": false, "isConst": false }, + "mayThrow": false, + "parameters": + [ + ] + } + ] + } + ] + } } diff --git a/packages/node-firebird-native-api/src/generate-files/patch.ts b/packages/node-firebird-native-api/src/generate-files/patch.ts index d6a8b1c..deb86ae 100644 --- a/packages/node-firebird-native-api/src/generate-files/patch.ts +++ b/packages/node-firebird-native-api/src/generate-files/patch.ts @@ -4,7 +4,44 @@ type InterfaceConfig = Record; const interfaceConfig: InterfaceConfig = { Util: { - deleteMethods: ['dumpBlob', 'loadBlob', 'getPerfCounters', 'formatStatus'], + deleteMethods: [ + 'dumpBlob', + 'loadBlob', + 'getPerfCounters', + 'formatStatus', + // Firebird 4+: these write text into a caller-supplied char buffer. + 'decodeTimeTz', + 'decodeTimeStampTz', + 'decodeTimeTzEx', + 'decodeTimeStampTzEx', + ], + }, + + // Firebird 4+: toString writes into a caller-supplied char buffer. + DecFloat16: { + deleteMethods: ['toString'], + }, + + DecFloat34: { + deleteMethods: ['toString'], + }, + + Int128: { + deleteMethods: ['toString'], + }, + + // Firebird 4+: returns an untyped data pointer. + ReplicatedField: { + deleteMethods: ['getData'], + }, + + // Firebird 5+: profiler plugin interfaces, for plugins rather than clients. + ProfilerPlugin: { + deleteMethods: ['*'], + }, + + ProfilerSession: { + deleteMethods: ['*'], }, Statement: {}, diff --git a/packages/node-firebird-native-api/src/lib/cloop-gen.ts b/packages/node-firebird-native-api/src/lib/cloop-gen.ts index 7228430..f77b26b 100644 --- a/packages/node-firebird-native-api/src/lib/cloop-gen.ts +++ b/packages/node-firebird-native-api/src/lib/cloop-gen.ts @@ -153,6 +153,8 @@ export interface FirebirdConf extends ReferenceCounted { asStringAsync(key: number): Promise; asBooleanSync(key: number): boolean; asBooleanAsync(key: number): Promise; + getVersionSync(status: Status | undefined): number; + getVersionAsync(status: Status | undefined): Promise; } export interface PluginConfig extends ReferenceCounted { @@ -181,6 +183,8 @@ export interface PluginFactory extends Versioned { export interface PluginModule extends Versioned { doCleanSync(): void; doCleanAsync(): Promise; + threadDetachSync(): void; + threadDetachAsync(): Promise; } export interface PluginManager extends Versioned { @@ -227,7 +231,9 @@ export namespace PluginManager { export const TYPE_WIRE_CRYPT: number = 8; export const TYPE_DB_CRYPT: number = 9; export const TYPE_KEY_HOLDER: number = 10; - export const TYPE_COUNT: number = 11; + export const TYPE_REPLICATOR: number = 11; + export const TYPE_PROFILER: number = 12; + export const TYPE_COUNT: number = 13; } export interface CryptKey extends Versioned {} @@ -245,6 +251,8 @@ export interface ConfigManager extends Versioned { getInstallDirectoryAsync(): Promise; getRootDirectorySync(): string | undefined; getRootDirectoryAsync(): Promise; + getDefaultSecurityDbSync(): string | undefined; + getDefaultSecurityDbAsync(): Promise; } export namespace ConfigManager { @@ -265,7 +273,8 @@ export namespace ConfigManager { export const DIR_LOG: number = 14; export const DIR_GUARD: number = 15; export const DIR_PLUGINS: number = 16; - export const DIR_COUNT: number = 17; + export const DIR_TZDATA: number = 17; + export const DIR_COUNT: number = 18; } export interface EventCallback extends ReferenceCounted { @@ -310,12 +319,16 @@ export interface Blob extends ReferenceCounted { ): Promise; putSegmentSync(status: Status | undefined, length: number, buffer: Uint8Array | Pointer | undefined): void; putSegmentAsync(status: Status | undefined, length: number, buffer: Uint8Array | Pointer | undefined): Promise; + deprecatedCancelSync(status: Status | undefined): void; + deprecatedCancelAsync(status: Status | undefined): Promise; + deprecatedCloseSync(status: Status | undefined): void; + deprecatedCloseAsync(status: Status | undefined): Promise; + seekSync(status: Status | undefined, mode: number, offset: number): number; + seekAsync(status: Status | undefined, mode: number, offset: number): Promise; cancelSync(status: Status | undefined): void; cancelAsync(status: Status | undefined): Promise; closeSync(status: Status | undefined): void; closeAsync(status: Status | undefined): Promise; - seekSync(status: Status | undefined, mode: number, offset: number): number; - seekAsync(status: Status | undefined, mode: number, offset: number): Promise; } export interface Transaction extends ReferenceCounted { @@ -339,22 +352,28 @@ export interface Transaction extends ReferenceCounted { ): Promise; prepareSync(status: Status | undefined, msgLength: number, message: Uint8Array | Pointer | undefined): void; prepareAsync(status: Status | undefined, msgLength: number, message: Uint8Array | Pointer | undefined): Promise; - commitSync(status: Status | undefined): void; - commitAsync(status: Status | undefined): Promise; + deprecatedCommitSync(status: Status | undefined): void; + deprecatedCommitAsync(status: Status | undefined): Promise; commitRetainingSync(status: Status | undefined): void; commitRetainingAsync(status: Status | undefined): Promise; - rollbackSync(status: Status | undefined): void; - rollbackAsync(status: Status | undefined): Promise; + deprecatedRollbackSync(status: Status | undefined): void; + deprecatedRollbackAsync(status: Status | undefined): Promise; rollbackRetainingSync(status: Status | undefined): void; rollbackRetainingAsync(status: Status | undefined): Promise; - disconnectSync(status: Status | undefined): void; - disconnectAsync(status: Status | undefined): Promise; + deprecatedDisconnectSync(status: Status | undefined): void; + deprecatedDisconnectAsync(status: Status | undefined): Promise; joinSync(status: Status | undefined, transaction: Transaction | undefined): Transaction | undefined; joinAsync(status: Status | undefined, transaction: Transaction | undefined): Promise; validateSync(status: Status | undefined, attachment: Attachment | undefined): Transaction | undefined; validateAsync(status: Status | undefined, attachment: Attachment | undefined): Promise; enterDtcSync(status: Status | undefined): Transaction | undefined; enterDtcAsync(status: Status | undefined): Promise; + commitSync(status: Status | undefined): void; + commitAsync(status: Status | undefined): Promise; + rollbackSync(status: Status | undefined): void; + rollbackAsync(status: Status | undefined): Promise; + disconnectSync(status: Status | undefined): void; + disconnectAsync(status: Status | undefined): Promise; } export interface MessageMetadata extends ReferenceCounted { @@ -392,6 +411,10 @@ export interface MessageMetadata extends ReferenceCounted { getBuilderAsync(status: Status | undefined): Promise; getMessageLengthSync(status: Status | undefined): number; getMessageLengthAsync(status: Status | undefined): Promise; + getAlignmentSync(status: Status | undefined): number; + getAlignmentAsync(status: Status | undefined): Promise; + getAlignedLengthSync(status: Status | undefined): number; + getAlignedLengthAsync(status: Status | undefined): Promise; } export interface MetadataBuilder extends ReferenceCounted { @@ -419,6 +442,14 @@ export interface MetadataBuilder extends ReferenceCounted { addFieldAsync(status: Status | undefined): Promise; getMetadataSync(status: Status | undefined): MessageMetadata | undefined; getMetadataAsync(status: Status | undefined): Promise; + setFieldSync(status: Status | undefined, index: number, field: string | undefined): void; + setFieldAsync(status: Status | undefined, index: number, field: string | undefined): Promise; + setRelationSync(status: Status | undefined, index: number, relation: string | undefined): void; + setRelationAsync(status: Status | undefined, index: number, relation: string | undefined): Promise; + setOwnerSync(status: Status | undefined, index: number, owner: string | undefined): void; + setOwnerAsync(status: Status | undefined, index: number, owner: string | undefined): Promise; + setAliasSync(status: Status | undefined, index: number, alias: string | undefined): void; + setAliasAsync(status: Status | undefined, index: number, alias: string | undefined): Promise; } export interface ResultSet extends ReferenceCounted { @@ -452,10 +483,30 @@ export interface ResultSet extends ReferenceCounted { isBofAsync(status: Status | undefined): Promise; getMetadataSync(status: Status | undefined): MessageMetadata | undefined; getMetadataAsync(status: Status | undefined): Promise; - closeSync(status: Status | undefined): void; - closeAsync(status: Status | undefined): Promise; + deprecatedCloseSync(status: Status | undefined): void; + deprecatedCloseAsync(status: Status | undefined): Promise; setDelayedOutputFormatSync(status: Status | undefined, format: MessageMetadata | undefined): void; setDelayedOutputFormatAsync(status: Status | undefined, format: MessageMetadata | undefined): Promise; + closeSync(status: Status | undefined): void; + closeAsync(status: Status | undefined): Promise; + getInfoSync( + status: Status | undefined, + itemsLength: number, + items: Uint8Array | Pointer | undefined, + bufferLength: number, + buffer: Uint8Array | Pointer | undefined, + ): void; + getInfoAsync( + status: Status | undefined, + itemsLength: number, + items: Uint8Array | Pointer | undefined, + bufferLength: number, + buffer: Uint8Array | Pointer | undefined, + ): Promise; +} + +export namespace ResultSet { + export const INF_RECORD_COUNT: number = 10; } export interface Statement extends ReferenceCounted { @@ -521,10 +572,32 @@ export interface Statement extends ReferenceCounted { ): Promise; setCursorNameSync(status: Status | undefined, name: string | undefined): void; setCursorNameAsync(status: Status | undefined, name: string | undefined): Promise; - freeSync(status: Status | undefined): void; - freeAsync(status: Status | undefined): Promise; + deprecatedFreeSync(status: Status | undefined): void; + deprecatedFreeAsync(status: Status | undefined): Promise; getFlagsSync(status: Status | undefined): number; getFlagsAsync(status: Status | undefined): Promise; + getTimeoutSync(status: Status | undefined): number; + getTimeoutAsync(status: Status | undefined): Promise; + setTimeoutSync(status: Status | undefined, timeOut: number): void; + setTimeoutAsync(status: Status | undefined, timeOut: number): Promise; + createBatchSync( + status: Status | undefined, + inMetadata: MessageMetadata | undefined, + parLength: number, + par: Uint8Array | Pointer | undefined, + ): Batch | undefined; + createBatchAsync( + status: Status | undefined, + inMetadata: MessageMetadata | undefined, + parLength: number, + par: Uint8Array | Pointer | undefined, + ): Promise; + freeSync(status: Status | undefined): void; + freeAsync(status: Status | undefined): Promise; + getMaxInlineBlobSizeSync(status: Status | undefined): number; + getMaxInlineBlobSizeAsync(status: Status | undefined): Promise; + setMaxInlineBlobSizeSync(status: Status | undefined, size: number): void; + setMaxInlineBlobSizeAsync(status: Status | undefined, size: number): Promise; } export namespace Statement { @@ -549,6 +622,140 @@ export namespace Statement { export const CURSOR_TYPE_SCROLLABLE: number = 1; } +export interface Batch extends ReferenceCounted { + addRefSync(): void; + addRefAsync(): Promise; + releaseSync(): number; + releaseAsync(): Promise; + addSync(status: Status | undefined, count: number, inBuffer: Uint8Array | Pointer | undefined): void; + addAsync(status: Status | undefined, count: number, inBuffer: Uint8Array | Pointer | undefined): Promise; + addBlobSync( + status: Status | undefined, + length: number, + inBuffer: Uint8Array | Pointer | undefined, + blobId: Uint8Array | Pointer | undefined, + parLength: number, + par: Uint8Array | Pointer | undefined, + ): void; + addBlobAsync( + status: Status | undefined, + length: number, + inBuffer: Uint8Array | Pointer | undefined, + blobId: Uint8Array | Pointer | undefined, + parLength: number, + par: Uint8Array | Pointer | undefined, + ): Promise; + appendBlobDataSync(status: Status | undefined, length: number, inBuffer: Uint8Array | Pointer | undefined): void; + appendBlobDataAsync( + status: Status | undefined, + length: number, + inBuffer: Uint8Array | Pointer | undefined, + ): Promise; + addBlobStreamSync(status: Status | undefined, length: number, inBuffer: Uint8Array | Pointer | undefined): void; + addBlobStreamAsync( + status: Status | undefined, + length: number, + inBuffer: Uint8Array | Pointer | undefined, + ): Promise; + registerBlobSync( + status: Status | undefined, + existingBlob: Uint8Array | Pointer | undefined, + blobId: Uint8Array | Pointer | undefined, + ): void; + registerBlobAsync( + status: Status | undefined, + existingBlob: Uint8Array | Pointer | undefined, + blobId: Uint8Array | Pointer | undefined, + ): Promise; + executeSync(status: Status | undefined, transaction: Transaction | undefined): BatchCompletionState | undefined; + executeAsync( + status: Status | undefined, + transaction: Transaction | undefined, + ): Promise; + cancelSync(status: Status | undefined): void; + cancelAsync(status: Status | undefined): Promise; + getBlobAlignmentSync(status: Status | undefined): number; + getBlobAlignmentAsync(status: Status | undefined): Promise; + getMetadataSync(status: Status | undefined): MessageMetadata | undefined; + getMetadataAsync(status: Status | undefined): Promise; + setDefaultBpbSync(status: Status | undefined, parLength: number, par: Uint8Array | Pointer | undefined): void; + setDefaultBpbAsync( + status: Status | undefined, + parLength: number, + par: Uint8Array | Pointer | undefined, + ): Promise; + deprecatedCloseSync(status: Status | undefined): void; + deprecatedCloseAsync(status: Status | undefined): Promise; + closeSync(status: Status | undefined): void; + closeAsync(status: Status | undefined): Promise; + getInfoSync( + status: Status | undefined, + itemsLength: number, + items: Uint8Array | Pointer | undefined, + bufferLength: number, + buffer: Uint8Array | Pointer | undefined, + ): void; + getInfoAsync( + status: Status | undefined, + itemsLength: number, + items: Uint8Array | Pointer | undefined, + bufferLength: number, + buffer: Uint8Array | Pointer | undefined, + ): Promise; +} + +export namespace Batch { + export const VERSION1: number = 1; + export const CURRENT_VERSION: number = Batch.VERSION1; + export const TAG_MULTIERROR: number = 1; + export const TAG_RECORD_COUNTS: number = 2; + export const TAG_BUFFER_BYTES_SIZE: number = 3; + export const TAG_BLOB_POLICY: number = 4; + export const TAG_DETAILED_ERRORS: number = 5; + export const INF_BUFFER_BYTES_SIZE: number = 10; + export const INF_DATA_BYTES_SIZE: number = 11; + export const INF_BLOBS_BYTES_SIZE: number = 12; + export const INF_BLOB_ALIGNMENT: number = 13; + export const INF_BLOB_HEADER: number = 14; + export const BLOB_NONE: number = 0; + export const BLOB_ID_ENGINE: number = 1; + export const BLOB_ID_USER: number = 2; + export const BLOB_STREAM: number = 3; + export const BLOB_SEGHDR_ALIGN: number = 2; +} + +export interface BatchCompletionState extends Disposable { + disposeSync(): void; + disposeAsync(): Promise; + getSizeSync(status: Status | undefined): number; + getSizeAsync(status: Status | undefined): Promise; + getStateSync(status: Status | undefined, pos: number): number; + getStateAsync(status: Status | undefined, pos: number): Promise; + findErrorSync(status: Status | undefined, pos: number): number; + findErrorAsync(status: Status | undefined, pos: number): Promise; + getStatusSync(status: Status | undefined, to: Status | undefined, pos: number): void; + getStatusAsync(status: Status | undefined, to: Status | undefined, pos: number): Promise; +} + +export namespace BatchCompletionState { + export const EXECUTE_FAILED: number = -1; + export const SUCCESS_NO_INFO: number = -2; + export const NO_MORE_ERRORS: number = 4294967295; +} + +export interface Replicator extends ReferenceCounted { + addRefSync(): void; + addRefAsync(): Promise; + releaseSync(): number; + releaseAsync(): Promise; + processSync(status: Status | undefined, length: number, data: Uint8Array | Pointer | undefined): void; + processAsync(status: Status | undefined, length: number, data: Uint8Array | Pointer | undefined): Promise; + deprecatedCloseSync(status: Status | undefined): void; + deprecatedCloseAsync(status: Status | undefined): Promise; + closeSync(status: Status | undefined): void; + closeAsync(status: Status | undefined): Promise; +} + export interface Request extends ReferenceCounted { addRefSync(): void; addRefAsync(): Promise; @@ -618,6 +825,8 @@ export interface Request extends ReferenceCounted { ): Promise; unwindSync(status: Status | undefined, level: number): void; unwindAsync(status: Status | undefined, level: number): Promise; + deprecatedFreeSync(status: Status | undefined): void; + deprecatedFreeAsync(status: Status | undefined): Promise; freeSync(status: Status | undefined): void; freeAsync(status: Status | undefined): Promise; } @@ -627,6 +836,8 @@ export interface Events extends ReferenceCounted { addRefAsync(): Promise; releaseSync(): number; releaseAsync(): Promise; + deprecatedCancelSync(status: Status | undefined): void; + deprecatedCancelAsync(status: Status | undefined): Promise; cancelSync(status: Status | undefined): void; cancelAsync(status: Status | undefined): Promise; } @@ -818,10 +1029,52 @@ export interface Attachment extends ReferenceCounted { cancelOperationAsync(status: Status | undefined, option: number): Promise; pingSync(status: Status | undefined): void; pingAsync(status: Status | undefined): Promise; + deprecatedDetachSync(status: Status | undefined): void; + deprecatedDetachAsync(status: Status | undefined): Promise; + deprecatedDropDatabaseSync(status: Status | undefined): void; + deprecatedDropDatabaseAsync(status: Status | undefined): Promise; + getIdleTimeoutSync(status: Status | undefined): number; + getIdleTimeoutAsync(status: Status | undefined): Promise; + setIdleTimeoutSync(status: Status | undefined, timeOut: number): void; + setIdleTimeoutAsync(status: Status | undefined, timeOut: number): Promise; + getStatementTimeoutSync(status: Status | undefined): number; + getStatementTimeoutAsync(status: Status | undefined): Promise; + setStatementTimeoutSync(status: Status | undefined, timeOut: number): void; + setStatementTimeoutAsync(status: Status | undefined, timeOut: number): Promise; + createBatchSync( + status: Status | undefined, + transaction: Transaction | undefined, + stmtLength: number, + sqlStmt: string | undefined, + dialect: number, + inMetadata: MessageMetadata | undefined, + parLength: number, + par: Uint8Array | Pointer | undefined, + ): Batch | undefined; + createBatchAsync( + status: Status | undefined, + transaction: Transaction | undefined, + stmtLength: number, + sqlStmt: string | undefined, + dialect: number, + inMetadata: MessageMetadata | undefined, + parLength: number, + par: Uint8Array | Pointer | undefined, + ): Promise; + createReplicatorSync(status: Status | undefined): Replicator | undefined; + createReplicatorAsync(status: Status | undefined): Promise; detachSync(status: Status | undefined): void; detachAsync(status: Status | undefined): Promise; dropDatabaseSync(status: Status | undefined): void; dropDatabaseAsync(status: Status | undefined): Promise; + getMaxBlobCacheSizeSync(status: Status | undefined): number; + getMaxBlobCacheSizeAsync(status: Status | undefined): Promise; + setMaxBlobCacheSizeSync(status: Status | undefined, size: number): void; + setMaxBlobCacheSizeAsync(status: Status | undefined, size: number): Promise; + getMaxInlineBlobSizeSync(status: Status | undefined): number; + getMaxInlineBlobSizeAsync(status: Status | undefined): Promise; + setMaxInlineBlobSizeSync(status: Status | undefined, size: number): void; + setMaxInlineBlobSizeAsync(status: Status | undefined, size: number): Promise; } export interface Service extends ReferenceCounted { @@ -829,8 +1082,8 @@ export interface Service extends ReferenceCounted { addRefAsync(): Promise; releaseSync(): number; releaseAsync(): Promise; - detachSync(status: Status | undefined): void; - detachAsync(status: Status | undefined): Promise; + deprecatedDetachSync(status: Status | undefined): void; + deprecatedDetachAsync(status: Status | undefined): Promise; querySync( status: Status | undefined, sendLength: number, @@ -851,6 +1104,10 @@ export interface Service extends ReferenceCounted { ): Promise; startSync(status: Status | undefined, spbLength: number, spb: Uint8Array | Pointer | undefined): void; startAsync(status: Status | undefined, spbLength: number, spb: Uint8Array | Pointer | undefined): Promise; + detachSync(status: Status | undefined): void; + detachAsync(status: Status | undefined): Promise; + cancelSync(status: Status | undefined): void; + cancelAsync(status: Status | undefined): Promise; } export interface Provider extends PluginBase { @@ -956,6 +1213,7 @@ export namespace Auth { export const AUTH_SUCCESS: number = 0; export const AUTH_MORE_DATA: number = 1; export const AUTH_CONTINUE: number = 2; + export const AUTH_SUCCESS_WITH_DATA: number = 3; } export interface Writer extends Versioned { @@ -995,6 +1253,8 @@ export interface ClientBlock extends ReferenceCounted { putDataAsync(status: Status | undefined, length: number, data: Uint8Array | Pointer | undefined): Promise; newKeySync(status: Status | undefined): CryptKey | undefined; newKeyAsync(status: Status | undefined): Promise; + getAuthBlockSync(status: Status | undefined): AuthBlock | undefined; + getAuthBlockAsync(status: Status | undefined): Promise; } export interface Server extends Auth { @@ -1016,6 +1276,8 @@ export interface Server extends Auth { sBlock: ServerBlock | undefined, writerInterface: Writer | undefined, ): Promise; + setDbCryptCallbackSync(status: Status | undefined, cryptCallback: CryptKeyCallback | undefined): void; + setDbCryptCallbackAsync(status: Status | undefined, cryptCallback: CryptKeyCallback | undefined): Promise; } export interface Client extends Auth { @@ -1116,6 +1378,10 @@ export interface LogonInfo extends Versioned { remoteAddressAsync(): Promise; authBlockSync(length: Uint32Array | undefined): Pointer | undefined; authBlockAsync(length: Uint32Array | undefined): Promise; + attachmentSync(status: Status | undefined): Attachment | undefined; + attachmentAsync(status: Status | undefined): Promise; + transactionSync(status: Status | undefined): Transaction | undefined; + transactionAsync(status: Status | undefined): Promise; } export interface Management extends PluginBase { @@ -1137,6 +1403,23 @@ export interface Management extends PluginBase { rollbackAsync(status: Status | undefined): Promise; } +export interface AuthBlock extends Versioned { + getTypeSync(): string | undefined; + getTypeAsync(): Promise; + getNameSync(): string | undefined; + getNameAsync(): Promise; + getPluginSync(): string | undefined; + getPluginAsync(): Promise; + getSecurityDbSync(): string | undefined; + getSecurityDbAsync(): Promise; + getOriginalPluginSync(): string | undefined; + getOriginalPluginAsync(): Promise; + nextSync(status: Status | undefined): boolean; + nextAsync(status: Status | undefined): Promise; + firstSync(status: Status | undefined): boolean; + firstAsync(status: Status | undefined): Promise; +} + export interface WireCryptPlugin extends PluginBase { addRefSync(): void; addRefAsync(): Promise; @@ -1174,6 +1457,28 @@ export interface WireCryptPlugin extends PluginBase { from: Uint8Array | Pointer | undefined, to: Uint8Array | Pointer | undefined, ): Promise; + getSpecificDataSync( + status: Status | undefined, + keyType: string | undefined, + length: Uint32Array | undefined, + ): Pointer | undefined; + getSpecificDataAsync( + status: Status | undefined, + keyType: string | undefined, + length: Uint32Array | undefined, + ): Promise; + setSpecificDataSync( + status: Status | undefined, + keyType: string | undefined, + length: number, + data: Uint8Array | Pointer | undefined, + ): void; + setSpecificDataAsync( + status: Status | undefined, + keyType: string | undefined, + length: number, + data: Uint8Array | Pointer | undefined, + ): Promise; } export interface CryptKeyCallback extends Versioned { @@ -1189,6 +1494,14 @@ export interface CryptKeyCallback extends Versioned { bufferLength: number, buffer: Uint8Array | Pointer | undefined, ): Promise; + dummy1Sync(status: Status | undefined): void; + dummy1Async(status: Status | undefined): Promise; + dummy2Sync(): void; + dummy2Async(): Promise; + getHashLengthSync(status: Status | undefined): number; + getHashLengthAsync(status: Status | undefined): Promise; + getHashDataSync(status: Status | undefined, hash: Uint8Array | Pointer | undefined): void; + getHashDataAsync(status: Status | undefined, hash: Uint8Array | Pointer | undefined): Promise; } export interface KeyHolderPlugin extends PluginBase { @@ -1204,6 +1517,19 @@ export interface KeyHolderPlugin extends PluginBase { keyCallbackAsync(status: Status | undefined, callback: CryptKeyCallback | undefined): Promise; keyHandleSync(status: Status | undefined, keyName: string | undefined): CryptKeyCallback | undefined; keyHandleAsync(status: Status | undefined, keyName: string | undefined): Promise; + useOnlyOwnKeysSync(status: Status | undefined): boolean; + useOnlyOwnKeysAsync(status: Status | undefined): Promise; + chainHandleSync(status: Status | undefined): CryptKeyCallback | undefined; + chainHandleAsync(status: Status | undefined): Promise; +} + +export interface DbCryptInfo extends ReferenceCounted { + addRefSync(): void; + addRefAsync(): Promise; + releaseSync(): number; + releaseAsync(): Promise; + getDatabaseFullPathSync(status: Status | undefined): string | undefined; + getDatabaseFullPathAsync(status: Status | undefined): Promise; } export interface DbCryptPlugin extends PluginBase { @@ -1388,6 +1714,54 @@ export interface Util extends Versioned { metadata: MessageMetadata | undefined, callback: OffsetsCallback | undefined, ): Promise; + getDecFloat16Sync(status: Status | undefined): DecFloat16 | undefined; + getDecFloat16Async(status: Status | undefined): Promise; + getDecFloat34Sync(status: Status | undefined): DecFloat34 | undefined; + getDecFloat34Async(status: Status | undefined): Promise; + encodeTimeTzSync( + status: Status | undefined, + timeTz: Uint8Array | Pointer | undefined, + hours: number, + minutes: number, + seconds: number, + fractions: number, + timeZone: string | undefined, + ): void; + encodeTimeTzAsync( + status: Status | undefined, + timeTz: Uint8Array | Pointer | undefined, + hours: number, + minutes: number, + seconds: number, + fractions: number, + timeZone: string | undefined, + ): Promise; + encodeTimeStampTzSync( + status: Status | undefined, + timeStampTz: Uint8Array | Pointer | undefined, + year: number, + month: number, + day: number, + hours: number, + minutes: number, + seconds: number, + fractions: number, + timeZone: string | undefined, + ): void; + encodeTimeStampTzAsync( + status: Status | undefined, + timeStampTz: Uint8Array | Pointer | undefined, + year: number, + month: number, + day: number, + hours: number, + minutes: number, + seconds: number, + fractions: number, + timeZone: string | undefined, + ): Promise; + getInt128Sync(status: Status | undefined): Int128 | undefined; + getInt128Async(status: Status | undefined): Promise; } export interface OffsetsCallback extends Versioned { @@ -1455,6 +1829,13 @@ export namespace XpbBuilder { export const SPB_ATTACH: number = 2; export const SPB_START: number = 3; export const TPB: number = 4; + export const BATCH: number = 5; + export const BPB: number = 6; + export const SPB_SEND: number = 7; + export const SPB_RECEIVE: number = 8; + export const SPB_RESPONSE: number = 9; + export const INFO_SEND: number = 10; + export const INFO_RESPONSE: number = 11; } export interface TraceConnection extends Versioned { @@ -1515,6 +1896,7 @@ export namespace TraceTransaction { export const ISOLATION_CONCURRENCY: number = 2; export const ISOLATION_READ_COMMITTED_RECVER: number = 3; export const ISOLATION_READ_COMMITTED_NORECVER: number = 4; + export const ISOLATION_READ_COMMITTED_READ_CONSISTENCY: number = 5; } export interface TraceParams extends Versioned {} @@ -1624,7 +2006,10 @@ export namespace TraceFactory { export const TRACE_EVENT_ERROR: number = 17; export const TRACE_EVENT_SWEEP: number = 18; export const TRACE_EVENT_FUNC_EXECUTE: number = 19; - export const TRACE_EVENT_MAX: number = 20; + export const TRACE_EVENT_PROC_COMPILE: number = 20; + export const TRACE_EVENT_FUNC_COMPILE: number = 21; + export const TRACE_EVENT_TRIGGER_COMPILE: number = 22; + export const TRACE_EVENT_MAX: number = 23; } export interface UdrFunctionFactory extends Disposable { @@ -1746,3 +2131,222 @@ export interface UdrPlugin extends Versioned { factory: UdrTriggerFactory | undefined, ): Promise; } + +export interface DecFloat16 extends Versioned { + toBcdSync( + from: Uint8Array | Pointer | undefined, + sign: Int32Array | undefined, + bcd: Uint8Array | Pointer | undefined, + exp: Int32Array | undefined, + ): void; + toBcdAsync( + from: Uint8Array | Pointer | undefined, + sign: Int32Array | undefined, + bcd: Uint8Array | Pointer | undefined, + exp: Int32Array | undefined, + ): Promise; + fromBcdSync( + sign: number, + bcd: Uint8Array | Pointer | undefined, + exp: number, + to: Uint8Array | Pointer | undefined, + ): void; + fromBcdAsync( + sign: number, + bcd: Uint8Array | Pointer | undefined, + exp: number, + to: Uint8Array | Pointer | undefined, + ): Promise; + fromStringSync(status: Status | undefined, from: string | undefined, to: Uint8Array | Pointer | undefined): void; + fromStringAsync( + status: Status | undefined, + from: string | undefined, + to: Uint8Array | Pointer | undefined, + ): Promise; +} + +export namespace DecFloat16 { + export const BCD_SIZE: number = 16; + export const STRING_SIZE: number = 24; +} + +export interface DecFloat34 extends Versioned { + toBcdSync( + from: Uint8Array | Pointer | undefined, + sign: Int32Array | undefined, + bcd: Uint8Array | Pointer | undefined, + exp: Int32Array | undefined, + ): void; + toBcdAsync( + from: Uint8Array | Pointer | undefined, + sign: Int32Array | undefined, + bcd: Uint8Array | Pointer | undefined, + exp: Int32Array | undefined, + ): Promise; + fromBcdSync( + sign: number, + bcd: Uint8Array | Pointer | undefined, + exp: number, + to: Uint8Array | Pointer | undefined, + ): void; + fromBcdAsync( + sign: number, + bcd: Uint8Array | Pointer | undefined, + exp: number, + to: Uint8Array | Pointer | undefined, + ): Promise; + fromStringSync(status: Status | undefined, from: string | undefined, to: Uint8Array | Pointer | undefined): void; + fromStringAsync( + status: Status | undefined, + from: string | undefined, + to: Uint8Array | Pointer | undefined, + ): Promise; +} + +export namespace DecFloat34 { + export const BCD_SIZE: number = 34; + export const STRING_SIZE: number = 43; +} + +export interface Int128 extends Versioned { + fromStringSync( + status: Status | undefined, + scale: number, + from: string | undefined, + to: Uint8Array | Pointer | undefined, + ): void; + fromStringAsync( + status: Status | undefined, + scale: number, + from: string | undefined, + to: Uint8Array | Pointer | undefined, + ): Promise; +} + +export namespace Int128 { + export const STRING_SIZE: number = 46; +} + +export interface ReplicatedField extends Versioned { + getNameSync(): string | undefined; + getNameAsync(): Promise; + getTypeSync(): number; + getTypeAsync(): Promise; + getSubTypeSync(): number; + getSubTypeAsync(): Promise; + getScaleSync(): number; + getScaleAsync(): Promise; + getLengthSync(): number; + getLengthAsync(): Promise; + getCharSetSync(): number; + getCharSetAsync(): Promise; +} + +export interface ReplicatedRecord extends Versioned { + getCountSync(): number; + getCountAsync(): Promise; + getFieldSync(index: number): ReplicatedField | undefined; + getFieldAsync(index: number): Promise; + getRawLengthSync(): number; + getRawLengthAsync(): Promise; + getRawDataSync(): Pointer | undefined; + getRawDataAsync(): Promise; +} + +export interface ReplicatedTransaction extends Disposable { + disposeSync(): void; + disposeAsync(): Promise; + prepareSync(status: Status | undefined): void; + prepareAsync(status: Status | undefined): Promise; + commitSync(status: Status | undefined): void; + commitAsync(status: Status | undefined): Promise; + rollbackSync(status: Status | undefined): void; + rollbackAsync(status: Status | undefined): Promise; + startSavepointSync(status: Status | undefined): void; + startSavepointAsync(status: Status | undefined): Promise; + releaseSavepointSync(status: Status | undefined): void; + releaseSavepointAsync(status: Status | undefined): Promise; + rollbackSavepointSync(status: Status | undefined): void; + rollbackSavepointAsync(status: Status | undefined): Promise; + insertRecordSync(status: Status | undefined, name: string | undefined, record: ReplicatedRecord | undefined): void; + insertRecordAsync( + status: Status | undefined, + name: string | undefined, + record: ReplicatedRecord | undefined, + ): Promise; + updateRecordSync( + status: Status | undefined, + name: string | undefined, + orgRecord: ReplicatedRecord | undefined, + newRecord: ReplicatedRecord | undefined, + ): void; + updateRecordAsync( + status: Status | undefined, + name: string | undefined, + orgRecord: ReplicatedRecord | undefined, + newRecord: ReplicatedRecord | undefined, + ): Promise; + deleteRecordSync(status: Status | undefined, name: string | undefined, record: ReplicatedRecord | undefined): void; + deleteRecordAsync( + status: Status | undefined, + name: string | undefined, + record: ReplicatedRecord | undefined, + ): Promise; + executeSqlSync(status: Status | undefined, sql: string | undefined): void; + executeSqlAsync(status: Status | undefined, sql: string | undefined): Promise; + executeSqlIntlSync(status: Status | undefined, charset: number, sql: string | undefined): void; + executeSqlIntlAsync(status: Status | undefined, charset: number, sql: string | undefined): Promise; +} + +export interface ReplicatedSession extends PluginBase { + addRefSync(): void; + addRefAsync(): Promise; + releaseSync(): number; + releaseAsync(): Promise; + setOwnerSync(r: ReferenceCounted | undefined): void; + setOwnerAsync(r: ReferenceCounted | undefined): Promise; + getOwnerSync(): ReferenceCounted | undefined; + getOwnerAsync(): Promise; + initSync(status: Status | undefined, attachment: Attachment | undefined): boolean; + initAsync(status: Status | undefined, attachment: Attachment | undefined): Promise; + startTransactionSync( + status: Status | undefined, + transaction: Transaction | undefined, + number: number, + ): ReplicatedTransaction | undefined; + startTransactionAsync( + status: Status | undefined, + transaction: Transaction | undefined, + number: number, + ): Promise; + cleanupTransactionSync(status: Status | undefined, number: number): void; + cleanupTransactionAsync(status: Status | undefined, number: number): Promise; + setSequenceSync(status: Status | undefined, name: string | undefined, value: number): void; + setSequenceAsync(status: Status | undefined, name: string | undefined, value: number): Promise; +} + +export interface ProfilerPlugin extends PluginBase { + addRefSync(): void; + addRefAsync(): Promise; + releaseSync(): number; + releaseAsync(): Promise; + setOwnerSync(r: ReferenceCounted | undefined): void; + setOwnerAsync(r: ReferenceCounted | undefined): Promise; + getOwnerSync(): ReferenceCounted | undefined; + getOwnerAsync(): Promise; +} + +export interface ProfilerSession extends Disposable { + disposeSync(): void; + disposeAsync(): Promise; +} + +export namespace ProfilerSession { + export const FLAG_BEFORE_EVENTS: number = 1; + export const FLAG_AFTER_EVENTS: number = 2; +} + +export interface ProfilerStats extends Versioned { + getElapsedTicksSync(): number; + getElapsedTicksAsync(): Promise; +} diff --git a/packages/node-firebird-native-api/src/native/cloop-gen.h b/packages/node-firebird-native-api/src/native/cloop-gen.h index c626787..1e79cff 100644 --- a/packages/node-firebird-native-api/src/native/cloop-gen.h +++ b/packages/node-firebird-native-api/src/native/cloop-gen.h @@ -1241,6 +1241,29 @@ friend class BaseClass; } } + static MethodStart getVersionStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getVersionFinish(const Napi::Env env, unsigned ret); + + Napi::Value getVersionAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getVersionStart(true, info), + &FirebirdConf::getVersionFinish); + } + + Napi::Value getVersionSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getVersionStart(false, info)(); + return getVersionFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + }; @@ -1467,6 +1490,29 @@ friend class BaseClass; } } + static MethodStart threadDetachStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value threadDetachFinish(const Napi::Env env, void* ret); + + Napi::Value threadDetachAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + threadDetachStart(true, info), + &PluginModule::threadDetachFinish); + } + + Napi::Value threadDetachSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = threadDetachStart(false, info)(); + return threadDetachFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + }; @@ -1785,6 +1831,29 @@ friend class BaseClass; } } + static MethodStart getDefaultSecurityDbStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getDefaultSecurityDbFinish(const Napi::Env env, OptString ret); + + Napi::Value getDefaultSecurityDbAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getDefaultSecurityDbStart(true, info), + &ConfigManager::getDefaultSecurityDbFinish); + } + + Napi::Value getDefaultSecurityDbSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getDefaultSecurityDbStart(false, info)(); + return getDefaultSecurityDbFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + }; @@ -1997,22 +2066,22 @@ friend class BaseClass; } } - static MethodStart cancelStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value cancelFinish(const Napi::Env env, void* ret); + static MethodStart deprecatedCancelStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value deprecatedCancelFinish(const Napi::Env env, void* ret); - Napi::Value cancelAsync(const Napi::CallbackInfo& info) + Napi::Value deprecatedCancelAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - cancelStart(true, info), - &Blob::cancelFinish); + deprecatedCancelStart(true, info), + &Blob::deprecatedCancelFinish); } - Napi::Value cancelSync(const Napi::CallbackInfo& info) + Napi::Value deprecatedCancelSync(const Napi::CallbackInfo& info) { try { - auto ret = cancelStart(false, info)(); - return cancelFinish(info.Env(), ret); + auto ret = deprecatedCancelStart(false, info)(); + return deprecatedCancelFinish(info.Env(), ret); } catch (...) { @@ -2020,22 +2089,22 @@ friend class BaseClass; } } - static MethodStart closeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value closeFinish(const Napi::Env env, void* ret); + static MethodStart deprecatedCloseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value deprecatedCloseFinish(const Napi::Env env, void* ret); - Napi::Value closeAsync(const Napi::CallbackInfo& info) + Napi::Value deprecatedCloseAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - closeStart(true, info), - &Blob::closeFinish); + deprecatedCloseStart(true, info), + &Blob::deprecatedCloseFinish); } - Napi::Value closeSync(const Napi::CallbackInfo& info) + Napi::Value deprecatedCloseSync(const Napi::CallbackInfo& info) { try { - auto ret = closeStart(false, info)(); - return closeFinish(info.Env(), ret); + auto ret = deprecatedCloseStart(false, info)(); + return deprecatedCloseFinish(info.Env(), ret); } catch (...) { @@ -2066,6 +2135,52 @@ friend class BaseClass; } } + static MethodStart cancelStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value cancelFinish(const Napi::Env env, void* ret); + + Napi::Value cancelAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + cancelStart(true, info), + &Blob::cancelFinish); + } + + Napi::Value cancelSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = cancelStart(false, info)(); + return cancelFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart closeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value closeFinish(const Napi::Env env, void* ret); + + Napi::Value closeAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + closeStart(true, info), + &Blob::closeFinish); + } + + Napi::Value closeSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = closeStart(false, info)(); + return closeFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + }; @@ -2172,22 +2287,22 @@ friend class BaseClass; } } - static MethodStart commitStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value commitFinish(const Napi::Env env, void* ret); + static MethodStart deprecatedCommitStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value deprecatedCommitFinish(const Napi::Env env, void* ret); - Napi::Value commitAsync(const Napi::CallbackInfo& info) + Napi::Value deprecatedCommitAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - commitStart(true, info), - &Transaction::commitFinish); + deprecatedCommitStart(true, info), + &Transaction::deprecatedCommitFinish); } - Napi::Value commitSync(const Napi::CallbackInfo& info) + Napi::Value deprecatedCommitSync(const Napi::CallbackInfo& info) { try { - auto ret = commitStart(false, info)(); - return commitFinish(info.Env(), ret); + auto ret = deprecatedCommitStart(false, info)(); + return deprecatedCommitFinish(info.Env(), ret); } catch (...) { @@ -2218,22 +2333,22 @@ friend class BaseClass; } } - static MethodStart rollbackStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value rollbackFinish(const Napi::Env env, void* ret); + static MethodStart deprecatedRollbackStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value deprecatedRollbackFinish(const Napi::Env env, void* ret); - Napi::Value rollbackAsync(const Napi::CallbackInfo& info) + Napi::Value deprecatedRollbackAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - rollbackStart(true, info), - &Transaction::rollbackFinish); + deprecatedRollbackStart(true, info), + &Transaction::deprecatedRollbackFinish); } - Napi::Value rollbackSync(const Napi::CallbackInfo& info) + Napi::Value deprecatedRollbackSync(const Napi::CallbackInfo& info) { try { - auto ret = rollbackStart(false, info)(); - return rollbackFinish(info.Env(), ret); + auto ret = deprecatedRollbackStart(false, info)(); + return deprecatedRollbackFinish(info.Env(), ret); } catch (...) { @@ -2264,22 +2379,22 @@ friend class BaseClass; } } - static MethodStart disconnectStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value disconnectFinish(const Napi::Env env, void* ret); + static MethodStart deprecatedDisconnectStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value deprecatedDisconnectFinish(const Napi::Env env, void* ret); - Napi::Value disconnectAsync(const Napi::CallbackInfo& info) + Napi::Value deprecatedDisconnectAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - disconnectStart(true, info), - &Transaction::disconnectFinish); + deprecatedDisconnectStart(true, info), + &Transaction::deprecatedDisconnectFinish); } - Napi::Value disconnectSync(const Napi::CallbackInfo& info) + Napi::Value deprecatedDisconnectSync(const Napi::CallbackInfo& info) { try { - auto ret = disconnectStart(false, info)(); - return disconnectFinish(info.Env(), ret); + auto ret = deprecatedDisconnectStart(false, info)(); + return deprecatedDisconnectFinish(info.Env(), ret); } catch (...) { @@ -2356,6 +2471,75 @@ friend class BaseClass; } } + static MethodStart commitStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value commitFinish(const Napi::Env env, void* ret); + + Napi::Value commitAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + commitStart(true, info), + &Transaction::commitFinish); + } + + Napi::Value commitSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = commitStart(false, info)(); + return commitFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart rollbackStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value rollbackFinish(const Napi::Env env, void* ret); + + Napi::Value rollbackAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + rollbackStart(true, info), + &Transaction::rollbackFinish); + } + + Napi::Value rollbackSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = rollbackStart(false, info)(); + return rollbackFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart disconnectStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value disconnectFinish(const Napi::Env env, void* ret); + + Napi::Value disconnectAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + disconnectStart(true, info), + &Transaction::disconnectFinish); + } + + Napi::Value disconnectSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = disconnectStart(false, info)(); + return disconnectFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + }; @@ -2761,6 +2945,52 @@ friend class BaseClass; } } + static MethodStart getAlignmentStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getAlignmentFinish(const Napi::Env env, unsigned ret); + + Napi::Value getAlignmentAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getAlignmentStart(true, info), + &MessageMetadata::getAlignmentFinish); + } + + Napi::Value getAlignmentSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getAlignmentStart(false, info)(); + return getAlignmentFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getAlignedLengthStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getAlignedLengthFinish(const Napi::Env env, unsigned ret); + + Napi::Value getAlignedLengthAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getAlignedLengthStart(true, info), + &MessageMetadata::getAlignedLengthFinish); + } + + Napi::Value getAlignedLengthSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getAlignedLengthStart(false, info)(); + return getAlignedLengthFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + }; @@ -3051,36 +3281,22 @@ friend class BaseClass; } } -}; - - -class ResultSet : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addRefFinish(const Napi::Env env, void* ret); + static MethodStart setFieldStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setFieldFinish(const Napi::Env env, void* ret); - Napi::Value addRefAsync(const Napi::CallbackInfo& info) + Napi::Value setFieldAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - addRefStart(true, info), - &ResultSet::addRefFinish); + setFieldStart(true, info), + &MetadataBuilder::setFieldFinish); } - Napi::Value addRefSync(const Napi::CallbackInfo& info) + Napi::Value setFieldSync(const Napi::CallbackInfo& info) { try { - auto ret = addRefStart(false, info)(); - return addRefFinish(info.Env(), ret); + auto ret = setFieldStart(false, info)(); + return setFieldFinish(info.Env(), ret); } catch (...) { @@ -3088,12 +3304,118 @@ friend class BaseClass; } } - static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value releaseFinish(const Napi::Env env, int ret); + static MethodStart setRelationStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setRelationFinish(const Napi::Env env, void* ret); - Napi::Value releaseAsync(const Napi::CallbackInfo& info) + Napi::Value setRelationAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), + return PromiseWorker::Run(info.Env(), + setRelationStart(true, info), + &MetadataBuilder::setRelationFinish); + } + + Napi::Value setRelationSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = setRelationStart(false, info)(); + return setRelationFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); + + Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + setOwnerStart(true, info), + &MetadataBuilder::setOwnerFinish); + } + + Napi::Value setOwnerSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = setOwnerStart(false, info)(); + return setOwnerFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart setAliasStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setAliasFinish(const Napi::Env env, void* ret); + + Napi::Value setAliasAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + setAliasStart(true, info), + &MetadataBuilder::setAliasFinish); + } + + Napi::Value setAliasSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = setAliasStart(false, info)(); + return setAliasFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class ResultSet : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); + + Napi::Value addRefAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + addRefStart(true, info), + &ResultSet::addRefFinish); + } + + Napi::Value addRefSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); + + Napi::Value releaseAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), releaseStart(true, info), &ResultSet::releaseFinish); } @@ -3318,22 +3640,22 @@ friend class BaseClass; } } - static MethodStart closeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value closeFinish(const Napi::Env env, void* ret); + static MethodStart deprecatedCloseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value deprecatedCloseFinish(const Napi::Env env, void* ret); - Napi::Value closeAsync(const Napi::CallbackInfo& info) + Napi::Value deprecatedCloseAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - closeStart(true, info), - &ResultSet::closeFinish); + deprecatedCloseStart(true, info), + &ResultSet::deprecatedCloseFinish); } - Napi::Value closeSync(const Napi::CallbackInfo& info) + Napi::Value deprecatedCloseSync(const Napi::CallbackInfo& info) { try { - auto ret = closeStart(false, info)(); - return closeFinish(info.Env(), ret); + auto ret = deprecatedCloseStart(false, info)(); + return deprecatedCloseFinish(info.Env(), ret); } catch (...) { @@ -3364,6 +3686,52 @@ friend class BaseClass; } } + static MethodStart closeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value closeFinish(const Napi::Env env, void* ret); + + Napi::Value closeAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + closeStart(true, info), + &ResultSet::closeFinish); + } + + Napi::Value closeSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = closeStart(false, info)(); + return closeFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getInfoStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getInfoFinish(const Napi::Env env, void* ret); + + Napi::Value getInfoAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getInfoStart(true, info), + &ResultSet::getInfoFinish); + } + + Napi::Value getInfoSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getInfoStart(false, info)(); + return getInfoFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + }; @@ -3631,22 +3999,22 @@ friend class BaseClass; } } - static MethodStart freeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value freeFinish(const Napi::Env env, void* ret); + static MethodStart deprecatedFreeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value deprecatedFreeFinish(const Napi::Env env, void* ret); - Napi::Value freeAsync(const Napi::CallbackInfo& info) + Napi::Value deprecatedFreeAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - freeStart(true, info), - &Statement::freeFinish); + deprecatedFreeStart(true, info), + &Statement::deprecatedFreeFinish); } - Napi::Value freeSync(const Napi::CallbackInfo& info) + Napi::Value deprecatedFreeSync(const Napi::CallbackInfo& info) { try { - auto ret = freeStart(false, info)(); - return freeFinish(info.Env(), ret); + auto ret = deprecatedFreeStart(false, info)(); + return deprecatedFreeFinish(info.Env(), ret); } catch (...) { @@ -3677,36 +4045,22 @@ friend class BaseClass; } } -}; - - -class Request : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addRefFinish(const Napi::Env env, void* ret); + static MethodStart getTimeoutStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getTimeoutFinish(const Napi::Env env, unsigned ret); - Napi::Value addRefAsync(const Napi::CallbackInfo& info) + Napi::Value getTimeoutAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - addRefStart(true, info), - &Request::addRefFinish); + return PromiseWorker::Run(info.Env(), + getTimeoutStart(true, info), + &Statement::getTimeoutFinish); } - Napi::Value addRefSync(const Napi::CallbackInfo& info) + Napi::Value getTimeoutSync(const Napi::CallbackInfo& info) { try { - auto ret = addRefStart(false, info)(); - return addRefFinish(info.Env(), ret); + auto ret = getTimeoutStart(false, info)(); + return getTimeoutFinish(info.Env(), ret); } catch (...) { @@ -3714,22 +4068,22 @@ friend class BaseClass; } } - static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value releaseFinish(const Napi::Env env, int ret); + static MethodStart setTimeoutStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setTimeoutFinish(const Napi::Env env, void* ret); - Napi::Value releaseAsync(const Napi::CallbackInfo& info) + Napi::Value setTimeoutAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - releaseStart(true, info), - &Request::releaseFinish); + return PromiseWorker::Run(info.Env(), + setTimeoutStart(true, info), + &Statement::setTimeoutFinish); } - Napi::Value releaseSync(const Napi::CallbackInfo& info) + Napi::Value setTimeoutSync(const Napi::CallbackInfo& info) { try { - auto ret = releaseStart(false, info)(); - return releaseFinish(info.Env(), ret); + auto ret = setTimeoutStart(false, info)(); + return setTimeoutFinish(info.Env(), ret); } catch (...) { @@ -3737,22 +4091,22 @@ friend class BaseClass; } } - static MethodStart receiveStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value receiveFinish(const Napi::Env env, void* ret); + static MethodStart createBatchStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value createBatchFinish(const Napi::Env env, fb::IBatch* ret); - Napi::Value receiveAsync(const Napi::CallbackInfo& info) + Napi::Value createBatchAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - receiveStart(true, info), - &Request::receiveFinish); + return PromiseWorker::Run(info.Env(), + createBatchStart(true, info), + &Statement::createBatchFinish); } - Napi::Value receiveSync(const Napi::CallbackInfo& info) + Napi::Value createBatchSync(const Napi::CallbackInfo& info) { try { - auto ret = receiveStart(false, info)(); - return receiveFinish(info.Env(), ret); + auto ret = createBatchStart(false, info)(); + return createBatchFinish(info.Env(), ret); } catch (...) { @@ -3760,22 +4114,22 @@ friend class BaseClass; } } - static MethodStart sendStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value sendFinish(const Napi::Env env, void* ret); + static MethodStart freeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value freeFinish(const Napi::Env env, void* ret); - Napi::Value sendAsync(const Napi::CallbackInfo& info) + Napi::Value freeAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - sendStart(true, info), - &Request::sendFinish); + freeStart(true, info), + &Statement::freeFinish); } - Napi::Value sendSync(const Napi::CallbackInfo& info) + Napi::Value freeSync(const Napi::CallbackInfo& info) { try { - auto ret = sendStart(false, info)(); - return sendFinish(info.Env(), ret); + auto ret = freeStart(false, info)(); + return freeFinish(info.Env(), ret); } catch (...) { @@ -3783,22 +4137,22 @@ friend class BaseClass; } } - static MethodStart getInfoStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getInfoFinish(const Napi::Env env, void* ret); + static MethodStart getMaxInlineBlobSizeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getMaxInlineBlobSizeFinish(const Napi::Env env, unsigned ret); - Napi::Value getInfoAsync(const Napi::CallbackInfo& info) + Napi::Value getMaxInlineBlobSizeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getInfoStart(true, info), - &Request::getInfoFinish); + return PromiseWorker::Run(info.Env(), + getMaxInlineBlobSizeStart(true, info), + &Statement::getMaxInlineBlobSizeFinish); } - Napi::Value getInfoSync(const Napi::CallbackInfo& info) + Napi::Value getMaxInlineBlobSizeSync(const Napi::CallbackInfo& info) { try { - auto ret = getInfoStart(false, info)(); - return getInfoFinish(info.Env(), ret); + auto ret = getMaxInlineBlobSizeStart(false, info)(); + return getMaxInlineBlobSizeFinish(info.Env(), ret); } catch (...) { @@ -3806,22 +4160,22 @@ friend class BaseClass; } } - static MethodStart startStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value startFinish(const Napi::Env env, void* ret); + static MethodStart setMaxInlineBlobSizeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setMaxInlineBlobSizeFinish(const Napi::Env env, void* ret); - Napi::Value startAsync(const Napi::CallbackInfo& info) + Napi::Value setMaxInlineBlobSizeAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - startStart(true, info), - &Request::startFinish); + setMaxInlineBlobSizeStart(true, info), + &Statement::setMaxInlineBlobSizeFinish); } - Napi::Value startSync(const Napi::CallbackInfo& info) + Napi::Value setMaxInlineBlobSizeSync(const Napi::CallbackInfo& info) { try { - auto ret = startStart(false, info)(); - return startFinish(info.Env(), ret); + auto ret = setMaxInlineBlobSizeStart(false, info)(); + return setMaxInlineBlobSizeFinish(info.Env(), ret); } catch (...) { @@ -3829,45 +4183,59 @@ friend class BaseClass; } } - static MethodStart startAndSendStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value startAndSendFinish(const Napi::Env env, void* ret); +}; - Napi::Value startAndSendAsync(const Napi::CallbackInfo& info) + +class Batch : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); + + Napi::Value addRefAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - startAndSendStart(true, info), - &Request::startAndSendFinish); + addRefStart(true, info), + &Batch::addRefFinish); } - Napi::Value startAndSendSync(const Napi::CallbackInfo& info) + Napi::Value addRefSync(const Napi::CallbackInfo& info) { try { - auto ret = startAndSendStart(false, info)(); - return startAndSendFinish(info.Env(), ret); - } + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); + } catch (...) { rethrowException(info.Env()); } } - static MethodStart unwindStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value unwindFinish(const Napi::Env env, void* ret); + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); - Napi::Value unwindAsync(const Napi::CallbackInfo& info) + Napi::Value releaseAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - unwindStart(true, info), - &Request::unwindFinish); + return PromiseWorker::Run(info.Env(), + releaseStart(true, info), + &Batch::releaseFinish); } - Napi::Value unwindSync(const Napi::CallbackInfo& info) + Napi::Value releaseSync(const Napi::CallbackInfo& info) { try { - auto ret = unwindStart(false, info)(); - return unwindFinish(info.Env(), ret); + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); } catch (...) { @@ -3875,22 +4243,22 @@ friend class BaseClass; } } - static MethodStart freeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value freeFinish(const Napi::Env env, void* ret); + static MethodStart addStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addFinish(const Napi::Env env, void* ret); - Napi::Value freeAsync(const Napi::CallbackInfo& info) + Napi::Value addAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - freeStart(true, info), - &Request::freeFinish); + addStart(true, info), + &Batch::addFinish); } - Napi::Value freeSync(const Napi::CallbackInfo& info) + Napi::Value addSync(const Napi::CallbackInfo& info) { try { - auto ret = freeStart(false, info)(); - return freeFinish(info.Env(), ret); + auto ret = addStart(false, info)(); + return addFinish(info.Env(), ret); } catch (...) { @@ -3898,36 +4266,22 @@ friend class BaseClass; } } -}; - - -class Events : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addRefFinish(const Napi::Env env, void* ret); + static MethodStart addBlobStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addBlobFinish(const Napi::Env env, void* ret); - Napi::Value addRefAsync(const Napi::CallbackInfo& info) + Napi::Value addBlobAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - addRefStart(true, info), - &Events::addRefFinish); + addBlobStart(true, info), + &Batch::addBlobFinish); } - Napi::Value addRefSync(const Napi::CallbackInfo& info) + Napi::Value addBlobSync(const Napi::CallbackInfo& info) { try { - auto ret = addRefStart(false, info)(); - return addRefFinish(info.Env(), ret); + auto ret = addBlobStart(false, info)(); + return addBlobFinish(info.Env(), ret); } catch (...) { @@ -3935,22 +4289,22 @@ friend class BaseClass; } } - static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value releaseFinish(const Napi::Env env, int ret); + static MethodStart appendBlobDataStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value appendBlobDataFinish(const Napi::Env env, void* ret); - Napi::Value releaseAsync(const Napi::CallbackInfo& info) + Napi::Value appendBlobDataAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - releaseStart(true, info), - &Events::releaseFinish); + return PromiseWorker::Run(info.Env(), + appendBlobDataStart(true, info), + &Batch::appendBlobDataFinish); } - Napi::Value releaseSync(const Napi::CallbackInfo& info) + Napi::Value appendBlobDataSync(const Napi::CallbackInfo& info) { try { - auto ret = releaseStart(false, info)(); - return releaseFinish(info.Env(), ret); + auto ret = appendBlobDataStart(false, info)(); + return appendBlobDataFinish(info.Env(), ret); } catch (...) { @@ -3958,22 +4312,22 @@ friend class BaseClass; } } - static MethodStart cancelStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value cancelFinish(const Napi::Env env, void* ret); + static MethodStart addBlobStreamStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addBlobStreamFinish(const Napi::Env env, void* ret); - Napi::Value cancelAsync(const Napi::CallbackInfo& info) + Napi::Value addBlobStreamAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - cancelStart(true, info), - &Events::cancelFinish); + addBlobStreamStart(true, info), + &Batch::addBlobStreamFinish); } - Napi::Value cancelSync(const Napi::CallbackInfo& info) + Napi::Value addBlobStreamSync(const Napi::CallbackInfo& info) { try { - auto ret = cancelStart(false, info)(); - return cancelFinish(info.Env(), ret); + auto ret = addBlobStreamStart(false, info)(); + return addBlobStreamFinish(info.Env(), ret); } catch (...) { @@ -3981,36 +4335,22 @@ friend class BaseClass; } } -}; - - -class Attachment : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addRefFinish(const Napi::Env env, void* ret); + static MethodStart registerBlobStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value registerBlobFinish(const Napi::Env env, void* ret); - Napi::Value addRefAsync(const Napi::CallbackInfo& info) + Napi::Value registerBlobAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - addRefStart(true, info), - &Attachment::addRefFinish); + registerBlobStart(true, info), + &Batch::registerBlobFinish); } - Napi::Value addRefSync(const Napi::CallbackInfo& info) + Napi::Value registerBlobSync(const Napi::CallbackInfo& info) { try { - auto ret = addRefStart(false, info)(); - return addRefFinish(info.Env(), ret); + auto ret = registerBlobStart(false, info)(); + return registerBlobFinish(info.Env(), ret); } catch (...) { @@ -4018,22 +4358,22 @@ friend class BaseClass; } } - static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value releaseFinish(const Napi::Env env, int ret); + static MethodStart executeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value executeFinish(const Napi::Env env, fb::IBatchCompletionState* ret); - Napi::Value releaseAsync(const Napi::CallbackInfo& info) + Napi::Value executeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - releaseStart(true, info), - &Attachment::releaseFinish); + return PromiseWorker::Run(info.Env(), + executeStart(true, info), + &Batch::executeFinish); } - Napi::Value releaseSync(const Napi::CallbackInfo& info) + Napi::Value executeSync(const Napi::CallbackInfo& info) { try { - auto ret = releaseStart(false, info)(); - return releaseFinish(info.Env(), ret); + auto ret = executeStart(false, info)(); + return executeFinish(info.Env(), ret); } catch (...) { @@ -4041,22 +4381,22 @@ friend class BaseClass; } } - static MethodStart getInfoStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getInfoFinish(const Napi::Env env, void* ret); + static MethodStart cancelStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value cancelFinish(const Napi::Env env, void* ret); - Napi::Value getInfoAsync(const Napi::CallbackInfo& info) + Napi::Value cancelAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - getInfoStart(true, info), - &Attachment::getInfoFinish); + cancelStart(true, info), + &Batch::cancelFinish); } - Napi::Value getInfoSync(const Napi::CallbackInfo& info) + Napi::Value cancelSync(const Napi::CallbackInfo& info) { try { - auto ret = getInfoStart(false, info)(); - return getInfoFinish(info.Env(), ret); + auto ret = cancelStart(false, info)(); + return cancelFinish(info.Env(), ret); } catch (...) { @@ -4064,22 +4404,22 @@ friend class BaseClass; } } - static MethodStart startTransactionStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value startTransactionFinish(const Napi::Env env, fb::ITransaction* ret); + static MethodStart getBlobAlignmentStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getBlobAlignmentFinish(const Napi::Env env, unsigned ret); - Napi::Value startTransactionAsync(const Napi::CallbackInfo& info) + Napi::Value getBlobAlignmentAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - startTransactionStart(true, info), - &Attachment::startTransactionFinish); + return PromiseWorker::Run(info.Env(), + getBlobAlignmentStart(true, info), + &Batch::getBlobAlignmentFinish); } - Napi::Value startTransactionSync(const Napi::CallbackInfo& info) + Napi::Value getBlobAlignmentSync(const Napi::CallbackInfo& info) { try { - auto ret = startTransactionStart(false, info)(); - return startTransactionFinish(info.Env(), ret); + auto ret = getBlobAlignmentStart(false, info)(); + return getBlobAlignmentFinish(info.Env(), ret); } catch (...) { @@ -4087,22 +4427,22 @@ friend class BaseClass; } } - static MethodStart reconnectTransactionStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value reconnectTransactionFinish(const Napi::Env env, fb::ITransaction* ret); + static MethodStart getMetadataStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret); - Napi::Value reconnectTransactionAsync(const Napi::CallbackInfo& info) + Napi::Value getMetadataAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - reconnectTransactionStart(true, info), - &Attachment::reconnectTransactionFinish); + return PromiseWorker::Run(info.Env(), + getMetadataStart(true, info), + &Batch::getMetadataFinish); } - Napi::Value reconnectTransactionSync(const Napi::CallbackInfo& info) + Napi::Value getMetadataSync(const Napi::CallbackInfo& info) { try { - auto ret = reconnectTransactionStart(false, info)(); - return reconnectTransactionFinish(info.Env(), ret); + auto ret = getMetadataStart(false, info)(); + return getMetadataFinish(info.Env(), ret); } catch (...) { @@ -4110,22 +4450,22 @@ friend class BaseClass; } } - static MethodStart compileRequestStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value compileRequestFinish(const Napi::Env env, fb::IRequest* ret); + static MethodStart setDefaultBpbStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setDefaultBpbFinish(const Napi::Env env, void* ret); - Napi::Value compileRequestAsync(const Napi::CallbackInfo& info) + Napi::Value setDefaultBpbAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - compileRequestStart(true, info), - &Attachment::compileRequestFinish); + return PromiseWorker::Run(info.Env(), + setDefaultBpbStart(true, info), + &Batch::setDefaultBpbFinish); } - Napi::Value compileRequestSync(const Napi::CallbackInfo& info) + Napi::Value setDefaultBpbSync(const Napi::CallbackInfo& info) { try { - auto ret = compileRequestStart(false, info)(); - return compileRequestFinish(info.Env(), ret); + auto ret = setDefaultBpbStart(false, info)(); + return setDefaultBpbFinish(info.Env(), ret); } catch (...) { @@ -4133,22 +4473,22 @@ friend class BaseClass; } } - static MethodStart transactRequestStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value transactRequestFinish(const Napi::Env env, void* ret); + static MethodStart deprecatedCloseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value deprecatedCloseFinish(const Napi::Env env, void* ret); - Napi::Value transactRequestAsync(const Napi::CallbackInfo& info) + Napi::Value deprecatedCloseAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - transactRequestStart(true, info), - &Attachment::transactRequestFinish); + deprecatedCloseStart(true, info), + &Batch::deprecatedCloseFinish); } - Napi::Value transactRequestSync(const Napi::CallbackInfo& info) + Napi::Value deprecatedCloseSync(const Napi::CallbackInfo& info) { try { - auto ret = transactRequestStart(false, info)(); - return transactRequestFinish(info.Env(), ret); + auto ret = deprecatedCloseStart(false, info)(); + return deprecatedCloseFinish(info.Env(), ret); } catch (...) { @@ -4156,22 +4496,22 @@ friend class BaseClass; } } - static MethodStart createBlobStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value createBlobFinish(const Napi::Env env, fb::IBlob* ret); + static MethodStart closeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value closeFinish(const Napi::Env env, void* ret); - Napi::Value createBlobAsync(const Napi::CallbackInfo& info) + Napi::Value closeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - createBlobStart(true, info), - &Attachment::createBlobFinish); + return PromiseWorker::Run(info.Env(), + closeStart(true, info), + &Batch::closeFinish); } - Napi::Value createBlobSync(const Napi::CallbackInfo& info) + Napi::Value closeSync(const Napi::CallbackInfo& info) { try { - auto ret = createBlobStart(false, info)(); - return createBlobFinish(info.Env(), ret); + auto ret = closeStart(false, info)(); + return closeFinish(info.Env(), ret); } catch (...) { @@ -4179,22 +4519,22 @@ friend class BaseClass; } } - static MethodStart openBlobStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value openBlobFinish(const Napi::Env env, fb::IBlob* ret); + static MethodStart getInfoStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getInfoFinish(const Napi::Env env, void* ret); - Napi::Value openBlobAsync(const Napi::CallbackInfo& info) + Napi::Value getInfoAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - openBlobStart(true, info), - &Attachment::openBlobFinish); + return PromiseWorker::Run(info.Env(), + getInfoStart(true, info), + &Batch::getInfoFinish); } - Napi::Value openBlobSync(const Napi::CallbackInfo& info) + Napi::Value getInfoSync(const Napi::CallbackInfo& info) { try { - auto ret = openBlobStart(false, info)(); - return openBlobFinish(info.Env(), ret); + auto ret = getInfoStart(false, info)(); + return getInfoFinish(info.Env(), ret); } catch (...) { @@ -4202,22 +4542,36 @@ friend class BaseClass; } } - static MethodStart executeDynStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value executeDynFinish(const Napi::Env env, void* ret); +}; - Napi::Value executeDynAsync(const Napi::CallbackInfo& info) + +class BatchCompletionState : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value disposeFinish(const Napi::Env env, void* ret); + + Napi::Value disposeAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - executeDynStart(true, info), - &Attachment::executeDynFinish); + disposeStart(true, info), + &BatchCompletionState::disposeFinish); } - Napi::Value executeDynSync(const Napi::CallbackInfo& info) + Napi::Value disposeSync(const Napi::CallbackInfo& info) { try { - auto ret = executeDynStart(false, info)(); - return executeDynFinish(info.Env(), ret); + auto ret = disposeStart(false, info)(); + return disposeFinish(info.Env(), ret); } catch (...) { @@ -4225,22 +4579,22 @@ friend class BaseClass; } } - static MethodStart prepareStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value prepareFinish(const Napi::Env env, fb::IStatement* ret); + static MethodStart getSizeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getSizeFinish(const Napi::Env env, unsigned ret); - Napi::Value prepareAsync(const Napi::CallbackInfo& info) + Napi::Value getSizeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - prepareStart(true, info), - &Attachment::prepareFinish); + return PromiseWorker::Run(info.Env(), + getSizeStart(true, info), + &BatchCompletionState::getSizeFinish); } - Napi::Value prepareSync(const Napi::CallbackInfo& info) + Napi::Value getSizeSync(const Napi::CallbackInfo& info) { try { - auto ret = prepareStart(false, info)(); - return prepareFinish(info.Env(), ret); + auto ret = getSizeStart(false, info)(); + return getSizeFinish(info.Env(), ret); } catch (...) { @@ -4248,22 +4602,22 @@ friend class BaseClass; } } - static MethodStart executeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value executeFinish(const Napi::Env env, fb::ITransaction* ret); + static MethodStart getStateStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getStateFinish(const Napi::Env env, int ret); - Napi::Value executeAsync(const Napi::CallbackInfo& info) + Napi::Value getStateAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - executeStart(true, info), - &Attachment::executeFinish); + return PromiseWorker::Run(info.Env(), + getStateStart(true, info), + &BatchCompletionState::getStateFinish); } - Napi::Value executeSync(const Napi::CallbackInfo& info) + Napi::Value getStateSync(const Napi::CallbackInfo& info) { try { - auto ret = executeStart(false, info)(); - return executeFinish(info.Env(), ret); + auto ret = getStateStart(false, info)(); + return getStateFinish(info.Env(), ret); } catch (...) { @@ -4271,22 +4625,22 @@ friend class BaseClass; } } - static MethodStart openCursorStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value openCursorFinish(const Napi::Env env, fb::IResultSet* ret); + static MethodStart findErrorStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value findErrorFinish(const Napi::Env env, unsigned ret); - Napi::Value openCursorAsync(const Napi::CallbackInfo& info) + Napi::Value findErrorAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - openCursorStart(true, info), - &Attachment::openCursorFinish); + return PromiseWorker::Run(info.Env(), + findErrorStart(true, info), + &BatchCompletionState::findErrorFinish); } - Napi::Value openCursorSync(const Napi::CallbackInfo& info) + Napi::Value findErrorSync(const Napi::CallbackInfo& info) { try { - auto ret = openCursorStart(false, info)(); - return openCursorFinish(info.Env(), ret); + auto ret = findErrorStart(false, info)(); + return findErrorFinish(info.Env(), ret); } catch (...) { @@ -4294,22 +4648,22 @@ friend class BaseClass; } } - static MethodStart queEventsStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value queEventsFinish(const Napi::Env env, fb::IEvents* ret); + static MethodStart getStatusStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getStatusFinish(const Napi::Env env, void* ret); - Napi::Value queEventsAsync(const Napi::CallbackInfo& info) + Napi::Value getStatusAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - queEventsStart(true, info), - &Attachment::queEventsFinish); + return PromiseWorker::Run(info.Env(), + getStatusStart(true, info), + &BatchCompletionState::getStatusFinish); } - Napi::Value queEventsSync(const Napi::CallbackInfo& info) + Napi::Value getStatusSync(const Napi::CallbackInfo& info) { try { - auto ret = queEventsStart(false, info)(); - return queEventsFinish(info.Env(), ret); + auto ret = getStatusStart(false, info)(); + return getStatusFinish(info.Env(), ret); } catch (...) { @@ -4317,22 +4671,36 @@ friend class BaseClass; } } - static MethodStart cancelOperationStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value cancelOperationFinish(const Napi::Env env, void* ret); +}; - Napi::Value cancelOperationAsync(const Napi::CallbackInfo& info) + +class Replicator : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); + + Napi::Value addRefAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - cancelOperationStart(true, info), - &Attachment::cancelOperationFinish); + addRefStart(true, info), + &Replicator::addRefFinish); } - Napi::Value cancelOperationSync(const Napi::CallbackInfo& info) + Napi::Value addRefSync(const Napi::CallbackInfo& info) { try { - auto ret = cancelOperationStart(false, info)(); - return cancelOperationFinish(info.Env(), ret); + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); } catch (...) { @@ -4340,22 +4708,45 @@ friend class BaseClass; } } - static MethodStart pingStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value pingFinish(const Napi::Env env, void* ret); + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); - Napi::Value pingAsync(const Napi::CallbackInfo& info) + Napi::Value releaseAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + releaseStart(true, info), + &Replicator::releaseFinish); + } + + Napi::Value releaseSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart processStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value processFinish(const Napi::Env env, void* ret); + + Napi::Value processAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - pingStart(true, info), - &Attachment::pingFinish); + processStart(true, info), + &Replicator::processFinish); } - Napi::Value pingSync(const Napi::CallbackInfo& info) + Napi::Value processSync(const Napi::CallbackInfo& info) { try { - auto ret = pingStart(false, info)(); - return pingFinish(info.Env(), ret); + auto ret = processStart(false, info)(); + return processFinish(info.Env(), ret); } catch (...) { @@ -4363,22 +4754,22 @@ friend class BaseClass; } } - static MethodStart detachStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value detachFinish(const Napi::Env env, void* ret); + static MethodStart deprecatedCloseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value deprecatedCloseFinish(const Napi::Env env, void* ret); - Napi::Value detachAsync(const Napi::CallbackInfo& info) + Napi::Value deprecatedCloseAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - detachStart(true, info), - &Attachment::detachFinish); + deprecatedCloseStart(true, info), + &Replicator::deprecatedCloseFinish); } - Napi::Value detachSync(const Napi::CallbackInfo& info) + Napi::Value deprecatedCloseSync(const Napi::CallbackInfo& info) { try { - auto ret = detachStart(false, info)(); - return detachFinish(info.Env(), ret); + auto ret = deprecatedCloseStart(false, info)(); + return deprecatedCloseFinish(info.Env(), ret); } catch (...) { @@ -4386,22 +4777,22 @@ friend class BaseClass; } } - static MethodStart dropDatabaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value dropDatabaseFinish(const Napi::Env env, void* ret); + static MethodStart closeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value closeFinish(const Napi::Env env, void* ret); - Napi::Value dropDatabaseAsync(const Napi::CallbackInfo& info) + Napi::Value closeAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - dropDatabaseStart(true, info), - &Attachment::dropDatabaseFinish); + closeStart(true, info), + &Replicator::closeFinish); } - Napi::Value dropDatabaseSync(const Napi::CallbackInfo& info) + Napi::Value closeSync(const Napi::CallbackInfo& info) { try { - auto ret = dropDatabaseStart(false, info)(); - return dropDatabaseFinish(info.Env(), ret); + auto ret = closeStart(false, info)(); + return closeFinish(info.Env(), ret); } catch (...) { @@ -4412,15 +4803,15 @@ friend class BaseClass; }; -class Service : public BaseClass +class Request : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); @@ -4430,7 +4821,7 @@ friend class BaseClass; { return PromiseWorker::Run(info.Env(), addRefStart(true, info), - &Service::addRefFinish); + &Request::addRefFinish); } Napi::Value addRefSync(const Napi::CallbackInfo& info) @@ -4453,7 +4844,7 @@ friend class BaseClass; { return PromiseWorker::Run(info.Env(), releaseStart(true, info), - &Service::releaseFinish); + &Request::releaseFinish); } Napi::Value releaseSync(const Napi::CallbackInfo& info) @@ -4469,22 +4860,22 @@ friend class BaseClass; } } - static MethodStart detachStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value detachFinish(const Napi::Env env, void* ret); + static MethodStart receiveStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value receiveFinish(const Napi::Env env, void* ret); - Napi::Value detachAsync(const Napi::CallbackInfo& info) + Napi::Value receiveAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - detachStart(true, info), - &Service::detachFinish); + receiveStart(true, info), + &Request::receiveFinish); } - Napi::Value detachSync(const Napi::CallbackInfo& info) + Napi::Value receiveSync(const Napi::CallbackInfo& info) { try { - auto ret = detachStart(false, info)(); - return detachFinish(info.Env(), ret); + auto ret = receiveStart(false, info)(); + return receiveFinish(info.Env(), ret); } catch (...) { @@ -4492,22 +4883,22 @@ friend class BaseClass; } } - static MethodStart queryStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value queryFinish(const Napi::Env env, void* ret); + static MethodStart sendStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value sendFinish(const Napi::Env env, void* ret); - Napi::Value queryAsync(const Napi::CallbackInfo& info) + Napi::Value sendAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - queryStart(true, info), - &Service::queryFinish); + sendStart(true, info), + &Request::sendFinish); } - Napi::Value querySync(const Napi::CallbackInfo& info) + Napi::Value sendSync(const Napi::CallbackInfo& info) { try { - auto ret = queryStart(false, info)(); - return queryFinish(info.Env(), ret); + auto ret = sendStart(false, info)(); + return sendFinish(info.Env(), ret); } catch (...) { @@ -4515,22 +4906,22 @@ friend class BaseClass; } } - static MethodStart startStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value startFinish(const Napi::Env env, void* ret); + static MethodStart getInfoStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getInfoFinish(const Napi::Env env, void* ret); - Napi::Value startAsync(const Napi::CallbackInfo& info) + Napi::Value getInfoAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - startStart(true, info), - &Service::startFinish); + getInfoStart(true, info), + &Request::getInfoFinish); } - Napi::Value startSync(const Napi::CallbackInfo& info) + Napi::Value getInfoSync(const Napi::CallbackInfo& info) { try { - auto ret = startStart(false, info)(); - return startFinish(info.Env(), ret); + auto ret = getInfoStart(false, info)(); + return getInfoFinish(info.Env(), ret); } catch (...) { @@ -4538,36 +4929,22 @@ friend class BaseClass; } } -}; - - -class Provider : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addRefFinish(const Napi::Env env, void* ret); + static MethodStart startStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value startFinish(const Napi::Env env, void* ret); - Napi::Value addRefAsync(const Napi::CallbackInfo& info) + Napi::Value startAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - addRefStart(true, info), - &Provider::addRefFinish); + startStart(true, info), + &Request::startFinish); } - Napi::Value addRefSync(const Napi::CallbackInfo& info) + Napi::Value startSync(const Napi::CallbackInfo& info) { try { - auto ret = addRefStart(false, info)(); - return addRefFinish(info.Env(), ret); + auto ret = startStart(false, info)(); + return startFinish(info.Env(), ret); } catch (...) { @@ -4575,22 +4952,22 @@ friend class BaseClass; } } - static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value releaseFinish(const Napi::Env env, int ret); + static MethodStart startAndSendStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value startAndSendFinish(const Napi::Env env, void* ret); - Napi::Value releaseAsync(const Napi::CallbackInfo& info) + Napi::Value startAndSendAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - releaseStart(true, info), - &Provider::releaseFinish); + return PromiseWorker::Run(info.Env(), + startAndSendStart(true, info), + &Request::startAndSendFinish); } - Napi::Value releaseSync(const Napi::CallbackInfo& info) + Napi::Value startAndSendSync(const Napi::CallbackInfo& info) { try { - auto ret = releaseStart(false, info)(); - return releaseFinish(info.Env(), ret); + auto ret = startAndSendStart(false, info)(); + return startAndSendFinish(info.Env(), ret); } catch (...) { @@ -4598,22 +4975,22 @@ friend class BaseClass; } } - static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); + static MethodStart unwindStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value unwindFinish(const Napi::Env env, void* ret); - Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) + Napi::Value unwindAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - setOwnerStart(true, info), - &Provider::setOwnerFinish); + unwindStart(true, info), + &Request::unwindFinish); } - Napi::Value setOwnerSync(const Napi::CallbackInfo& info) + Napi::Value unwindSync(const Napi::CallbackInfo& info) { try { - auto ret = setOwnerStart(false, info)(); - return setOwnerFinish(info.Env(), ret); + auto ret = unwindStart(false, info)(); + return unwindFinish(info.Env(), ret); } catch (...) { @@ -4621,22 +4998,22 @@ friend class BaseClass; } } - static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); + static MethodStart deprecatedFreeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value deprecatedFreeFinish(const Napi::Env env, void* ret); - Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) + Napi::Value deprecatedFreeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getOwnerStart(true, info), - &Provider::getOwnerFinish); + return PromiseWorker::Run(info.Env(), + deprecatedFreeStart(true, info), + &Request::deprecatedFreeFinish); } - Napi::Value getOwnerSync(const Napi::CallbackInfo& info) + Napi::Value deprecatedFreeSync(const Napi::CallbackInfo& info) { try { - auto ret = getOwnerStart(false, info)(); - return getOwnerFinish(info.Env(), ret); + auto ret = deprecatedFreeStart(false, info)(); + return deprecatedFreeFinish(info.Env(), ret); } catch (...) { @@ -4644,22 +5021,22 @@ friend class BaseClass; } } - static MethodStart attachDatabaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value attachDatabaseFinish(const Napi::Env env, fb::IAttachment* ret); + static MethodStart freeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value freeFinish(const Napi::Env env, void* ret); - Napi::Value attachDatabaseAsync(const Napi::CallbackInfo& info) + Napi::Value freeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - attachDatabaseStart(true, info), - &Provider::attachDatabaseFinish); + return PromiseWorker::Run(info.Env(), + freeStart(true, info), + &Request::freeFinish); } - Napi::Value attachDatabaseSync(const Napi::CallbackInfo& info) + Napi::Value freeSync(const Napi::CallbackInfo& info) { try { - auto ret = attachDatabaseStart(false, info)(); - return attachDatabaseFinish(info.Env(), ret); + auto ret = freeStart(false, info)(); + return freeFinish(info.Env(), ret); } catch (...) { @@ -4667,22 +5044,36 @@ friend class BaseClass; } } - static MethodStart createDatabaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value createDatabaseFinish(const Napi::Env env, fb::IAttachment* ret); +}; - Napi::Value createDatabaseAsync(const Napi::CallbackInfo& info) + +class Events : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); + + Napi::Value addRefAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - createDatabaseStart(true, info), - &Provider::createDatabaseFinish); + return PromiseWorker::Run(info.Env(), + addRefStart(true, info), + &Events::addRefFinish); } - Napi::Value createDatabaseSync(const Napi::CallbackInfo& info) + Napi::Value addRefSync(const Napi::CallbackInfo& info) { try { - auto ret = createDatabaseStart(false, info)(); - return createDatabaseFinish(info.Env(), ret); + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); } catch (...) { @@ -4690,22 +5081,22 @@ friend class BaseClass; } } - static MethodStart attachServiceManagerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value attachServiceManagerFinish(const Napi::Env env, fb::IService* ret); + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); - Napi::Value attachServiceManagerAsync(const Napi::CallbackInfo& info) + Napi::Value releaseAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - attachServiceManagerStart(true, info), - &Provider::attachServiceManagerFinish); + return PromiseWorker::Run(info.Env(), + releaseStart(true, info), + &Events::releaseFinish); } - Napi::Value attachServiceManagerSync(const Napi::CallbackInfo& info) + Napi::Value releaseSync(const Napi::CallbackInfo& info) { try { - auto ret = attachServiceManagerStart(false, info)(); - return attachServiceManagerFinish(info.Env(), ret); + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); } catch (...) { @@ -4713,22 +5104,22 @@ friend class BaseClass; } } - static MethodStart shutdownStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value shutdownFinish(const Napi::Env env, void* ret); + static MethodStart deprecatedCancelStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value deprecatedCancelFinish(const Napi::Env env, void* ret); - Napi::Value shutdownAsync(const Napi::CallbackInfo& info) + Napi::Value deprecatedCancelAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - shutdownStart(true, info), - &Provider::shutdownFinish); + deprecatedCancelStart(true, info), + &Events::deprecatedCancelFinish); } - Napi::Value shutdownSync(const Napi::CallbackInfo& info) + Napi::Value deprecatedCancelSync(const Napi::CallbackInfo& info) { try { - auto ret = shutdownStart(false, info)(); - return shutdownFinish(info.Env(), ret); + auto ret = deprecatedCancelStart(false, info)(); + return deprecatedCancelFinish(info.Env(), ret); } catch (...) { @@ -4736,22 +5127,22 @@ friend class BaseClass; } } - static MethodStart setDbCryptCallbackStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setDbCryptCallbackFinish(const Napi::Env env, void* ret); + static MethodStart cancelStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value cancelFinish(const Napi::Env env, void* ret); - Napi::Value setDbCryptCallbackAsync(const Napi::CallbackInfo& info) + Napi::Value cancelAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - setDbCryptCallbackStart(true, info), - &Provider::setDbCryptCallbackFinish); + cancelStart(true, info), + &Events::cancelFinish); } - Napi::Value setDbCryptCallbackSync(const Napi::CallbackInfo& info) + Napi::Value cancelSync(const Napi::CallbackInfo& info) { try { - auto ret = setDbCryptCallbackStart(false, info)(); - return setDbCryptCallbackFinish(info.Env(), ret); + auto ret = cancelStart(false, info)(); + return cancelFinish(info.Env(), ret); } catch (...) { @@ -4762,33 +5153,33 @@ friend class BaseClass; }; -class DtcStart : public BaseClass +class Attachment : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: - static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value disposeFinish(const Napi::Env env, void* ret); + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); - Napi::Value disposeAsync(const Napi::CallbackInfo& info) + Napi::Value addRefAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - disposeStart(true, info), - &DtcStart::disposeFinish); + addRefStart(true, info), + &Attachment::addRefFinish); } - Napi::Value disposeSync(const Napi::CallbackInfo& info) + Napi::Value addRefSync(const Napi::CallbackInfo& info) { try { - auto ret = disposeStart(false, info)(); - return disposeFinish(info.Env(), ret); + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); } catch (...) { @@ -4796,22 +5187,22 @@ friend class BaseClass; } } - static MethodStart addAttachmentStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addAttachmentFinish(const Napi::Env env, void* ret); + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); - Napi::Value addAttachmentAsync(const Napi::CallbackInfo& info) + Napi::Value releaseAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - addAttachmentStart(true, info), - &DtcStart::addAttachmentFinish); + return PromiseWorker::Run(info.Env(), + releaseStart(true, info), + &Attachment::releaseFinish); } - Napi::Value addAttachmentSync(const Napi::CallbackInfo& info) + Napi::Value releaseSync(const Napi::CallbackInfo& info) { try { - auto ret = addAttachmentStart(false, info)(); - return addAttachmentFinish(info.Env(), ret); + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); } catch (...) { @@ -4819,22 +5210,22 @@ friend class BaseClass; } } - static MethodStart addWithTpbStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addWithTpbFinish(const Napi::Env env, void* ret); + static MethodStart getInfoStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getInfoFinish(const Napi::Env env, void* ret); - Napi::Value addWithTpbAsync(const Napi::CallbackInfo& info) + Napi::Value getInfoAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - addWithTpbStart(true, info), - &DtcStart::addWithTpbFinish); + getInfoStart(true, info), + &Attachment::getInfoFinish); } - Napi::Value addWithTpbSync(const Napi::CallbackInfo& info) + Napi::Value getInfoSync(const Napi::CallbackInfo& info) { try { - auto ret = addWithTpbStart(false, info)(); - return addWithTpbFinish(info.Env(), ret); + auto ret = getInfoStart(false, info)(); + return getInfoFinish(info.Env(), ret); } catch (...) { @@ -4842,22 +5233,22 @@ friend class BaseClass; } } - static MethodStart startStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value startFinish(const Napi::Env env, fb::ITransaction* ret); + static MethodStart startTransactionStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value startTransactionFinish(const Napi::Env env, fb::ITransaction* ret); - Napi::Value startAsync(const Napi::CallbackInfo& info) + Napi::Value startTransactionAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - startStart(true, info), - &DtcStart::startFinish); + startTransactionStart(true, info), + &Attachment::startTransactionFinish); } - Napi::Value startSync(const Napi::CallbackInfo& info) + Napi::Value startTransactionSync(const Napi::CallbackInfo& info) { try { - auto ret = startStart(false, info)(); - return startFinish(info.Env(), ret); + auto ret = startTransactionStart(false, info)(); + return startTransactionFinish(info.Env(), ret); } catch (...) { @@ -4865,36 +5256,22 @@ friend class BaseClass; } } -}; - - -class Dtc : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart joinStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value joinFinish(const Napi::Env env, fb::ITransaction* ret); + static MethodStart reconnectTransactionStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value reconnectTransactionFinish(const Napi::Env env, fb::ITransaction* ret); - Napi::Value joinAsync(const Napi::CallbackInfo& info) + Napi::Value reconnectTransactionAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - joinStart(true, info), - &Dtc::joinFinish); + reconnectTransactionStart(true, info), + &Attachment::reconnectTransactionFinish); } - Napi::Value joinSync(const Napi::CallbackInfo& info) + Napi::Value reconnectTransactionSync(const Napi::CallbackInfo& info) { try { - auto ret = joinStart(false, info)(); - return joinFinish(info.Env(), ret); + auto ret = reconnectTransactionStart(false, info)(); + return reconnectTransactionFinish(info.Env(), ret); } catch (...) { @@ -4902,22 +5279,22 @@ friend class BaseClass; } } - static MethodStart startBuilderStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value startBuilderFinish(const Napi::Env env, fb::IDtcStart* ret); + static MethodStart compileRequestStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value compileRequestFinish(const Napi::Env env, fb::IRequest* ret); - Napi::Value startBuilderAsync(const Napi::CallbackInfo& info) + Napi::Value compileRequestAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - startBuilderStart(true, info), - &Dtc::startBuilderFinish); + return PromiseWorker::Run(info.Env(), + compileRequestStart(true, info), + &Attachment::compileRequestFinish); } - Napi::Value startBuilderSync(const Napi::CallbackInfo& info) + Napi::Value compileRequestSync(const Napi::CallbackInfo& info) { try { - auto ret = startBuilderStart(false, info)(); - return startBuilderFinish(info.Env(), ret); + auto ret = compileRequestStart(false, info)(); + return compileRequestFinish(info.Env(), ret); } catch (...) { @@ -4925,36 +5302,22 @@ friend class BaseClass; } } -}; - - -class Auth : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addRefFinish(const Napi::Env env, void* ret); + static MethodStart transactRequestStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value transactRequestFinish(const Napi::Env env, void* ret); - Napi::Value addRefAsync(const Napi::CallbackInfo& info) + Napi::Value transactRequestAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - addRefStart(true, info), - &Auth::addRefFinish); + transactRequestStart(true, info), + &Attachment::transactRequestFinish); } - Napi::Value addRefSync(const Napi::CallbackInfo& info) + Napi::Value transactRequestSync(const Napi::CallbackInfo& info) { try { - auto ret = addRefStart(false, info)(); - return addRefFinish(info.Env(), ret); + auto ret = transactRequestStart(false, info)(); + return transactRequestFinish(info.Env(), ret); } catch (...) { @@ -4962,22 +5325,22 @@ friend class BaseClass; } } - static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value releaseFinish(const Napi::Env env, int ret); + static MethodStart createBlobStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value createBlobFinish(const Napi::Env env, fb::IBlob* ret); - Napi::Value releaseAsync(const Napi::CallbackInfo& info) + Napi::Value createBlobAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - releaseStart(true, info), - &Auth::releaseFinish); + return PromiseWorker::Run(info.Env(), + createBlobStart(true, info), + &Attachment::createBlobFinish); } - Napi::Value releaseSync(const Napi::CallbackInfo& info) + Napi::Value createBlobSync(const Napi::CallbackInfo& info) { try { - auto ret = releaseStart(false, info)(); - return releaseFinish(info.Env(), ret); + auto ret = createBlobStart(false, info)(); + return createBlobFinish(info.Env(), ret); } catch (...) { @@ -4985,22 +5348,22 @@ friend class BaseClass; } } - static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); + static MethodStart openBlobStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value openBlobFinish(const Napi::Env env, fb::IBlob* ret); - Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) + Napi::Value openBlobAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - setOwnerStart(true, info), - &Auth::setOwnerFinish); + return PromiseWorker::Run(info.Env(), + openBlobStart(true, info), + &Attachment::openBlobFinish); } - Napi::Value setOwnerSync(const Napi::CallbackInfo& info) + Napi::Value openBlobSync(const Napi::CallbackInfo& info) { try { - auto ret = setOwnerStart(false, info)(); - return setOwnerFinish(info.Env(), ret); + auto ret = openBlobStart(false, info)(); + return openBlobFinish(info.Env(), ret); } catch (...) { @@ -5008,22 +5371,22 @@ friend class BaseClass; } } - static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); + static MethodStart executeDynStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value executeDynFinish(const Napi::Env env, void* ret); - Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) + Napi::Value executeDynAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getOwnerStart(true, info), - &Auth::getOwnerFinish); + return PromiseWorker::Run(info.Env(), + executeDynStart(true, info), + &Attachment::executeDynFinish); } - Napi::Value getOwnerSync(const Napi::CallbackInfo& info) + Napi::Value executeDynSync(const Napi::CallbackInfo& info) { try { - auto ret = getOwnerStart(false, info)(); - return getOwnerFinish(info.Env(), ret); + auto ret = executeDynStart(false, info)(); + return executeDynFinish(info.Env(), ret); } catch (...) { @@ -5031,36 +5394,22 @@ friend class BaseClass; } } -}; - - -class Writer : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart resetStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value resetFinish(const Napi::Env env, void* ret); + static MethodStart prepareStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value prepareFinish(const Napi::Env env, fb::IStatement* ret); - Napi::Value resetAsync(const Napi::CallbackInfo& info) + Napi::Value prepareAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - resetStart(true, info), - &Writer::resetFinish); + return PromiseWorker::Run(info.Env(), + prepareStart(true, info), + &Attachment::prepareFinish); } - Napi::Value resetSync(const Napi::CallbackInfo& info) + Napi::Value prepareSync(const Napi::CallbackInfo& info) { try { - auto ret = resetStart(false, info)(); - return resetFinish(info.Env(), ret); + auto ret = prepareStart(false, info)(); + return prepareFinish(info.Env(), ret); } catch (...) { @@ -5068,22 +5417,22 @@ friend class BaseClass; } } - static MethodStart addStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addFinish(const Napi::Env env, void* ret); + static MethodStart executeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value executeFinish(const Napi::Env env, fb::ITransaction* ret); - Napi::Value addAsync(const Napi::CallbackInfo& info) + Napi::Value executeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - addStart(true, info), - &Writer::addFinish); + return PromiseWorker::Run(info.Env(), + executeStart(true, info), + &Attachment::executeFinish); } - Napi::Value addSync(const Napi::CallbackInfo& info) + Napi::Value executeSync(const Napi::CallbackInfo& info) { try { - auto ret = addStart(false, info)(); - return addFinish(info.Env(), ret); + auto ret = executeStart(false, info)(); + return executeFinish(info.Env(), ret); } catch (...) { @@ -5091,22 +5440,22 @@ friend class BaseClass; } } - static MethodStart setTypeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setTypeFinish(const Napi::Env env, void* ret); + static MethodStart openCursorStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value openCursorFinish(const Napi::Env env, fb::IResultSet* ret); - Napi::Value setTypeAsync(const Napi::CallbackInfo& info) + Napi::Value openCursorAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - setTypeStart(true, info), - &Writer::setTypeFinish); + return PromiseWorker::Run(info.Env(), + openCursorStart(true, info), + &Attachment::openCursorFinish); } - Napi::Value setTypeSync(const Napi::CallbackInfo& info) + Napi::Value openCursorSync(const Napi::CallbackInfo& info) { try { - auto ret = setTypeStart(false, info)(); - return setTypeFinish(info.Env(), ret); + auto ret = openCursorStart(false, info)(); + return openCursorFinish(info.Env(), ret); } catch (...) { @@ -5114,22 +5463,22 @@ friend class BaseClass; } } - static MethodStart setDbStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setDbFinish(const Napi::Env env, void* ret); + static MethodStart queEventsStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value queEventsFinish(const Napi::Env env, fb::IEvents* ret); - Napi::Value setDbAsync(const Napi::CallbackInfo& info) + Napi::Value queEventsAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - setDbStart(true, info), - &Writer::setDbFinish); + return PromiseWorker::Run(info.Env(), + queEventsStart(true, info), + &Attachment::queEventsFinish); } - Napi::Value setDbSync(const Napi::CallbackInfo& info) + Napi::Value queEventsSync(const Napi::CallbackInfo& info) { try { - auto ret = setDbStart(false, info)(); - return setDbFinish(info.Env(), ret); + auto ret = queEventsStart(false, info)(); + return queEventsFinish(info.Env(), ret); } catch (...) { @@ -5137,36 +5486,22 @@ friend class BaseClass; } } -}; - - -class ServerBlock : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart getLoginStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getLoginFinish(const Napi::Env env, OptString ret); + static MethodStart cancelOperationStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value cancelOperationFinish(const Napi::Env env, void* ret); - Napi::Value getLoginAsync(const Napi::CallbackInfo& info) + Napi::Value cancelOperationAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getLoginStart(true, info), - &ServerBlock::getLoginFinish); + return PromiseWorker::Run(info.Env(), + cancelOperationStart(true, info), + &Attachment::cancelOperationFinish); } - Napi::Value getLoginSync(const Napi::CallbackInfo& info) + Napi::Value cancelOperationSync(const Napi::CallbackInfo& info) { try { - auto ret = getLoginStart(false, info)(); - return getLoginFinish(info.Env(), ret); + auto ret = cancelOperationStart(false, info)(); + return cancelOperationFinish(info.Env(), ret); } catch (...) { @@ -5174,22 +5509,22 @@ friend class BaseClass; } } - static MethodStart getDataStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getDataFinish(const Napi::Env env, const unsigned char* ret); + static MethodStart pingStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value pingFinish(const Napi::Env env, void* ret); - Napi::Value getDataAsync(const Napi::CallbackInfo& info) + Napi::Value pingAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getDataStart(true, info), - &ServerBlock::getDataFinish); + return PromiseWorker::Run(info.Env(), + pingStart(true, info), + &Attachment::pingFinish); } - Napi::Value getDataSync(const Napi::CallbackInfo& info) + Napi::Value pingSync(const Napi::CallbackInfo& info) { try { - auto ret = getDataStart(false, info)(); - return getDataFinish(info.Env(), ret); + auto ret = pingStart(false, info)(); + return pingFinish(info.Env(), ret); } catch (...) { @@ -5197,22 +5532,22 @@ friend class BaseClass; } } - static MethodStart putDataStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value putDataFinish(const Napi::Env env, void* ret); + static MethodStart deprecatedDetachStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value deprecatedDetachFinish(const Napi::Env env, void* ret); - Napi::Value putDataAsync(const Napi::CallbackInfo& info) + Napi::Value deprecatedDetachAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - putDataStart(true, info), - &ServerBlock::putDataFinish); + deprecatedDetachStart(true, info), + &Attachment::deprecatedDetachFinish); } - Napi::Value putDataSync(const Napi::CallbackInfo& info) + Napi::Value deprecatedDetachSync(const Napi::CallbackInfo& info) { try { - auto ret = putDataStart(false, info)(); - return putDataFinish(info.Env(), ret); + auto ret = deprecatedDetachStart(false, info)(); + return deprecatedDetachFinish(info.Env(), ret); } catch (...) { @@ -5220,22 +5555,22 @@ friend class BaseClass; } } - static MethodStart newKeyStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value newKeyFinish(const Napi::Env env, fb::ICryptKey* ret); + static MethodStart deprecatedDropDatabaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value deprecatedDropDatabaseFinish(const Napi::Env env, void* ret); - Napi::Value newKeyAsync(const Napi::CallbackInfo& info) + Napi::Value deprecatedDropDatabaseAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - newKeyStart(true, info), - &ServerBlock::newKeyFinish); + return PromiseWorker::Run(info.Env(), + deprecatedDropDatabaseStart(true, info), + &Attachment::deprecatedDropDatabaseFinish); } - Napi::Value newKeySync(const Napi::CallbackInfo& info) + Napi::Value deprecatedDropDatabaseSync(const Napi::CallbackInfo& info) { try { - auto ret = newKeyStart(false, info)(); - return newKeyFinish(info.Env(), ret); + auto ret = deprecatedDropDatabaseStart(false, info)(); + return deprecatedDropDatabaseFinish(info.Env(), ret); } catch (...) { @@ -5243,36 +5578,22 @@ friend class BaseClass; } } -}; - + static MethodStart getIdleTimeoutStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getIdleTimeoutFinish(const Napi::Env env, unsigned ret); -class ClientBlock : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addRefFinish(const Napi::Env env, void* ret); - - Napi::Value addRefAsync(const Napi::CallbackInfo& info) + Napi::Value getIdleTimeoutAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - addRefStart(true, info), - &ClientBlock::addRefFinish); + return PromiseWorker::Run(info.Env(), + getIdleTimeoutStart(true, info), + &Attachment::getIdleTimeoutFinish); } - Napi::Value addRefSync(const Napi::CallbackInfo& info) + Napi::Value getIdleTimeoutSync(const Napi::CallbackInfo& info) { try { - auto ret = addRefStart(false, info)(); - return addRefFinish(info.Env(), ret); + auto ret = getIdleTimeoutStart(false, info)(); + return getIdleTimeoutFinish(info.Env(), ret); } catch (...) { @@ -5280,22 +5601,22 @@ friend class BaseClass; } } - static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value releaseFinish(const Napi::Env env, int ret); + static MethodStart setIdleTimeoutStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setIdleTimeoutFinish(const Napi::Env env, void* ret); - Napi::Value releaseAsync(const Napi::CallbackInfo& info) + Napi::Value setIdleTimeoutAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - releaseStart(true, info), - &ClientBlock::releaseFinish); + return PromiseWorker::Run(info.Env(), + setIdleTimeoutStart(true, info), + &Attachment::setIdleTimeoutFinish); } - Napi::Value releaseSync(const Napi::CallbackInfo& info) + Napi::Value setIdleTimeoutSync(const Napi::CallbackInfo& info) { try { - auto ret = releaseStart(false, info)(); - return releaseFinish(info.Env(), ret); + auto ret = setIdleTimeoutStart(false, info)(); + return setIdleTimeoutFinish(info.Env(), ret); } catch (...) { @@ -5303,22 +5624,22 @@ friend class BaseClass; } } - static MethodStart getLoginStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getLoginFinish(const Napi::Env env, OptString ret); + static MethodStart getStatementTimeoutStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getStatementTimeoutFinish(const Napi::Env env, unsigned ret); - Napi::Value getLoginAsync(const Napi::CallbackInfo& info) + Napi::Value getStatementTimeoutAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getLoginStart(true, info), - &ClientBlock::getLoginFinish); + return PromiseWorker::Run(info.Env(), + getStatementTimeoutStart(true, info), + &Attachment::getStatementTimeoutFinish); } - Napi::Value getLoginSync(const Napi::CallbackInfo& info) + Napi::Value getStatementTimeoutSync(const Napi::CallbackInfo& info) { try { - auto ret = getLoginStart(false, info)(); - return getLoginFinish(info.Env(), ret); + auto ret = getStatementTimeoutStart(false, info)(); + return getStatementTimeoutFinish(info.Env(), ret); } catch (...) { @@ -5326,22 +5647,22 @@ friend class BaseClass; } } - static MethodStart getPasswordStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getPasswordFinish(const Napi::Env env, OptString ret); + static MethodStart setStatementTimeoutStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setStatementTimeoutFinish(const Napi::Env env, void* ret); - Napi::Value getPasswordAsync(const Napi::CallbackInfo& info) + Napi::Value setStatementTimeoutAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getPasswordStart(true, info), - &ClientBlock::getPasswordFinish); + return PromiseWorker::Run(info.Env(), + setStatementTimeoutStart(true, info), + &Attachment::setStatementTimeoutFinish); } - Napi::Value getPasswordSync(const Napi::CallbackInfo& info) + Napi::Value setStatementTimeoutSync(const Napi::CallbackInfo& info) { try { - auto ret = getPasswordStart(false, info)(); - return getPasswordFinish(info.Env(), ret); + auto ret = setStatementTimeoutStart(false, info)(); + return setStatementTimeoutFinish(info.Env(), ret); } catch (...) { @@ -5349,22 +5670,22 @@ friend class BaseClass; } } - static MethodStart getDataStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getDataFinish(const Napi::Env env, const unsigned char* ret); + static MethodStart createBatchStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value createBatchFinish(const Napi::Env env, fb::IBatch* ret); - Napi::Value getDataAsync(const Napi::CallbackInfo& info) + Napi::Value createBatchAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getDataStart(true, info), - &ClientBlock::getDataFinish); + return PromiseWorker::Run(info.Env(), + createBatchStart(true, info), + &Attachment::createBatchFinish); } - Napi::Value getDataSync(const Napi::CallbackInfo& info) + Napi::Value createBatchSync(const Napi::CallbackInfo& info) { try { - auto ret = getDataStart(false, info)(); - return getDataFinish(info.Env(), ret); + auto ret = createBatchStart(false, info)(); + return createBatchFinish(info.Env(), ret); } catch (...) { @@ -5372,22 +5693,22 @@ friend class BaseClass; } } - static MethodStart putDataStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value putDataFinish(const Napi::Env env, void* ret); + static MethodStart createReplicatorStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value createReplicatorFinish(const Napi::Env env, fb::IReplicator* ret); - Napi::Value putDataAsync(const Napi::CallbackInfo& info) + Napi::Value createReplicatorAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - putDataStart(true, info), - &ClientBlock::putDataFinish); + return PromiseWorker::Run(info.Env(), + createReplicatorStart(true, info), + &Attachment::createReplicatorFinish); } - Napi::Value putDataSync(const Napi::CallbackInfo& info) + Napi::Value createReplicatorSync(const Napi::CallbackInfo& info) { try { - auto ret = putDataStart(false, info)(); - return putDataFinish(info.Env(), ret); + auto ret = createReplicatorStart(false, info)(); + return createReplicatorFinish(info.Env(), ret); } catch (...) { @@ -5395,22 +5716,22 @@ friend class BaseClass; } } - static MethodStart newKeyStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value newKeyFinish(const Napi::Env env, fb::ICryptKey* ret); + static MethodStart detachStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value detachFinish(const Napi::Env env, void* ret); - Napi::Value newKeyAsync(const Napi::CallbackInfo& info) + Napi::Value detachAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - newKeyStart(true, info), - &ClientBlock::newKeyFinish); - } + return PromiseWorker::Run(info.Env(), + detachStart(true, info), + &Attachment::detachFinish); + } - Napi::Value newKeySync(const Napi::CallbackInfo& info) + Napi::Value detachSync(const Napi::CallbackInfo& info) { try { - auto ret = newKeyStart(false, info)(); - return newKeyFinish(info.Env(), ret); + auto ret = detachStart(false, info)(); + return detachFinish(info.Env(), ret); } catch (...) { @@ -5418,36 +5739,22 @@ friend class BaseClass; } } -}; - - -class Server : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addRefFinish(const Napi::Env env, void* ret); + static MethodStart dropDatabaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value dropDatabaseFinish(const Napi::Env env, void* ret); - Napi::Value addRefAsync(const Napi::CallbackInfo& info) + Napi::Value dropDatabaseAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - addRefStart(true, info), - &Server::addRefFinish); + dropDatabaseStart(true, info), + &Attachment::dropDatabaseFinish); } - Napi::Value addRefSync(const Napi::CallbackInfo& info) + Napi::Value dropDatabaseSync(const Napi::CallbackInfo& info) { try { - auto ret = addRefStart(false, info)(); - return addRefFinish(info.Env(), ret); + auto ret = dropDatabaseStart(false, info)(); + return dropDatabaseFinish(info.Env(), ret); } catch (...) { @@ -5455,22 +5762,22 @@ friend class BaseClass; } } - static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value releaseFinish(const Napi::Env env, int ret); + static MethodStart getMaxBlobCacheSizeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getMaxBlobCacheSizeFinish(const Napi::Env env, unsigned ret); - Napi::Value releaseAsync(const Napi::CallbackInfo& info) + Napi::Value getMaxBlobCacheSizeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - releaseStart(true, info), - &Server::releaseFinish); + return PromiseWorker::Run(info.Env(), + getMaxBlobCacheSizeStart(true, info), + &Attachment::getMaxBlobCacheSizeFinish); } - Napi::Value releaseSync(const Napi::CallbackInfo& info) + Napi::Value getMaxBlobCacheSizeSync(const Napi::CallbackInfo& info) { try { - auto ret = releaseStart(false, info)(); - return releaseFinish(info.Env(), ret); + auto ret = getMaxBlobCacheSizeStart(false, info)(); + return getMaxBlobCacheSizeFinish(info.Env(), ret); } catch (...) { @@ -5478,22 +5785,22 @@ friend class BaseClass; } } - static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); + static MethodStart setMaxBlobCacheSizeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setMaxBlobCacheSizeFinish(const Napi::Env env, void* ret); - Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) + Napi::Value setMaxBlobCacheSizeAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - setOwnerStart(true, info), - &Server::setOwnerFinish); + setMaxBlobCacheSizeStart(true, info), + &Attachment::setMaxBlobCacheSizeFinish); } - Napi::Value setOwnerSync(const Napi::CallbackInfo& info) + Napi::Value setMaxBlobCacheSizeSync(const Napi::CallbackInfo& info) { try { - auto ret = setOwnerStart(false, info)(); - return setOwnerFinish(info.Env(), ret); + auto ret = setMaxBlobCacheSizeStart(false, info)(); + return setMaxBlobCacheSizeFinish(info.Env(), ret); } catch (...) { @@ -5501,22 +5808,22 @@ friend class BaseClass; } } - static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); + static MethodStart getMaxInlineBlobSizeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getMaxInlineBlobSizeFinish(const Napi::Env env, unsigned ret); - Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) + Napi::Value getMaxInlineBlobSizeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getOwnerStart(true, info), - &Server::getOwnerFinish); + return PromiseWorker::Run(info.Env(), + getMaxInlineBlobSizeStart(true, info), + &Attachment::getMaxInlineBlobSizeFinish); } - Napi::Value getOwnerSync(const Napi::CallbackInfo& info) + Napi::Value getMaxInlineBlobSizeSync(const Napi::CallbackInfo& info) { try { - auto ret = getOwnerStart(false, info)(); - return getOwnerFinish(info.Env(), ret); + auto ret = getMaxInlineBlobSizeStart(false, info)(); + return getMaxInlineBlobSizeFinish(info.Env(), ret); } catch (...) { @@ -5524,22 +5831,22 @@ friend class BaseClass; } } - static MethodStart authenticateStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value authenticateFinish(const Napi::Env env, int ret); + static MethodStart setMaxInlineBlobSizeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setMaxInlineBlobSizeFinish(const Napi::Env env, void* ret); - Napi::Value authenticateAsync(const Napi::CallbackInfo& info) + Napi::Value setMaxInlineBlobSizeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - authenticateStart(true, info), - &Server::authenticateFinish); + return PromiseWorker::Run(info.Env(), + setMaxInlineBlobSizeStart(true, info), + &Attachment::setMaxInlineBlobSizeFinish); } - Napi::Value authenticateSync(const Napi::CallbackInfo& info) + Napi::Value setMaxInlineBlobSizeSync(const Napi::CallbackInfo& info) { try { - auto ret = authenticateStart(false, info)(); - return authenticateFinish(info.Env(), ret); + auto ret = setMaxInlineBlobSizeStart(false, info)(); + return setMaxInlineBlobSizeFinish(info.Env(), ret); } catch (...) { @@ -5550,15 +5857,15 @@ friend class BaseClass; }; -class Client : public BaseClass +class Service : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); @@ -5568,7 +5875,7 @@ friend class BaseClass; { return PromiseWorker::Run(info.Env(), addRefStart(true, info), - &Client::addRefFinish); + &Service::addRefFinish); } Napi::Value addRefSync(const Napi::CallbackInfo& info) @@ -5591,7 +5898,7 @@ friend class BaseClass; { return PromiseWorker::Run(info.Env(), releaseStart(true, info), - &Client::releaseFinish); + &Service::releaseFinish); } Napi::Value releaseSync(const Napi::CallbackInfo& info) @@ -5607,45 +5914,22 @@ friend class BaseClass; } } - static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); + static MethodStart deprecatedDetachStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value deprecatedDetachFinish(const Napi::Env env, void* ret); - Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) + Napi::Value deprecatedDetachAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - setOwnerStart(true, info), - &Client::setOwnerFinish); - } - - Napi::Value setOwnerSync(const Napi::CallbackInfo& info) - { - try - { - auto ret = setOwnerStart(false, info)(); - return setOwnerFinish(info.Env(), ret); - } - catch (...) - { - rethrowException(info.Env()); - } - } - - static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); - - Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) - { - return PromiseWorker::Run(info.Env(), - getOwnerStart(true, info), - &Client::getOwnerFinish); + deprecatedDetachStart(true, info), + &Service::deprecatedDetachFinish); } - Napi::Value getOwnerSync(const Napi::CallbackInfo& info) + Napi::Value deprecatedDetachSync(const Napi::CallbackInfo& info) { try { - auto ret = getOwnerStart(false, info)(); - return getOwnerFinish(info.Env(), ret); + auto ret = deprecatedDetachStart(false, info)(); + return deprecatedDetachFinish(info.Env(), ret); } catch (...) { @@ -5653,22 +5937,22 @@ friend class BaseClass; } } - static MethodStart authenticateStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value authenticateFinish(const Napi::Env env, int ret); + static MethodStart queryStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value queryFinish(const Napi::Env env, void* ret); - Napi::Value authenticateAsync(const Napi::CallbackInfo& info) + Napi::Value queryAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - authenticateStart(true, info), - &Client::authenticateFinish); + return PromiseWorker::Run(info.Env(), + queryStart(true, info), + &Service::queryFinish); } - Napi::Value authenticateSync(const Napi::CallbackInfo& info) + Napi::Value querySync(const Napi::CallbackInfo& info) { try { - auto ret = authenticateStart(false, info)(); - return authenticateFinish(info.Env(), ret); + auto ret = queryStart(false, info)(); + return queryFinish(info.Env(), ret); } catch (...) { @@ -5676,36 +5960,22 @@ friend class BaseClass; } } -}; - - -class UserField : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart enteredStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value enteredFinish(const Napi::Env env, int ret); + static MethodStart startStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value startFinish(const Napi::Env env, void* ret); - Napi::Value enteredAsync(const Napi::CallbackInfo& info) + Napi::Value startAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - enteredStart(true, info), - &UserField::enteredFinish); + return PromiseWorker::Run(info.Env(), + startStart(true, info), + &Service::startFinish); } - Napi::Value enteredSync(const Napi::CallbackInfo& info) + Napi::Value startSync(const Napi::CallbackInfo& info) { try { - auto ret = enteredStart(false, info)(); - return enteredFinish(info.Env(), ret); + auto ret = startStart(false, info)(); + return startFinish(info.Env(), ret); } catch (...) { @@ -5713,22 +5983,22 @@ friend class BaseClass; } } - static MethodStart specifiedStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value specifiedFinish(const Napi::Env env, int ret); + static MethodStart detachStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value detachFinish(const Napi::Env env, void* ret); - Napi::Value specifiedAsync(const Napi::CallbackInfo& info) + Napi::Value detachAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - specifiedStart(true, info), - &UserField::specifiedFinish); + return PromiseWorker::Run(info.Env(), + detachStart(true, info), + &Service::detachFinish); } - Napi::Value specifiedSync(const Napi::CallbackInfo& info) + Napi::Value detachSync(const Napi::CallbackInfo& info) { try { - auto ret = specifiedStart(false, info)(); - return specifiedFinish(info.Env(), ret); + auto ret = detachStart(false, info)(); + return detachFinish(info.Env(), ret); } catch (...) { @@ -5736,22 +6006,22 @@ friend class BaseClass; } } - static MethodStart setEnteredStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setEnteredFinish(const Napi::Env env, void* ret); + static MethodStart cancelStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value cancelFinish(const Napi::Env env, void* ret); - Napi::Value setEnteredAsync(const Napi::CallbackInfo& info) + Napi::Value cancelAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - setEnteredStart(true, info), - &UserField::setEnteredFinish); + cancelStart(true, info), + &Service::cancelFinish); } - Napi::Value setEnteredSync(const Napi::CallbackInfo& info) + Napi::Value cancelSync(const Napi::CallbackInfo& info) { try { - auto ret = setEnteredStart(false, info)(); - return setEnteredFinish(info.Env(), ret); + auto ret = cancelStart(false, info)(); + return cancelFinish(info.Env(), ret); } catch (...) { @@ -5762,33 +6032,33 @@ friend class BaseClass; }; -class CharUserField : public BaseClass +class Provider : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: - static MethodStart enteredStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value enteredFinish(const Napi::Env env, int ret); + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); - Napi::Value enteredAsync(const Napi::CallbackInfo& info) + Napi::Value addRefAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - enteredStart(true, info), - &CharUserField::enteredFinish); + return PromiseWorker::Run(info.Env(), + addRefStart(true, info), + &Provider::addRefFinish); } - Napi::Value enteredSync(const Napi::CallbackInfo& info) + Napi::Value addRefSync(const Napi::CallbackInfo& info) { try { - auto ret = enteredStart(false, info)(); - return enteredFinish(info.Env(), ret); + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); } catch (...) { @@ -5796,22 +6066,22 @@ friend class BaseClass; } } - static MethodStart specifiedStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value specifiedFinish(const Napi::Env env, int ret); + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); - Napi::Value specifiedAsync(const Napi::CallbackInfo& info) + Napi::Value releaseAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - specifiedStart(true, info), - &CharUserField::specifiedFinish); + releaseStart(true, info), + &Provider::releaseFinish); } - Napi::Value specifiedSync(const Napi::CallbackInfo& info) + Napi::Value releaseSync(const Napi::CallbackInfo& info) { try { - auto ret = specifiedStart(false, info)(); - return specifiedFinish(info.Env(), ret); + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); } catch (...) { @@ -5819,22 +6089,22 @@ friend class BaseClass; } } - static MethodStart setEnteredStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setEnteredFinish(const Napi::Env env, void* ret); + static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); - Napi::Value setEnteredAsync(const Napi::CallbackInfo& info) + Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - setEnteredStart(true, info), - &CharUserField::setEnteredFinish); + setOwnerStart(true, info), + &Provider::setOwnerFinish); } - Napi::Value setEnteredSync(const Napi::CallbackInfo& info) + Napi::Value setOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = setEnteredStart(false, info)(); - return setEnteredFinish(info.Env(), ret); + auto ret = setOwnerStart(false, info)(); + return setOwnerFinish(info.Env(), ret); } catch (...) { @@ -5842,22 +6112,22 @@ friend class BaseClass; } } - static MethodStart getStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getFinish(const Napi::Env env, OptString ret); + static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); - Napi::Value getAsync(const Napi::CallbackInfo& info) + Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getStart(true, info), - &CharUserField::getFinish); + return PromiseWorker::Run(info.Env(), + getOwnerStart(true, info), + &Provider::getOwnerFinish); } - Napi::Value getSync(const Napi::CallbackInfo& info) + Napi::Value getOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = getStart(false, info)(); - return getFinish(info.Env(), ret); + auto ret = getOwnerStart(false, info)(); + return getOwnerFinish(info.Env(), ret); } catch (...) { @@ -5865,22 +6135,22 @@ friend class BaseClass; } } - static MethodStart setStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setFinish(const Napi::Env env, void* ret); + static MethodStart attachDatabaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value attachDatabaseFinish(const Napi::Env env, fb::IAttachment* ret); - Napi::Value setAsync(const Napi::CallbackInfo& info) + Napi::Value attachDatabaseAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - setStart(true, info), - &CharUserField::setFinish); + return PromiseWorker::Run(info.Env(), + attachDatabaseStart(true, info), + &Provider::attachDatabaseFinish); } - Napi::Value setSync(const Napi::CallbackInfo& info) + Napi::Value attachDatabaseSync(const Napi::CallbackInfo& info) { try { - auto ret = setStart(false, info)(); - return setFinish(info.Env(), ret); + auto ret = attachDatabaseStart(false, info)(); + return attachDatabaseFinish(info.Env(), ret); } catch (...) { @@ -5888,36 +6158,22 @@ friend class BaseClass; } } -}; - - -class IntUserField : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart enteredStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value enteredFinish(const Napi::Env env, int ret); + static MethodStart createDatabaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value createDatabaseFinish(const Napi::Env env, fb::IAttachment* ret); - Napi::Value enteredAsync(const Napi::CallbackInfo& info) + Napi::Value createDatabaseAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - enteredStart(true, info), - &IntUserField::enteredFinish); + return PromiseWorker::Run(info.Env(), + createDatabaseStart(true, info), + &Provider::createDatabaseFinish); } - Napi::Value enteredSync(const Napi::CallbackInfo& info) + Napi::Value createDatabaseSync(const Napi::CallbackInfo& info) { try { - auto ret = enteredStart(false, info)(); - return enteredFinish(info.Env(), ret); + auto ret = createDatabaseStart(false, info)(); + return createDatabaseFinish(info.Env(), ret); } catch (...) { @@ -5925,22 +6181,22 @@ friend class BaseClass; } } - static MethodStart specifiedStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value specifiedFinish(const Napi::Env env, int ret); + static MethodStart attachServiceManagerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value attachServiceManagerFinish(const Napi::Env env, fb::IService* ret); - Napi::Value specifiedAsync(const Napi::CallbackInfo& info) + Napi::Value attachServiceManagerAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - specifiedStart(true, info), - &IntUserField::specifiedFinish); + return PromiseWorker::Run(info.Env(), + attachServiceManagerStart(true, info), + &Provider::attachServiceManagerFinish); } - Napi::Value specifiedSync(const Napi::CallbackInfo& info) + Napi::Value attachServiceManagerSync(const Napi::CallbackInfo& info) { try { - auto ret = specifiedStart(false, info)(); - return specifiedFinish(info.Env(), ret); + auto ret = attachServiceManagerStart(false, info)(); + return attachServiceManagerFinish(info.Env(), ret); } catch (...) { @@ -5948,45 +6204,22 @@ friend class BaseClass; } } - static MethodStart setEnteredStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setEnteredFinish(const Napi::Env env, void* ret); + static MethodStart shutdownStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value shutdownFinish(const Napi::Env env, void* ret); - Napi::Value setEnteredAsync(const Napi::CallbackInfo& info) + Napi::Value shutdownAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - setEnteredStart(true, info), - &IntUserField::setEnteredFinish); - } - - Napi::Value setEnteredSync(const Napi::CallbackInfo& info) - { - try - { - auto ret = setEnteredStart(false, info)(); - return setEnteredFinish(info.Env(), ret); - } - catch (...) - { - rethrowException(info.Env()); - } - } - - static MethodStart getStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getFinish(const Napi::Env env, int ret); - - Napi::Value getAsync(const Napi::CallbackInfo& info) - { - return PromiseWorker::Run(info.Env(), - getStart(true, info), - &IntUserField::getFinish); + shutdownStart(true, info), + &Provider::shutdownFinish); } - Napi::Value getSync(const Napi::CallbackInfo& info) + Napi::Value shutdownSync(const Napi::CallbackInfo& info) { try { - auto ret = getStart(false, info)(); - return getFinish(info.Env(), ret); + auto ret = shutdownStart(false, info)(); + return shutdownFinish(info.Env(), ret); } catch (...) { @@ -5994,22 +6227,22 @@ friend class BaseClass; } } - static MethodStart setStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setFinish(const Napi::Env env, void* ret); + static MethodStart setDbCryptCallbackStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setDbCryptCallbackFinish(const Napi::Env env, void* ret); - Napi::Value setAsync(const Napi::CallbackInfo& info) + Napi::Value setDbCryptCallbackAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - setStart(true, info), - &IntUserField::setFinish); + setDbCryptCallbackStart(true, info), + &Provider::setDbCryptCallbackFinish); } - Napi::Value setSync(const Napi::CallbackInfo& info) + Napi::Value setDbCryptCallbackSync(const Napi::CallbackInfo& info) { try { - auto ret = setStart(false, info)(); - return setFinish(info.Env(), ret); + auto ret = setDbCryptCallbackStart(false, info)(); + return setDbCryptCallbackFinish(info.Env(), ret); } catch (...) { @@ -6020,33 +6253,33 @@ friend class BaseClass; }; -class User : public BaseClass +class DtcStart : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: - static MethodStart operationStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value operationFinish(const Napi::Env env, unsigned ret); + static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value disposeFinish(const Napi::Env env, void* ret); - Napi::Value operationAsync(const Napi::CallbackInfo& info) + Napi::Value disposeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - operationStart(true, info), - &User::operationFinish); + return PromiseWorker::Run(info.Env(), + disposeStart(true, info), + &DtcStart::disposeFinish); } - Napi::Value operationSync(const Napi::CallbackInfo& info) + Napi::Value disposeSync(const Napi::CallbackInfo& info) { try { - auto ret = operationStart(false, info)(); - return operationFinish(info.Env(), ret); + auto ret = disposeStart(false, info)(); + return disposeFinish(info.Env(), ret); } catch (...) { @@ -6054,22 +6287,22 @@ friend class BaseClass; } } - static MethodStart userNameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value userNameFinish(const Napi::Env env, fb::ICharUserField* ret); + static MethodStart addAttachmentStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addAttachmentFinish(const Napi::Env env, void* ret); - Napi::Value userNameAsync(const Napi::CallbackInfo& info) + Napi::Value addAttachmentAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - userNameStart(true, info), - &User::userNameFinish); + return PromiseWorker::Run(info.Env(), + addAttachmentStart(true, info), + &DtcStart::addAttachmentFinish); } - Napi::Value userNameSync(const Napi::CallbackInfo& info) + Napi::Value addAttachmentSync(const Napi::CallbackInfo& info) { try { - auto ret = userNameStart(false, info)(); - return userNameFinish(info.Env(), ret); + auto ret = addAttachmentStart(false, info)(); + return addAttachmentFinish(info.Env(), ret); } catch (...) { @@ -6077,22 +6310,22 @@ friend class BaseClass; } } - static MethodStart passwordStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value passwordFinish(const Napi::Env env, fb::ICharUserField* ret); + static MethodStart addWithTpbStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addWithTpbFinish(const Napi::Env env, void* ret); - Napi::Value passwordAsync(const Napi::CallbackInfo& info) + Napi::Value addWithTpbAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - passwordStart(true, info), - &User::passwordFinish); + return PromiseWorker::Run(info.Env(), + addWithTpbStart(true, info), + &DtcStart::addWithTpbFinish); } - Napi::Value passwordSync(const Napi::CallbackInfo& info) + Napi::Value addWithTpbSync(const Napi::CallbackInfo& info) { try { - auto ret = passwordStart(false, info)(); - return passwordFinish(info.Env(), ret); + auto ret = addWithTpbStart(false, info)(); + return addWithTpbFinish(info.Env(), ret); } catch (...) { @@ -6100,22 +6333,22 @@ friend class BaseClass; } } - static MethodStart firstNameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value firstNameFinish(const Napi::Env env, fb::ICharUserField* ret); + static MethodStart startStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value startFinish(const Napi::Env env, fb::ITransaction* ret); - Napi::Value firstNameAsync(const Napi::CallbackInfo& info) + Napi::Value startAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - firstNameStart(true, info), - &User::firstNameFinish); + return PromiseWorker::Run(info.Env(), + startStart(true, info), + &DtcStart::startFinish); } - Napi::Value firstNameSync(const Napi::CallbackInfo& info) + Napi::Value startSync(const Napi::CallbackInfo& info) { try { - auto ret = firstNameStart(false, info)(); - return firstNameFinish(info.Env(), ret); + auto ret = startStart(false, info)(); + return startFinish(info.Env(), ret); } catch (...) { @@ -6123,22 +6356,36 @@ friend class BaseClass; } } - static MethodStart lastNameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value lastNameFinish(const Napi::Env env, fb::ICharUserField* ret); +}; - Napi::Value lastNameAsync(const Napi::CallbackInfo& info) + +class Dtc : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart joinStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value joinFinish(const Napi::Env env, fb::ITransaction* ret); + + Napi::Value joinAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - lastNameStart(true, info), - &User::lastNameFinish); + return PromiseWorker::Run(info.Env(), + joinStart(true, info), + &Dtc::joinFinish); } - Napi::Value lastNameSync(const Napi::CallbackInfo& info) + Napi::Value joinSync(const Napi::CallbackInfo& info) { try { - auto ret = lastNameStart(false, info)(); - return lastNameFinish(info.Env(), ret); + auto ret = joinStart(false, info)(); + return joinFinish(info.Env(), ret); } catch (...) { @@ -6146,22 +6393,22 @@ friend class BaseClass; } } - static MethodStart middleNameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value middleNameFinish(const Napi::Env env, fb::ICharUserField* ret); - - Napi::Value middleNameAsync(const Napi::CallbackInfo& info) + static MethodStart startBuilderStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value startBuilderFinish(const Napi::Env env, fb::IDtcStart* ret); + + Napi::Value startBuilderAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - middleNameStart(true, info), - &User::middleNameFinish); + return PromiseWorker::Run(info.Env(), + startBuilderStart(true, info), + &Dtc::startBuilderFinish); } - Napi::Value middleNameSync(const Napi::CallbackInfo& info) + Napi::Value startBuilderSync(const Napi::CallbackInfo& info) { try { - auto ret = middleNameStart(false, info)(); - return middleNameFinish(info.Env(), ret); + auto ret = startBuilderStart(false, info)(); + return startBuilderFinish(info.Env(), ret); } catch (...) { @@ -6169,45 +6416,36 @@ friend class BaseClass; } } - static MethodStart commentStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value commentFinish(const Napi::Env env, fb::ICharUserField* ret); +}; - Napi::Value commentAsync(const Napi::CallbackInfo& info) - { - return PromiseWorker::Run(info.Env(), - commentStart(true, info), - &User::commentFinish); - } - Napi::Value commentSync(const Napi::CallbackInfo& info) - { - try - { - auto ret = commentStart(false, info)(); - return commentFinish(info.Env(), ret); - } - catch (...) - { - rethrowException(info.Env()); - } - } +class Auth : public BaseClass +{ +friend class BaseClass; - static MethodStart attributesStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value attributesFinish(const Napi::Env env, fb::ICharUserField* ret); +public: + using BaseClass::BaseClass; - Napi::Value attributesAsync(const Napi::CallbackInfo& info) +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); + + Napi::Value addRefAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - attributesStart(true, info), - &User::attributesFinish); + return PromiseWorker::Run(info.Env(), + addRefStart(true, info), + &Auth::addRefFinish); } - Napi::Value attributesSync(const Napi::CallbackInfo& info) + Napi::Value addRefSync(const Napi::CallbackInfo& info) { try { - auto ret = attributesStart(false, info)(); - return attributesFinish(info.Env(), ret); + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); } catch (...) { @@ -6215,22 +6453,22 @@ friend class BaseClass; } } - static MethodStart activeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value activeFinish(const Napi::Env env, fb::IIntUserField* ret); + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); - Napi::Value activeAsync(const Napi::CallbackInfo& info) + Napi::Value releaseAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - activeStart(true, info), - &User::activeFinish); + return PromiseWorker::Run(info.Env(), + releaseStart(true, info), + &Auth::releaseFinish); } - Napi::Value activeSync(const Napi::CallbackInfo& info) + Napi::Value releaseSync(const Napi::CallbackInfo& info) { try { - auto ret = activeStart(false, info)(); - return activeFinish(info.Env(), ret); + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); } catch (...) { @@ -6238,22 +6476,22 @@ friend class BaseClass; } } - static MethodStart adminStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value adminFinish(const Napi::Env env, fb::IIntUserField* ret); + static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); - Napi::Value adminAsync(const Napi::CallbackInfo& info) + Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - adminStart(true, info), - &User::adminFinish); + return PromiseWorker::Run(info.Env(), + setOwnerStart(true, info), + &Auth::setOwnerFinish); } - Napi::Value adminSync(const Napi::CallbackInfo& info) + Napi::Value setOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = adminStart(false, info)(); - return adminFinish(info.Env(), ret); + auto ret = setOwnerStart(false, info)(); + return setOwnerFinish(info.Env(), ret); } catch (...) { @@ -6261,22 +6499,22 @@ friend class BaseClass; } } - static MethodStart clearStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value clearFinish(const Napi::Env env, void* ret); + static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); - Napi::Value clearAsync(const Napi::CallbackInfo& info) + Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - clearStart(true, info), - &User::clearFinish); + return PromiseWorker::Run(info.Env(), + getOwnerStart(true, info), + &Auth::getOwnerFinish); } - Napi::Value clearSync(const Napi::CallbackInfo& info) + Napi::Value getOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = clearStart(false, info)(); - return clearFinish(info.Env(), ret); + auto ret = getOwnerStart(false, info)(); + return getOwnerFinish(info.Env(), ret); } catch (...) { @@ -6287,33 +6525,33 @@ friend class BaseClass; }; -class ListUsers : public BaseClass +class Writer : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: - static MethodStart listStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value listFinish(const Napi::Env env, void* ret); + static MethodStart resetStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value resetFinish(const Napi::Env env, void* ret); - Napi::Value listAsync(const Napi::CallbackInfo& info) + Napi::Value resetAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - listStart(true, info), - &ListUsers::listFinish); + resetStart(true, info), + &Writer::resetFinish); } - Napi::Value listSync(const Napi::CallbackInfo& info) + Napi::Value resetSync(const Napi::CallbackInfo& info) { try { - auto ret = listStart(false, info)(); - return listFinish(info.Env(), ret); + auto ret = resetStart(false, info)(); + return resetFinish(info.Env(), ret); } catch (...) { @@ -6321,36 +6559,22 @@ friend class BaseClass; } } -}; - - -class LogonInfo : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart nameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value nameFinish(const Napi::Env env, OptString ret); + static MethodStart addStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addFinish(const Napi::Env env, void* ret); - Napi::Value nameAsync(const Napi::CallbackInfo& info) + Napi::Value addAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - nameStart(true, info), - &LogonInfo::nameFinish); + return PromiseWorker::Run(info.Env(), + addStart(true, info), + &Writer::addFinish); } - Napi::Value nameSync(const Napi::CallbackInfo& info) + Napi::Value addSync(const Napi::CallbackInfo& info) { try { - auto ret = nameStart(false, info)(); - return nameFinish(info.Env(), ret); + auto ret = addStart(false, info)(); + return addFinish(info.Env(), ret); } catch (...) { @@ -6358,22 +6582,22 @@ friend class BaseClass; } } - static MethodStart roleStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value roleFinish(const Napi::Env env, OptString ret); + static MethodStart setTypeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setTypeFinish(const Napi::Env env, void* ret); - Napi::Value roleAsync(const Napi::CallbackInfo& info) + Napi::Value setTypeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - roleStart(true, info), - &LogonInfo::roleFinish); + return PromiseWorker::Run(info.Env(), + setTypeStart(true, info), + &Writer::setTypeFinish); } - Napi::Value roleSync(const Napi::CallbackInfo& info) + Napi::Value setTypeSync(const Napi::CallbackInfo& info) { try { - auto ret = roleStart(false, info)(); - return roleFinish(info.Env(), ret); + auto ret = setTypeStart(false, info)(); + return setTypeFinish(info.Env(), ret); } catch (...) { @@ -6381,22 +6605,22 @@ friend class BaseClass; } } - static MethodStart networkProtocolStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value networkProtocolFinish(const Napi::Env env, OptString ret); + static MethodStart setDbStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setDbFinish(const Napi::Env env, void* ret); - Napi::Value networkProtocolAsync(const Napi::CallbackInfo& info) + Napi::Value setDbAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - networkProtocolStart(true, info), - &LogonInfo::networkProtocolFinish); + return PromiseWorker::Run(info.Env(), + setDbStart(true, info), + &Writer::setDbFinish); } - Napi::Value networkProtocolSync(const Napi::CallbackInfo& info) + Napi::Value setDbSync(const Napi::CallbackInfo& info) { try { - auto ret = networkProtocolStart(false, info)(); - return networkProtocolFinish(info.Env(), ret); + auto ret = setDbStart(false, info)(); + return setDbFinish(info.Env(), ret); } catch (...) { @@ -6404,22 +6628,36 @@ friend class BaseClass; } } - static MethodStart remoteAddressStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value remoteAddressFinish(const Napi::Env env, OptString ret); +}; - Napi::Value remoteAddressAsync(const Napi::CallbackInfo& info) + +class ServerBlock : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart getLoginStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getLoginFinish(const Napi::Env env, OptString ret); + + Napi::Value getLoginAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - remoteAddressStart(true, info), - &LogonInfo::remoteAddressFinish); + getLoginStart(true, info), + &ServerBlock::getLoginFinish); } - Napi::Value remoteAddressSync(const Napi::CallbackInfo& info) + Napi::Value getLoginSync(const Napi::CallbackInfo& info) { try { - auto ret = remoteAddressStart(false, info)(); - return remoteAddressFinish(info.Env(), ret); + auto ret = getLoginStart(false, info)(); + return getLoginFinish(info.Env(), ret); } catch (...) { @@ -6427,22 +6665,68 @@ friend class BaseClass; } } - static MethodStart authBlockStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value authBlockFinish(const Napi::Env env, const unsigned char* ret); + static MethodStart getDataStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getDataFinish(const Napi::Env env, const unsigned char* ret); - Napi::Value authBlockAsync(const Napi::CallbackInfo& info) + Napi::Value getDataAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - authBlockStart(true, info), - &LogonInfo::authBlockFinish); + getDataStart(true, info), + &ServerBlock::getDataFinish); } - Napi::Value authBlockSync(const Napi::CallbackInfo& info) + Napi::Value getDataSync(const Napi::CallbackInfo& info) { try { - auto ret = authBlockStart(false, info)(); - return authBlockFinish(info.Env(), ret); + auto ret = getDataStart(false, info)(); + return getDataFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart putDataStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value putDataFinish(const Napi::Env env, void* ret); + + Napi::Value putDataAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + putDataStart(true, info), + &ServerBlock::putDataFinish); + } + + Napi::Value putDataSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = putDataStart(false, info)(); + return putDataFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart newKeyStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value newKeyFinish(const Napi::Env env, fb::ICryptKey* ret); + + Napi::Value newKeyAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + newKeyStart(true, info), + &ServerBlock::newKeyFinish); + } + + Napi::Value newKeySync(const Napi::CallbackInfo& info) + { + try + { + auto ret = newKeyStart(false, info)(); + return newKeyFinish(info.Env(), ret); } catch (...) { @@ -6453,15 +6737,15 @@ friend class BaseClass; }; -class Management : public BaseClass +class ClientBlock : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); @@ -6471,7 +6755,7 @@ friend class BaseClass; { return PromiseWorker::Run(info.Env(), addRefStart(true, info), - &Management::addRefFinish); + &ClientBlock::addRefFinish); } Napi::Value addRefSync(const Napi::CallbackInfo& info) @@ -6494,7 +6778,7 @@ friend class BaseClass; { return PromiseWorker::Run(info.Env(), releaseStart(true, info), - &Management::releaseFinish); + &ClientBlock::releaseFinish); } Napi::Value releaseSync(const Napi::CallbackInfo& info) @@ -6510,22 +6794,22 @@ friend class BaseClass; } } - static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); + static MethodStart getLoginStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getLoginFinish(const Napi::Env env, OptString ret); - Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) + Napi::Value getLoginAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - setOwnerStart(true, info), - &Management::setOwnerFinish); + return PromiseWorker::Run(info.Env(), + getLoginStart(true, info), + &ClientBlock::getLoginFinish); } - Napi::Value setOwnerSync(const Napi::CallbackInfo& info) + Napi::Value getLoginSync(const Napi::CallbackInfo& info) { try { - auto ret = setOwnerStart(false, info)(); - return setOwnerFinish(info.Env(), ret); + auto ret = getLoginStart(false, info)(); + return getLoginFinish(info.Env(), ret); } catch (...) { @@ -6533,22 +6817,22 @@ friend class BaseClass; } } - static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); + static MethodStart getPasswordStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getPasswordFinish(const Napi::Env env, OptString ret); - Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) + Napi::Value getPasswordAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getOwnerStart(true, info), - &Management::getOwnerFinish); + return PromiseWorker::Run(info.Env(), + getPasswordStart(true, info), + &ClientBlock::getPasswordFinish); } - Napi::Value getOwnerSync(const Napi::CallbackInfo& info) + Napi::Value getPasswordSync(const Napi::CallbackInfo& info) { try { - auto ret = getOwnerStart(false, info)(); - return getOwnerFinish(info.Env(), ret); + auto ret = getPasswordStart(false, info)(); + return getPasswordFinish(info.Env(), ret); } catch (...) { @@ -6556,22 +6840,22 @@ friend class BaseClass; } } - static MethodStart startStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value startFinish(const Napi::Env env, void* ret); + static MethodStart getDataStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getDataFinish(const Napi::Env env, const unsigned char* ret); - Napi::Value startAsync(const Napi::CallbackInfo& info) + Napi::Value getDataAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - startStart(true, info), - &Management::startFinish); + return PromiseWorker::Run(info.Env(), + getDataStart(true, info), + &ClientBlock::getDataFinish); } - Napi::Value startSync(const Napi::CallbackInfo& info) + Napi::Value getDataSync(const Napi::CallbackInfo& info) { try { - auto ret = startStart(false, info)(); - return startFinish(info.Env(), ret); + auto ret = getDataStart(false, info)(); + return getDataFinish(info.Env(), ret); } catch (...) { @@ -6579,22 +6863,22 @@ friend class BaseClass; } } - static MethodStart executeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value executeFinish(const Napi::Env env, int ret); + static MethodStart putDataStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value putDataFinish(const Napi::Env env, void* ret); - Napi::Value executeAsync(const Napi::CallbackInfo& info) + Napi::Value putDataAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - executeStart(true, info), - &Management::executeFinish); + return PromiseWorker::Run(info.Env(), + putDataStart(true, info), + &ClientBlock::putDataFinish); } - Napi::Value executeSync(const Napi::CallbackInfo& info) + Napi::Value putDataSync(const Napi::CallbackInfo& info) { try { - auto ret = executeStart(false, info)(); - return executeFinish(info.Env(), ret); + auto ret = putDataStart(false, info)(); + return putDataFinish(info.Env(), ret); } catch (...) { @@ -6602,22 +6886,22 @@ friend class BaseClass; } } - static MethodStart commitStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value commitFinish(const Napi::Env env, void* ret); + static MethodStart newKeyStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value newKeyFinish(const Napi::Env env, fb::ICryptKey* ret); - Napi::Value commitAsync(const Napi::CallbackInfo& info) + Napi::Value newKeyAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - commitStart(true, info), - &Management::commitFinish); + return PromiseWorker::Run(info.Env(), + newKeyStart(true, info), + &ClientBlock::newKeyFinish); } - Napi::Value commitSync(const Napi::CallbackInfo& info) + Napi::Value newKeySync(const Napi::CallbackInfo& info) { try { - auto ret = commitStart(false, info)(); - return commitFinish(info.Env(), ret); + auto ret = newKeyStart(false, info)(); + return newKeyFinish(info.Env(), ret); } catch (...) { @@ -6625,22 +6909,22 @@ friend class BaseClass; } } - static MethodStart rollbackStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value rollbackFinish(const Napi::Env env, void* ret); + static MethodStart getAuthBlockStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getAuthBlockFinish(const Napi::Env env, fb::IAuthBlock* ret); - Napi::Value rollbackAsync(const Napi::CallbackInfo& info) + Napi::Value getAuthBlockAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - rollbackStart(true, info), - &Management::rollbackFinish); + return PromiseWorker::Run(info.Env(), + getAuthBlockStart(true, info), + &ClientBlock::getAuthBlockFinish); } - Napi::Value rollbackSync(const Napi::CallbackInfo& info) + Napi::Value getAuthBlockSync(const Napi::CallbackInfo& info) { try { - auto ret = rollbackStart(false, info)(); - return rollbackFinish(info.Env(), ret); + auto ret = getAuthBlockStart(false, info)(); + return getAuthBlockFinish(info.Env(), ret); } catch (...) { @@ -6651,15 +6935,15 @@ friend class BaseClass; }; -class WireCryptPlugin : public BaseClass +class Server : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); @@ -6669,7 +6953,7 @@ friend class BaseClass; { return PromiseWorker::Run(info.Env(), addRefStart(true, info), - &WireCryptPlugin::addRefFinish); + &Server::addRefFinish); } Napi::Value addRefSync(const Napi::CallbackInfo& info) @@ -6692,7 +6976,7 @@ friend class BaseClass; { return PromiseWorker::Run(info.Env(), releaseStart(true, info), - &WireCryptPlugin::releaseFinish); + &Server::releaseFinish); } Napi::Value releaseSync(const Napi::CallbackInfo& info) @@ -6715,7 +6999,7 @@ friend class BaseClass; { return PromiseWorker::Run(info.Env(), setOwnerStart(true, info), - &WireCryptPlugin::setOwnerFinish); + &Server::setOwnerFinish); } Napi::Value setOwnerSync(const Napi::CallbackInfo& info) @@ -6738,7 +7022,7 @@ friend class BaseClass; { return PromiseWorker::Run(info.Env(), getOwnerStart(true, info), - &WireCryptPlugin::getOwnerFinish); + &Server::getOwnerFinish); } Napi::Value getOwnerSync(const Napi::CallbackInfo& info) @@ -6754,22 +7038,22 @@ friend class BaseClass; } } - static MethodStart getKnownTypesStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getKnownTypesFinish(const Napi::Env env, OptString ret); + static MethodStart authenticateStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value authenticateFinish(const Napi::Env env, int ret); - Napi::Value getKnownTypesAsync(const Napi::CallbackInfo& info) + Napi::Value authenticateAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getKnownTypesStart(true, info), - &WireCryptPlugin::getKnownTypesFinish); + return PromiseWorker::Run(info.Env(), + authenticateStart(true, info), + &Server::authenticateFinish); } - Napi::Value getKnownTypesSync(const Napi::CallbackInfo& info) + Napi::Value authenticateSync(const Napi::CallbackInfo& info) { try { - auto ret = getKnownTypesStart(false, info)(); - return getKnownTypesFinish(info.Env(), ret); + auto ret = authenticateStart(false, info)(); + return authenticateFinish(info.Env(), ret); } catch (...) { @@ -6777,22 +7061,22 @@ friend class BaseClass; } } - static MethodStart setKeyStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setKeyFinish(const Napi::Env env, void* ret); + static MethodStart setDbCryptCallbackStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setDbCryptCallbackFinish(const Napi::Env env, void* ret); - Napi::Value setKeyAsync(const Napi::CallbackInfo& info) + Napi::Value setDbCryptCallbackAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - setKeyStart(true, info), - &WireCryptPlugin::setKeyFinish); + setDbCryptCallbackStart(true, info), + &Server::setDbCryptCallbackFinish); } - Napi::Value setKeySync(const Napi::CallbackInfo& info) + Napi::Value setDbCryptCallbackSync(const Napi::CallbackInfo& info) { try { - auto ret = setKeyStart(false, info)(); - return setKeyFinish(info.Env(), ret); + auto ret = setDbCryptCallbackStart(false, info)(); + return setDbCryptCallbackFinish(info.Env(), ret); } catch (...) { @@ -6800,22 +7084,36 @@ friend class BaseClass; } } - static MethodStart encryptStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value encryptFinish(const Napi::Env env, void* ret); +}; - Napi::Value encryptAsync(const Napi::CallbackInfo& info) + +class Client : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); + + Napi::Value addRefAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - encryptStart(true, info), - &WireCryptPlugin::encryptFinish); + addRefStart(true, info), + &Client::addRefFinish); } - Napi::Value encryptSync(const Napi::CallbackInfo& info) + Napi::Value addRefSync(const Napi::CallbackInfo& info) { try { - auto ret = encryptStart(false, info)(); - return encryptFinish(info.Env(), ret); + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); } catch (...) { @@ -6823,22 +7121,22 @@ friend class BaseClass; } } - static MethodStart decryptStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value decryptFinish(const Napi::Env env, void* ret); + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); - Napi::Value decryptAsync(const Napi::CallbackInfo& info) + Napi::Value releaseAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - decryptStart(true, info), - &WireCryptPlugin::decryptFinish); + return PromiseWorker::Run(info.Env(), + releaseStart(true, info), + &Client::releaseFinish); } - Napi::Value decryptSync(const Napi::CallbackInfo& info) + Napi::Value releaseSync(const Napi::CallbackInfo& info) { try { - auto ret = decryptStart(false, info)(); - return decryptFinish(info.Env(), ret); + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); } catch (...) { @@ -6846,36 +7144,22 @@ friend class BaseClass; } } -}; - + static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); -class CryptKeyCallback : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart callbackStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value callbackFinish(const Napi::Env env, unsigned ret); - - Napi::Value callbackAsync(const Napi::CallbackInfo& info) + Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - callbackStart(true, info), - &CryptKeyCallback::callbackFinish); + return PromiseWorker::Run(info.Env(), + setOwnerStart(true, info), + &Client::setOwnerFinish); } - Napi::Value callbackSync(const Napi::CallbackInfo& info) + Napi::Value setOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = callbackStart(false, info)(); - return callbackFinish(info.Env(), ret); + auto ret = setOwnerStart(false, info)(); + return setOwnerFinish(info.Env(), ret); } catch (...) { @@ -6883,36 +7167,22 @@ friend class BaseClass; } } -}; - - -class KeyHolderPlugin : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addRefFinish(const Napi::Env env, void* ret); + static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); - Napi::Value addRefAsync(const Napi::CallbackInfo& info) + Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - addRefStart(true, info), - &KeyHolderPlugin::addRefFinish); + return PromiseWorker::Run(info.Env(), + getOwnerStart(true, info), + &Client::getOwnerFinish); } - Napi::Value addRefSync(const Napi::CallbackInfo& info) + Napi::Value getOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = addRefStart(false, info)(); - return addRefFinish(info.Env(), ret); + auto ret = getOwnerStart(false, info)(); + return getOwnerFinish(info.Env(), ret); } catch (...) { @@ -6920,22 +7190,22 @@ friend class BaseClass; } } - static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value releaseFinish(const Napi::Env env, int ret); + static MethodStart authenticateStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value authenticateFinish(const Napi::Env env, int ret); - Napi::Value releaseAsync(const Napi::CallbackInfo& info) + Napi::Value authenticateAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - releaseStart(true, info), - &KeyHolderPlugin::releaseFinish); + authenticateStart(true, info), + &Client::authenticateFinish); } - Napi::Value releaseSync(const Napi::CallbackInfo& info) + Napi::Value authenticateSync(const Napi::CallbackInfo& info) { try { - auto ret = releaseStart(false, info)(); - return releaseFinish(info.Env(), ret); + auto ret = authenticateStart(false, info)(); + return authenticateFinish(info.Env(), ret); } catch (...) { @@ -6943,45 +7213,36 @@ friend class BaseClass; } } - static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); +}; - Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) - { - return PromiseWorker::Run(info.Env(), - setOwnerStart(true, info), - &KeyHolderPlugin::setOwnerFinish); - } - Napi::Value setOwnerSync(const Napi::CallbackInfo& info) - { - try - { - auto ret = setOwnerStart(false, info)(); - return setOwnerFinish(info.Env(), ret); - } - catch (...) - { - rethrowException(info.Env()); - } - } +class UserField : public BaseClass +{ +friend class BaseClass; - static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); +public: + using BaseClass::BaseClass; - Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart enteredStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value enteredFinish(const Napi::Env env, int ret); + + Napi::Value enteredAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getOwnerStart(true, info), - &KeyHolderPlugin::getOwnerFinish); + return PromiseWorker::Run(info.Env(), + enteredStart(true, info), + &UserField::enteredFinish); } - Napi::Value getOwnerSync(const Napi::CallbackInfo& info) + Napi::Value enteredSync(const Napi::CallbackInfo& info) { try { - auto ret = getOwnerStart(false, info)(); - return getOwnerFinish(info.Env(), ret); + auto ret = enteredStart(false, info)(); + return enteredFinish(info.Env(), ret); } catch (...) { @@ -6989,22 +7250,22 @@ friend class BaseClass; } } - static MethodStart keyCallbackStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value keyCallbackFinish(const Napi::Env env, int ret); + static MethodStart specifiedStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value specifiedFinish(const Napi::Env env, int ret); - Napi::Value keyCallbackAsync(const Napi::CallbackInfo& info) + Napi::Value specifiedAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - keyCallbackStart(true, info), - &KeyHolderPlugin::keyCallbackFinish); + specifiedStart(true, info), + &UserField::specifiedFinish); } - Napi::Value keyCallbackSync(const Napi::CallbackInfo& info) + Napi::Value specifiedSync(const Napi::CallbackInfo& info) { try { - auto ret = keyCallbackStart(false, info)(); - return keyCallbackFinish(info.Env(), ret); + auto ret = specifiedStart(false, info)(); + return specifiedFinish(info.Env(), ret); } catch (...) { @@ -7012,22 +7273,22 @@ friend class BaseClass; } } - static MethodStart keyHandleStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value keyHandleFinish(const Napi::Env env, fb::ICryptKeyCallback* ret); + static MethodStart setEnteredStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setEnteredFinish(const Napi::Env env, void* ret); - Napi::Value keyHandleAsync(const Napi::CallbackInfo& info) + Napi::Value setEnteredAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - keyHandleStart(true, info), - &KeyHolderPlugin::keyHandleFinish); + return PromiseWorker::Run(info.Env(), + setEnteredStart(true, info), + &UserField::setEnteredFinish); } - Napi::Value keyHandleSync(const Napi::CallbackInfo& info) + Napi::Value setEnteredSync(const Napi::CallbackInfo& info) { try { - auto ret = keyHandleStart(false, info)(); - return keyHandleFinish(info.Env(), ret); + auto ret = setEnteredStart(false, info)(); + return setEnteredFinish(info.Env(), ret); } catch (...) { @@ -7038,33 +7299,33 @@ friend class BaseClass; }; -class DbCryptPlugin : public BaseClass +class CharUserField : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: - static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addRefFinish(const Napi::Env env, void* ret); + static MethodStart enteredStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value enteredFinish(const Napi::Env env, int ret); - Napi::Value addRefAsync(const Napi::CallbackInfo& info) + Napi::Value enteredAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - addRefStart(true, info), - &DbCryptPlugin::addRefFinish); + return PromiseWorker::Run(info.Env(), + enteredStart(true, info), + &CharUserField::enteredFinish); } - Napi::Value addRefSync(const Napi::CallbackInfo& info) + Napi::Value enteredSync(const Napi::CallbackInfo& info) { try { - auto ret = addRefStart(false, info)(); - return addRefFinish(info.Env(), ret); + auto ret = enteredStart(false, info)(); + return enteredFinish(info.Env(), ret); } catch (...) { @@ -7072,22 +7333,22 @@ friend class BaseClass; } } - static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value releaseFinish(const Napi::Env env, int ret); + static MethodStart specifiedStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value specifiedFinish(const Napi::Env env, int ret); - Napi::Value releaseAsync(const Napi::CallbackInfo& info) + Napi::Value specifiedAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - releaseStart(true, info), - &DbCryptPlugin::releaseFinish); + specifiedStart(true, info), + &CharUserField::specifiedFinish); } - Napi::Value releaseSync(const Napi::CallbackInfo& info) + Napi::Value specifiedSync(const Napi::CallbackInfo& info) { try { - auto ret = releaseStart(false, info)(); - return releaseFinish(info.Env(), ret); + auto ret = specifiedStart(false, info)(); + return specifiedFinish(info.Env(), ret); } catch (...) { @@ -7095,22 +7356,22 @@ friend class BaseClass; } } - static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); + static MethodStart setEnteredStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setEnteredFinish(const Napi::Env env, void* ret); - Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) + Napi::Value setEnteredAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - setOwnerStart(true, info), - &DbCryptPlugin::setOwnerFinish); + setEnteredStart(true, info), + &CharUserField::setEnteredFinish); } - Napi::Value setOwnerSync(const Napi::CallbackInfo& info) + Napi::Value setEnteredSync(const Napi::CallbackInfo& info) { try { - auto ret = setOwnerStart(false, info)(); - return setOwnerFinish(info.Env(), ret); + auto ret = setEnteredStart(false, info)(); + return setEnteredFinish(info.Env(), ret); } catch (...) { @@ -7118,22 +7379,45 @@ friend class BaseClass; } } - static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); + static MethodStart getStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getFinish(const Napi::Env env, OptString ret); - Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) + Napi::Value getAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getOwnerStart(true, info), - &DbCryptPlugin::getOwnerFinish); + return PromiseWorker::Run(info.Env(), + getStart(true, info), + &CharUserField::getFinish); } - Napi::Value getOwnerSync(const Napi::CallbackInfo& info) + Napi::Value getSync(const Napi::CallbackInfo& info) { try { - auto ret = getOwnerStart(false, info)(); - return getOwnerFinish(info.Env(), ret); + auto ret = getStart(false, info)(); + return getFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart setStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setFinish(const Napi::Env env, void* ret); + + Napi::Value setAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + setStart(true, info), + &CharUserField::setFinish); + } + + Napi::Value setSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = setStart(false, info)(); + return setFinish(info.Env(), ret); } catch (...) { @@ -7144,47 +7428,33 @@ friend class BaseClass; }; -class ExternalContext : public BaseClass +class IntUserField : public BaseClass { -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: -}; - - -class ExternalResultSet : public BaseClass -{ -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: - static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value disposeFinish(const Napi::Env env, void* ret); + static MethodStart enteredStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value enteredFinish(const Napi::Env env, int ret); - Napi::Value disposeAsync(const Napi::CallbackInfo& info) + Napi::Value enteredAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - disposeStart(true, info), - &ExternalResultSet::disposeFinish); + return PromiseWorker::Run(info.Env(), + enteredStart(true, info), + &IntUserField::enteredFinish); } - Napi::Value disposeSync(const Napi::CallbackInfo& info) + Napi::Value enteredSync(const Napi::CallbackInfo& info) { try { - auto ret = disposeStart(false, info)(); - return disposeFinish(info.Env(), ret); + auto ret = enteredStart(false, info)(); + return enteredFinish(info.Env(), ret); } catch (...) { @@ -7192,22 +7462,22 @@ friend class BaseClass; } } - static MethodStart fetchStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value fetchFinish(const Napi::Env env, FB_BOOLEAN ret); + static MethodStart specifiedStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value specifiedFinish(const Napi::Env env, int ret); - Napi::Value fetchAsync(const Napi::CallbackInfo& info) + Napi::Value specifiedAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - fetchStart(true, info), - &ExternalResultSet::fetchFinish); + return PromiseWorker::Run(info.Env(), + specifiedStart(true, info), + &IntUserField::specifiedFinish); } - Napi::Value fetchSync(const Napi::CallbackInfo& info) + Napi::Value specifiedSync(const Napi::CallbackInfo& info) { try { - auto ret = fetchStart(false, info)(); - return fetchFinish(info.Env(), ret); + auto ret = specifiedStart(false, info)(); + return specifiedFinish(info.Env(), ret); } catch (...) { @@ -7215,36 +7485,22 @@ friend class BaseClass; } } -}; - - -class ExternalFunction : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value disposeFinish(const Napi::Env env, void* ret); + static MethodStart setEnteredStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setEnteredFinish(const Napi::Env env, void* ret); - Napi::Value disposeAsync(const Napi::CallbackInfo& info) + Napi::Value setEnteredAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - disposeStart(true, info), - &ExternalFunction::disposeFinish); + setEnteredStart(true, info), + &IntUserField::setEnteredFinish); } - Napi::Value disposeSync(const Napi::CallbackInfo& info) + Napi::Value setEnteredSync(const Napi::CallbackInfo& info) { try { - auto ret = disposeStart(false, info)(); - return disposeFinish(info.Env(), ret); + auto ret = setEnteredStart(false, info)(); + return setEnteredFinish(info.Env(), ret); } catch (...) { @@ -7252,36 +7508,22 @@ friend class BaseClass; } } -}; - - -class ExternalProcedure : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value disposeFinish(const Napi::Env env, void* ret); + static MethodStart getStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getFinish(const Napi::Env env, int ret); - Napi::Value disposeAsync(const Napi::CallbackInfo& info) + Napi::Value getAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - disposeStart(true, info), - &ExternalProcedure::disposeFinish); + return PromiseWorker::Run(info.Env(), + getStart(true, info), + &IntUserField::getFinish); } - Napi::Value disposeSync(const Napi::CallbackInfo& info) + Napi::Value getSync(const Napi::CallbackInfo& info) { try { - auto ret = disposeStart(false, info)(); - return disposeFinish(info.Env(), ret); + auto ret = getStart(false, info)(); + return getFinish(info.Env(), ret); } catch (...) { @@ -7289,36 +7531,22 @@ friend class BaseClass; } } -}; - - -class ExternalTrigger : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value disposeFinish(const Napi::Env env, void* ret); + static MethodStart setStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setFinish(const Napi::Env env, void* ret); - Napi::Value disposeAsync(const Napi::CallbackInfo& info) + Napi::Value setAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - disposeStart(true, info), - &ExternalTrigger::disposeFinish); + setStart(true, info), + &IntUserField::setFinish); } - Napi::Value disposeSync(const Napi::CallbackInfo& info) + Napi::Value setSync(const Napi::CallbackInfo& info) { try { - auto ret = disposeStart(false, info)(); - return disposeFinish(info.Env(), ret); + auto ret = setStart(false, info)(); + return setFinish(info.Env(), ret); } catch (...) { @@ -7329,33 +7557,33 @@ friend class BaseClass; }; -class RoutineMetadata : public BaseClass +class User : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: - static MethodStart getPackageStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getPackageFinish(const Napi::Env env, OptString ret); + static MethodStart operationStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value operationFinish(const Napi::Env env, unsigned ret); - Napi::Value getPackageAsync(const Napi::CallbackInfo& info) + Napi::Value operationAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getPackageStart(true, info), - &RoutineMetadata::getPackageFinish); + return PromiseWorker::Run(info.Env(), + operationStart(true, info), + &User::operationFinish); } - Napi::Value getPackageSync(const Napi::CallbackInfo& info) + Napi::Value operationSync(const Napi::CallbackInfo& info) { try { - auto ret = getPackageStart(false, info)(); - return getPackageFinish(info.Env(), ret); + auto ret = operationStart(false, info)(); + return operationFinish(info.Env(), ret); } catch (...) { @@ -7363,22 +7591,22 @@ friend class BaseClass; } } - static MethodStart getNameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getNameFinish(const Napi::Env env, OptString ret); + static MethodStart userNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value userNameFinish(const Napi::Env env, fb::ICharUserField* ret); - Napi::Value getNameAsync(const Napi::CallbackInfo& info) + Napi::Value userNameAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getNameStart(true, info), - &RoutineMetadata::getNameFinish); + return PromiseWorker::Run(info.Env(), + userNameStart(true, info), + &User::userNameFinish); } - Napi::Value getNameSync(const Napi::CallbackInfo& info) + Napi::Value userNameSync(const Napi::CallbackInfo& info) { try { - auto ret = getNameStart(false, info)(); - return getNameFinish(info.Env(), ret); + auto ret = userNameStart(false, info)(); + return userNameFinish(info.Env(), ret); } catch (...) { @@ -7386,22 +7614,22 @@ friend class BaseClass; } } - static MethodStart getEntryPointStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getEntryPointFinish(const Napi::Env env, OptString ret); + static MethodStart passwordStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value passwordFinish(const Napi::Env env, fb::ICharUserField* ret); - Napi::Value getEntryPointAsync(const Napi::CallbackInfo& info) + Napi::Value passwordAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getEntryPointStart(true, info), - &RoutineMetadata::getEntryPointFinish); + return PromiseWorker::Run(info.Env(), + passwordStart(true, info), + &User::passwordFinish); } - Napi::Value getEntryPointSync(const Napi::CallbackInfo& info) + Napi::Value passwordSync(const Napi::CallbackInfo& info) { try { - auto ret = getEntryPointStart(false, info)(); - return getEntryPointFinish(info.Env(), ret); + auto ret = passwordStart(false, info)(); + return passwordFinish(info.Env(), ret); } catch (...) { @@ -7409,22 +7637,22 @@ friend class BaseClass; } } - static MethodStart getBodyStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getBodyFinish(const Napi::Env env, OptString ret); + static MethodStart firstNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value firstNameFinish(const Napi::Env env, fb::ICharUserField* ret); - Napi::Value getBodyAsync(const Napi::CallbackInfo& info) + Napi::Value firstNameAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getBodyStart(true, info), - &RoutineMetadata::getBodyFinish); + return PromiseWorker::Run(info.Env(), + firstNameStart(true, info), + &User::firstNameFinish); } - Napi::Value getBodySync(const Napi::CallbackInfo& info) + Napi::Value firstNameSync(const Napi::CallbackInfo& info) { try { - auto ret = getBodyStart(false, info)(); - return getBodyFinish(info.Env(), ret); + auto ret = firstNameStart(false, info)(); + return firstNameFinish(info.Env(), ret); } catch (...) { @@ -7432,22 +7660,22 @@ friend class BaseClass; } } - static MethodStart getInputMetadataStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getInputMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret); + static MethodStart lastNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value lastNameFinish(const Napi::Env env, fb::ICharUserField* ret); - Napi::Value getInputMetadataAsync(const Napi::CallbackInfo& info) + Napi::Value lastNameAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getInputMetadataStart(true, info), - &RoutineMetadata::getInputMetadataFinish); + return PromiseWorker::Run(info.Env(), + lastNameStart(true, info), + &User::lastNameFinish); } - Napi::Value getInputMetadataSync(const Napi::CallbackInfo& info) + Napi::Value lastNameSync(const Napi::CallbackInfo& info) { try { - auto ret = getInputMetadataStart(false, info)(); - return getInputMetadataFinish(info.Env(), ret); + auto ret = lastNameStart(false, info)(); + return lastNameFinish(info.Env(), ret); } catch (...) { @@ -7455,22 +7683,22 @@ friend class BaseClass; } } - static MethodStart getOutputMetadataStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getOutputMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret); + static MethodStart middleNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value middleNameFinish(const Napi::Env env, fb::ICharUserField* ret); - Napi::Value getOutputMetadataAsync(const Napi::CallbackInfo& info) + Napi::Value middleNameAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getOutputMetadataStart(true, info), - &RoutineMetadata::getOutputMetadataFinish); + return PromiseWorker::Run(info.Env(), + middleNameStart(true, info), + &User::middleNameFinish); } - Napi::Value getOutputMetadataSync(const Napi::CallbackInfo& info) + Napi::Value middleNameSync(const Napi::CallbackInfo& info) { try { - auto ret = getOutputMetadataStart(false, info)(); - return getOutputMetadataFinish(info.Env(), ret); + auto ret = middleNameStart(false, info)(); + return middleNameFinish(info.Env(), ret); } catch (...) { @@ -7478,22 +7706,22 @@ friend class BaseClass; } } - static MethodStart getTriggerMetadataStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getTriggerMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret); + static MethodStart commentStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value commentFinish(const Napi::Env env, fb::ICharUserField* ret); - Napi::Value getTriggerMetadataAsync(const Napi::CallbackInfo& info) + Napi::Value commentAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getTriggerMetadataStart(true, info), - &RoutineMetadata::getTriggerMetadataFinish); + return PromiseWorker::Run(info.Env(), + commentStart(true, info), + &User::commentFinish); } - Napi::Value getTriggerMetadataSync(const Napi::CallbackInfo& info) + Napi::Value commentSync(const Napi::CallbackInfo& info) { try { - auto ret = getTriggerMetadataStart(false, info)(); - return getTriggerMetadataFinish(info.Env(), ret); + auto ret = commentStart(false, info)(); + return commentFinish(info.Env(), ret); } catch (...) { @@ -7501,22 +7729,22 @@ friend class BaseClass; } } - static MethodStart getTriggerTableStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getTriggerTableFinish(const Napi::Env env, OptString ret); + static MethodStart attributesStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value attributesFinish(const Napi::Env env, fb::ICharUserField* ret); - Napi::Value getTriggerTableAsync(const Napi::CallbackInfo& info) + Napi::Value attributesAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getTriggerTableStart(true, info), - &RoutineMetadata::getTriggerTableFinish); + return PromiseWorker::Run(info.Env(), + attributesStart(true, info), + &User::attributesFinish); } - Napi::Value getTriggerTableSync(const Napi::CallbackInfo& info) + Napi::Value attributesSync(const Napi::CallbackInfo& info) { try { - auto ret = getTriggerTableStart(false, info)(); - return getTriggerTableFinish(info.Env(), ret); + auto ret = attributesStart(false, info)(); + return attributesFinish(info.Env(), ret); } catch (...) { @@ -7524,22 +7752,22 @@ friend class BaseClass; } } - static MethodStart getTriggerTypeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getTriggerTypeFinish(const Napi::Env env, unsigned ret); + static MethodStart activeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value activeFinish(const Napi::Env env, fb::IIntUserField* ret); - Napi::Value getTriggerTypeAsync(const Napi::CallbackInfo& info) + Napi::Value activeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getTriggerTypeStart(true, info), - &RoutineMetadata::getTriggerTypeFinish); + return PromiseWorker::Run(info.Env(), + activeStart(true, info), + &User::activeFinish); } - Napi::Value getTriggerTypeSync(const Napi::CallbackInfo& info) + Napi::Value activeSync(const Napi::CallbackInfo& info) { try { - auto ret = getTriggerTypeStart(false, info)(); - return getTriggerTypeFinish(info.Env(), ret); + auto ret = activeStart(false, info)(); + return activeFinish(info.Env(), ret); } catch (...) { @@ -7547,36 +7775,22 @@ friend class BaseClass; } } -}; - - -class ExternalEngine : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addRefFinish(const Napi::Env env, void* ret); + static MethodStart adminStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value adminFinish(const Napi::Env env, fb::IIntUserField* ret); - Napi::Value addRefAsync(const Napi::CallbackInfo& info) + Napi::Value adminAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - addRefStart(true, info), - &ExternalEngine::addRefFinish); + return PromiseWorker::Run(info.Env(), + adminStart(true, info), + &User::adminFinish); } - Napi::Value addRefSync(const Napi::CallbackInfo& info) + Napi::Value adminSync(const Napi::CallbackInfo& info) { try { - auto ret = addRefStart(false, info)(); - return addRefFinish(info.Env(), ret); + auto ret = adminStart(false, info)(); + return adminFinish(info.Env(), ret); } catch (...) { @@ -7584,22 +7798,22 @@ friend class BaseClass; } } - static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value releaseFinish(const Napi::Env env, int ret); + static MethodStart clearStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value clearFinish(const Napi::Env env, void* ret); - Napi::Value releaseAsync(const Napi::CallbackInfo& info) + Napi::Value clearAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - releaseStart(true, info), - &ExternalEngine::releaseFinish); + return PromiseWorker::Run(info.Env(), + clearStart(true, info), + &User::clearFinish); } - Napi::Value releaseSync(const Napi::CallbackInfo& info) + Napi::Value clearSync(const Napi::CallbackInfo& info) { try { - auto ret = releaseStart(false, info)(); - return releaseFinish(info.Env(), ret); + auto ret = clearStart(false, info)(); + return clearFinish(info.Env(), ret); } catch (...) { @@ -7607,45 +7821,36 @@ friend class BaseClass; } } - static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); +}; - Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) - { - return PromiseWorker::Run(info.Env(), - setOwnerStart(true, info), - &ExternalEngine::setOwnerFinish); - } - Napi::Value setOwnerSync(const Napi::CallbackInfo& info) - { - try - { - auto ret = setOwnerStart(false, info)(); - return setOwnerFinish(info.Env(), ret); - } - catch (...) - { - rethrowException(info.Env()); - } - } +class ListUsers : public BaseClass +{ +friend class BaseClass; - static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); +public: + using BaseClass::BaseClass; - Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart listStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value listFinish(const Napi::Env env, void* ret); + + Napi::Value listAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getOwnerStart(true, info), - &ExternalEngine::getOwnerFinish); + return PromiseWorker::Run(info.Env(), + listStart(true, info), + &ListUsers::listFinish); } - Napi::Value getOwnerSync(const Napi::CallbackInfo& info) + Napi::Value listSync(const Napi::CallbackInfo& info) { try { - auto ret = getOwnerStart(false, info)(); - return getOwnerFinish(info.Env(), ret); + auto ret = listStart(false, info)(); + return listFinish(info.Env(), ret); } catch (...) { @@ -7656,33 +7861,33 @@ friend class BaseClass; }; -class Timer : public BaseClass +class LogonInfo : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: - static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addRefFinish(const Napi::Env env, void* ret); + static MethodStart nameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value nameFinish(const Napi::Env env, OptString ret); - Napi::Value addRefAsync(const Napi::CallbackInfo& info) + Napi::Value nameAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - addRefStart(true, info), - &Timer::addRefFinish); + return PromiseWorker::Run(info.Env(), + nameStart(true, info), + &LogonInfo::nameFinish); } - Napi::Value addRefSync(const Napi::CallbackInfo& info) + Napi::Value nameSync(const Napi::CallbackInfo& info) { try { - auto ret = addRefStart(false, info)(); - return addRefFinish(info.Env(), ret); + auto ret = nameStart(false, info)(); + return nameFinish(info.Env(), ret); } catch (...) { @@ -7690,22 +7895,22 @@ friend class BaseClass; } } - static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value releaseFinish(const Napi::Env env, int ret); + static MethodStart roleStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value roleFinish(const Napi::Env env, OptString ret); - Napi::Value releaseAsync(const Napi::CallbackInfo& info) + Napi::Value roleAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - releaseStart(true, info), - &Timer::releaseFinish); + return PromiseWorker::Run(info.Env(), + roleStart(true, info), + &LogonInfo::roleFinish); } - Napi::Value releaseSync(const Napi::CallbackInfo& info) + Napi::Value roleSync(const Napi::CallbackInfo& info) { try { - auto ret = releaseStart(false, info)(); - return releaseFinish(info.Env(), ret); + auto ret = roleStart(false, info)(); + return roleFinish(info.Env(), ret); } catch (...) { @@ -7713,22 +7918,22 @@ friend class BaseClass; } } - static MethodStart handlerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value handlerFinish(const Napi::Env env, void* ret); + static MethodStart networkProtocolStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value networkProtocolFinish(const Napi::Env env, OptString ret); - Napi::Value handlerAsync(const Napi::CallbackInfo& info) + Napi::Value networkProtocolAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - handlerStart(true, info), - &Timer::handlerFinish); + return PromiseWorker::Run(info.Env(), + networkProtocolStart(true, info), + &LogonInfo::networkProtocolFinish); } - Napi::Value handlerSync(const Napi::CallbackInfo& info) + Napi::Value networkProtocolSync(const Napi::CallbackInfo& info) { try { - auto ret = handlerStart(false, info)(); - return handlerFinish(info.Env(), ret); + auto ret = networkProtocolStart(false, info)(); + return networkProtocolFinish(info.Env(), ret); } catch (...) { @@ -7736,36 +7941,22 @@ friend class BaseClass; } } -}; - - -class TimerControl : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart startStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value startFinish(const Napi::Env env, void* ret); + static MethodStart remoteAddressStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value remoteAddressFinish(const Napi::Env env, OptString ret); - Napi::Value startAsync(const Napi::CallbackInfo& info) + Napi::Value remoteAddressAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - startStart(true, info), - &TimerControl::startFinish); + return PromiseWorker::Run(info.Env(), + remoteAddressStart(true, info), + &LogonInfo::remoteAddressFinish); } - Napi::Value startSync(const Napi::CallbackInfo& info) + Napi::Value remoteAddressSync(const Napi::CallbackInfo& info) { try { - auto ret = startStart(false, info)(); - return startFinish(info.Env(), ret); + auto ret = remoteAddressStart(false, info)(); + return remoteAddressFinish(info.Env(), ret); } catch (...) { @@ -7773,22 +7964,22 @@ friend class BaseClass; } } - static MethodStart stopStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value stopFinish(const Napi::Env env, void* ret); + static MethodStart authBlockStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value authBlockFinish(const Napi::Env env, const unsigned char* ret); - Napi::Value stopAsync(const Napi::CallbackInfo& info) + Napi::Value authBlockAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - stopStart(true, info), - &TimerControl::stopFinish); + return PromiseWorker::Run(info.Env(), + authBlockStart(true, info), + &LogonInfo::authBlockFinish); } - Napi::Value stopSync(const Napi::CallbackInfo& info) + Napi::Value authBlockSync(const Napi::CallbackInfo& info) { try { - auto ret = stopStart(false, info)(); - return stopFinish(info.Env(), ret); + auto ret = authBlockStart(false, info)(); + return authBlockFinish(info.Env(), ret); } catch (...) { @@ -7796,36 +7987,45 @@ friend class BaseClass; } } -}; - - -class VersionCallback : public BaseClass -{ -friend class BaseClass; + static MethodStart attachmentStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value attachmentFinish(const Napi::Env env, fb::IAttachment* ret); -public: - using BaseClass::BaseClass; + Napi::Value attachmentAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + attachmentStart(true, info), + &LogonInfo::attachmentFinish); + } -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + Napi::Value attachmentSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = attachmentStart(false, info)(); + return attachmentFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } -private: - static MethodStart callbackStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value callbackFinish(const Napi::Env env, void* ret); + static MethodStart transactionStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value transactionFinish(const Napi::Env env, fb::ITransaction* ret); - Napi::Value callbackAsync(const Napi::CallbackInfo& info) + Napi::Value transactionAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - callbackStart(true, info), - &VersionCallback::callbackFinish); + return PromiseWorker::Run(info.Env(), + transactionStart(true, info), + &LogonInfo::transactionFinish); } - Napi::Value callbackSync(const Napi::CallbackInfo& info) + Napi::Value transactionSync(const Napi::CallbackInfo& info) { try { - auto ret = callbackStart(false, info)(); - return callbackFinish(info.Env(), ret); + auto ret = transactionStart(false, info)(); + return transactionFinish(info.Env(), ret); } catch (...) { @@ -7836,33 +8036,33 @@ friend class BaseClass; }; -class Util : public BaseClass +class Management : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: - static MethodStart getFbVersionStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getFbVersionFinish(const Napi::Env env, void* ret); + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); - Napi::Value getFbVersionAsync(const Napi::CallbackInfo& info) + Napi::Value addRefAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - getFbVersionStart(true, info), - &Util::getFbVersionFinish); + addRefStart(true, info), + &Management::addRefFinish); } - Napi::Value getFbVersionSync(const Napi::CallbackInfo& info) + Napi::Value addRefSync(const Napi::CallbackInfo& info) { try { - auto ret = getFbVersionStart(false, info)(); - return getFbVersionFinish(info.Env(), ret); + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); } catch (...) { @@ -7870,22 +8070,22 @@ friend class BaseClass; } } - static MethodStart executeCreateDatabaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value executeCreateDatabaseFinish(const Napi::Env env, fb::IAttachment* ret); + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); - Napi::Value executeCreateDatabaseAsync(const Napi::CallbackInfo& info) + Napi::Value releaseAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - executeCreateDatabaseStart(true, info), - &Util::executeCreateDatabaseFinish); + return PromiseWorker::Run(info.Env(), + releaseStart(true, info), + &Management::releaseFinish); } - Napi::Value executeCreateDatabaseSync(const Napi::CallbackInfo& info) + Napi::Value releaseSync(const Napi::CallbackInfo& info) { try { - auto ret = executeCreateDatabaseStart(false, info)(); - return executeCreateDatabaseFinish(info.Env(), ret); + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); } catch (...) { @@ -7893,22 +8093,22 @@ friend class BaseClass; } } - static MethodStart decodeDateStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value decodeDateFinish(const Napi::Env env, void* ret); + static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); - Napi::Value decodeDateAsync(const Napi::CallbackInfo& info) + Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - decodeDateStart(true, info), - &Util::decodeDateFinish); + setOwnerStart(true, info), + &Management::setOwnerFinish); } - Napi::Value decodeDateSync(const Napi::CallbackInfo& info) + Napi::Value setOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = decodeDateStart(false, info)(); - return decodeDateFinish(info.Env(), ret); + auto ret = setOwnerStart(false, info)(); + return setOwnerFinish(info.Env(), ret); } catch (...) { @@ -7916,22 +8116,22 @@ friend class BaseClass; } } - static MethodStart decodeTimeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value decodeTimeFinish(const Napi::Env env, void* ret); + static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); - Napi::Value decodeTimeAsync(const Napi::CallbackInfo& info) + Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - decodeTimeStart(true, info), - &Util::decodeTimeFinish); + return PromiseWorker::Run(info.Env(), + getOwnerStart(true, info), + &Management::getOwnerFinish); } - Napi::Value decodeTimeSync(const Napi::CallbackInfo& info) + Napi::Value getOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = decodeTimeStart(false, info)(); - return decodeTimeFinish(info.Env(), ret); + auto ret = getOwnerStart(false, info)(); + return getOwnerFinish(info.Env(), ret); } catch (...) { @@ -7939,22 +8139,22 @@ friend class BaseClass; } } - static MethodStart encodeDateStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value encodeDateFinish(const Napi::Env env, int ret); + static MethodStart startStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value startFinish(const Napi::Env env, void* ret); - Napi::Value encodeDateAsync(const Napi::CallbackInfo& info) + Napi::Value startAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - encodeDateStart(true, info), - &Util::encodeDateFinish); + return PromiseWorker::Run(info.Env(), + startStart(true, info), + &Management::startFinish); } - Napi::Value encodeDateSync(const Napi::CallbackInfo& info) + Napi::Value startSync(const Napi::CallbackInfo& info) { try { - auto ret = encodeDateStart(false, info)(); - return encodeDateFinish(info.Env(), ret); + auto ret = startStart(false, info)(); + return startFinish(info.Env(), ret); } catch (...) { @@ -7962,45 +8162,22 @@ friend class BaseClass; } } - static MethodStart encodeTimeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value encodeTimeFinish(const Napi::Env env, int ret); + static MethodStart executeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value executeFinish(const Napi::Env env, int ret); - Napi::Value encodeTimeAsync(const Napi::CallbackInfo& info) + Napi::Value executeAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - encodeTimeStart(true, info), - &Util::encodeTimeFinish); - } - - Napi::Value encodeTimeSync(const Napi::CallbackInfo& info) - { - try - { - auto ret = encodeTimeStart(false, info)(); - return encodeTimeFinish(info.Env(), ret); - } - catch (...) - { - rethrowException(info.Env()); - } - } - - static MethodStart getClientVersionStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getClientVersionFinish(const Napi::Env env, unsigned ret); - - Napi::Value getClientVersionAsync(const Napi::CallbackInfo& info) - { - return PromiseWorker::Run(info.Env(), - getClientVersionStart(true, info), - &Util::getClientVersionFinish); + executeStart(true, info), + &Management::executeFinish); } - Napi::Value getClientVersionSync(const Napi::CallbackInfo& info) + Napi::Value executeSync(const Napi::CallbackInfo& info) { try { - auto ret = getClientVersionStart(false, info)(); - return getClientVersionFinish(info.Env(), ret); + auto ret = executeStart(false, info)(); + return executeFinish(info.Env(), ret); } catch (...) { @@ -8008,22 +8185,22 @@ friend class BaseClass; } } - static MethodStart getXpbBuilderStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getXpbBuilderFinish(const Napi::Env env, fb::IXpbBuilder* ret); + static MethodStart commitStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value commitFinish(const Napi::Env env, void* ret); - Napi::Value getXpbBuilderAsync(const Napi::CallbackInfo& info) + Napi::Value commitAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getXpbBuilderStart(true, info), - &Util::getXpbBuilderFinish); + return PromiseWorker::Run(info.Env(), + commitStart(true, info), + &Management::commitFinish); } - Napi::Value getXpbBuilderSync(const Napi::CallbackInfo& info) + Napi::Value commitSync(const Napi::CallbackInfo& info) { try { - auto ret = getXpbBuilderStart(false, info)(); - return getXpbBuilderFinish(info.Env(), ret); + auto ret = commitStart(false, info)(); + return commitFinish(info.Env(), ret); } catch (...) { @@ -8031,22 +8208,22 @@ friend class BaseClass; } } - static MethodStart setOffsetsStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setOffsetsFinish(const Napi::Env env, unsigned ret); + static MethodStart rollbackStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value rollbackFinish(const Napi::Env env, void* ret); - Napi::Value setOffsetsAsync(const Napi::CallbackInfo& info) + Napi::Value rollbackAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - setOffsetsStart(true, info), - &Util::setOffsetsFinish); + return PromiseWorker::Run(info.Env(), + rollbackStart(true, info), + &Management::rollbackFinish); } - Napi::Value setOffsetsSync(const Napi::CallbackInfo& info) + Napi::Value rollbackSync(const Napi::CallbackInfo& info) { try { - auto ret = setOffsetsStart(false, info)(); - return setOffsetsFinish(info.Env(), ret); + auto ret = rollbackStart(false, info)(); + return rollbackFinish(info.Env(), ret); } catch (...) { @@ -8057,33 +8234,33 @@ friend class BaseClass; }; -class OffsetsCallback : public BaseClass +class AuthBlock : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: - static MethodStart setOffsetStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setOffsetFinish(const Napi::Env env, void* ret); + static MethodStart getTypeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getTypeFinish(const Napi::Env env, OptString ret); - Napi::Value setOffsetAsync(const Napi::CallbackInfo& info) + Napi::Value getTypeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - setOffsetStart(true, info), - &OffsetsCallback::setOffsetFinish); + return PromiseWorker::Run(info.Env(), + getTypeStart(true, info), + &AuthBlock::getTypeFinish); } - Napi::Value setOffsetSync(const Napi::CallbackInfo& info) + Napi::Value getTypeSync(const Napi::CallbackInfo& info) { try { - auto ret = setOffsetStart(false, info)(); - return setOffsetFinish(info.Env(), ret); + auto ret = getTypeStart(false, info)(); + return getTypeFinish(info.Env(), ret); } catch (...) { @@ -8091,36 +8268,22 @@ friend class BaseClass; } } -}; - - -class XpbBuilder : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value disposeFinish(const Napi::Env env, void* ret); + static MethodStart getNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getNameFinish(const Napi::Env env, OptString ret); - Napi::Value disposeAsync(const Napi::CallbackInfo& info) + Napi::Value getNameAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - disposeStart(true, info), - &XpbBuilder::disposeFinish); + return PromiseWorker::Run(info.Env(), + getNameStart(true, info), + &AuthBlock::getNameFinish); } - Napi::Value disposeSync(const Napi::CallbackInfo& info) + Napi::Value getNameSync(const Napi::CallbackInfo& info) { try { - auto ret = disposeStart(false, info)(); - return disposeFinish(info.Env(), ret); + auto ret = getNameStart(false, info)(); + return getNameFinish(info.Env(), ret); } catch (...) { @@ -8128,22 +8291,22 @@ friend class BaseClass; } } - static MethodStart clearStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value clearFinish(const Napi::Env env, void* ret); + static MethodStart getPluginStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getPluginFinish(const Napi::Env env, OptString ret); - Napi::Value clearAsync(const Napi::CallbackInfo& info) + Napi::Value getPluginAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - clearStart(true, info), - &XpbBuilder::clearFinish); + return PromiseWorker::Run(info.Env(), + getPluginStart(true, info), + &AuthBlock::getPluginFinish); } - Napi::Value clearSync(const Napi::CallbackInfo& info) + Napi::Value getPluginSync(const Napi::CallbackInfo& info) { try { - auto ret = clearStart(false, info)(); - return clearFinish(info.Env(), ret); + auto ret = getPluginStart(false, info)(); + return getPluginFinish(info.Env(), ret); } catch (...) { @@ -8151,22 +8314,22 @@ friend class BaseClass; } } - static MethodStart removeCurrentStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value removeCurrentFinish(const Napi::Env env, void* ret); + static MethodStart getSecurityDbStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getSecurityDbFinish(const Napi::Env env, OptString ret); - Napi::Value removeCurrentAsync(const Napi::CallbackInfo& info) + Napi::Value getSecurityDbAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - removeCurrentStart(true, info), - &XpbBuilder::removeCurrentFinish); + return PromiseWorker::Run(info.Env(), + getSecurityDbStart(true, info), + &AuthBlock::getSecurityDbFinish); } - Napi::Value removeCurrentSync(const Napi::CallbackInfo& info) + Napi::Value getSecurityDbSync(const Napi::CallbackInfo& info) { try { - auto ret = removeCurrentStart(false, info)(); - return removeCurrentFinish(info.Env(), ret); + auto ret = getSecurityDbStart(false, info)(); + return getSecurityDbFinish(info.Env(), ret); } catch (...) { @@ -8174,22 +8337,22 @@ friend class BaseClass; } } - static MethodStart insertIntStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value insertIntFinish(const Napi::Env env, void* ret); + static MethodStart getOriginalPluginStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getOriginalPluginFinish(const Napi::Env env, OptString ret); - Napi::Value insertIntAsync(const Napi::CallbackInfo& info) + Napi::Value getOriginalPluginAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - insertIntStart(true, info), - &XpbBuilder::insertIntFinish); + return PromiseWorker::Run(info.Env(), + getOriginalPluginStart(true, info), + &AuthBlock::getOriginalPluginFinish); } - Napi::Value insertIntSync(const Napi::CallbackInfo& info) + Napi::Value getOriginalPluginSync(const Napi::CallbackInfo& info) { try { - auto ret = insertIntStart(false, info)(); - return insertIntFinish(info.Env(), ret); + auto ret = getOriginalPluginStart(false, info)(); + return getOriginalPluginFinish(info.Env(), ret); } catch (...) { @@ -8197,22 +8360,22 @@ friend class BaseClass; } } - static MethodStart insertBigIntStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value insertBigIntFinish(const Napi::Env env, void* ret); + static MethodStart nextStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value nextFinish(const Napi::Env env, FB_BOOLEAN ret); - Napi::Value insertBigIntAsync(const Napi::CallbackInfo& info) + Napi::Value nextAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - insertBigIntStart(true, info), - &XpbBuilder::insertBigIntFinish); + return PromiseWorker::Run(info.Env(), + nextStart(true, info), + &AuthBlock::nextFinish); } - Napi::Value insertBigIntSync(const Napi::CallbackInfo& info) + Napi::Value nextSync(const Napi::CallbackInfo& info) { try { - auto ret = insertBigIntStart(false, info)(); - return insertBigIntFinish(info.Env(), ret); + auto ret = nextStart(false, info)(); + return nextFinish(info.Env(), ret); } catch (...) { @@ -8220,22 +8383,22 @@ friend class BaseClass; } } - static MethodStart insertBytesStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value insertBytesFinish(const Napi::Env env, void* ret); + static MethodStart firstStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value firstFinish(const Napi::Env env, FB_BOOLEAN ret); - Napi::Value insertBytesAsync(const Napi::CallbackInfo& info) + Napi::Value firstAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - insertBytesStart(true, info), - &XpbBuilder::insertBytesFinish); + return PromiseWorker::Run(info.Env(), + firstStart(true, info), + &AuthBlock::firstFinish); } - Napi::Value insertBytesSync(const Napi::CallbackInfo& info) + Napi::Value firstSync(const Napi::CallbackInfo& info) { try { - auto ret = insertBytesStart(false, info)(); - return insertBytesFinish(info.Env(), ret); + auto ret = firstStart(false, info)(); + return firstFinish(info.Env(), ret); } catch (...) { @@ -8243,45 +8406,36 @@ friend class BaseClass; } } - static MethodStart insertStringStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value insertStringFinish(const Napi::Env env, void* ret); +}; - Napi::Value insertStringAsync(const Napi::CallbackInfo& info) - { - return PromiseWorker::Run(info.Env(), - insertStringStart(true, info), - &XpbBuilder::insertStringFinish); - } - Napi::Value insertStringSync(const Napi::CallbackInfo& info) - { - try - { - auto ret = insertStringStart(false, info)(); - return insertStringFinish(info.Env(), ret); - } - catch (...) - { - rethrowException(info.Env()); - } - } +class WireCryptPlugin : public BaseClass +{ +friend class BaseClass; - static MethodStart insertTagStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value insertTagFinish(const Napi::Env env, void* ret); +public: + using BaseClass::BaseClass; - Napi::Value insertTagAsync(const Napi::CallbackInfo& info) +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); + + Napi::Value addRefAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - insertTagStart(true, info), - &XpbBuilder::insertTagFinish); + addRefStart(true, info), + &WireCryptPlugin::addRefFinish); } - Napi::Value insertTagSync(const Napi::CallbackInfo& info) + Napi::Value addRefSync(const Napi::CallbackInfo& info) { try { - auto ret = insertTagStart(false, info)(); - return insertTagFinish(info.Env(), ret); + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); } catch (...) { @@ -8289,22 +8443,22 @@ friend class BaseClass; } } - static MethodStart isEofStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value isEofFinish(const Napi::Env env, FB_BOOLEAN ret); + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); - Napi::Value isEofAsync(const Napi::CallbackInfo& info) + Napi::Value releaseAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - isEofStart(true, info), - &XpbBuilder::isEofFinish); + return PromiseWorker::Run(info.Env(), + releaseStart(true, info), + &WireCryptPlugin::releaseFinish); } - Napi::Value isEofSync(const Napi::CallbackInfo& info) + Napi::Value releaseSync(const Napi::CallbackInfo& info) { try { - auto ret = isEofStart(false, info)(); - return isEofFinish(info.Env(), ret); + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); } catch (...) { @@ -8312,22 +8466,22 @@ friend class BaseClass; } } - static MethodStart moveNextStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value moveNextFinish(const Napi::Env env, void* ret); + static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); - Napi::Value moveNextAsync(const Napi::CallbackInfo& info) + Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - moveNextStart(true, info), - &XpbBuilder::moveNextFinish); + setOwnerStart(true, info), + &WireCryptPlugin::setOwnerFinish); } - Napi::Value moveNextSync(const Napi::CallbackInfo& info) + Napi::Value setOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = moveNextStart(false, info)(); - return moveNextFinish(info.Env(), ret); + auto ret = setOwnerStart(false, info)(); + return setOwnerFinish(info.Env(), ret); } catch (...) { @@ -8335,22 +8489,22 @@ friend class BaseClass; } } - static MethodStart rewindStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value rewindFinish(const Napi::Env env, void* ret); + static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); - Napi::Value rewindAsync(const Napi::CallbackInfo& info) + Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - rewindStart(true, info), - &XpbBuilder::rewindFinish); + return PromiseWorker::Run(info.Env(), + getOwnerStart(true, info), + &WireCryptPlugin::getOwnerFinish); } - Napi::Value rewindSync(const Napi::CallbackInfo& info) + Napi::Value getOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = rewindStart(false, info)(); - return rewindFinish(info.Env(), ret); + auto ret = getOwnerStart(false, info)(); + return getOwnerFinish(info.Env(), ret); } catch (...) { @@ -8358,22 +8512,22 @@ friend class BaseClass; } } - static MethodStart findFirstStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value findFirstFinish(const Napi::Env env, FB_BOOLEAN ret); + static MethodStart getKnownTypesStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getKnownTypesFinish(const Napi::Env env, OptString ret); - Napi::Value findFirstAsync(const Napi::CallbackInfo& info) + Napi::Value getKnownTypesAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - findFirstStart(true, info), - &XpbBuilder::findFirstFinish); + return PromiseWorker::Run(info.Env(), + getKnownTypesStart(true, info), + &WireCryptPlugin::getKnownTypesFinish); } - Napi::Value findFirstSync(const Napi::CallbackInfo& info) + Napi::Value getKnownTypesSync(const Napi::CallbackInfo& info) { try { - auto ret = findFirstStart(false, info)(); - return findFirstFinish(info.Env(), ret); + auto ret = getKnownTypesStart(false, info)(); + return getKnownTypesFinish(info.Env(), ret); } catch (...) { @@ -8381,22 +8535,22 @@ friend class BaseClass; } } - static MethodStart findNextStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value findNextFinish(const Napi::Env env, FB_BOOLEAN ret); + static MethodStart setKeyStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setKeyFinish(const Napi::Env env, void* ret); - Napi::Value findNextAsync(const Napi::CallbackInfo& info) + Napi::Value setKeyAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - findNextStart(true, info), - &XpbBuilder::findNextFinish); + return PromiseWorker::Run(info.Env(), + setKeyStart(true, info), + &WireCryptPlugin::setKeyFinish); } - Napi::Value findNextSync(const Napi::CallbackInfo& info) + Napi::Value setKeySync(const Napi::CallbackInfo& info) { try { - auto ret = findNextStart(false, info)(); - return findNextFinish(info.Env(), ret); + auto ret = setKeyStart(false, info)(); + return setKeyFinish(info.Env(), ret); } catch (...) { @@ -8404,22 +8558,22 @@ friend class BaseClass; } } - static MethodStart getTagStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getTagFinish(const Napi::Env env, unsigned char ret); + static MethodStart encryptStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value encryptFinish(const Napi::Env env, void* ret); - Napi::Value getTagAsync(const Napi::CallbackInfo& info) + Napi::Value encryptAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getTagStart(true, info), - &XpbBuilder::getTagFinish); + return PromiseWorker::Run(info.Env(), + encryptStart(true, info), + &WireCryptPlugin::encryptFinish); } - Napi::Value getTagSync(const Napi::CallbackInfo& info) + Napi::Value encryptSync(const Napi::CallbackInfo& info) { try { - auto ret = getTagStart(false, info)(); - return getTagFinish(info.Env(), ret); + auto ret = encryptStart(false, info)(); + return encryptFinish(info.Env(), ret); } catch (...) { @@ -8427,22 +8581,22 @@ friend class BaseClass; } } - static MethodStart getLengthStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getLengthFinish(const Napi::Env env, unsigned ret); + static MethodStart decryptStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value decryptFinish(const Napi::Env env, void* ret); - Napi::Value getLengthAsync(const Napi::CallbackInfo& info) + Napi::Value decryptAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getLengthStart(true, info), - &XpbBuilder::getLengthFinish); + return PromiseWorker::Run(info.Env(), + decryptStart(true, info), + &WireCryptPlugin::decryptFinish); } - Napi::Value getLengthSync(const Napi::CallbackInfo& info) + Napi::Value decryptSync(const Napi::CallbackInfo& info) { try { - auto ret = getLengthStart(false, info)(); - return getLengthFinish(info.Env(), ret); + auto ret = decryptStart(false, info)(); + return decryptFinish(info.Env(), ret); } catch (...) { @@ -8450,22 +8604,22 @@ friend class BaseClass; } } - static MethodStart getIntStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getIntFinish(const Napi::Env env, int ret); + static MethodStart getSpecificDataStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getSpecificDataFinish(const Napi::Env env, const unsigned char* ret); - Napi::Value getIntAsync(const Napi::CallbackInfo& info) + Napi::Value getSpecificDataAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getIntStart(true, info), - &XpbBuilder::getIntFinish); + return PromiseWorker::Run(info.Env(), + getSpecificDataStart(true, info), + &WireCryptPlugin::getSpecificDataFinish); } - Napi::Value getIntSync(const Napi::CallbackInfo& info) + Napi::Value getSpecificDataSync(const Napi::CallbackInfo& info) { try { - auto ret = getIntStart(false, info)(); - return getIntFinish(info.Env(), ret); + auto ret = getSpecificDataStart(false, info)(); + return getSpecificDataFinish(info.Env(), ret); } catch (...) { @@ -8473,22 +8627,22 @@ friend class BaseClass; } } - static MethodStart getBigIntStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getBigIntFinish(const Napi::Env env, int64_t ret); + static MethodStart setSpecificDataStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setSpecificDataFinish(const Napi::Env env, void* ret); - Napi::Value getBigIntAsync(const Napi::CallbackInfo& info) + Napi::Value setSpecificDataAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getBigIntStart(true, info), - &XpbBuilder::getBigIntFinish); + return PromiseWorker::Run(info.Env(), + setSpecificDataStart(true, info), + &WireCryptPlugin::setSpecificDataFinish); } - Napi::Value getBigIntSync(const Napi::CallbackInfo& info) + Napi::Value setSpecificDataSync(const Napi::CallbackInfo& info) { try { - auto ret = getBigIntStart(false, info)(); - return getBigIntFinish(info.Env(), ret); + auto ret = setSpecificDataStart(false, info)(); + return setSpecificDataFinish(info.Env(), ret); } catch (...) { @@ -8496,22 +8650,36 @@ friend class BaseClass; } } - static MethodStart getStringStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getStringFinish(const Napi::Env env, OptString ret); +}; - Napi::Value getStringAsync(const Napi::CallbackInfo& info) + +class CryptKeyCallback : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart callbackStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value callbackFinish(const Napi::Env env, unsigned ret); + + Napi::Value callbackAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getStringStart(true, info), - &XpbBuilder::getStringFinish); + return PromiseWorker::Run(info.Env(), + callbackStart(true, info), + &CryptKeyCallback::callbackFinish); } - Napi::Value getStringSync(const Napi::CallbackInfo& info) + Napi::Value callbackSync(const Napi::CallbackInfo& info) { try { - auto ret = getStringStart(false, info)(); - return getStringFinish(info.Env(), ret); + auto ret = callbackStart(false, info)(); + return callbackFinish(info.Env(), ret); } catch (...) { @@ -8519,22 +8687,22 @@ friend class BaseClass; } } - static MethodStart getBytesStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getBytesFinish(const Napi::Env env, const unsigned char* ret); + static MethodStart dummy1Start(bool async, const Napi::CallbackInfo& info); + static Napi::Value dummy1Finish(const Napi::Env env, void* ret); - Napi::Value getBytesAsync(const Napi::CallbackInfo& info) + Napi::Value dummy1Async(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getBytesStart(true, info), - &XpbBuilder::getBytesFinish); + return PromiseWorker::Run(info.Env(), + dummy1Start(true, info), + &CryptKeyCallback::dummy1Finish); } - Napi::Value getBytesSync(const Napi::CallbackInfo& info) + Napi::Value dummy1Sync(const Napi::CallbackInfo& info) { try { - auto ret = getBytesStart(false, info)(); - return getBytesFinish(info.Env(), ret); + auto ret = dummy1Start(false, info)(); + return dummy1Finish(info.Env(), ret); } catch (...) { @@ -8542,22 +8710,22 @@ friend class BaseClass; } } - static MethodStart getBufferLengthStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getBufferLengthFinish(const Napi::Env env, unsigned ret); + static MethodStart dummy2Start(bool async, const Napi::CallbackInfo& info); + static Napi::Value dummy2Finish(const Napi::Env env, void* ret); - Napi::Value getBufferLengthAsync(const Napi::CallbackInfo& info) + Napi::Value dummy2Async(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getBufferLengthStart(true, info), - &XpbBuilder::getBufferLengthFinish); + return PromiseWorker::Run(info.Env(), + dummy2Start(true, info), + &CryptKeyCallback::dummy2Finish); } - Napi::Value getBufferLengthSync(const Napi::CallbackInfo& info) + Napi::Value dummy2Sync(const Napi::CallbackInfo& info) { try { - auto ret = getBufferLengthStart(false, info)(); - return getBufferLengthFinish(info.Env(), ret); + auto ret = dummy2Start(false, info)(); + return dummy2Finish(info.Env(), ret); } catch (...) { @@ -8565,22 +8733,22 @@ friend class BaseClass; } } - static MethodStart getBufferStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getBufferFinish(const Napi::Env env, const unsigned char* ret); + static MethodStart getHashLengthStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getHashLengthFinish(const Napi::Env env, int ret); - Napi::Value getBufferAsync(const Napi::CallbackInfo& info) + Napi::Value getHashLengthAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getBufferStart(true, info), - &XpbBuilder::getBufferFinish); + return PromiseWorker::Run(info.Env(), + getHashLengthStart(true, info), + &CryptKeyCallback::getHashLengthFinish); } - Napi::Value getBufferSync(const Napi::CallbackInfo& info) + Napi::Value getHashLengthSync(const Napi::CallbackInfo& info) { try { - auto ret = getBufferStart(false, info)(); - return getBufferFinish(info.Env(), ret); + auto ret = getHashLengthStart(false, info)(); + return getHashLengthFinish(info.Env(), ret); } catch (...) { @@ -8588,36 +8756,22 @@ friend class BaseClass; } } -}; - - -class TraceConnection : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart getKindStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getKindFinish(const Napi::Env env, unsigned ret); + static MethodStart getHashDataStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getHashDataFinish(const Napi::Env env, void* ret); - Napi::Value getKindAsync(const Napi::CallbackInfo& info) + Napi::Value getHashDataAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getKindStart(true, info), - &TraceConnection::getKindFinish); + return PromiseWorker::Run(info.Env(), + getHashDataStart(true, info), + &CryptKeyCallback::getHashDataFinish); } - Napi::Value getKindSync(const Napi::CallbackInfo& info) + Napi::Value getHashDataSync(const Napi::CallbackInfo& info) { try { - auto ret = getKindStart(false, info)(); - return getKindFinish(info.Env(), ret); + auto ret = getHashDataStart(false, info)(); + return getHashDataFinish(info.Env(), ret); } catch (...) { @@ -8625,22 +8779,36 @@ friend class BaseClass; } } - static MethodStart getProcessIDStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getProcessIDFinish(const Napi::Env env, int ret); +}; - Napi::Value getProcessIDAsync(const Napi::CallbackInfo& info) + +class KeyHolderPlugin : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); + + Napi::Value addRefAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getProcessIDStart(true, info), - &TraceConnection::getProcessIDFinish); + return PromiseWorker::Run(info.Env(), + addRefStart(true, info), + &KeyHolderPlugin::addRefFinish); } - Napi::Value getProcessIDSync(const Napi::CallbackInfo& info) + Napi::Value addRefSync(const Napi::CallbackInfo& info) { try { - auto ret = getProcessIDStart(false, info)(); - return getProcessIDFinish(info.Env(), ret); + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); } catch (...) { @@ -8648,22 +8816,22 @@ friend class BaseClass; } } - static MethodStart getUserNameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getUserNameFinish(const Napi::Env env, OptString ret); + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); - Napi::Value getUserNameAsync(const Napi::CallbackInfo& info) + Napi::Value releaseAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getUserNameStart(true, info), - &TraceConnection::getUserNameFinish); + return PromiseWorker::Run(info.Env(), + releaseStart(true, info), + &KeyHolderPlugin::releaseFinish); } - Napi::Value getUserNameSync(const Napi::CallbackInfo& info) + Napi::Value releaseSync(const Napi::CallbackInfo& info) { try { - auto ret = getUserNameStart(false, info)(); - return getUserNameFinish(info.Env(), ret); + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); } catch (...) { @@ -8671,22 +8839,22 @@ friend class BaseClass; } } - static MethodStart getRoleNameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getRoleNameFinish(const Napi::Env env, OptString ret); + static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); - Napi::Value getRoleNameAsync(const Napi::CallbackInfo& info) + Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getRoleNameStart(true, info), - &TraceConnection::getRoleNameFinish); + return PromiseWorker::Run(info.Env(), + setOwnerStart(true, info), + &KeyHolderPlugin::setOwnerFinish); } - Napi::Value getRoleNameSync(const Napi::CallbackInfo& info) + Napi::Value setOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = getRoleNameStart(false, info)(); - return getRoleNameFinish(info.Env(), ret); + auto ret = setOwnerStart(false, info)(); + return setOwnerFinish(info.Env(), ret); } catch (...) { @@ -8694,22 +8862,22 @@ friend class BaseClass; } } - static MethodStart getCharSetStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getCharSetFinish(const Napi::Env env, OptString ret); + static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); - Napi::Value getCharSetAsync(const Napi::CallbackInfo& info) + Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getCharSetStart(true, info), - &TraceConnection::getCharSetFinish); + return PromiseWorker::Run(info.Env(), + getOwnerStart(true, info), + &KeyHolderPlugin::getOwnerFinish); } - Napi::Value getCharSetSync(const Napi::CallbackInfo& info) + Napi::Value getOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = getCharSetStart(false, info)(); - return getCharSetFinish(info.Env(), ret); + auto ret = getOwnerStart(false, info)(); + return getOwnerFinish(info.Env(), ret); } catch (...) { @@ -8717,22 +8885,22 @@ friend class BaseClass; } } - static MethodStart getRemoteProtocolStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getRemoteProtocolFinish(const Napi::Env env, OptString ret); + static MethodStart keyCallbackStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value keyCallbackFinish(const Napi::Env env, int ret); - Napi::Value getRemoteProtocolAsync(const Napi::CallbackInfo& info) + Napi::Value keyCallbackAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getRemoteProtocolStart(true, info), - &TraceConnection::getRemoteProtocolFinish); + return PromiseWorker::Run(info.Env(), + keyCallbackStart(true, info), + &KeyHolderPlugin::keyCallbackFinish); } - Napi::Value getRemoteProtocolSync(const Napi::CallbackInfo& info) + Napi::Value keyCallbackSync(const Napi::CallbackInfo& info) { try { - auto ret = getRemoteProtocolStart(false, info)(); - return getRemoteProtocolFinish(info.Env(), ret); + auto ret = keyCallbackStart(false, info)(); + return keyCallbackFinish(info.Env(), ret); } catch (...) { @@ -8740,22 +8908,22 @@ friend class BaseClass; } } - static MethodStart getRemoteAddressStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getRemoteAddressFinish(const Napi::Env env, OptString ret); + static MethodStart keyHandleStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value keyHandleFinish(const Napi::Env env, fb::ICryptKeyCallback* ret); - Napi::Value getRemoteAddressAsync(const Napi::CallbackInfo& info) + Napi::Value keyHandleAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getRemoteAddressStart(true, info), - &TraceConnection::getRemoteAddressFinish); + return PromiseWorker::Run(info.Env(), + keyHandleStart(true, info), + &KeyHolderPlugin::keyHandleFinish); } - Napi::Value getRemoteAddressSync(const Napi::CallbackInfo& info) + Napi::Value keyHandleSync(const Napi::CallbackInfo& info) { try { - auto ret = getRemoteAddressStart(false, info)(); - return getRemoteAddressFinish(info.Env(), ret); + auto ret = keyHandleStart(false, info)(); + return keyHandleFinish(info.Env(), ret); } catch (...) { @@ -8763,22 +8931,22 @@ friend class BaseClass; } } - static MethodStart getRemoteProcessIDStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getRemoteProcessIDFinish(const Napi::Env env, int ret); + static MethodStart useOnlyOwnKeysStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value useOnlyOwnKeysFinish(const Napi::Env env, FB_BOOLEAN ret); - Napi::Value getRemoteProcessIDAsync(const Napi::CallbackInfo& info) + Napi::Value useOnlyOwnKeysAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getRemoteProcessIDStart(true, info), - &TraceConnection::getRemoteProcessIDFinish); + return PromiseWorker::Run(info.Env(), + useOnlyOwnKeysStart(true, info), + &KeyHolderPlugin::useOnlyOwnKeysFinish); } - Napi::Value getRemoteProcessIDSync(const Napi::CallbackInfo& info) + Napi::Value useOnlyOwnKeysSync(const Napi::CallbackInfo& info) { try { - auto ret = getRemoteProcessIDStart(false, info)(); - return getRemoteProcessIDFinish(info.Env(), ret); + auto ret = useOnlyOwnKeysStart(false, info)(); + return useOnlyOwnKeysFinish(info.Env(), ret); } catch (...) { @@ -8786,22 +8954,22 @@ friend class BaseClass; } } - static MethodStart getRemoteProcessNameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getRemoteProcessNameFinish(const Napi::Env env, OptString ret); + static MethodStart chainHandleStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value chainHandleFinish(const Napi::Env env, fb::ICryptKeyCallback* ret); - Napi::Value getRemoteProcessNameAsync(const Napi::CallbackInfo& info) + Napi::Value chainHandleAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getRemoteProcessNameStart(true, info), - &TraceConnection::getRemoteProcessNameFinish); + return PromiseWorker::Run(info.Env(), + chainHandleStart(true, info), + &KeyHolderPlugin::chainHandleFinish); } - Napi::Value getRemoteProcessNameSync(const Napi::CallbackInfo& info) + Napi::Value chainHandleSync(const Napi::CallbackInfo& info) { try { - auto ret = getRemoteProcessNameStart(false, info)(); - return getRemoteProcessNameFinish(info.Env(), ret); + auto ret = chainHandleStart(false, info)(); + return chainHandleFinish(info.Env(), ret); } catch (...) { @@ -8812,33 +8980,33 @@ friend class BaseClass; }; -class TraceDatabaseConnection : public BaseClass +class DbCryptInfo : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: - static MethodStart getKindStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getKindFinish(const Napi::Env env, unsigned ret); + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); - Napi::Value getKindAsync(const Napi::CallbackInfo& info) + Napi::Value addRefAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getKindStart(true, info), - &TraceDatabaseConnection::getKindFinish); + return PromiseWorker::Run(info.Env(), + addRefStart(true, info), + &DbCryptInfo::addRefFinish); } - Napi::Value getKindSync(const Napi::CallbackInfo& info) + Napi::Value addRefSync(const Napi::CallbackInfo& info) { try { - auto ret = getKindStart(false, info)(); - return getKindFinish(info.Env(), ret); + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); } catch (...) { @@ -8846,22 +9014,22 @@ friend class BaseClass; } } - static MethodStart getProcessIDStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getProcessIDFinish(const Napi::Env env, int ret); + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); - Napi::Value getProcessIDAsync(const Napi::CallbackInfo& info) + Napi::Value releaseAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - getProcessIDStart(true, info), - &TraceDatabaseConnection::getProcessIDFinish); + releaseStart(true, info), + &DbCryptInfo::releaseFinish); } - Napi::Value getProcessIDSync(const Napi::CallbackInfo& info) + Napi::Value releaseSync(const Napi::CallbackInfo& info) { try { - auto ret = getProcessIDStart(false, info)(); - return getProcessIDFinish(info.Env(), ret); + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); } catch (...) { @@ -8869,22 +9037,22 @@ friend class BaseClass; } } - static MethodStart getUserNameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getUserNameFinish(const Napi::Env env, OptString ret); + static MethodStart getDatabaseFullPathStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getDatabaseFullPathFinish(const Napi::Env env, OptString ret); - Napi::Value getUserNameAsync(const Napi::CallbackInfo& info) + Napi::Value getDatabaseFullPathAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - getUserNameStart(true, info), - &TraceDatabaseConnection::getUserNameFinish); + getDatabaseFullPathStart(true, info), + &DbCryptInfo::getDatabaseFullPathFinish); } - Napi::Value getUserNameSync(const Napi::CallbackInfo& info) + Napi::Value getDatabaseFullPathSync(const Napi::CallbackInfo& info) { try { - auto ret = getUserNameStart(false, info)(); - return getUserNameFinish(info.Env(), ret); + auto ret = getDatabaseFullPathStart(false, info)(); + return getDatabaseFullPathFinish(info.Env(), ret); } catch (...) { @@ -8892,45 +9060,36 @@ friend class BaseClass; } } - static MethodStart getRoleNameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getRoleNameFinish(const Napi::Env env, OptString ret); +}; - Napi::Value getRoleNameAsync(const Napi::CallbackInfo& info) - { - return PromiseWorker::Run(info.Env(), - getRoleNameStart(true, info), - &TraceDatabaseConnection::getRoleNameFinish); - } - Napi::Value getRoleNameSync(const Napi::CallbackInfo& info) - { - try - { - auto ret = getRoleNameStart(false, info)(); - return getRoleNameFinish(info.Env(), ret); - } - catch (...) - { - rethrowException(info.Env()); - } - } +class DbCryptPlugin : public BaseClass +{ +friend class BaseClass; - static MethodStart getCharSetStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getCharSetFinish(const Napi::Env env, OptString ret); +public: + using BaseClass::BaseClass; - Napi::Value getCharSetAsync(const Napi::CallbackInfo& info) +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); + + Napi::Value addRefAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getCharSetStart(true, info), - &TraceDatabaseConnection::getCharSetFinish); + return PromiseWorker::Run(info.Env(), + addRefStart(true, info), + &DbCryptPlugin::addRefFinish); } - Napi::Value getCharSetSync(const Napi::CallbackInfo& info) + Napi::Value addRefSync(const Napi::CallbackInfo& info) { try { - auto ret = getCharSetStart(false, info)(); - return getCharSetFinish(info.Env(), ret); + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); } catch (...) { @@ -8938,22 +9097,22 @@ friend class BaseClass; } } - static MethodStart getRemoteProtocolStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getRemoteProtocolFinish(const Napi::Env env, OptString ret); + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); - Napi::Value getRemoteProtocolAsync(const Napi::CallbackInfo& info) + Napi::Value releaseAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getRemoteProtocolStart(true, info), - &TraceDatabaseConnection::getRemoteProtocolFinish); + return PromiseWorker::Run(info.Env(), + releaseStart(true, info), + &DbCryptPlugin::releaseFinish); } - Napi::Value getRemoteProtocolSync(const Napi::CallbackInfo& info) + Napi::Value releaseSync(const Napi::CallbackInfo& info) { try { - auto ret = getRemoteProtocolStart(false, info)(); - return getRemoteProtocolFinish(info.Env(), ret); + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); } catch (...) { @@ -8961,22 +9120,22 @@ friend class BaseClass; } } - static MethodStart getRemoteAddressStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getRemoteAddressFinish(const Napi::Env env, OptString ret); + static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); - Napi::Value getRemoteAddressAsync(const Napi::CallbackInfo& info) + Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getRemoteAddressStart(true, info), - &TraceDatabaseConnection::getRemoteAddressFinish); + return PromiseWorker::Run(info.Env(), + setOwnerStart(true, info), + &DbCryptPlugin::setOwnerFinish); } - Napi::Value getRemoteAddressSync(const Napi::CallbackInfo& info) + Napi::Value setOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = getRemoteAddressStart(false, info)(); - return getRemoteAddressFinish(info.Env(), ret); + auto ret = setOwnerStart(false, info)(); + return setOwnerFinish(info.Env(), ret); } catch (...) { @@ -8984,22 +9143,22 @@ friend class BaseClass; } } - static MethodStart getRemoteProcessIDStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getRemoteProcessIDFinish(const Napi::Env env, int ret); + static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); - Napi::Value getRemoteProcessIDAsync(const Napi::CallbackInfo& info) + Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getRemoteProcessIDStart(true, info), - &TraceDatabaseConnection::getRemoteProcessIDFinish); + return PromiseWorker::Run(info.Env(), + getOwnerStart(true, info), + &DbCryptPlugin::getOwnerFinish); } - Napi::Value getRemoteProcessIDSync(const Napi::CallbackInfo& info) + Napi::Value getOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = getRemoteProcessIDStart(false, info)(); - return getRemoteProcessIDFinish(info.Env(), ret); + auto ret = getOwnerStart(false, info)(); + return getOwnerFinish(info.Env(), ret); } catch (...) { @@ -9007,22 +9166,50 @@ friend class BaseClass; } } - static MethodStart getRemoteProcessNameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getRemoteProcessNameFinish(const Napi::Env env, OptString ret); +}; - Napi::Value getRemoteProcessNameAsync(const Napi::CallbackInfo& info) + +class ExternalContext : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: +}; + + +class ExternalResultSet : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value disposeFinish(const Napi::Env env, void* ret); + + Napi::Value disposeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getRemoteProcessNameStart(true, info), - &TraceDatabaseConnection::getRemoteProcessNameFinish); + return PromiseWorker::Run(info.Env(), + disposeStart(true, info), + &ExternalResultSet::disposeFinish); } - Napi::Value getRemoteProcessNameSync(const Napi::CallbackInfo& info) + Napi::Value disposeSync(const Napi::CallbackInfo& info) { try { - auto ret = getRemoteProcessNameStart(false, info)(); - return getRemoteProcessNameFinish(info.Env(), ret); + auto ret = disposeStart(false, info)(); + return disposeFinish(info.Env(), ret); } catch (...) { @@ -9030,22 +9217,22 @@ friend class BaseClass; } } - static MethodStart getConnectionIDStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getConnectionIDFinish(const Napi::Env env, int64_t ret); + static MethodStart fetchStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value fetchFinish(const Napi::Env env, FB_BOOLEAN ret); - Napi::Value getConnectionIDAsync(const Napi::CallbackInfo& info) + Napi::Value fetchAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getConnectionIDStart(true, info), - &TraceDatabaseConnection::getConnectionIDFinish); + return PromiseWorker::Run(info.Env(), + fetchStart(true, info), + &ExternalResultSet::fetchFinish); } - Napi::Value getConnectionIDSync(const Napi::CallbackInfo& info) + Napi::Value fetchSync(const Napi::CallbackInfo& info) { try { - auto ret = getConnectionIDStart(false, info)(); - return getConnectionIDFinish(info.Env(), ret); + auto ret = fetchStart(false, info)(); + return fetchFinish(info.Env(), ret); } catch (...) { @@ -9053,22 +9240,36 @@ friend class BaseClass; } } - static MethodStart getDatabaseNameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getDatabaseNameFinish(const Napi::Env env, OptString ret); +}; - Napi::Value getDatabaseNameAsync(const Napi::CallbackInfo& info) + +class ExternalFunction : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value disposeFinish(const Napi::Env env, void* ret); + + Napi::Value disposeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getDatabaseNameStart(true, info), - &TraceDatabaseConnection::getDatabaseNameFinish); + return PromiseWorker::Run(info.Env(), + disposeStart(true, info), + &ExternalFunction::disposeFinish); } - Napi::Value getDatabaseNameSync(const Napi::CallbackInfo& info) + Napi::Value disposeSync(const Napi::CallbackInfo& info) { try { - auto ret = getDatabaseNameStart(false, info)(); - return getDatabaseNameFinish(info.Env(), ret); + auto ret = disposeStart(false, info)(); + return disposeFinish(info.Env(), ret); } catch (...) { @@ -9079,173 +9280,107 @@ friend class BaseClass; }; -class TraceTransaction : public BaseClass +class ExternalProcedure : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: -}; - - -class TraceParams : public BaseClass -{ -friend class BaseClass; + static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value disposeFinish(const Napi::Env env, void* ret); -public: - using BaseClass::BaseClass; + Napi::Value disposeAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + disposeStart(true, info), + &ExternalProcedure::disposeFinish); + } -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + Napi::Value disposeSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = disposeStart(false, info)(); + return disposeFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } -private: }; -class TraceStatement : public BaseClass +class ExternalTrigger : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: -}; - - -class TraceSQLStatement : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: -}; - - -class TraceBLRStatement : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: -}; - - -class TraceDYNRequest : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: -}; - - -class TraceContextVariable : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: -}; - - -class TraceProcedure : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: -}; - - -class TraceFunction : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: -}; - - -class TraceTrigger : public BaseClass -{ -friend class BaseClass; + static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value disposeFinish(const Napi::Env env, void* ret); -public: - using BaseClass::BaseClass; + Napi::Value disposeAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + disposeStart(true, info), + &ExternalTrigger::disposeFinish); + } -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + Napi::Value disposeSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = disposeStart(false, info)(); + return disposeFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } -private: }; -class TraceServiceConnection : public BaseClass +class RoutineMetadata : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: - static MethodStart getKindStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getKindFinish(const Napi::Env env, unsigned ret); + static MethodStart getPackageStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getPackageFinish(const Napi::Env env, OptString ret); - Napi::Value getKindAsync(const Napi::CallbackInfo& info) + Napi::Value getPackageAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getKindStart(true, info), - &TraceServiceConnection::getKindFinish); + return PromiseWorker::Run(info.Env(), + getPackageStart(true, info), + &RoutineMetadata::getPackageFinish); } - Napi::Value getKindSync(const Napi::CallbackInfo& info) + Napi::Value getPackageSync(const Napi::CallbackInfo& info) { try { - auto ret = getKindStart(false, info)(); - return getKindFinish(info.Env(), ret); + auto ret = getPackageStart(false, info)(); + return getPackageFinish(info.Env(), ret); } catch (...) { @@ -9253,22 +9388,22 @@ friend class BaseClass; } } - static MethodStart getProcessIDStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getProcessIDFinish(const Napi::Env env, int ret); + static MethodStart getNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getNameFinish(const Napi::Env env, OptString ret); - Napi::Value getProcessIDAsync(const Napi::CallbackInfo& info) + Napi::Value getNameAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getProcessIDStart(true, info), - &TraceServiceConnection::getProcessIDFinish); + return PromiseWorker::Run(info.Env(), + getNameStart(true, info), + &RoutineMetadata::getNameFinish); } - Napi::Value getProcessIDSync(const Napi::CallbackInfo& info) + Napi::Value getNameSync(const Napi::CallbackInfo& info) { try { - auto ret = getProcessIDStart(false, info)(); - return getProcessIDFinish(info.Env(), ret); + auto ret = getNameStart(false, info)(); + return getNameFinish(info.Env(), ret); } catch (...) { @@ -9276,22 +9411,22 @@ friend class BaseClass; } } - static MethodStart getUserNameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getUserNameFinish(const Napi::Env env, OptString ret); + static MethodStart getEntryPointStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getEntryPointFinish(const Napi::Env env, OptString ret); - Napi::Value getUserNameAsync(const Napi::CallbackInfo& info) + Napi::Value getEntryPointAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - getUserNameStart(true, info), - &TraceServiceConnection::getUserNameFinish); + getEntryPointStart(true, info), + &RoutineMetadata::getEntryPointFinish); } - Napi::Value getUserNameSync(const Napi::CallbackInfo& info) + Napi::Value getEntryPointSync(const Napi::CallbackInfo& info) { try { - auto ret = getUserNameStart(false, info)(); - return getUserNameFinish(info.Env(), ret); + auto ret = getEntryPointStart(false, info)(); + return getEntryPointFinish(info.Env(), ret); } catch (...) { @@ -9299,22 +9434,22 @@ friend class BaseClass; } } - static MethodStart getRoleNameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getRoleNameFinish(const Napi::Env env, OptString ret); + static MethodStart getBodyStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getBodyFinish(const Napi::Env env, OptString ret); - Napi::Value getRoleNameAsync(const Napi::CallbackInfo& info) + Napi::Value getBodyAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - getRoleNameStart(true, info), - &TraceServiceConnection::getRoleNameFinish); + getBodyStart(true, info), + &RoutineMetadata::getBodyFinish); } - Napi::Value getRoleNameSync(const Napi::CallbackInfo& info) + Napi::Value getBodySync(const Napi::CallbackInfo& info) { try { - auto ret = getRoleNameStart(false, info)(); - return getRoleNameFinish(info.Env(), ret); + auto ret = getBodyStart(false, info)(); + return getBodyFinish(info.Env(), ret); } catch (...) { @@ -9322,22 +9457,22 @@ friend class BaseClass; } } - static MethodStart getCharSetStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getCharSetFinish(const Napi::Env env, OptString ret); + static MethodStart getInputMetadataStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getInputMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret); - Napi::Value getCharSetAsync(const Napi::CallbackInfo& info) + Napi::Value getInputMetadataAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getCharSetStart(true, info), - &TraceServiceConnection::getCharSetFinish); + return PromiseWorker::Run(info.Env(), + getInputMetadataStart(true, info), + &RoutineMetadata::getInputMetadataFinish); } - Napi::Value getCharSetSync(const Napi::CallbackInfo& info) + Napi::Value getInputMetadataSync(const Napi::CallbackInfo& info) { try { - auto ret = getCharSetStart(false, info)(); - return getCharSetFinish(info.Env(), ret); + auto ret = getInputMetadataStart(false, info)(); + return getInputMetadataFinish(info.Env(), ret); } catch (...) { @@ -9345,22 +9480,22 @@ friend class BaseClass; } } - static MethodStart getRemoteProtocolStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getRemoteProtocolFinish(const Napi::Env env, OptString ret); + static MethodStart getOutputMetadataStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getOutputMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret); - Napi::Value getRemoteProtocolAsync(const Napi::CallbackInfo& info) + Napi::Value getOutputMetadataAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getRemoteProtocolStart(true, info), - &TraceServiceConnection::getRemoteProtocolFinish); + return PromiseWorker::Run(info.Env(), + getOutputMetadataStart(true, info), + &RoutineMetadata::getOutputMetadataFinish); } - Napi::Value getRemoteProtocolSync(const Napi::CallbackInfo& info) + Napi::Value getOutputMetadataSync(const Napi::CallbackInfo& info) { try { - auto ret = getRemoteProtocolStart(false, info)(); - return getRemoteProtocolFinish(info.Env(), ret); + auto ret = getOutputMetadataStart(false, info)(); + return getOutputMetadataFinish(info.Env(), ret); } catch (...) { @@ -9368,22 +9503,22 @@ friend class BaseClass; } } - static MethodStart getRemoteAddressStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getRemoteAddressFinish(const Napi::Env env, OptString ret); + static MethodStart getTriggerMetadataStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getTriggerMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret); - Napi::Value getRemoteAddressAsync(const Napi::CallbackInfo& info) + Napi::Value getTriggerMetadataAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getRemoteAddressStart(true, info), - &TraceServiceConnection::getRemoteAddressFinish); + return PromiseWorker::Run(info.Env(), + getTriggerMetadataStart(true, info), + &RoutineMetadata::getTriggerMetadataFinish); } - Napi::Value getRemoteAddressSync(const Napi::CallbackInfo& info) + Napi::Value getTriggerMetadataSync(const Napi::CallbackInfo& info) { try { - auto ret = getRemoteAddressStart(false, info)(); - return getRemoteAddressFinish(info.Env(), ret); + auto ret = getTriggerMetadataStart(false, info)(); + return getTriggerMetadataFinish(info.Env(), ret); } catch (...) { @@ -9391,22 +9526,22 @@ friend class BaseClass; } } - static MethodStart getRemoteProcessIDStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getRemoteProcessIDFinish(const Napi::Env env, int ret); + static MethodStart getTriggerTableStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getTriggerTableFinish(const Napi::Env env, OptString ret); - Napi::Value getRemoteProcessIDAsync(const Napi::CallbackInfo& info) + Napi::Value getTriggerTableAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getRemoteProcessIDStart(true, info), - &TraceServiceConnection::getRemoteProcessIDFinish); + return PromiseWorker::Run(info.Env(), + getTriggerTableStart(true, info), + &RoutineMetadata::getTriggerTableFinish); } - Napi::Value getRemoteProcessIDSync(const Napi::CallbackInfo& info) + Napi::Value getTriggerTableSync(const Napi::CallbackInfo& info) { try { - auto ret = getRemoteProcessIDStart(false, info)(); - return getRemoteProcessIDFinish(info.Env(), ret); + auto ret = getTriggerTableStart(false, info)(); + return getTriggerTableFinish(info.Env(), ret); } catch (...) { @@ -9414,22 +9549,22 @@ friend class BaseClass; } } - static MethodStart getRemoteProcessNameStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getRemoteProcessNameFinish(const Napi::Env env, OptString ret); + static MethodStart getTriggerTypeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getTriggerTypeFinish(const Napi::Env env, unsigned ret); - Napi::Value getRemoteProcessNameAsync(const Napi::CallbackInfo& info) + Napi::Value getTriggerTypeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getRemoteProcessNameStart(true, info), - &TraceServiceConnection::getRemoteProcessNameFinish); + return PromiseWorker::Run(info.Env(), + getTriggerTypeStart(true, info), + &RoutineMetadata::getTriggerTypeFinish); } - Napi::Value getRemoteProcessNameSync(const Napi::CallbackInfo& info) + Napi::Value getTriggerTypeSync(const Napi::CallbackInfo& info) { try { - auto ret = getRemoteProcessNameStart(false, info)(); - return getRemoteProcessNameFinish(info.Env(), ret); + auto ret = getTriggerTypeStart(false, info)(); + return getTriggerTypeFinish(info.Env(), ret); } catch (...) { @@ -9440,43 +9575,15 @@ friend class BaseClass; }; -class TraceStatusVector : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: -}; - - -class TraceSweepInfo : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: -}; - - -class TraceLogWriter : public BaseClass +class ExternalEngine : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); @@ -9486,7 +9593,7 @@ friend class BaseClass; { return PromiseWorker::Run(info.Env(), addRefStart(true, info), - &TraceLogWriter::addRefFinish); + &ExternalEngine::addRefFinish); } Napi::Value addRefSync(const Napi::CallbackInfo& info) @@ -9509,7 +9616,7 @@ friend class BaseClass; { return PromiseWorker::Run(info.Env(), releaseStart(true, info), - &TraceLogWriter::releaseFinish); + &ExternalEngine::releaseFinish); } Napi::Value releaseSync(const Napi::CallbackInfo& info) @@ -9525,50 +9632,22 @@ friend class BaseClass; } } -}; - - -class TraceInitInfo : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: -}; - - -class TracePlugin : public BaseClass -{ -friend class BaseClass; - -public: - using BaseClass::BaseClass; - -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); - -private: - static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value addRefFinish(const Napi::Env env, void* ret); + static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); - Napi::Value addRefAsync(const Napi::CallbackInfo& info) + Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - addRefStart(true, info), - &TracePlugin::addRefFinish); + setOwnerStart(true, info), + &ExternalEngine::setOwnerFinish); } - Napi::Value addRefSync(const Napi::CallbackInfo& info) + Napi::Value setOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = addRefStart(false, info)(); - return addRefFinish(info.Env(), ret); + auto ret = setOwnerStart(false, info)(); + return setOwnerFinish(info.Env(), ret); } catch (...) { @@ -9576,22 +9655,22 @@ friend class BaseClass; } } - static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value releaseFinish(const Napi::Env env, int ret); + static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); - Napi::Value releaseAsync(const Napi::CallbackInfo& info) + Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - releaseStart(true, info), - &TracePlugin::releaseFinish); + return PromiseWorker::Run(info.Env(), + getOwnerStart(true, info), + &ExternalEngine::getOwnerFinish); } - Napi::Value releaseSync(const Napi::CallbackInfo& info) + Napi::Value getOwnerSync(const Napi::CallbackInfo& info) { try { - auto ret = releaseStart(false, info)(); - return releaseFinish(info.Env(), ret); + auto ret = getOwnerStart(false, info)(); + return getOwnerFinish(info.Env(), ret); } catch (...) { @@ -9602,15 +9681,15 @@ friend class BaseClass; }; -class TraceFactory : public BaseClass +class Timer : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); @@ -9620,7 +9699,7 @@ friend class BaseClass; { return PromiseWorker::Run(info.Env(), addRefStart(true, info), - &TraceFactory::addRefFinish); + &Timer::addRefFinish); } Napi::Value addRefSync(const Napi::CallbackInfo& info) @@ -9643,7 +9722,7 @@ friend class BaseClass; { return PromiseWorker::Run(info.Env(), releaseStart(true, info), - &TraceFactory::releaseFinish); + &Timer::releaseFinish); } Napi::Value releaseSync(const Napi::CallbackInfo& info) @@ -9659,45 +9738,22 @@ friend class BaseClass; } } - static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); + static MethodStart handlerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value handlerFinish(const Napi::Env env, void* ret); - Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) + Napi::Value handlerAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - setOwnerStart(true, info), - &TraceFactory::setOwnerFinish); - } - - Napi::Value setOwnerSync(const Napi::CallbackInfo& info) - { - try - { - auto ret = setOwnerStart(false, info)(); - return setOwnerFinish(info.Env(), ret); - } - catch (...) - { - rethrowException(info.Env()); - } - } - - static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); - - Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) - { - return PromiseWorker::Run(info.Env(), - getOwnerStart(true, info), - &TraceFactory::getOwnerFinish); + handlerStart(true, info), + &Timer::handlerFinish); } - Napi::Value getOwnerSync(const Napi::CallbackInfo& info) + Napi::Value handlerSync(const Napi::CallbackInfo& info) { try { - auto ret = getOwnerStart(false, info)(); - return getOwnerFinish(info.Env(), ret); + auto ret = handlerStart(false, info)(); + return handlerFinish(info.Env(), ret); } catch (...) { @@ -9708,33 +9764,33 @@ friend class BaseClass; }; -class UdrFunctionFactory : public BaseClass +class TimerControl : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: - static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value disposeFinish(const Napi::Env env, void* ret); + static MethodStart startStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value startFinish(const Napi::Env env, void* ret); - Napi::Value disposeAsync(const Napi::CallbackInfo& info) + Napi::Value startAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - disposeStart(true, info), - &UdrFunctionFactory::disposeFinish); + startStart(true, info), + &TimerControl::startFinish); } - Napi::Value disposeSync(const Napi::CallbackInfo& info) + Napi::Value startSync(const Napi::CallbackInfo& info) { try { - auto ret = disposeStart(false, info)(); - return disposeFinish(info.Env(), ret); + auto ret = startStart(false, info)(); + return startFinish(info.Env(), ret); } catch (...) { @@ -9742,22 +9798,22 @@ friend class BaseClass; } } - static MethodStart setupStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setupFinish(const Napi::Env env, void* ret); + static MethodStart stopStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value stopFinish(const Napi::Env env, void* ret); - Napi::Value setupAsync(const Napi::CallbackInfo& info) + Napi::Value stopAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - setupStart(true, info), - &UdrFunctionFactory::setupFinish); + stopStart(true, info), + &TimerControl::stopFinish); } - Napi::Value setupSync(const Napi::CallbackInfo& info) + Napi::Value stopSync(const Napi::CallbackInfo& info) { try { - auto ret = setupStart(false, info)(); - return setupFinish(info.Env(), ret); + auto ret = stopStart(false, info)(); + return stopFinish(info.Env(), ret); } catch (...) { @@ -9765,22 +9821,36 @@ friend class BaseClass; } } - static MethodStart newItemStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value newItemFinish(const Napi::Env env, fb::IExternalFunction* ret); +}; - Napi::Value newItemAsync(const Napi::CallbackInfo& info) + +class VersionCallback : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart callbackStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value callbackFinish(const Napi::Env env, void* ret); + + Napi::Value callbackAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - newItemStart(true, info), - &UdrFunctionFactory::newItemFinish); + return PromiseWorker::Run(info.Env(), + callbackStart(true, info), + &VersionCallback::callbackFinish); } - Napi::Value newItemSync(const Napi::CallbackInfo& info) + Napi::Value callbackSync(const Napi::CallbackInfo& info) { try { - auto ret = newItemStart(false, info)(); - return newItemFinish(info.Env(), ret); + auto ret = callbackStart(false, info)(); + return callbackFinish(info.Env(), ret); } catch (...) { @@ -9791,33 +9861,33 @@ friend class BaseClass; }; -class UdrProcedureFactory : public BaseClass +class Util : public BaseClass { -friend class BaseClass; +friend class BaseClass; public: using BaseClass::BaseClass; private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + static void InitPrototype(std::vector::PropertyDescriptor>& properties); private: - static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value disposeFinish(const Napi::Env env, void* ret); + static MethodStart getFbVersionStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getFbVersionFinish(const Napi::Env env, void* ret); - Napi::Value disposeAsync(const Napi::CallbackInfo& info) + Napi::Value getFbVersionAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - disposeStart(true, info), - &UdrProcedureFactory::disposeFinish); + getFbVersionStart(true, info), + &Util::getFbVersionFinish); } - Napi::Value disposeSync(const Napi::CallbackInfo& info) + Napi::Value getFbVersionSync(const Napi::CallbackInfo& info) { try { - auto ret = disposeStart(false, info)(); - return disposeFinish(info.Env(), ret); + auto ret = getFbVersionStart(false, info)(); + return getFbVersionFinish(info.Env(), ret); } catch (...) { @@ -9825,22 +9895,22 @@ friend class BaseClass; } } - static MethodStart setupStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setupFinish(const Napi::Env env, void* ret); + static MethodStart executeCreateDatabaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value executeCreateDatabaseFinish(const Napi::Env env, fb::IAttachment* ret); - Napi::Value setupAsync(const Napi::CallbackInfo& info) + Napi::Value executeCreateDatabaseAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - setupStart(true, info), - &UdrProcedureFactory::setupFinish); + return PromiseWorker::Run(info.Env(), + executeCreateDatabaseStart(true, info), + &Util::executeCreateDatabaseFinish); } - Napi::Value setupSync(const Napi::CallbackInfo& info) + Napi::Value executeCreateDatabaseSync(const Napi::CallbackInfo& info) { try { - auto ret = setupStart(false, info)(); - return setupFinish(info.Env(), ret); + auto ret = executeCreateDatabaseStart(false, info)(); + return executeCreateDatabaseFinish(info.Env(), ret); } catch (...) { @@ -9848,22 +9918,22 @@ friend class BaseClass; } } - static MethodStart newItemStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value newItemFinish(const Napi::Env env, fb::IExternalProcedure* ret); + static MethodStart decodeDateStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value decodeDateFinish(const Napi::Env env, void* ret); - Napi::Value newItemAsync(const Napi::CallbackInfo& info) + Napi::Value decodeDateAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - newItemStart(true, info), - &UdrProcedureFactory::newItemFinish); + return PromiseWorker::Run(info.Env(), + decodeDateStart(true, info), + &Util::decodeDateFinish); } - Napi::Value newItemSync(const Napi::CallbackInfo& info) + Napi::Value decodeDateSync(const Napi::CallbackInfo& info) { try { - auto ret = newItemStart(false, info)(); - return newItemFinish(info.Env(), ret); + auto ret = decodeDateStart(false, info)(); + return decodeDateFinish(info.Env(), ret); } catch (...) { @@ -9871,36 +9941,68 @@ friend class BaseClass; } } -}; + static MethodStart decodeTimeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value decodeTimeFinish(const Napi::Env env, void* ret); + Napi::Value decodeTimeAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + decodeTimeStart(true, info), + &Util::decodeTimeFinish); + } -class UdrTriggerFactory : public BaseClass -{ -friend class BaseClass; + Napi::Value decodeTimeSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = decodeTimeStart(false, info)(); + return decodeTimeFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } -public: - using BaseClass::BaseClass; + static MethodStart encodeDateStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value encodeDateFinish(const Napi::Env env, int ret); -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + Napi::Value encodeDateAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + encodeDateStart(true, info), + &Util::encodeDateFinish); + } -private: - static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value disposeFinish(const Napi::Env env, void* ret); + Napi::Value encodeDateSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = encodeDateStart(false, info)(); + return encodeDateFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } - Napi::Value disposeAsync(const Napi::CallbackInfo& info) + static MethodStart encodeTimeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value encodeTimeFinish(const Napi::Env env, int ret); + + Napi::Value encodeTimeAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - disposeStart(true, info), - &UdrTriggerFactory::disposeFinish); + return PromiseWorker::Run(info.Env(), + encodeTimeStart(true, info), + &Util::encodeTimeFinish); } - Napi::Value disposeSync(const Napi::CallbackInfo& info) + Napi::Value encodeTimeSync(const Napi::CallbackInfo& info) { try { - auto ret = disposeStart(false, info)(); - return disposeFinish(info.Env(), ret); + auto ret = encodeTimeStart(false, info)(); + return encodeTimeFinish(info.Env(), ret); } catch (...) { @@ -9908,22 +10010,22 @@ friend class BaseClass; } } - static MethodStart setupStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value setupFinish(const Napi::Env env, void* ret); + static MethodStart getClientVersionStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getClientVersionFinish(const Napi::Env env, unsigned ret); - Napi::Value setupAsync(const Napi::CallbackInfo& info) + Napi::Value getClientVersionAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - setupStart(true, info), - &UdrTriggerFactory::setupFinish); + return PromiseWorker::Run(info.Env(), + getClientVersionStart(true, info), + &Util::getClientVersionFinish); } - Napi::Value setupSync(const Napi::CallbackInfo& info) + Napi::Value getClientVersionSync(const Napi::CallbackInfo& info) { try { - auto ret = setupStart(false, info)(); - return setupFinish(info.Env(), ret); + auto ret = getClientVersionStart(false, info)(); + return getClientVersionFinish(info.Env(), ret); } catch (...) { @@ -9931,22 +10033,22 @@ friend class BaseClass; } } - static MethodStart newItemStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value newItemFinish(const Napi::Env env, fb::IExternalTrigger* ret); + static MethodStart getXpbBuilderStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getXpbBuilderFinish(const Napi::Env env, fb::IXpbBuilder* ret); - Napi::Value newItemAsync(const Napi::CallbackInfo& info) + Napi::Value getXpbBuilderAsync(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - newItemStart(true, info), - &UdrTriggerFactory::newItemFinish); + return PromiseWorker::Run(info.Env(), + getXpbBuilderStart(true, info), + &Util::getXpbBuilderFinish); } - Napi::Value newItemSync(const Napi::CallbackInfo& info) + Napi::Value getXpbBuilderSync(const Napi::CallbackInfo& info) { try { - auto ret = newItemStart(false, info)(); - return newItemFinish(info.Env(), ret); + auto ret = getXpbBuilderStart(false, info)(); + return getXpbBuilderFinish(info.Env(), ret); } catch (...) { @@ -9954,36 +10056,68 @@ friend class BaseClass; } } -}; + static MethodStart setOffsetsStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setOffsetsFinish(const Napi::Env env, unsigned ret); + Napi::Value setOffsetsAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + setOffsetsStart(true, info), + &Util::setOffsetsFinish); + } -class UdrPlugin : public BaseClass -{ -friend class BaseClass; + Napi::Value setOffsetsSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = setOffsetsStart(false, info)(); + return setOffsetsFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } -public: - using BaseClass::BaseClass; + static MethodStart getDecFloat16Start(bool async, const Napi::CallbackInfo& info); + static Napi::Value getDecFloat16Finish(const Napi::Env env, fb::IDecFloat16* ret); -private: - static void InitPrototype(std::vector::PropertyDescriptor>& properties); + Napi::Value getDecFloat16Async(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getDecFloat16Start(true, info), + &Util::getDecFloat16Finish); + } -private: - static MethodStart getMasterStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value getMasterFinish(const Napi::Env env, fb::IMaster* ret); + Napi::Value getDecFloat16Sync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getDecFloat16Start(false, info)(); + return getDecFloat16Finish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } - Napi::Value getMasterAsync(const Napi::CallbackInfo& info) + static MethodStart getDecFloat34Start(bool async, const Napi::CallbackInfo& info); + static Napi::Value getDecFloat34Finish(const Napi::Env env, fb::IDecFloat34* ret); + + Napi::Value getDecFloat34Async(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - getMasterStart(true, info), - &UdrPlugin::getMasterFinish); + return PromiseWorker::Run(info.Env(), + getDecFloat34Start(true, info), + &Util::getDecFloat34Finish); } - Napi::Value getMasterSync(const Napi::CallbackInfo& info) + Napi::Value getDecFloat34Sync(const Napi::CallbackInfo& info) { try { - auto ret = getMasterStart(false, info)(); - return getMasterFinish(info.Env(), ret); + auto ret = getDecFloat34Start(false, info)(); + return getDecFloat34Finish(info.Env(), ret); } catch (...) { @@ -9991,22 +10125,22 @@ friend class BaseClass; } } - static MethodStart registerFunctionStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value registerFunctionFinish(const Napi::Env env, void* ret); + static MethodStart encodeTimeTzStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value encodeTimeTzFinish(const Napi::Env env, void* ret); - Napi::Value registerFunctionAsync(const Napi::CallbackInfo& info) + Napi::Value encodeTimeTzAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - registerFunctionStart(true, info), - &UdrPlugin::registerFunctionFinish); + encodeTimeTzStart(true, info), + &Util::encodeTimeTzFinish); } - Napi::Value registerFunctionSync(const Napi::CallbackInfo& info) + Napi::Value encodeTimeTzSync(const Napi::CallbackInfo& info) { try { - auto ret = registerFunctionStart(false, info)(); - return registerFunctionFinish(info.Env(), ret); + auto ret = encodeTimeTzStart(false, info)(); + return encodeTimeTzFinish(info.Env(), ret); } catch (...) { @@ -10014,22 +10148,22 @@ friend class BaseClass; } } - static MethodStart registerProcedureStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value registerProcedureFinish(const Napi::Env env, void* ret); + static MethodStart encodeTimeStampTzStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value encodeTimeStampTzFinish(const Napi::Env env, void* ret); - Napi::Value registerProcedureAsync(const Napi::CallbackInfo& info) + Napi::Value encodeTimeStampTzAsync(const Napi::CallbackInfo& info) { return PromiseWorker::Run(info.Env(), - registerProcedureStart(true, info), - &UdrPlugin::registerProcedureFinish); + encodeTimeStampTzStart(true, info), + &Util::encodeTimeStampTzFinish); } - Napi::Value registerProcedureSync(const Napi::CallbackInfo& info) + Napi::Value encodeTimeStampTzSync(const Napi::CallbackInfo& info) { try { - auto ret = registerProcedureStart(false, info)(); - return registerProcedureFinish(info.Env(), ret); + auto ret = encodeTimeStampTzStart(false, info)(); + return encodeTimeStampTzFinish(info.Env(), ret); } catch (...) { @@ -10037,22 +10171,22 @@ friend class BaseClass; } } - static MethodStart registerTriggerStart(bool async, const Napi::CallbackInfo& info); - static Napi::Value registerTriggerFinish(const Napi::Env env, void* ret); + static MethodStart getInt128Start(bool async, const Napi::CallbackInfo& info); + static Napi::Value getInt128Finish(const Napi::Env env, fb::IInt128* ret); - Napi::Value registerTriggerAsync(const Napi::CallbackInfo& info) + Napi::Value getInt128Async(const Napi::CallbackInfo& info) { - return PromiseWorker::Run(info.Env(), - registerTriggerStart(true, info), - &UdrPlugin::registerTriggerFinish); + return PromiseWorker::Run(info.Env(), + getInt128Start(true, info), + &Util::getInt128Finish); } - Napi::Value registerTriggerSync(const Napi::CallbackInfo& info) + Napi::Value getInt128Sync(const Napi::CallbackInfo& info) { try { - auto ret = registerTriggerStart(false, info)(); - return registerTriggerFinish(info.Env(), ret); + auto ret = getInt128Start(false, info)(); + return getInt128Finish(info.Env(), ret); } catch (...) { @@ -10063,560 +10197,5994 @@ friend class BaseClass; }; -void Versioned::InitPrototype(std::vector::PropertyDescriptor>& properties) -{ -} - -void ReferenceCounted::InitPrototype(std::vector::PropertyDescriptor>& properties) +class OffsetsCallback : public BaseClass { - properties.push_back(InstanceMethod("addRefSync", &ReferenceCounted::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &ReferenceCounted::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &ReferenceCounted::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &ReferenceCounted::releaseAsync)); -} +friend class BaseClass; -MethodStart ReferenceCounted::addRefStart(bool async, const Napi::CallbackInfo& info) -{ - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); +public: + using BaseClass::BaseClass; - return [obj]() { - obj->interface->addRef(); - return nullptr; - }; -} +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); -Napi::Value ReferenceCounted::addRefFinish(const Napi::Env env, void* ret) -{ - return env.Undefined(); -} +private: + static MethodStart setOffsetStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setOffsetFinish(const Napi::Env env, void* ret); -MethodStart ReferenceCounted::releaseStart(bool async, const Napi::CallbackInfo& info) -{ + Napi::Value setOffsetAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + setOffsetStart(true, info), + &OffsetsCallback::setOffsetFinish); + } + + Napi::Value setOffsetSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = setOffsetStart(false, info)(); + return setOffsetFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class XpbBuilder : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value disposeFinish(const Napi::Env env, void* ret); + + Napi::Value disposeAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + disposeStart(true, info), + &XpbBuilder::disposeFinish); + } + + Napi::Value disposeSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = disposeStart(false, info)(); + return disposeFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart clearStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value clearFinish(const Napi::Env env, void* ret); + + Napi::Value clearAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + clearStart(true, info), + &XpbBuilder::clearFinish); + } + + Napi::Value clearSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = clearStart(false, info)(); + return clearFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart removeCurrentStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value removeCurrentFinish(const Napi::Env env, void* ret); + + Napi::Value removeCurrentAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + removeCurrentStart(true, info), + &XpbBuilder::removeCurrentFinish); + } + + Napi::Value removeCurrentSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = removeCurrentStart(false, info)(); + return removeCurrentFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart insertIntStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value insertIntFinish(const Napi::Env env, void* ret); + + Napi::Value insertIntAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + insertIntStart(true, info), + &XpbBuilder::insertIntFinish); + } + + Napi::Value insertIntSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = insertIntStart(false, info)(); + return insertIntFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart insertBigIntStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value insertBigIntFinish(const Napi::Env env, void* ret); + + Napi::Value insertBigIntAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + insertBigIntStart(true, info), + &XpbBuilder::insertBigIntFinish); + } + + Napi::Value insertBigIntSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = insertBigIntStart(false, info)(); + return insertBigIntFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart insertBytesStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value insertBytesFinish(const Napi::Env env, void* ret); + + Napi::Value insertBytesAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + insertBytesStart(true, info), + &XpbBuilder::insertBytesFinish); + } + + Napi::Value insertBytesSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = insertBytesStart(false, info)(); + return insertBytesFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart insertStringStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value insertStringFinish(const Napi::Env env, void* ret); + + Napi::Value insertStringAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + insertStringStart(true, info), + &XpbBuilder::insertStringFinish); + } + + Napi::Value insertStringSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = insertStringStart(false, info)(); + return insertStringFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart insertTagStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value insertTagFinish(const Napi::Env env, void* ret); + + Napi::Value insertTagAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + insertTagStart(true, info), + &XpbBuilder::insertTagFinish); + } + + Napi::Value insertTagSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = insertTagStart(false, info)(); + return insertTagFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart isEofStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value isEofFinish(const Napi::Env env, FB_BOOLEAN ret); + + Napi::Value isEofAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + isEofStart(true, info), + &XpbBuilder::isEofFinish); + } + + Napi::Value isEofSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = isEofStart(false, info)(); + return isEofFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart moveNextStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value moveNextFinish(const Napi::Env env, void* ret); + + Napi::Value moveNextAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + moveNextStart(true, info), + &XpbBuilder::moveNextFinish); + } + + Napi::Value moveNextSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = moveNextStart(false, info)(); + return moveNextFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart rewindStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value rewindFinish(const Napi::Env env, void* ret); + + Napi::Value rewindAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + rewindStart(true, info), + &XpbBuilder::rewindFinish); + } + + Napi::Value rewindSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = rewindStart(false, info)(); + return rewindFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart findFirstStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value findFirstFinish(const Napi::Env env, FB_BOOLEAN ret); + + Napi::Value findFirstAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + findFirstStart(true, info), + &XpbBuilder::findFirstFinish); + } + + Napi::Value findFirstSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = findFirstStart(false, info)(); + return findFirstFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart findNextStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value findNextFinish(const Napi::Env env, FB_BOOLEAN ret); + + Napi::Value findNextAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + findNextStart(true, info), + &XpbBuilder::findNextFinish); + } + + Napi::Value findNextSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = findNextStart(false, info)(); + return findNextFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getTagStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getTagFinish(const Napi::Env env, unsigned char ret); + + Napi::Value getTagAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getTagStart(true, info), + &XpbBuilder::getTagFinish); + } + + Napi::Value getTagSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getTagStart(false, info)(); + return getTagFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getLengthStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getLengthFinish(const Napi::Env env, unsigned ret); + + Napi::Value getLengthAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getLengthStart(true, info), + &XpbBuilder::getLengthFinish); + } + + Napi::Value getLengthSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getLengthStart(false, info)(); + return getLengthFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getIntStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getIntFinish(const Napi::Env env, int ret); + + Napi::Value getIntAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getIntStart(true, info), + &XpbBuilder::getIntFinish); + } + + Napi::Value getIntSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getIntStart(false, info)(); + return getIntFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getBigIntStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getBigIntFinish(const Napi::Env env, int64_t ret); + + Napi::Value getBigIntAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getBigIntStart(true, info), + &XpbBuilder::getBigIntFinish); + } + + Napi::Value getBigIntSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getBigIntStart(false, info)(); + return getBigIntFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getStringStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getStringFinish(const Napi::Env env, OptString ret); + + Napi::Value getStringAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getStringStart(true, info), + &XpbBuilder::getStringFinish); + } + + Napi::Value getStringSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getStringStart(false, info)(); + return getStringFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getBytesStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getBytesFinish(const Napi::Env env, const unsigned char* ret); + + Napi::Value getBytesAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getBytesStart(true, info), + &XpbBuilder::getBytesFinish); + } + + Napi::Value getBytesSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getBytesStart(false, info)(); + return getBytesFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getBufferLengthStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getBufferLengthFinish(const Napi::Env env, unsigned ret); + + Napi::Value getBufferLengthAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getBufferLengthStart(true, info), + &XpbBuilder::getBufferLengthFinish); + } + + Napi::Value getBufferLengthSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getBufferLengthStart(false, info)(); + return getBufferLengthFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getBufferStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getBufferFinish(const Napi::Env env, const unsigned char* ret); + + Napi::Value getBufferAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getBufferStart(true, info), + &XpbBuilder::getBufferFinish); + } + + Napi::Value getBufferSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getBufferStart(false, info)(); + return getBufferFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class TraceConnection : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart getKindStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getKindFinish(const Napi::Env env, unsigned ret); + + Napi::Value getKindAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getKindStart(true, info), + &TraceConnection::getKindFinish); + } + + Napi::Value getKindSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getKindStart(false, info)(); + return getKindFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getProcessIDStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getProcessIDFinish(const Napi::Env env, int ret); + + Napi::Value getProcessIDAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getProcessIDStart(true, info), + &TraceConnection::getProcessIDFinish); + } + + Napi::Value getProcessIDSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getProcessIDStart(false, info)(); + return getProcessIDFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getUserNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getUserNameFinish(const Napi::Env env, OptString ret); + + Napi::Value getUserNameAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getUserNameStart(true, info), + &TraceConnection::getUserNameFinish); + } + + Napi::Value getUserNameSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getUserNameStart(false, info)(); + return getUserNameFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRoleNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRoleNameFinish(const Napi::Env env, OptString ret); + + Napi::Value getRoleNameAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRoleNameStart(true, info), + &TraceConnection::getRoleNameFinish); + } + + Napi::Value getRoleNameSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRoleNameStart(false, info)(); + return getRoleNameFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getCharSetStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getCharSetFinish(const Napi::Env env, OptString ret); + + Napi::Value getCharSetAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getCharSetStart(true, info), + &TraceConnection::getCharSetFinish); + } + + Napi::Value getCharSetSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getCharSetStart(false, info)(); + return getCharSetFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRemoteProtocolStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRemoteProtocolFinish(const Napi::Env env, OptString ret); + + Napi::Value getRemoteProtocolAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRemoteProtocolStart(true, info), + &TraceConnection::getRemoteProtocolFinish); + } + + Napi::Value getRemoteProtocolSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRemoteProtocolStart(false, info)(); + return getRemoteProtocolFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRemoteAddressStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRemoteAddressFinish(const Napi::Env env, OptString ret); + + Napi::Value getRemoteAddressAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRemoteAddressStart(true, info), + &TraceConnection::getRemoteAddressFinish); + } + + Napi::Value getRemoteAddressSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRemoteAddressStart(false, info)(); + return getRemoteAddressFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRemoteProcessIDStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRemoteProcessIDFinish(const Napi::Env env, int ret); + + Napi::Value getRemoteProcessIDAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRemoteProcessIDStart(true, info), + &TraceConnection::getRemoteProcessIDFinish); + } + + Napi::Value getRemoteProcessIDSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRemoteProcessIDStart(false, info)(); + return getRemoteProcessIDFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRemoteProcessNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRemoteProcessNameFinish(const Napi::Env env, OptString ret); + + Napi::Value getRemoteProcessNameAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRemoteProcessNameStart(true, info), + &TraceConnection::getRemoteProcessNameFinish); + } + + Napi::Value getRemoteProcessNameSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRemoteProcessNameStart(false, info)(); + return getRemoteProcessNameFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class TraceDatabaseConnection : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart getKindStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getKindFinish(const Napi::Env env, unsigned ret); + + Napi::Value getKindAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getKindStart(true, info), + &TraceDatabaseConnection::getKindFinish); + } + + Napi::Value getKindSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getKindStart(false, info)(); + return getKindFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getProcessIDStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getProcessIDFinish(const Napi::Env env, int ret); + + Napi::Value getProcessIDAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getProcessIDStart(true, info), + &TraceDatabaseConnection::getProcessIDFinish); + } + + Napi::Value getProcessIDSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getProcessIDStart(false, info)(); + return getProcessIDFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getUserNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getUserNameFinish(const Napi::Env env, OptString ret); + + Napi::Value getUserNameAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getUserNameStart(true, info), + &TraceDatabaseConnection::getUserNameFinish); + } + + Napi::Value getUserNameSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getUserNameStart(false, info)(); + return getUserNameFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRoleNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRoleNameFinish(const Napi::Env env, OptString ret); + + Napi::Value getRoleNameAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRoleNameStart(true, info), + &TraceDatabaseConnection::getRoleNameFinish); + } + + Napi::Value getRoleNameSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRoleNameStart(false, info)(); + return getRoleNameFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getCharSetStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getCharSetFinish(const Napi::Env env, OptString ret); + + Napi::Value getCharSetAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getCharSetStart(true, info), + &TraceDatabaseConnection::getCharSetFinish); + } + + Napi::Value getCharSetSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getCharSetStart(false, info)(); + return getCharSetFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRemoteProtocolStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRemoteProtocolFinish(const Napi::Env env, OptString ret); + + Napi::Value getRemoteProtocolAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRemoteProtocolStart(true, info), + &TraceDatabaseConnection::getRemoteProtocolFinish); + } + + Napi::Value getRemoteProtocolSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRemoteProtocolStart(false, info)(); + return getRemoteProtocolFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRemoteAddressStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRemoteAddressFinish(const Napi::Env env, OptString ret); + + Napi::Value getRemoteAddressAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRemoteAddressStart(true, info), + &TraceDatabaseConnection::getRemoteAddressFinish); + } + + Napi::Value getRemoteAddressSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRemoteAddressStart(false, info)(); + return getRemoteAddressFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRemoteProcessIDStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRemoteProcessIDFinish(const Napi::Env env, int ret); + + Napi::Value getRemoteProcessIDAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRemoteProcessIDStart(true, info), + &TraceDatabaseConnection::getRemoteProcessIDFinish); + } + + Napi::Value getRemoteProcessIDSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRemoteProcessIDStart(false, info)(); + return getRemoteProcessIDFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRemoteProcessNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRemoteProcessNameFinish(const Napi::Env env, OptString ret); + + Napi::Value getRemoteProcessNameAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRemoteProcessNameStart(true, info), + &TraceDatabaseConnection::getRemoteProcessNameFinish); + } + + Napi::Value getRemoteProcessNameSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRemoteProcessNameStart(false, info)(); + return getRemoteProcessNameFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getConnectionIDStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getConnectionIDFinish(const Napi::Env env, int64_t ret); + + Napi::Value getConnectionIDAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getConnectionIDStart(true, info), + &TraceDatabaseConnection::getConnectionIDFinish); + } + + Napi::Value getConnectionIDSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getConnectionIDStart(false, info)(); + return getConnectionIDFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getDatabaseNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getDatabaseNameFinish(const Napi::Env env, OptString ret); + + Napi::Value getDatabaseNameAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getDatabaseNameStart(true, info), + &TraceDatabaseConnection::getDatabaseNameFinish); + } + + Napi::Value getDatabaseNameSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getDatabaseNameStart(false, info)(); + return getDatabaseNameFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class TraceTransaction : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: +}; + + +class TraceParams : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: +}; + + +class TraceStatement : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: +}; + + +class TraceSQLStatement : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: +}; + + +class TraceBLRStatement : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: +}; + + +class TraceDYNRequest : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: +}; + + +class TraceContextVariable : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: +}; + + +class TraceProcedure : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: +}; + + +class TraceFunction : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: +}; + + +class TraceTrigger : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: +}; + + +class TraceServiceConnection : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart getKindStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getKindFinish(const Napi::Env env, unsigned ret); + + Napi::Value getKindAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getKindStart(true, info), + &TraceServiceConnection::getKindFinish); + } + + Napi::Value getKindSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getKindStart(false, info)(); + return getKindFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getProcessIDStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getProcessIDFinish(const Napi::Env env, int ret); + + Napi::Value getProcessIDAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getProcessIDStart(true, info), + &TraceServiceConnection::getProcessIDFinish); + } + + Napi::Value getProcessIDSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getProcessIDStart(false, info)(); + return getProcessIDFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getUserNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getUserNameFinish(const Napi::Env env, OptString ret); + + Napi::Value getUserNameAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getUserNameStart(true, info), + &TraceServiceConnection::getUserNameFinish); + } + + Napi::Value getUserNameSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getUserNameStart(false, info)(); + return getUserNameFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRoleNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRoleNameFinish(const Napi::Env env, OptString ret); + + Napi::Value getRoleNameAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRoleNameStart(true, info), + &TraceServiceConnection::getRoleNameFinish); + } + + Napi::Value getRoleNameSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRoleNameStart(false, info)(); + return getRoleNameFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getCharSetStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getCharSetFinish(const Napi::Env env, OptString ret); + + Napi::Value getCharSetAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getCharSetStart(true, info), + &TraceServiceConnection::getCharSetFinish); + } + + Napi::Value getCharSetSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getCharSetStart(false, info)(); + return getCharSetFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRemoteProtocolStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRemoteProtocolFinish(const Napi::Env env, OptString ret); + + Napi::Value getRemoteProtocolAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRemoteProtocolStart(true, info), + &TraceServiceConnection::getRemoteProtocolFinish); + } + + Napi::Value getRemoteProtocolSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRemoteProtocolStart(false, info)(); + return getRemoteProtocolFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRemoteAddressStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRemoteAddressFinish(const Napi::Env env, OptString ret); + + Napi::Value getRemoteAddressAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRemoteAddressStart(true, info), + &TraceServiceConnection::getRemoteAddressFinish); + } + + Napi::Value getRemoteAddressSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRemoteAddressStart(false, info)(); + return getRemoteAddressFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRemoteProcessIDStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRemoteProcessIDFinish(const Napi::Env env, int ret); + + Napi::Value getRemoteProcessIDAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRemoteProcessIDStart(true, info), + &TraceServiceConnection::getRemoteProcessIDFinish); + } + + Napi::Value getRemoteProcessIDSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRemoteProcessIDStart(false, info)(); + return getRemoteProcessIDFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRemoteProcessNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRemoteProcessNameFinish(const Napi::Env env, OptString ret); + + Napi::Value getRemoteProcessNameAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRemoteProcessNameStart(true, info), + &TraceServiceConnection::getRemoteProcessNameFinish); + } + + Napi::Value getRemoteProcessNameSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRemoteProcessNameStart(false, info)(); + return getRemoteProcessNameFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class TraceStatusVector : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: +}; + + +class TraceSweepInfo : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: +}; + + +class TraceLogWriter : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); + + Napi::Value addRefAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + addRefStart(true, info), + &TraceLogWriter::addRefFinish); + } + + Napi::Value addRefSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); + + Napi::Value releaseAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + releaseStart(true, info), + &TraceLogWriter::releaseFinish); + } + + Napi::Value releaseSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class TraceInitInfo : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: +}; + + +class TracePlugin : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); + + Napi::Value addRefAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + addRefStart(true, info), + &TracePlugin::addRefFinish); + } + + Napi::Value addRefSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); + + Napi::Value releaseAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + releaseStart(true, info), + &TracePlugin::releaseFinish); + } + + Napi::Value releaseSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class TraceFactory : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); + + Napi::Value addRefAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + addRefStart(true, info), + &TraceFactory::addRefFinish); + } + + Napi::Value addRefSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); + + Napi::Value releaseAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + releaseStart(true, info), + &TraceFactory::releaseFinish); + } + + Napi::Value releaseSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); + + Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + setOwnerStart(true, info), + &TraceFactory::setOwnerFinish); + } + + Napi::Value setOwnerSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = setOwnerStart(false, info)(); + return setOwnerFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); + + Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getOwnerStart(true, info), + &TraceFactory::getOwnerFinish); + } + + Napi::Value getOwnerSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getOwnerStart(false, info)(); + return getOwnerFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class UdrFunctionFactory : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value disposeFinish(const Napi::Env env, void* ret); + + Napi::Value disposeAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + disposeStart(true, info), + &UdrFunctionFactory::disposeFinish); + } + + Napi::Value disposeSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = disposeStart(false, info)(); + return disposeFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart setupStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setupFinish(const Napi::Env env, void* ret); + + Napi::Value setupAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + setupStart(true, info), + &UdrFunctionFactory::setupFinish); + } + + Napi::Value setupSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = setupStart(false, info)(); + return setupFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart newItemStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value newItemFinish(const Napi::Env env, fb::IExternalFunction* ret); + + Napi::Value newItemAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + newItemStart(true, info), + &UdrFunctionFactory::newItemFinish); + } + + Napi::Value newItemSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = newItemStart(false, info)(); + return newItemFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class UdrProcedureFactory : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value disposeFinish(const Napi::Env env, void* ret); + + Napi::Value disposeAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + disposeStart(true, info), + &UdrProcedureFactory::disposeFinish); + } + + Napi::Value disposeSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = disposeStart(false, info)(); + return disposeFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart setupStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setupFinish(const Napi::Env env, void* ret); + + Napi::Value setupAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + setupStart(true, info), + &UdrProcedureFactory::setupFinish); + } + + Napi::Value setupSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = setupStart(false, info)(); + return setupFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart newItemStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value newItemFinish(const Napi::Env env, fb::IExternalProcedure* ret); + + Napi::Value newItemAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + newItemStart(true, info), + &UdrProcedureFactory::newItemFinish); + } + + Napi::Value newItemSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = newItemStart(false, info)(); + return newItemFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class UdrTriggerFactory : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value disposeFinish(const Napi::Env env, void* ret); + + Napi::Value disposeAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + disposeStart(true, info), + &UdrTriggerFactory::disposeFinish); + } + + Napi::Value disposeSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = disposeStart(false, info)(); + return disposeFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart setupStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setupFinish(const Napi::Env env, void* ret); + + Napi::Value setupAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + setupStart(true, info), + &UdrTriggerFactory::setupFinish); + } + + Napi::Value setupSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = setupStart(false, info)(); + return setupFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart newItemStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value newItemFinish(const Napi::Env env, fb::IExternalTrigger* ret); + + Napi::Value newItemAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + newItemStart(true, info), + &UdrTriggerFactory::newItemFinish); + } + + Napi::Value newItemSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = newItemStart(false, info)(); + return newItemFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class UdrPlugin : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart getMasterStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getMasterFinish(const Napi::Env env, fb::IMaster* ret); + + Napi::Value getMasterAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getMasterStart(true, info), + &UdrPlugin::getMasterFinish); + } + + Napi::Value getMasterSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getMasterStart(false, info)(); + return getMasterFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart registerFunctionStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value registerFunctionFinish(const Napi::Env env, void* ret); + + Napi::Value registerFunctionAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + registerFunctionStart(true, info), + &UdrPlugin::registerFunctionFinish); + } + + Napi::Value registerFunctionSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = registerFunctionStart(false, info)(); + return registerFunctionFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart registerProcedureStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value registerProcedureFinish(const Napi::Env env, void* ret); + + Napi::Value registerProcedureAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + registerProcedureStart(true, info), + &UdrPlugin::registerProcedureFinish); + } + + Napi::Value registerProcedureSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = registerProcedureStart(false, info)(); + return registerProcedureFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart registerTriggerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value registerTriggerFinish(const Napi::Env env, void* ret); + + Napi::Value registerTriggerAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + registerTriggerStart(true, info), + &UdrPlugin::registerTriggerFinish); + } + + Napi::Value registerTriggerSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = registerTriggerStart(false, info)(); + return registerTriggerFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class DecFloat16 : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart toBcdStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value toBcdFinish(const Napi::Env env, void* ret); + + Napi::Value toBcdAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + toBcdStart(true, info), + &DecFloat16::toBcdFinish); + } + + Napi::Value toBcdSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = toBcdStart(false, info)(); + return toBcdFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart fromBcdStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value fromBcdFinish(const Napi::Env env, void* ret); + + Napi::Value fromBcdAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + fromBcdStart(true, info), + &DecFloat16::fromBcdFinish); + } + + Napi::Value fromBcdSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = fromBcdStart(false, info)(); + return fromBcdFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart fromStringStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value fromStringFinish(const Napi::Env env, void* ret); + + Napi::Value fromStringAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + fromStringStart(true, info), + &DecFloat16::fromStringFinish); + } + + Napi::Value fromStringSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = fromStringStart(false, info)(); + return fromStringFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class DecFloat34 : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart toBcdStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value toBcdFinish(const Napi::Env env, void* ret); + + Napi::Value toBcdAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + toBcdStart(true, info), + &DecFloat34::toBcdFinish); + } + + Napi::Value toBcdSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = toBcdStart(false, info)(); + return toBcdFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart fromBcdStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value fromBcdFinish(const Napi::Env env, void* ret); + + Napi::Value fromBcdAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + fromBcdStart(true, info), + &DecFloat34::fromBcdFinish); + } + + Napi::Value fromBcdSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = fromBcdStart(false, info)(); + return fromBcdFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart fromStringStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value fromStringFinish(const Napi::Env env, void* ret); + + Napi::Value fromStringAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + fromStringStart(true, info), + &DecFloat34::fromStringFinish); + } + + Napi::Value fromStringSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = fromStringStart(false, info)(); + return fromStringFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class Int128 : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart fromStringStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value fromStringFinish(const Napi::Env env, void* ret); + + Napi::Value fromStringAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + fromStringStart(true, info), + &Int128::fromStringFinish); + } + + Napi::Value fromStringSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = fromStringStart(false, info)(); + return fromStringFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class ReplicatedField : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart getNameStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getNameFinish(const Napi::Env env, OptString ret); + + Napi::Value getNameAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getNameStart(true, info), + &ReplicatedField::getNameFinish); + } + + Napi::Value getNameSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getNameStart(false, info)(); + return getNameFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getTypeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getTypeFinish(const Napi::Env env, unsigned ret); + + Napi::Value getTypeAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getTypeStart(true, info), + &ReplicatedField::getTypeFinish); + } + + Napi::Value getTypeSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getTypeStart(false, info)(); + return getTypeFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getSubTypeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getSubTypeFinish(const Napi::Env env, int ret); + + Napi::Value getSubTypeAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getSubTypeStart(true, info), + &ReplicatedField::getSubTypeFinish); + } + + Napi::Value getSubTypeSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getSubTypeStart(false, info)(); + return getSubTypeFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getScaleStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getScaleFinish(const Napi::Env env, int ret); + + Napi::Value getScaleAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getScaleStart(true, info), + &ReplicatedField::getScaleFinish); + } + + Napi::Value getScaleSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getScaleStart(false, info)(); + return getScaleFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getLengthStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getLengthFinish(const Napi::Env env, unsigned ret); + + Napi::Value getLengthAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getLengthStart(true, info), + &ReplicatedField::getLengthFinish); + } + + Napi::Value getLengthSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getLengthStart(false, info)(); + return getLengthFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getCharSetStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getCharSetFinish(const Napi::Env env, unsigned ret); + + Napi::Value getCharSetAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getCharSetStart(true, info), + &ReplicatedField::getCharSetFinish); + } + + Napi::Value getCharSetSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getCharSetStart(false, info)(); + return getCharSetFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class ReplicatedRecord : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart getCountStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getCountFinish(const Napi::Env env, unsigned ret); + + Napi::Value getCountAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getCountStart(true, info), + &ReplicatedRecord::getCountFinish); + } + + Napi::Value getCountSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getCountStart(false, info)(); + return getCountFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getFieldStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getFieldFinish(const Napi::Env env, fb::IReplicatedField* ret); + + Napi::Value getFieldAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getFieldStart(true, info), + &ReplicatedRecord::getFieldFinish); + } + + Napi::Value getFieldSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getFieldStart(false, info)(); + return getFieldFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRawLengthStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRawLengthFinish(const Napi::Env env, unsigned ret); + + Napi::Value getRawLengthAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRawLengthStart(true, info), + &ReplicatedRecord::getRawLengthFinish); + } + + Napi::Value getRawLengthSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRawLengthStart(false, info)(); + return getRawLengthFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getRawDataStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getRawDataFinish(const Napi::Env env, const unsigned char* ret); + + Napi::Value getRawDataAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getRawDataStart(true, info), + &ReplicatedRecord::getRawDataFinish); + } + + Napi::Value getRawDataSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getRawDataStart(false, info)(); + return getRawDataFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class ReplicatedTransaction : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value disposeFinish(const Napi::Env env, void* ret); + + Napi::Value disposeAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + disposeStart(true, info), + &ReplicatedTransaction::disposeFinish); + } + + Napi::Value disposeSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = disposeStart(false, info)(); + return disposeFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart prepareStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value prepareFinish(const Napi::Env env, void* ret); + + Napi::Value prepareAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + prepareStart(true, info), + &ReplicatedTransaction::prepareFinish); + } + + Napi::Value prepareSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = prepareStart(false, info)(); + return prepareFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart commitStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value commitFinish(const Napi::Env env, void* ret); + + Napi::Value commitAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + commitStart(true, info), + &ReplicatedTransaction::commitFinish); + } + + Napi::Value commitSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = commitStart(false, info)(); + return commitFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart rollbackStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value rollbackFinish(const Napi::Env env, void* ret); + + Napi::Value rollbackAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + rollbackStart(true, info), + &ReplicatedTransaction::rollbackFinish); + } + + Napi::Value rollbackSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = rollbackStart(false, info)(); + return rollbackFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart startSavepointStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value startSavepointFinish(const Napi::Env env, void* ret); + + Napi::Value startSavepointAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + startSavepointStart(true, info), + &ReplicatedTransaction::startSavepointFinish); + } + + Napi::Value startSavepointSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = startSavepointStart(false, info)(); + return startSavepointFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart releaseSavepointStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseSavepointFinish(const Napi::Env env, void* ret); + + Napi::Value releaseSavepointAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + releaseSavepointStart(true, info), + &ReplicatedTransaction::releaseSavepointFinish); + } + + Napi::Value releaseSavepointSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = releaseSavepointStart(false, info)(); + return releaseSavepointFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart rollbackSavepointStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value rollbackSavepointFinish(const Napi::Env env, void* ret); + + Napi::Value rollbackSavepointAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + rollbackSavepointStart(true, info), + &ReplicatedTransaction::rollbackSavepointFinish); + } + + Napi::Value rollbackSavepointSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = rollbackSavepointStart(false, info)(); + return rollbackSavepointFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart insertRecordStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value insertRecordFinish(const Napi::Env env, void* ret); + + Napi::Value insertRecordAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + insertRecordStart(true, info), + &ReplicatedTransaction::insertRecordFinish); + } + + Napi::Value insertRecordSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = insertRecordStart(false, info)(); + return insertRecordFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart updateRecordStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value updateRecordFinish(const Napi::Env env, void* ret); + + Napi::Value updateRecordAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + updateRecordStart(true, info), + &ReplicatedTransaction::updateRecordFinish); + } + + Napi::Value updateRecordSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = updateRecordStart(false, info)(); + return updateRecordFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart deleteRecordStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value deleteRecordFinish(const Napi::Env env, void* ret); + + Napi::Value deleteRecordAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + deleteRecordStart(true, info), + &ReplicatedTransaction::deleteRecordFinish); + } + + Napi::Value deleteRecordSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = deleteRecordStart(false, info)(); + return deleteRecordFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart executeSqlStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value executeSqlFinish(const Napi::Env env, void* ret); + + Napi::Value executeSqlAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + executeSqlStart(true, info), + &ReplicatedTransaction::executeSqlFinish); + } + + Napi::Value executeSqlSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = executeSqlStart(false, info)(); + return executeSqlFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart executeSqlIntlStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value executeSqlIntlFinish(const Napi::Env env, void* ret); + + Napi::Value executeSqlIntlAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + executeSqlIntlStart(true, info), + &ReplicatedTransaction::executeSqlIntlFinish); + } + + Napi::Value executeSqlIntlSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = executeSqlIntlStart(false, info)(); + return executeSqlIntlFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class ReplicatedSession : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); + + Napi::Value addRefAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + addRefStart(true, info), + &ReplicatedSession::addRefFinish); + } + + Napi::Value addRefSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); + + Napi::Value releaseAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + releaseStart(true, info), + &ReplicatedSession::releaseFinish); + } + + Napi::Value releaseSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); + + Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + setOwnerStart(true, info), + &ReplicatedSession::setOwnerFinish); + } + + Napi::Value setOwnerSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = setOwnerStart(false, info)(); + return setOwnerFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); + + Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getOwnerStart(true, info), + &ReplicatedSession::getOwnerFinish); + } + + Napi::Value getOwnerSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getOwnerStart(false, info)(); + return getOwnerFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart initStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value initFinish(const Napi::Env env, FB_BOOLEAN ret); + + Napi::Value initAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + initStart(true, info), + &ReplicatedSession::initFinish); + } + + Napi::Value initSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = initStart(false, info)(); + return initFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart startTransactionStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value startTransactionFinish(const Napi::Env env, fb::IReplicatedTransaction* ret); + + Napi::Value startTransactionAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + startTransactionStart(true, info), + &ReplicatedSession::startTransactionFinish); + } + + Napi::Value startTransactionSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = startTransactionStart(false, info)(); + return startTransactionFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart cleanupTransactionStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value cleanupTransactionFinish(const Napi::Env env, void* ret); + + Napi::Value cleanupTransactionAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + cleanupTransactionStart(true, info), + &ReplicatedSession::cleanupTransactionFinish); + } + + Napi::Value cleanupTransactionSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = cleanupTransactionStart(false, info)(); + return cleanupTransactionFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart setSequenceStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setSequenceFinish(const Napi::Env env, void* ret); + + Napi::Value setSequenceAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + setSequenceStart(true, info), + &ReplicatedSession::setSequenceFinish); + } + + Napi::Value setSequenceSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = setSequenceStart(false, info)(); + return setSequenceFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class ProfilerPlugin : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart addRefStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value addRefFinish(const Napi::Env env, void* ret); + + Napi::Value addRefAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + addRefStart(true, info), + &ProfilerPlugin::addRefFinish); + } + + Napi::Value addRefSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = addRefStart(false, info)(); + return addRefFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart releaseStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value releaseFinish(const Napi::Env env, int ret); + + Napi::Value releaseAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + releaseStart(true, info), + &ProfilerPlugin::releaseFinish); + } + + Napi::Value releaseSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = releaseStart(false, info)(); + return releaseFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart setOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value setOwnerFinish(const Napi::Env env, void* ret); + + Napi::Value setOwnerAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + setOwnerStart(true, info), + &ProfilerPlugin::setOwnerFinish); + } + + Napi::Value setOwnerSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = setOwnerStart(false, info)(); + return setOwnerFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + + static MethodStart getOwnerStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret); + + Napi::Value getOwnerAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getOwnerStart(true, info), + &ProfilerPlugin::getOwnerFinish); + } + + Napi::Value getOwnerSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getOwnerStart(false, info)(); + return getOwnerFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class ProfilerSession : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart disposeStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value disposeFinish(const Napi::Env env, void* ret); + + Napi::Value disposeAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + disposeStart(true, info), + &ProfilerSession::disposeFinish); + } + + Napi::Value disposeSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = disposeStart(false, info)(); + return disposeFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +class ProfilerStats : public BaseClass +{ +friend class BaseClass; + +public: + using BaseClass::BaseClass; + +private: + static void InitPrototype(std::vector::PropertyDescriptor>& properties); + +private: + static MethodStart getElapsedTicksStart(bool async, const Napi::CallbackInfo& info); + static Napi::Value getElapsedTicksFinish(const Napi::Env env, uint64_t ret); + + Napi::Value getElapsedTicksAsync(const Napi::CallbackInfo& info) + { + return PromiseWorker::Run(info.Env(), + getElapsedTicksStart(true, info), + &ProfilerStats::getElapsedTicksFinish); + } + + Napi::Value getElapsedTicksSync(const Napi::CallbackInfo& info) + { + try + { + auto ret = getElapsedTicksStart(false, info)(); + return getElapsedTicksFinish(info.Env(), ret); + } + catch (...) + { + rethrowException(info.Env()); + } + } + +}; + + +void Versioned::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ +} + +void ReferenceCounted::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("addRefSync", &ReferenceCounted::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &ReferenceCounted::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &ReferenceCounted::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &ReferenceCounted::releaseAsync)); +} + +MethodStart ReferenceCounted::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); + return nullptr; + }; +} + +Napi::Value ReferenceCounted::addRefFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart ReferenceCounted::releaseStart(bool async, const Napi::CallbackInfo& info) +{ auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj]() { - return obj->interface->release(); + return [obj]() { + return obj->interface->release(); + }; +} + +Napi::Value ReferenceCounted::releaseFinish(const Napi::Env env, int ret) +{ + return Napi::Value::From(env, ret); +} + +void Disposable::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("disposeSync", &Disposable::disposeSync)); + properties.push_back(InstanceMethod("disposeAsync", &Disposable::disposeAsync)); +} + +MethodStart Disposable::disposeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->dispose(); + return nullptr; + }; +} + +Napi::Value Disposable::disposeFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +void Status::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("disposeSync", &Status::disposeSync)); + properties.push_back(InstanceMethod("disposeAsync", &Status::disposeAsync)); + properties.push_back(InstanceMethod("initSync", &Status::initSync)); + properties.push_back(InstanceMethod("initAsync", &Status::initAsync)); + properties.push_back(InstanceMethod("getStateSync", &Status::getStateSync)); + properties.push_back(InstanceMethod("getStateAsync", &Status::getStateAsync)); + properties.push_back(InstanceMethod("cloneSync", &Status::cloneSync)); + properties.push_back(InstanceMethod("cloneAsync", &Status::cloneAsync)); +} + +MethodStart Status::disposeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->dispose(); + return nullptr; + }; +} + +Napi::Value Status::disposeFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Status::initStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->init(); + return nullptr; + }; +} + +Napi::Value Status::initFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Status::getStateStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getState(); + }; +} + +Napi::Value Status::getStateFinish(const Napi::Env env, unsigned ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart Status::cloneStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->clone(); + }; +} + +Napi::Value Status::cloneFinish(const Napi::Env env, fb::IStatus* ret) +{ + return Status::NewInstance(env, ret); +} + +void Master::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("getStatusSync", &Master::getStatusSync)); + properties.push_back(InstanceMethod("getStatusAsync", &Master::getStatusAsync)); + properties.push_back(InstanceMethod("getDispatcherSync", &Master::getDispatcherSync)); + properties.push_back(InstanceMethod("getDispatcherAsync", &Master::getDispatcherAsync)); + properties.push_back(InstanceMethod("getPluginManagerSync", &Master::getPluginManagerSync)); + properties.push_back(InstanceMethod("getPluginManagerAsync", &Master::getPluginManagerAsync)); + properties.push_back(InstanceMethod("getTimerControlSync", &Master::getTimerControlSync)); + properties.push_back(InstanceMethod("getTimerControlAsync", &Master::getTimerControlAsync)); + properties.push_back(InstanceMethod("getDtcSync", &Master::getDtcSync)); + properties.push_back(InstanceMethod("getDtcAsync", &Master::getDtcAsync)); + properties.push_back(InstanceMethod("registerAttachmentSync", &Master::registerAttachmentSync)); + properties.push_back(InstanceMethod("registerAttachmentAsync", &Master::registerAttachmentAsync)); + properties.push_back(InstanceMethod("registerTransactionSync", &Master::registerTransactionSync)); + properties.push_back(InstanceMethod("registerTransactionAsync", &Master::registerTransactionAsync)); + properties.push_back(InstanceMethod("getMetadataBuilderSync", &Master::getMetadataBuilderSync)); + properties.push_back(InstanceMethod("getMetadataBuilderAsync", &Master::getMetadataBuilderAsync)); + properties.push_back(InstanceMethod("serverModeSync", &Master::serverModeSync)); + properties.push_back(InstanceMethod("serverModeAsync", &Master::serverModeAsync)); + properties.push_back(InstanceMethod("getUtilInterfaceSync", &Master::getUtilInterfaceSync)); + properties.push_back(InstanceMethod("getUtilInterfaceAsync", &Master::getUtilInterfaceAsync)); + properties.push_back(InstanceMethod("getConfigManagerSync", &Master::getConfigManagerSync)); + properties.push_back(InstanceMethod("getConfigManagerAsync", &Master::getConfigManagerAsync)); + properties.push_back(InstanceMethod("getProcessExitingSync", &Master::getProcessExitingSync)); + properties.push_back(InstanceMethod("getProcessExitingAsync", &Master::getProcessExitingAsync)); +} + +MethodStart Master::getStatusStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getStatus(); + }; +} + +Napi::Value Master::getStatusFinish(const Napi::Env env, fb::IStatus* ret) +{ + return Status::NewInstance(env, ret); +} + +MethodStart Master::getDispatcherStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getDispatcher(); + }; +} + +Napi::Value Master::getDispatcherFinish(const Napi::Env env, fb::IProvider* ret) +{ + return Provider::NewInstance(env, ret); +} + +MethodStart Master::getPluginManagerStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getPluginManager(); + }; +} + +Napi::Value Master::getPluginManagerFinish(const Napi::Env env, fb::IPluginManager* ret) +{ + return PluginManager::NewInstance(env, ret); +} + +MethodStart Master::getTimerControlStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getTimerControl(); + }; +} + +Napi::Value Master::getTimerControlFinish(const Napi::Env env, fb::ITimerControl* ret) +{ + return TimerControl::NewInstance(env, ret); +} + +MethodStart Master::getDtcStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getDtc(); + }; +} + +Napi::Value Master::getDtcFinish(const Napi::Env env, fb::IDtc* ret) +{ + return Dtc::NewInstance(env, ret); +} + +MethodStart Master::registerAttachmentStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* provider = Provider::CheckedUnwrap(info.Env(), info[0], "provider argument", true); + auto* attachment = Attachment::CheckedUnwrap(info.Env(), info[1], "attachment argument", true); + + return [obj, provider, attachment]() { + return obj->interface->registerAttachment((provider ? provider->interface : nullptr), (attachment ? attachment->interface : nullptr)); + }; +} + +Napi::Value Master::registerAttachmentFinish(const Napi::Env env, fb::IAttachment* ret) +{ + return Attachment::NewInstance(env, ret); +} + +MethodStart Master::registerTransactionStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* attachment = Attachment::CheckedUnwrap(info.Env(), info[0], "attachment argument", true); + auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); + + return [obj, attachment, transaction]() { + return obj->interface->registerTransaction((attachment ? attachment->interface : nullptr), (transaction ? transaction->interface : nullptr)); + }; +} + +Napi::Value Master::registerTransactionFinish(const Napi::Env env, fb::ITransaction* ret) +{ + return Transaction::NewInstance(env, ret); +} + +MethodStart Master::getMetadataBuilderStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned fieldCount = (unsigned) info[1].ToNumber(); + + return [obj, status, fieldCount]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getMetadataBuilder(&statusWrapper, fieldCount); + }; +} + +Napi::Value Master::getMetadataBuilderFinish(const Napi::Env env, fb::IMetadataBuilder* ret) +{ + return MetadataBuilder::NewInstance(env, ret); +} + +MethodStart Master::serverModeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + int mode = (int) info[0].ToNumber(); + + return [obj, mode]() { + return obj->interface->serverMode(mode); + }; +} + +Napi::Value Master::serverModeFinish(const Napi::Env env, int ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart Master::getUtilInterfaceStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getUtilInterface(); + }; +} + +Napi::Value Master::getUtilInterfaceFinish(const Napi::Env env, fb::IUtil* ret) +{ + return Util::NewInstance(env, ret); +} + +MethodStart Master::getConfigManagerStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getConfigManager(); + }; +} + +Napi::Value Master::getConfigManagerFinish(const Napi::Env env, fb::IConfigManager* ret) +{ + return ConfigManager::NewInstance(env, ret); +} + +MethodStart Master::getProcessExitingStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getProcessExiting(); + }; +} + +Napi::Value Master::getProcessExitingFinish(const Napi::Env env, FB_BOOLEAN ret) +{ + return Napi::Value::From(env, (bool) ret); +} + +void PluginBase::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("addRefSync", &PluginBase::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &PluginBase::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &PluginBase::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &PluginBase::releaseAsync)); + properties.push_back(InstanceMethod("setOwnerSync", &PluginBase::setOwnerSync)); + properties.push_back(InstanceMethod("setOwnerAsync", &PluginBase::setOwnerAsync)); + properties.push_back(InstanceMethod("getOwnerSync", &PluginBase::getOwnerSync)); + properties.push_back(InstanceMethod("getOwnerAsync", &PluginBase::getOwnerAsync)); +} + +MethodStart PluginBase::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); + return nullptr; + }; +} + +Napi::Value PluginBase::addRefFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart PluginBase::releaseStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->release(); + }; +} + +Napi::Value PluginBase::releaseFinish(const Napi::Env env, int ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart PluginBase::setOwnerStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); + + return [obj, r]() { + obj->interface->setOwner((r ? r->interface : nullptr)); + return nullptr; + }; +} + +Napi::Value PluginBase::setOwnerFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart PluginBase::getOwnerStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getOwner(); + }; +} + +Napi::Value PluginBase::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) +{ + return ReferenceCounted::NewInstance(env, ret); +} + +void PluginSet::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("addRefSync", &PluginSet::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &PluginSet::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &PluginSet::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &PluginSet::releaseAsync)); + properties.push_back(InstanceMethod("getNameSync", &PluginSet::getNameSync)); + properties.push_back(InstanceMethod("getNameAsync", &PluginSet::getNameAsync)); + properties.push_back(InstanceMethod("getModuleNameSync", &PluginSet::getModuleNameSync)); + properties.push_back(InstanceMethod("getModuleNameAsync", &PluginSet::getModuleNameAsync)); + properties.push_back(InstanceMethod("getPluginSync", &PluginSet::getPluginSync)); + properties.push_back(InstanceMethod("getPluginAsync", &PluginSet::getPluginAsync)); + properties.push_back(InstanceMethod("nextSync", &PluginSet::nextSync)); + properties.push_back(InstanceMethod("nextAsync", &PluginSet::nextAsync)); + properties.push_back(InstanceMethod("setSync", &PluginSet::setSync)); + properties.push_back(InstanceMethod("setAsync", &PluginSet::setAsync)); +} + +MethodStart PluginSet::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); + return nullptr; + }; +} + +Napi::Value PluginSet::addRefFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart PluginSet::releaseStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->release(); + }; +} + +Napi::Value PluginSet::releaseFinish(const Napi::Env env, int ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart PluginSet::getNameStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getName(); + }; +} + +Napi::Value PluginSet::getNameFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart PluginSet::getModuleNameStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getModuleName(); + }; +} + +Napi::Value PluginSet::getModuleNameFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart PluginSet::getPluginStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getPlugin(&statusWrapper); + }; +} + +Napi::Value PluginSet::getPluginFinish(const Napi::Env env, fb::IPluginBase* ret) +{ + return PluginBase::NewInstance(env, ret); +} + +MethodStart PluginSet::nextStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->next(&statusWrapper); + return nullptr; + }; +} + +Napi::Value PluginSet::nextFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart PluginSet::setStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string s = info[1].ToString().Utf8Value(); + + return [obj, status, s]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->set(&statusWrapper, s.c_str()); + return nullptr; + }; +} + +Napi::Value PluginSet::setFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +void ConfigEntry::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("addRefSync", &ConfigEntry::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &ConfigEntry::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &ConfigEntry::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &ConfigEntry::releaseAsync)); + properties.push_back(InstanceMethod("getNameSync", &ConfigEntry::getNameSync)); + properties.push_back(InstanceMethod("getNameAsync", &ConfigEntry::getNameAsync)); + properties.push_back(InstanceMethod("getValueSync", &ConfigEntry::getValueSync)); + properties.push_back(InstanceMethod("getValueAsync", &ConfigEntry::getValueAsync)); + properties.push_back(InstanceMethod("getIntValueSync", &ConfigEntry::getIntValueSync)); + properties.push_back(InstanceMethod("getIntValueAsync", &ConfigEntry::getIntValueAsync)); + properties.push_back(InstanceMethod("getBoolValueSync", &ConfigEntry::getBoolValueSync)); + properties.push_back(InstanceMethod("getBoolValueAsync", &ConfigEntry::getBoolValueAsync)); + properties.push_back(InstanceMethod("getSubConfigSync", &ConfigEntry::getSubConfigSync)); + properties.push_back(InstanceMethod("getSubConfigAsync", &ConfigEntry::getSubConfigAsync)); +} + +MethodStart ConfigEntry::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); + return nullptr; + }; +} + +Napi::Value ConfigEntry::addRefFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart ConfigEntry::releaseStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->release(); + }; +} + +Napi::Value ConfigEntry::releaseFinish(const Napi::Env env, int ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart ConfigEntry::getNameStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getName(); + }; +} + +Napi::Value ConfigEntry::getNameFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart ConfigEntry::getValueStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getValue(); + }; +} + +Napi::Value ConfigEntry::getValueFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart ConfigEntry::getIntValueStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getIntValue(); + }; +} + +Napi::Value ConfigEntry::getIntValueFinish(const Napi::Env env, int64_t ret) +{ + return Napi::Value::From(env, (double) ret); +} + +MethodStart ConfigEntry::getBoolValueStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getBoolValue(); + }; +} + +Napi::Value ConfigEntry::getBoolValueFinish(const Napi::Env env, FB_BOOLEAN ret) +{ + return Napi::Value::From(env, (bool) ret); +} + +MethodStart ConfigEntry::getSubConfigStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getSubConfig(&statusWrapper); + }; +} + +Napi::Value ConfigEntry::getSubConfigFinish(const Napi::Env env, fb::IConfig* ret) +{ + return Config::NewInstance(env, ret); +} + +void Config::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("addRefSync", &Config::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Config::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Config::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Config::releaseAsync)); + properties.push_back(InstanceMethod("findSync", &Config::findSync)); + properties.push_back(InstanceMethod("findAsync", &Config::findAsync)); + properties.push_back(InstanceMethod("findValueSync", &Config::findValueSync)); + properties.push_back(InstanceMethod("findValueAsync", &Config::findValueAsync)); + properties.push_back(InstanceMethod("findPosSync", &Config::findPosSync)); + properties.push_back(InstanceMethod("findPosAsync", &Config::findPosAsync)); +} + +MethodStart Config::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); + return nullptr; + }; +} + +Napi::Value Config::addRefFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Config::releaseStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->release(); + }; +} + +Napi::Value Config::releaseFinish(const Napi::Env env, int ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart Config::findStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string name = info[1].ToString().Utf8Value(); + + return [obj, status, name]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->find(&statusWrapper, name.c_str()); + }; +} + +Napi::Value Config::findFinish(const Napi::Env env, fb::IConfigEntry* ret) +{ + return ConfigEntry::NewInstance(env, ret); +} + +MethodStart Config::findValueStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string name = info[1].ToString().Utf8Value(); + std::string value = info[2].ToString().Utf8Value(); + + return [obj, status, name, value]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->findValue(&statusWrapper, name.c_str(), value.c_str()); + }; +} + +Napi::Value Config::findValueFinish(const Napi::Env env, fb::IConfigEntry* ret) +{ + return ConfigEntry::NewInstance(env, ret); +} + +MethodStart Config::findPosStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string name = info[1].ToString().Utf8Value(); + unsigned pos = (unsigned) info[2].ToNumber(); + + return [obj, status, name, pos]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->findPos(&statusWrapper, name.c_str(), pos); + }; +} + +Napi::Value Config::findPosFinish(const Napi::Env env, fb::IConfigEntry* ret) +{ + return ConfigEntry::NewInstance(env, ret); +} + +void FirebirdConf::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("addRefSync", &FirebirdConf::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &FirebirdConf::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &FirebirdConf::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &FirebirdConf::releaseAsync)); + properties.push_back(InstanceMethod("getKeySync", &FirebirdConf::getKeySync)); + properties.push_back(InstanceMethod("getKeyAsync", &FirebirdConf::getKeyAsync)); + properties.push_back(InstanceMethod("asIntegerSync", &FirebirdConf::asIntegerSync)); + properties.push_back(InstanceMethod("asIntegerAsync", &FirebirdConf::asIntegerAsync)); + properties.push_back(InstanceMethod("asStringSync", &FirebirdConf::asStringSync)); + properties.push_back(InstanceMethod("asStringAsync", &FirebirdConf::asStringAsync)); + properties.push_back(InstanceMethod("asBooleanSync", &FirebirdConf::asBooleanSync)); + properties.push_back(InstanceMethod("asBooleanAsync", &FirebirdConf::asBooleanAsync)); + properties.push_back(InstanceMethod("getVersionSync", &FirebirdConf::getVersionSync)); + properties.push_back(InstanceMethod("getVersionAsync", &FirebirdConf::getVersionAsync)); +} + +MethodStart FirebirdConf::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); + return nullptr; + }; +} + +Napi::Value FirebirdConf::addRefFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart FirebirdConf::releaseStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->release(); + }; +} + +Napi::Value FirebirdConf::releaseFinish(const Napi::Env env, int ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart FirebirdConf::getKeyStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + std::string name = info[0].ToString().Utf8Value(); + + return [obj, name]() { + return obj->interface->getKey(name.c_str()); + }; +} + +Napi::Value FirebirdConf::getKeyFinish(const Napi::Env env, unsigned ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart FirebirdConf::asIntegerStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + unsigned key = (unsigned) info[0].ToNumber(); + + return [obj, key]() { + return obj->interface->asInteger(key); + }; +} + +Napi::Value FirebirdConf::asIntegerFinish(const Napi::Env env, int64_t ret) +{ + return Napi::Value::From(env, (double) ret); +} + +MethodStart FirebirdConf::asStringStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + unsigned key = (unsigned) info[0].ToNumber(); + + return [obj, key]() { + return obj->interface->asString(key); + }; +} + +Napi::Value FirebirdConf::asStringFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart FirebirdConf::asBooleanStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + unsigned key = (unsigned) info[0].ToNumber(); + + return [obj, key]() { + return obj->interface->asBoolean(key); + }; +} + +Napi::Value FirebirdConf::asBooleanFinish(const Napi::Env env, FB_BOOLEAN ret) +{ + return Napi::Value::From(env, (bool) ret); +} + +MethodStart FirebirdConf::getVersionStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getVersion(&statusWrapper); + }; +} + +Napi::Value FirebirdConf::getVersionFinish(const Napi::Env env, unsigned ret) +{ + return Napi::Value::From(env, ret); +} + +void PluginConfig::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("addRefSync", &PluginConfig::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &PluginConfig::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &PluginConfig::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &PluginConfig::releaseAsync)); + properties.push_back(InstanceMethod("getConfigFileNameSync", &PluginConfig::getConfigFileNameSync)); + properties.push_back(InstanceMethod("getConfigFileNameAsync", &PluginConfig::getConfigFileNameAsync)); + properties.push_back(InstanceMethod("getDefaultConfigSync", &PluginConfig::getDefaultConfigSync)); + properties.push_back(InstanceMethod("getDefaultConfigAsync", &PluginConfig::getDefaultConfigAsync)); + properties.push_back(InstanceMethod("getFirebirdConfSync", &PluginConfig::getFirebirdConfSync)); + properties.push_back(InstanceMethod("getFirebirdConfAsync", &PluginConfig::getFirebirdConfAsync)); + properties.push_back(InstanceMethod("setReleaseDelaySync", &PluginConfig::setReleaseDelaySync)); + properties.push_back(InstanceMethod("setReleaseDelayAsync", &PluginConfig::setReleaseDelayAsync)); +} + +MethodStart PluginConfig::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); + return nullptr; + }; +} + +Napi::Value PluginConfig::addRefFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart PluginConfig::releaseStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->release(); + }; +} + +Napi::Value PluginConfig::releaseFinish(const Napi::Env env, int ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart PluginConfig::getConfigFileNameStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getConfigFileName(); + }; +} + +Napi::Value PluginConfig::getConfigFileNameFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart PluginConfig::getDefaultConfigStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getDefaultConfig(&statusWrapper); + }; +} + +Napi::Value PluginConfig::getDefaultConfigFinish(const Napi::Env env, fb::IConfig* ret) +{ + return Config::NewInstance(env, ret); +} + +MethodStart PluginConfig::getFirebirdConfStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getFirebirdConf(&statusWrapper); + }; +} + +Napi::Value PluginConfig::getFirebirdConfFinish(const Napi::Env env, fb::IFirebirdConf* ret) +{ + return FirebirdConf::NewInstance(env, ret); +} + +MethodStart PluginConfig::setReleaseDelayStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + uint64_t microSeconds = (uint64_t) info[1].ToNumber().Int64Value(); + + return [obj, status, microSeconds]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setReleaseDelay(&statusWrapper, microSeconds); + return nullptr; + }; +} + +Napi::Value PluginConfig::setReleaseDelayFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +void PluginFactory::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("createPluginSync", &PluginFactory::createPluginSync)); + properties.push_back(InstanceMethod("createPluginAsync", &PluginFactory::createPluginAsync)); +} + +MethodStart PluginFactory::createPluginStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* factoryParameter = PluginConfig::CheckedUnwrap(info.Env(), info[1], "factoryParameter argument", true); + + return [obj, status, factoryParameter]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->createPlugin(&statusWrapper, (factoryParameter ? factoryParameter->interface : nullptr)); + }; +} + +Napi::Value PluginFactory::createPluginFinish(const Napi::Env env, fb::IPluginBase* ret) +{ + return PluginBase::NewInstance(env, ret); +} + +void PluginModule::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("doCleanSync", &PluginModule::doCleanSync)); + properties.push_back(InstanceMethod("doCleanAsync", &PluginModule::doCleanAsync)); + properties.push_back(InstanceMethod("threadDetachSync", &PluginModule::threadDetachSync)); + properties.push_back(InstanceMethod("threadDetachAsync", &PluginModule::threadDetachAsync)); +} + +MethodStart PluginModule::doCleanStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->doClean(); + return nullptr; + }; +} + +Napi::Value PluginModule::doCleanFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart PluginModule::threadDetachStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->threadDetach(); + return nullptr; + }; +} + +Napi::Value PluginModule::threadDetachFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +void PluginManager::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("registerPluginFactorySync", &PluginManager::registerPluginFactorySync)); + properties.push_back(InstanceMethod("registerPluginFactoryAsync", &PluginManager::registerPluginFactoryAsync)); + properties.push_back(InstanceMethod("registerModuleSync", &PluginManager::registerModuleSync)); + properties.push_back(InstanceMethod("registerModuleAsync", &PluginManager::registerModuleAsync)); + properties.push_back(InstanceMethod("unregisterModuleSync", &PluginManager::unregisterModuleSync)); + properties.push_back(InstanceMethod("unregisterModuleAsync", &PluginManager::unregisterModuleAsync)); + properties.push_back(InstanceMethod("getPluginsSync", &PluginManager::getPluginsSync)); + properties.push_back(InstanceMethod("getPluginsAsync", &PluginManager::getPluginsAsync)); + properties.push_back(InstanceMethod("getConfigSync", &PluginManager::getConfigSync)); + properties.push_back(InstanceMethod("getConfigAsync", &PluginManager::getConfigAsync)); + properties.push_back(InstanceMethod("releasePluginSync", &PluginManager::releasePluginSync)); + properties.push_back(InstanceMethod("releasePluginAsync", &PluginManager::releasePluginAsync)); +} + +MethodStart PluginManager::registerPluginFactoryStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + unsigned pluginType = (unsigned) info[0].ToNumber(); + std::string defaultName = info[1].ToString().Utf8Value(); + auto* factory = PluginFactory::CheckedUnwrap(info.Env(), info[2], "factory argument", true); + + return [obj, pluginType, defaultName, factory]() { + obj->interface->registerPluginFactory(pluginType, defaultName.c_str(), (factory ? factory->interface : nullptr)); + return nullptr; + }; +} + +Napi::Value PluginManager::registerPluginFactoryFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart PluginManager::registerModuleStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* cleanup = PluginModule::CheckedUnwrap(info.Env(), info[0], "cleanup argument", true); + + return [obj, cleanup]() { + obj->interface->registerModule((cleanup ? cleanup->interface : nullptr)); + return nullptr; + }; +} + +Napi::Value PluginManager::registerModuleFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart PluginManager::unregisterModuleStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* cleanup = PluginModule::CheckedUnwrap(info.Env(), info[0], "cleanup argument", true); + + return [obj, cleanup]() { + obj->interface->unregisterModule((cleanup ? cleanup->interface : nullptr)); + return nullptr; + }; +} + +Napi::Value PluginManager::unregisterModuleFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart PluginManager::getPluginsStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned pluginType = (unsigned) info[1].ToNumber(); + std::string namesList = info[2].ToString().Utf8Value(); + auto* firebirdConf = FirebirdConf::CheckedUnwrap(info.Env(), info[3], "firebirdConf argument", true); + + return [obj, status, pluginType, namesList, firebirdConf]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getPlugins(&statusWrapper, pluginType, namesList.c_str(), (firebirdConf ? firebirdConf->interface : nullptr)); + }; +} + +Napi::Value PluginManager::getPluginsFinish(const Napi::Env env, fb::IPluginSet* ret) +{ + return PluginSet::NewInstance(env, ret); +} + +MethodStart PluginManager::getConfigStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string filename = info[1].ToString().Utf8Value(); + + return [obj, status, filename]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getConfig(&statusWrapper, filename.c_str()); + }; +} + +Napi::Value PluginManager::getConfigFinish(const Napi::Env env, fb::IConfig* ret) +{ + return Config::NewInstance(env, ret); +} + +MethodStart PluginManager::releasePluginStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* plugin = PluginBase::CheckedUnwrap(info.Env(), info[0], "plugin argument", true); + + return [obj, plugin]() { + obj->interface->releasePlugin((plugin ? plugin->interface : nullptr)); + return nullptr; + }; +} + +Napi::Value PluginManager::releasePluginFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +void CryptKey::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ +} + +void ConfigManager::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("getDirectorySync", &ConfigManager::getDirectorySync)); + properties.push_back(InstanceMethod("getDirectoryAsync", &ConfigManager::getDirectoryAsync)); + properties.push_back(InstanceMethod("getFirebirdConfSync", &ConfigManager::getFirebirdConfSync)); + properties.push_back(InstanceMethod("getFirebirdConfAsync", &ConfigManager::getFirebirdConfAsync)); + properties.push_back(InstanceMethod("getDatabaseConfSync", &ConfigManager::getDatabaseConfSync)); + properties.push_back(InstanceMethod("getDatabaseConfAsync", &ConfigManager::getDatabaseConfAsync)); + properties.push_back(InstanceMethod("getPluginConfigSync", &ConfigManager::getPluginConfigSync)); + properties.push_back(InstanceMethod("getPluginConfigAsync", &ConfigManager::getPluginConfigAsync)); + properties.push_back(InstanceMethod("getInstallDirectorySync", &ConfigManager::getInstallDirectorySync)); + properties.push_back(InstanceMethod("getInstallDirectoryAsync", &ConfigManager::getInstallDirectoryAsync)); + properties.push_back(InstanceMethod("getRootDirectorySync", &ConfigManager::getRootDirectorySync)); + properties.push_back(InstanceMethod("getRootDirectoryAsync", &ConfigManager::getRootDirectoryAsync)); + properties.push_back(InstanceMethod("getDefaultSecurityDbSync", &ConfigManager::getDefaultSecurityDbSync)); + properties.push_back(InstanceMethod("getDefaultSecurityDbAsync", &ConfigManager::getDefaultSecurityDbAsync)); +} + +MethodStart ConfigManager::getDirectoryStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + unsigned code = (unsigned) info[0].ToNumber(); + + return [obj, code]() { + return obj->interface->getDirectory(code); + }; +} + +Napi::Value ConfigManager::getDirectoryFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart ConfigManager::getFirebirdConfStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getFirebirdConf(); + }; +} + +Napi::Value ConfigManager::getFirebirdConfFinish(const Napi::Env env, fb::IFirebirdConf* ret) +{ + return FirebirdConf::NewInstance(env, ret); +} + +MethodStart ConfigManager::getDatabaseConfStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + std::string dbName = info[0].ToString().Utf8Value(); + + return [obj, dbName]() { + return obj->interface->getDatabaseConf(dbName.c_str()); + }; +} + +Napi::Value ConfigManager::getDatabaseConfFinish(const Napi::Env env, fb::IFirebirdConf* ret) +{ + return FirebirdConf::NewInstance(env, ret); +} + +MethodStart ConfigManager::getPluginConfigStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + std::string configuredPlugin = info[0].ToString().Utf8Value(); + + return [obj, configuredPlugin]() { + return obj->interface->getPluginConfig(configuredPlugin.c_str()); + }; +} + +Napi::Value ConfigManager::getPluginConfigFinish(const Napi::Env env, fb::IConfig* ret) +{ + return Config::NewInstance(env, ret); +} + +MethodStart ConfigManager::getInstallDirectoryStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getInstallDirectory(); + }; +} + +Napi::Value ConfigManager::getInstallDirectoryFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart ConfigManager::getRootDirectoryStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getRootDirectory(); + }; +} + +Napi::Value ConfigManager::getRootDirectoryFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart ConfigManager::getDefaultSecurityDbStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getDefaultSecurityDb(); + }; +} + +Napi::Value ConfigManager::getDefaultSecurityDbFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +void EventCallback::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("addRefSync", &EventCallback::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &EventCallback::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &EventCallback::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &EventCallback::releaseAsync)); + properties.push_back(InstanceMethod("eventCallbackFunctionSync", &EventCallback::eventCallbackFunctionSync)); + properties.push_back(InstanceMethod("eventCallbackFunctionAsync", &EventCallback::eventCallbackFunctionAsync)); +} + +MethodStart EventCallback::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); + return nullptr; + }; +} + +Napi::Value EventCallback::addRefFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart EventCallback::releaseStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->release(); + }; +} + +Napi::Value EventCallback::releaseFinish(const Napi::Env env, int ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart EventCallback::eventCallbackFunctionStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + unsigned length = (unsigned) info[0].ToNumber(); + std::shared_ptr> eventsPersistent; + auto* events = getAddress(info.Env(), async, info[1], eventsPersistent); + + return [obj, length, events, eventsPersistent]() { + obj->interface->eventCallbackFunction(length, events); + return nullptr; + }; +} + +Napi::Value EventCallback::eventCallbackFunctionFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +void Blob::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("addRefSync", &Blob::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Blob::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Blob::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Blob::releaseAsync)); + properties.push_back(InstanceMethod("getInfoSync", &Blob::getInfoSync)); + properties.push_back(InstanceMethod("getInfoAsync", &Blob::getInfoAsync)); + properties.push_back(InstanceMethod("getSegmentSync", &Blob::getSegmentSync)); + properties.push_back(InstanceMethod("getSegmentAsync", &Blob::getSegmentAsync)); + properties.push_back(InstanceMethod("putSegmentSync", &Blob::putSegmentSync)); + properties.push_back(InstanceMethod("putSegmentAsync", &Blob::putSegmentAsync)); + properties.push_back(InstanceMethod("deprecatedCancelSync", &Blob::deprecatedCancelSync)); + properties.push_back(InstanceMethod("deprecatedCancelAsync", &Blob::deprecatedCancelAsync)); + properties.push_back(InstanceMethod("deprecatedCloseSync", &Blob::deprecatedCloseSync)); + properties.push_back(InstanceMethod("deprecatedCloseAsync", &Blob::deprecatedCloseAsync)); + properties.push_back(InstanceMethod("seekSync", &Blob::seekSync)); + properties.push_back(InstanceMethod("seekAsync", &Blob::seekAsync)); + properties.push_back(InstanceMethod("cancelSync", &Blob::cancelSync)); + properties.push_back(InstanceMethod("cancelAsync", &Blob::cancelAsync)); + properties.push_back(InstanceMethod("closeSync", &Blob::closeSync)); + properties.push_back(InstanceMethod("closeAsync", &Blob::closeAsync)); +} + +MethodStart Blob::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); + return nullptr; + }; +} + +Napi::Value Blob::addRefFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Blob::releaseStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->release(); + }; +} + +Napi::Value Blob::releaseFinish(const Napi::Env env, int ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart Blob::getInfoStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned itemsLength = (unsigned) info[1].ToNumber(); + std::shared_ptr> itemsPersistent; + auto* items = getAddress(info.Env(), async, info[2], itemsPersistent); + unsigned bufferLength = (unsigned) info[3].ToNumber(); + std::shared_ptr> bufferPersistent; + auto* buffer = getAddress(info.Env(), async, info[4], bufferPersistent); + + return [obj, status, itemsLength, items, itemsPersistent, bufferLength, buffer, bufferPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->getInfo(&statusWrapper, itemsLength, items, bufferLength, buffer); + return nullptr; + }; +} + +Napi::Value Blob::getInfoFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Blob::getSegmentStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned bufferLength = (unsigned) info[1].ToNumber(); + std::shared_ptr> bufferPersistent; + auto* buffer = getAddress(info.Env(), async, info[2], bufferPersistent); + std::shared_ptr> segmentLengthPersistent; + auto* segmentLength = getAddress(info.Env(), async, info[3], segmentLengthPersistent); + + return [obj, status, bufferLength, buffer, bufferPersistent, segmentLength, segmentLengthPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getSegment(&statusWrapper, bufferLength, buffer, segmentLength); + }; +} + +Napi::Value Blob::getSegmentFinish(const Napi::Env env, int ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart Blob::putSegmentStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned length = (unsigned) info[1].ToNumber(); + std::shared_ptr> bufferPersistent; + auto* buffer = getAddress(info.Env(), async, info[2], bufferPersistent); + + return [obj, status, length, buffer, bufferPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->putSegment(&statusWrapper, length, buffer); + return nullptr; + }; +} + +Napi::Value Blob::putSegmentFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Blob::deprecatedCancelStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->deprecatedCancel(&statusWrapper); + return nullptr; + }; +} + +Napi::Value Blob::deprecatedCancelFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Blob::deprecatedCloseStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->deprecatedClose(&statusWrapper); + return nullptr; + }; +} + +Napi::Value Blob::deprecatedCloseFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Blob::seekStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + int mode = (int) info[1].ToNumber(); + int offset = (int) info[2].ToNumber(); + + return [obj, status, mode, offset]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->seek(&statusWrapper, mode, offset); + }; +} + +Napi::Value Blob::seekFinish(const Napi::Env env, int ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart Blob::cancelStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->cancel(&statusWrapper); + return nullptr; + }; +} + +Napi::Value Blob::cancelFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Blob::closeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->close(&statusWrapper); + return nullptr; + }; +} + +Napi::Value Blob::closeFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +void Transaction::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("addRefSync", &Transaction::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Transaction::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Transaction::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Transaction::releaseAsync)); + properties.push_back(InstanceMethod("getInfoSync", &Transaction::getInfoSync)); + properties.push_back(InstanceMethod("getInfoAsync", &Transaction::getInfoAsync)); + properties.push_back(InstanceMethod("prepareSync", &Transaction::prepareSync)); + properties.push_back(InstanceMethod("prepareAsync", &Transaction::prepareAsync)); + properties.push_back(InstanceMethod("deprecatedCommitSync", &Transaction::deprecatedCommitSync)); + properties.push_back(InstanceMethod("deprecatedCommitAsync", &Transaction::deprecatedCommitAsync)); + properties.push_back(InstanceMethod("commitRetainingSync", &Transaction::commitRetainingSync)); + properties.push_back(InstanceMethod("commitRetainingAsync", &Transaction::commitRetainingAsync)); + properties.push_back(InstanceMethod("deprecatedRollbackSync", &Transaction::deprecatedRollbackSync)); + properties.push_back(InstanceMethod("deprecatedRollbackAsync", &Transaction::deprecatedRollbackAsync)); + properties.push_back(InstanceMethod("rollbackRetainingSync", &Transaction::rollbackRetainingSync)); + properties.push_back(InstanceMethod("rollbackRetainingAsync", &Transaction::rollbackRetainingAsync)); + properties.push_back(InstanceMethod("deprecatedDisconnectSync", &Transaction::deprecatedDisconnectSync)); + properties.push_back(InstanceMethod("deprecatedDisconnectAsync", &Transaction::deprecatedDisconnectAsync)); + properties.push_back(InstanceMethod("joinSync", &Transaction::joinSync)); + properties.push_back(InstanceMethod("joinAsync", &Transaction::joinAsync)); + properties.push_back(InstanceMethod("validateSync", &Transaction::validateSync)); + properties.push_back(InstanceMethod("validateAsync", &Transaction::validateAsync)); + properties.push_back(InstanceMethod("enterDtcSync", &Transaction::enterDtcSync)); + properties.push_back(InstanceMethod("enterDtcAsync", &Transaction::enterDtcAsync)); + properties.push_back(InstanceMethod("commitSync", &Transaction::commitSync)); + properties.push_back(InstanceMethod("commitAsync", &Transaction::commitAsync)); + properties.push_back(InstanceMethod("rollbackSync", &Transaction::rollbackSync)); + properties.push_back(InstanceMethod("rollbackAsync", &Transaction::rollbackAsync)); + properties.push_back(InstanceMethod("disconnectSync", &Transaction::disconnectSync)); + properties.push_back(InstanceMethod("disconnectAsync", &Transaction::disconnectAsync)); +} + +MethodStart Transaction::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); + return nullptr; + }; +} + +Napi::Value Transaction::addRefFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Transaction::releaseStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->release(); + }; +} + +Napi::Value Transaction::releaseFinish(const Napi::Env env, int ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart Transaction::getInfoStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned itemsLength = (unsigned) info[1].ToNumber(); + std::shared_ptr> itemsPersistent; + auto* items = getAddress(info.Env(), async, info[2], itemsPersistent); + unsigned bufferLength = (unsigned) info[3].ToNumber(); + std::shared_ptr> bufferPersistent; + auto* buffer = getAddress(info.Env(), async, info[4], bufferPersistent); + + return [obj, status, itemsLength, items, itemsPersistent, bufferLength, buffer, bufferPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->getInfo(&statusWrapper, itemsLength, items, bufferLength, buffer); + return nullptr; + }; +} + +Napi::Value Transaction::getInfoFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Transaction::prepareStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned msgLength = (unsigned) info[1].ToNumber(); + std::shared_ptr> messagePersistent; + auto* message = getAddress(info.Env(), async, info[2], messagePersistent); + + return [obj, status, msgLength, message, messagePersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->prepare(&statusWrapper, msgLength, message); + return nullptr; + }; +} + +Napi::Value Transaction::prepareFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Transaction::deprecatedCommitStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->deprecatedCommit(&statusWrapper); + return nullptr; + }; +} + +Napi::Value Transaction::deprecatedCommitFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Transaction::commitRetainingStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->commitRetaining(&statusWrapper); + return nullptr; + }; +} + +Napi::Value Transaction::commitRetainingFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Transaction::deprecatedRollbackStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->deprecatedRollback(&statusWrapper); + return nullptr; + }; +} + +Napi::Value Transaction::deprecatedRollbackFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Transaction::rollbackRetainingStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->rollbackRetaining(&statusWrapper); + return nullptr; + }; +} + +Napi::Value Transaction::rollbackRetainingFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Transaction::deprecatedDisconnectStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->deprecatedDisconnect(&statusWrapper); + return nullptr; + }; +} + +Napi::Value Transaction::deprecatedDisconnectFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Transaction::joinStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); + + return [obj, status, transaction]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->join(&statusWrapper, (transaction ? transaction->interface : nullptr)); + }; +} + +Napi::Value Transaction::joinFinish(const Napi::Env env, fb::ITransaction* ret) +{ + return Transaction::NewInstance(env, ret); +} + +MethodStart Transaction::validateStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* attachment = Attachment::CheckedUnwrap(info.Env(), info[1], "attachment argument", true); + + return [obj, status, attachment]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->validate(&statusWrapper, (attachment ? attachment->interface : nullptr)); + }; +} + +Napi::Value Transaction::validateFinish(const Napi::Env env, fb::ITransaction* ret) +{ + return Transaction::NewInstance(env, ret); +} + +MethodStart Transaction::enterDtcStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->enterDtc(&statusWrapper); + }; +} + +Napi::Value Transaction::enterDtcFinish(const Napi::Env env, fb::ITransaction* ret) +{ + return Transaction::NewInstance(env, ret); +} + +MethodStart Transaction::commitStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->commit(&statusWrapper); + return nullptr; + }; +} + +Napi::Value Transaction::commitFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Transaction::rollbackStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->rollback(&statusWrapper); + return nullptr; + }; +} + +Napi::Value Transaction::rollbackFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Transaction::disconnectStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->disconnect(&statusWrapper); + return nullptr; + }; +} + +Napi::Value Transaction::disconnectFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +void MessageMetadata::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("addRefSync", &MessageMetadata::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &MessageMetadata::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &MessageMetadata::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &MessageMetadata::releaseAsync)); + properties.push_back(InstanceMethod("getCountSync", &MessageMetadata::getCountSync)); + properties.push_back(InstanceMethod("getCountAsync", &MessageMetadata::getCountAsync)); + properties.push_back(InstanceMethod("getFieldSync", &MessageMetadata::getFieldSync)); + properties.push_back(InstanceMethod("getFieldAsync", &MessageMetadata::getFieldAsync)); + properties.push_back(InstanceMethod("getRelationSync", &MessageMetadata::getRelationSync)); + properties.push_back(InstanceMethod("getRelationAsync", &MessageMetadata::getRelationAsync)); + properties.push_back(InstanceMethod("getOwnerSync", &MessageMetadata::getOwnerSync)); + properties.push_back(InstanceMethod("getOwnerAsync", &MessageMetadata::getOwnerAsync)); + properties.push_back(InstanceMethod("getAliasSync", &MessageMetadata::getAliasSync)); + properties.push_back(InstanceMethod("getAliasAsync", &MessageMetadata::getAliasAsync)); + properties.push_back(InstanceMethod("getTypeSync", &MessageMetadata::getTypeSync)); + properties.push_back(InstanceMethod("getTypeAsync", &MessageMetadata::getTypeAsync)); + properties.push_back(InstanceMethod("isNullableSync", &MessageMetadata::isNullableSync)); + properties.push_back(InstanceMethod("isNullableAsync", &MessageMetadata::isNullableAsync)); + properties.push_back(InstanceMethod("getSubTypeSync", &MessageMetadata::getSubTypeSync)); + properties.push_back(InstanceMethod("getSubTypeAsync", &MessageMetadata::getSubTypeAsync)); + properties.push_back(InstanceMethod("getLengthSync", &MessageMetadata::getLengthSync)); + properties.push_back(InstanceMethod("getLengthAsync", &MessageMetadata::getLengthAsync)); + properties.push_back(InstanceMethod("getScaleSync", &MessageMetadata::getScaleSync)); + properties.push_back(InstanceMethod("getScaleAsync", &MessageMetadata::getScaleAsync)); + properties.push_back(InstanceMethod("getCharSetSync", &MessageMetadata::getCharSetSync)); + properties.push_back(InstanceMethod("getCharSetAsync", &MessageMetadata::getCharSetAsync)); + properties.push_back(InstanceMethod("getOffsetSync", &MessageMetadata::getOffsetSync)); + properties.push_back(InstanceMethod("getOffsetAsync", &MessageMetadata::getOffsetAsync)); + properties.push_back(InstanceMethod("getNullOffsetSync", &MessageMetadata::getNullOffsetSync)); + properties.push_back(InstanceMethod("getNullOffsetAsync", &MessageMetadata::getNullOffsetAsync)); + properties.push_back(InstanceMethod("getBuilderSync", &MessageMetadata::getBuilderSync)); + properties.push_back(InstanceMethod("getBuilderAsync", &MessageMetadata::getBuilderAsync)); + properties.push_back(InstanceMethod("getMessageLengthSync", &MessageMetadata::getMessageLengthSync)); + properties.push_back(InstanceMethod("getMessageLengthAsync", &MessageMetadata::getMessageLengthAsync)); + properties.push_back(InstanceMethod("getAlignmentSync", &MessageMetadata::getAlignmentSync)); + properties.push_back(InstanceMethod("getAlignmentAsync", &MessageMetadata::getAlignmentAsync)); + properties.push_back(InstanceMethod("getAlignedLengthSync", &MessageMetadata::getAlignedLengthSync)); + properties.push_back(InstanceMethod("getAlignedLengthAsync", &MessageMetadata::getAlignedLengthAsync)); +} + +MethodStart MessageMetadata::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); + return nullptr; + }; +} + +Napi::Value MessageMetadata::addRefFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart MessageMetadata::releaseStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->release(); + }; +} + +Napi::Value MessageMetadata::releaseFinish(const Napi::Env env, int ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart MessageMetadata::getCountStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getCount(&statusWrapper); + }; +} + +Napi::Value MessageMetadata::getCountFinish(const Napi::Env env, unsigned ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart MessageMetadata::getFieldStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + + return [obj, status, index]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getField(&statusWrapper, index); + }; +} + +Napi::Value MessageMetadata::getFieldFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart MessageMetadata::getRelationStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + + return [obj, status, index]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getRelation(&statusWrapper, index); + }; +} + +Napi::Value MessageMetadata::getRelationFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart MessageMetadata::getOwnerStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + + return [obj, status, index]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getOwner(&statusWrapper, index); + }; +} + +Napi::Value MessageMetadata::getOwnerFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart MessageMetadata::getAliasStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + + return [obj, status, index]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getAlias(&statusWrapper, index); + }; +} + +Napi::Value MessageMetadata::getAliasFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart MessageMetadata::getTypeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + + return [obj, status, index]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getType(&statusWrapper, index); + }; +} + +Napi::Value MessageMetadata::getTypeFinish(const Napi::Env env, unsigned ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart MessageMetadata::isNullableStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + + return [obj, status, index]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->isNullable(&statusWrapper, index); + }; +} + +Napi::Value MessageMetadata::isNullableFinish(const Napi::Env env, FB_BOOLEAN ret) +{ + return Napi::Value::From(env, (bool) ret); +} + +MethodStart MessageMetadata::getSubTypeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + + return [obj, status, index]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getSubType(&statusWrapper, index); + }; +} + +Napi::Value MessageMetadata::getSubTypeFinish(const Napi::Env env, int ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart MessageMetadata::getLengthStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + + return [obj, status, index]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getLength(&statusWrapper, index); + }; +} + +Napi::Value MessageMetadata::getLengthFinish(const Napi::Env env, unsigned ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart MessageMetadata::getScaleStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + + return [obj, status, index]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getScale(&statusWrapper, index); }; } -Napi::Value ReferenceCounted::releaseFinish(const Napi::Env env, int ret) +Napi::Value MessageMetadata::getScaleFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -void Disposable::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart MessageMetadata::getCharSetStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("disposeSync", &Disposable::disposeSync)); - properties.push_back(InstanceMethod("disposeAsync", &Disposable::disposeAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + + return [obj, status, index]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getCharSet(&statusWrapper, index); + }; } -MethodStart Disposable::disposeStart(bool async, const Napi::CallbackInfo& info) +Napi::Value MessageMetadata::getCharSetFinish(const Napi::Env env, unsigned ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + return Napi::Value::From(env, ret); +} + +MethodStart MessageMetadata::getOffsetStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + + return [obj, status, index]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getOffset(&statusWrapper, index); + }; +} + +Napi::Value MessageMetadata::getOffsetFinish(const Napi::Env env, unsigned ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart MessageMetadata::getNullOffsetStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + + return [obj, status, index]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getNullOffset(&statusWrapper, index); + }; +} + +Napi::Value MessageMetadata::getNullOffsetFinish(const Napi::Env env, unsigned ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart MessageMetadata::getBuilderStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getBuilder(&statusWrapper); + }; +} + +Napi::Value MessageMetadata::getBuilderFinish(const Napi::Env env, fb::IMetadataBuilder* ret) +{ + return MetadataBuilder::NewInstance(env, ret); +} + +MethodStart MessageMetadata::getMessageLengthStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getMessageLength(&statusWrapper); + }; +} + +Napi::Value MessageMetadata::getMessageLengthFinish(const Napi::Env env, unsigned ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart MessageMetadata::getAlignmentStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getAlignment(&statusWrapper); + }; +} + +Napi::Value MessageMetadata::getAlignmentFinish(const Napi::Env env, unsigned ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart MessageMetadata::getAlignedLengthStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getAlignedLength(&statusWrapper); + }; +} + +Napi::Value MessageMetadata::getAlignedLengthFinish(const Napi::Env env, unsigned ret) +{ + return Napi::Value::From(env, ret); +} + +void MetadataBuilder::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("addRefSync", &MetadataBuilder::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &MetadataBuilder::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &MetadataBuilder::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &MetadataBuilder::releaseAsync)); + properties.push_back(InstanceMethod("setTypeSync", &MetadataBuilder::setTypeSync)); + properties.push_back(InstanceMethod("setTypeAsync", &MetadataBuilder::setTypeAsync)); + properties.push_back(InstanceMethod("setSubTypeSync", &MetadataBuilder::setSubTypeSync)); + properties.push_back(InstanceMethod("setSubTypeAsync", &MetadataBuilder::setSubTypeAsync)); + properties.push_back(InstanceMethod("setLengthSync", &MetadataBuilder::setLengthSync)); + properties.push_back(InstanceMethod("setLengthAsync", &MetadataBuilder::setLengthAsync)); + properties.push_back(InstanceMethod("setCharSetSync", &MetadataBuilder::setCharSetSync)); + properties.push_back(InstanceMethod("setCharSetAsync", &MetadataBuilder::setCharSetAsync)); + properties.push_back(InstanceMethod("setScaleSync", &MetadataBuilder::setScaleSync)); + properties.push_back(InstanceMethod("setScaleAsync", &MetadataBuilder::setScaleAsync)); + properties.push_back(InstanceMethod("truncateSync", &MetadataBuilder::truncateSync)); + properties.push_back(InstanceMethod("truncateAsync", &MetadataBuilder::truncateAsync)); + properties.push_back(InstanceMethod("moveNameToIndexSync", &MetadataBuilder::moveNameToIndexSync)); + properties.push_back(InstanceMethod("moveNameToIndexAsync", &MetadataBuilder::moveNameToIndexAsync)); + properties.push_back(InstanceMethod("removeSync", &MetadataBuilder::removeSync)); + properties.push_back(InstanceMethod("removeAsync", &MetadataBuilder::removeAsync)); + properties.push_back(InstanceMethod("addFieldSync", &MetadataBuilder::addFieldSync)); + properties.push_back(InstanceMethod("addFieldAsync", &MetadataBuilder::addFieldAsync)); + properties.push_back(InstanceMethod("getMetadataSync", &MetadataBuilder::getMetadataSync)); + properties.push_back(InstanceMethod("getMetadataAsync", &MetadataBuilder::getMetadataAsync)); + properties.push_back(InstanceMethod("setFieldSync", &MetadataBuilder::setFieldSync)); + properties.push_back(InstanceMethod("setFieldAsync", &MetadataBuilder::setFieldAsync)); + properties.push_back(InstanceMethod("setRelationSync", &MetadataBuilder::setRelationSync)); + properties.push_back(InstanceMethod("setRelationAsync", &MetadataBuilder::setRelationAsync)); + properties.push_back(InstanceMethod("setOwnerSync", &MetadataBuilder::setOwnerSync)); + properties.push_back(InstanceMethod("setOwnerAsync", &MetadataBuilder::setOwnerAsync)); + properties.push_back(InstanceMethod("setAliasSync", &MetadataBuilder::setAliasSync)); + properties.push_back(InstanceMethod("setAliasAsync", &MetadataBuilder::setAliasAsync)); +} + +MethodStart MetadataBuilder::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - obj->interface->dispose(); + obj->interface->addRef(); return nullptr; }; } -Napi::Value Disposable::disposeFinish(const Napi::Env env, void* ret) +Napi::Value MetadataBuilder::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -void Status::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart MetadataBuilder::releaseStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("disposeSync", &Status::disposeSync)); - properties.push_back(InstanceMethod("disposeAsync", &Status::disposeAsync)); - properties.push_back(InstanceMethod("initSync", &Status::initSync)); - properties.push_back(InstanceMethod("initAsync", &Status::initAsync)); - properties.push_back(InstanceMethod("getStateSync", &Status::getStateSync)); - properties.push_back(InstanceMethod("getStateAsync", &Status::getStateAsync)); - properties.push_back(InstanceMethod("cloneSync", &Status::cloneSync)); - properties.push_back(InstanceMethod("cloneAsync", &Status::cloneAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->release(); + }; } -MethodStart Status::disposeStart(bool async, const Napi::CallbackInfo& info) +Napi::Value MetadataBuilder::releaseFinish(const Napi::Env env, int ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + return Napi::Value::From(env, ret); +} - return [obj]() { - obj->interface->dispose(); +MethodStart MetadataBuilder::setTypeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + unsigned type = (unsigned) info[2].ToNumber(); + + return [obj, status, index, type]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setType(&statusWrapper, index, type); return nullptr; }; } -Napi::Value Status::disposeFinish(const Napi::Env env, void* ret) +Napi::Value MetadataBuilder::setTypeFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Status::initStart(bool async, const Napi::CallbackInfo& info) +MethodStart MetadataBuilder::setSubTypeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + int subType = (int) info[2].ToNumber(); - return [obj]() { - obj->interface->init(); + return [obj, status, index, subType]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setSubType(&statusWrapper, index, subType); return nullptr; }; } -Napi::Value Status::initFinish(const Napi::Env env, void* ret) +Napi::Value MetadataBuilder::setSubTypeFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Status::getStateStart(bool async, const Napi::CallbackInfo& info) +MethodStart MetadataBuilder::setLengthStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + unsigned length = (unsigned) info[2].ToNumber(); - return [obj]() { - return obj->interface->getState(); + return [obj, status, index, length]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setLength(&statusWrapper, index, length); + return nullptr; }; } -Napi::Value Status::getStateFinish(const Napi::Env env, unsigned ret) +Napi::Value MetadataBuilder::setLengthFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart Status::cloneStart(bool async, const Napi::CallbackInfo& info) +MethodStart MetadataBuilder::setCharSetStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + unsigned charSet = (unsigned) info[2].ToNumber(); - return [obj]() { - return obj->interface->clone(); + return [obj, status, index, charSet]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setCharSet(&statusWrapper, index, charSet); + return nullptr; }; } -Napi::Value Status::cloneFinish(const Napi::Env env, fb::IStatus* ret) +Napi::Value MetadataBuilder::setCharSetFinish(const Napi::Env env, void* ret) { - return Status::NewInstance(env, ret); + return env.Undefined(); +} + +MethodStart MetadataBuilder::setScaleStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + int scale = (int) info[2].ToNumber(); + + return [obj, status, index, scale]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setScale(&statusWrapper, index, scale); + return nullptr; + }; } -void Master::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value MetadataBuilder::setScaleFinish(const Napi::Env env, void* ret) { - properties.push_back(InstanceMethod("getStatusSync", &Master::getStatusSync)); - properties.push_back(InstanceMethod("getStatusAsync", &Master::getStatusAsync)); - properties.push_back(InstanceMethod("getDispatcherSync", &Master::getDispatcherSync)); - properties.push_back(InstanceMethod("getDispatcherAsync", &Master::getDispatcherAsync)); - properties.push_back(InstanceMethod("getPluginManagerSync", &Master::getPluginManagerSync)); - properties.push_back(InstanceMethod("getPluginManagerAsync", &Master::getPluginManagerAsync)); - properties.push_back(InstanceMethod("getTimerControlSync", &Master::getTimerControlSync)); - properties.push_back(InstanceMethod("getTimerControlAsync", &Master::getTimerControlAsync)); - properties.push_back(InstanceMethod("getDtcSync", &Master::getDtcSync)); - properties.push_back(InstanceMethod("getDtcAsync", &Master::getDtcAsync)); - properties.push_back(InstanceMethod("registerAttachmentSync", &Master::registerAttachmentSync)); - properties.push_back(InstanceMethod("registerAttachmentAsync", &Master::registerAttachmentAsync)); - properties.push_back(InstanceMethod("registerTransactionSync", &Master::registerTransactionSync)); - properties.push_back(InstanceMethod("registerTransactionAsync", &Master::registerTransactionAsync)); - properties.push_back(InstanceMethod("getMetadataBuilderSync", &Master::getMetadataBuilderSync)); - properties.push_back(InstanceMethod("getMetadataBuilderAsync", &Master::getMetadataBuilderAsync)); - properties.push_back(InstanceMethod("serverModeSync", &Master::serverModeSync)); - properties.push_back(InstanceMethod("serverModeAsync", &Master::serverModeAsync)); - properties.push_back(InstanceMethod("getUtilInterfaceSync", &Master::getUtilInterfaceSync)); - properties.push_back(InstanceMethod("getUtilInterfaceAsync", &Master::getUtilInterfaceAsync)); - properties.push_back(InstanceMethod("getConfigManagerSync", &Master::getConfigManagerSync)); - properties.push_back(InstanceMethod("getConfigManagerAsync", &Master::getConfigManagerAsync)); - properties.push_back(InstanceMethod("getProcessExitingSync", &Master::getProcessExitingSync)); - properties.push_back(InstanceMethod("getProcessExitingAsync", &Master::getProcessExitingAsync)); + return env.Undefined(); } -MethodStart Master::getStatusStart(bool async, const Napi::CallbackInfo& info) +MethodStart MetadataBuilder::truncateStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned count = (unsigned) info[1].ToNumber(); - return [obj]() { - return obj->interface->getStatus(); + return [obj, status, count]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->truncate(&statusWrapper, count); + return nullptr; }; } -Napi::Value Master::getStatusFinish(const Napi::Env env, fb::IStatus* ret) +Napi::Value MetadataBuilder::truncateFinish(const Napi::Env env, void* ret) { - return Status::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Master::getDispatcherStart(bool async, const Napi::CallbackInfo& info) +MethodStart MetadataBuilder::moveNameToIndexStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string name = info[1].ToString().Utf8Value(); + unsigned index = (unsigned) info[2].ToNumber(); - return [obj]() { - return obj->interface->getDispatcher(); + return [obj, status, name, index]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->moveNameToIndex(&statusWrapper, name.c_str(), index); + return nullptr; }; } -Napi::Value Master::getDispatcherFinish(const Napi::Env env, fb::IProvider* ret) +Napi::Value MetadataBuilder::moveNameToIndexFinish(const Napi::Env env, void* ret) { - return Provider::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Master::getPluginManagerStart(bool async, const Napi::CallbackInfo& info) +MethodStart MetadataBuilder::removeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); - return [obj]() { - return obj->interface->getPluginManager(); + return [obj, status, index]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->remove(&statusWrapper, index); + return nullptr; }; } -Napi::Value Master::getPluginManagerFinish(const Napi::Env env, fb::IPluginManager* ret) +Napi::Value MetadataBuilder::removeFinish(const Napi::Env env, void* ret) { - return PluginManager::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Master::getTimerControlStart(bool async, const Napi::CallbackInfo& info) +MethodStart MetadataBuilder::addFieldStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->getTimerControl(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->addField(&statusWrapper); }; } -Napi::Value Master::getTimerControlFinish(const Napi::Env env, fb::ITimerControl* ret) +Napi::Value MetadataBuilder::addFieldFinish(const Napi::Env env, unsigned ret) { - return TimerControl::NewInstance(env, ret); + return Napi::Value::From(env, ret); } -MethodStart Master::getDtcStart(bool async, const Napi::CallbackInfo& info) +MethodStart MetadataBuilder::getMetadataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->getDtc(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getMetadata(&statusWrapper); }; } -Napi::Value Master::getDtcFinish(const Napi::Env env, fb::IDtc* ret) +Napi::Value MetadataBuilder::getMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret) { - return Dtc::NewInstance(env, ret); + return MessageMetadata::NewInstance(env, ret); } -MethodStart Master::registerAttachmentStart(bool async, const Napi::CallbackInfo& info) +MethodStart MetadataBuilder::setFieldStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* provider = Provider::CheckedUnwrap(info.Env(), info[0], "provider argument", true); - auto* attachment = Attachment::CheckedUnwrap(info.Env(), info[1], "attachment argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + std::string field = info[2].ToString().Utf8Value(); - return [obj, provider, attachment]() { - return obj->interface->registerAttachment((provider ? provider->interface : nullptr), (attachment ? attachment->interface : nullptr)); + return [obj, status, index, field]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setField(&statusWrapper, index, field.c_str()); + return nullptr; }; } -Napi::Value Master::registerAttachmentFinish(const Napi::Env env, fb::IAttachment* ret) +Napi::Value MetadataBuilder::setFieldFinish(const Napi::Env env, void* ret) { - return Attachment::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Master::registerTransactionStart(bool async, const Napi::CallbackInfo& info) +MethodStart MetadataBuilder::setRelationStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* attachment = Attachment::CheckedUnwrap(info.Env(), info[0], "attachment argument", true); - auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + std::string relation = info[2].ToString().Utf8Value(); - return [obj, attachment, transaction]() { - return obj->interface->registerTransaction((attachment ? attachment->interface : nullptr), (transaction ? transaction->interface : nullptr)); + return [obj, status, index, relation]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setRelation(&statusWrapper, index, relation.c_str()); + return nullptr; }; } -Napi::Value Master::registerTransactionFinish(const Napi::Env env, fb::ITransaction* ret) +Napi::Value MetadataBuilder::setRelationFinish(const Napi::Env env, void* ret) { - return Transaction::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Master::getMetadataBuilderStart(bool async, const Napi::CallbackInfo& info) +MethodStart MetadataBuilder::setOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned fieldCount = (unsigned) info[1].ToNumber(); + unsigned index = (unsigned) info[1].ToNumber(); + std::string owner = info[2].ToString().Utf8Value(); - return [obj, status, fieldCount]() { + return [obj, status, index, owner]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getMetadataBuilder(&statusWrapper, fieldCount); + obj->interface->setOwner(&statusWrapper, index, owner.c_str()); + return nullptr; }; } -Napi::Value Master::getMetadataBuilderFinish(const Napi::Env env, fb::IMetadataBuilder* ret) +Napi::Value MetadataBuilder::setOwnerFinish(const Napi::Env env, void* ret) { - return MetadataBuilder::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Master::serverModeStart(bool async, const Napi::CallbackInfo& info) +MethodStart MetadataBuilder::setAliasStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - int mode = (int) info[0].ToNumber(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + std::string alias = info[2].ToString().Utf8Value(); - return [obj, mode]() { - return obj->interface->serverMode(mode); + return [obj, status, index, alias]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setAlias(&statusWrapper, index, alias.c_str()); + return nullptr; }; } -Napi::Value Master::serverModeFinish(const Napi::Env env, int ret) +Napi::Value MetadataBuilder::setAliasFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart Master::getUtilInterfaceStart(bool async, const Napi::CallbackInfo& info) +void ResultSet::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("addRefSync", &ResultSet::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &ResultSet::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &ResultSet::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &ResultSet::releaseAsync)); + properties.push_back(InstanceMethod("fetchNextSync", &ResultSet::fetchNextSync)); + properties.push_back(InstanceMethod("fetchNextAsync", &ResultSet::fetchNextAsync)); + properties.push_back(InstanceMethod("fetchPriorSync", &ResultSet::fetchPriorSync)); + properties.push_back(InstanceMethod("fetchPriorAsync", &ResultSet::fetchPriorAsync)); + properties.push_back(InstanceMethod("fetchFirstSync", &ResultSet::fetchFirstSync)); + properties.push_back(InstanceMethod("fetchFirstAsync", &ResultSet::fetchFirstAsync)); + properties.push_back(InstanceMethod("fetchLastSync", &ResultSet::fetchLastSync)); + properties.push_back(InstanceMethod("fetchLastAsync", &ResultSet::fetchLastAsync)); + properties.push_back(InstanceMethod("fetchAbsoluteSync", &ResultSet::fetchAbsoluteSync)); + properties.push_back(InstanceMethod("fetchAbsoluteAsync", &ResultSet::fetchAbsoluteAsync)); + properties.push_back(InstanceMethod("fetchRelativeSync", &ResultSet::fetchRelativeSync)); + properties.push_back(InstanceMethod("fetchRelativeAsync", &ResultSet::fetchRelativeAsync)); + properties.push_back(InstanceMethod("isEofSync", &ResultSet::isEofSync)); + properties.push_back(InstanceMethod("isEofAsync", &ResultSet::isEofAsync)); + properties.push_back(InstanceMethod("isBofSync", &ResultSet::isBofSync)); + properties.push_back(InstanceMethod("isBofAsync", &ResultSet::isBofAsync)); + properties.push_back(InstanceMethod("getMetadataSync", &ResultSet::getMetadataSync)); + properties.push_back(InstanceMethod("getMetadataAsync", &ResultSet::getMetadataAsync)); + properties.push_back(InstanceMethod("deprecatedCloseSync", &ResultSet::deprecatedCloseSync)); + properties.push_back(InstanceMethod("deprecatedCloseAsync", &ResultSet::deprecatedCloseAsync)); + properties.push_back(InstanceMethod("setDelayedOutputFormatSync", &ResultSet::setDelayedOutputFormatSync)); + properties.push_back(InstanceMethod("setDelayedOutputFormatAsync", &ResultSet::setDelayedOutputFormatAsync)); + properties.push_back(InstanceMethod("closeSync", &ResultSet::closeSync)); + properties.push_back(InstanceMethod("closeAsync", &ResultSet::closeAsync)); + properties.push_back(InstanceMethod("getInfoSync", &ResultSet::getInfoSync)); + properties.push_back(InstanceMethod("getInfoAsync", &ResultSet::getInfoAsync)); +} + +MethodStart ResultSet::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getUtilInterface(); + obj->interface->addRef(); + return nullptr; }; } -Napi::Value Master::getUtilInterfaceFinish(const Napi::Env env, fb::IUtil* ret) +Napi::Value ResultSet::addRefFinish(const Napi::Env env, void* ret) { - return Util::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Master::getConfigManagerStart(bool async, const Napi::CallbackInfo& info) +MethodStart ResultSet::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getConfigManager(); + return obj->interface->release(); }; } -Napi::Value Master::getConfigManagerFinish(const Napi::Env env, fb::IConfigManager* ret) +Napi::Value ResultSet::releaseFinish(const Napi::Env env, int ret) { - return ConfigManager::NewInstance(env, ret); + return Napi::Value::From(env, ret); } -MethodStart Master::getProcessExitingStart(bool async, const Napi::CallbackInfo& info) +MethodStart ResultSet::fetchNextStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::shared_ptr> messagePersistent; + auto* message = getAddress(info.Env(), async, info[1], messagePersistent); - return [obj]() { - return obj->interface->getProcessExiting(); + return [obj, status, message, messagePersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->fetchNext(&statusWrapper, message); }; } -Napi::Value Master::getProcessExitingFinish(const Napi::Env env, FB_BOOLEAN ret) +Napi::Value ResultSet::fetchNextFinish(const Napi::Env env, int ret) { - return Napi::Value::From(env, (bool) ret); + return Napi::Value::From(env, ret); } -void PluginBase::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart ResultSet::fetchPriorStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("addRefSync", &PluginBase::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &PluginBase::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &PluginBase::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &PluginBase::releaseAsync)); - properties.push_back(InstanceMethod("setOwnerSync", &PluginBase::setOwnerSync)); - properties.push_back(InstanceMethod("setOwnerAsync", &PluginBase::setOwnerAsync)); - properties.push_back(InstanceMethod("getOwnerSync", &PluginBase::getOwnerSync)); - properties.push_back(InstanceMethod("getOwnerAsync", &PluginBase::getOwnerAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::shared_ptr> messagePersistent; + auto* message = getAddress(info.Env(), async, info[1], messagePersistent); + + return [obj, status, message, messagePersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->fetchPrior(&statusWrapper, message); + }; } -MethodStart PluginBase::addRefStart(bool async, const Napi::CallbackInfo& info) +Napi::Value ResultSet::fetchPriorFinish(const Napi::Env env, int ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + return Napi::Value::From(env, ret); +} + +MethodStart ResultSet::fetchFirstStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::shared_ptr> messagePersistent; + auto* message = getAddress(info.Env(), async, info[1], messagePersistent); - return [obj]() { - obj->interface->addRef(); - return nullptr; + return [obj, status, message, messagePersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->fetchFirst(&statusWrapper, message); }; } -Napi::Value PluginBase::addRefFinish(const Napi::Env env, void* ret) +Napi::Value ResultSet::fetchFirstFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart PluginBase::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart ResultSet::fetchLastStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::shared_ptr> messagePersistent; + auto* message = getAddress(info.Env(), async, info[1], messagePersistent); - return [obj]() { - return obj->interface->release(); + return [obj, status, message, messagePersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->fetchLast(&statusWrapper, message); }; } -Napi::Value PluginBase::releaseFinish(const Napi::Env env, int ret) +Napi::Value ResultSet::fetchLastFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart PluginBase::setOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart ResultSet::fetchAbsoluteStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + int position = (int) info[1].ToNumber(); + std::shared_ptr> messagePersistent; + auto* message = getAddress(info.Env(), async, info[2], messagePersistent); - return [obj, r]() { - obj->interface->setOwner((r ? r->interface : nullptr)); - return nullptr; + return [obj, status, position, message, messagePersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->fetchAbsolute(&statusWrapper, position, message); }; } -Napi::Value PluginBase::setOwnerFinish(const Napi::Env env, void* ret) +Napi::Value ResultSet::fetchAbsoluteFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart PluginBase::getOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart ResultSet::fetchRelativeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + int offset = (int) info[1].ToNumber(); + std::shared_ptr> messagePersistent; + auto* message = getAddress(info.Env(), async, info[2], messagePersistent); - return [obj]() { - return obj->interface->getOwner(); + return [obj, status, offset, message, messagePersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->fetchRelative(&statusWrapper, offset, message); }; } -Napi::Value PluginBase::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) -{ - return ReferenceCounted::NewInstance(env, ret); -} - -void PluginSet::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value ResultSet::fetchRelativeFinish(const Napi::Env env, int ret) { - properties.push_back(InstanceMethod("addRefSync", &PluginSet::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &PluginSet::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &PluginSet::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &PluginSet::releaseAsync)); - properties.push_back(InstanceMethod("getNameSync", &PluginSet::getNameSync)); - properties.push_back(InstanceMethod("getNameAsync", &PluginSet::getNameAsync)); - properties.push_back(InstanceMethod("getModuleNameSync", &PluginSet::getModuleNameSync)); - properties.push_back(InstanceMethod("getModuleNameAsync", &PluginSet::getModuleNameAsync)); - properties.push_back(InstanceMethod("getPluginSync", &PluginSet::getPluginSync)); - properties.push_back(InstanceMethod("getPluginAsync", &PluginSet::getPluginAsync)); - properties.push_back(InstanceMethod("nextSync", &PluginSet::nextSync)); - properties.push_back(InstanceMethod("nextAsync", &PluginSet::nextAsync)); - properties.push_back(InstanceMethod("setSync", &PluginSet::setSync)); - properties.push_back(InstanceMethod("setAsync", &PluginSet::setAsync)); + return Napi::Value::From(env, ret); } -MethodStart PluginSet::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart ResultSet::isEofStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - obj->interface->addRef(); - return nullptr; + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->isEof(&statusWrapper); }; } -Napi::Value PluginSet::addRefFinish(const Napi::Env env, void* ret) +Napi::Value ResultSet::isEofFinish(const Napi::Env env, FB_BOOLEAN ret) { - return env.Undefined(); + return Napi::Value::From(env, (bool) ret); } -MethodStart PluginSet::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart ResultSet::isBofStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->release(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->isBof(&statusWrapper); }; } -Napi::Value PluginSet::releaseFinish(const Napi::Env env, int ret) +Napi::Value ResultSet::isBofFinish(const Napi::Env env, FB_BOOLEAN ret) { - return Napi::Value::From(env, ret); + return Napi::Value::From(env, (bool) ret); } -MethodStart PluginSet::getNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart ResultSet::getMetadataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->getName(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getMetadata(&statusWrapper); }; } -Napi::Value PluginSet::getNameFinish(const Napi::Env env, OptString ret) +Napi::Value ResultSet::getMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return MessageMetadata::NewInstance(env, ret); } -MethodStart PluginSet::getModuleNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart ResultSet::deprecatedCloseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->getModuleName(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->deprecatedClose(&statusWrapper); + return nullptr; }; } -Napi::Value PluginSet::getModuleNameFinish(const Napi::Env env, OptString ret) +Napi::Value ResultSet::deprecatedCloseFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart PluginSet::getPluginStart(bool async, const Napi::CallbackInfo& info) +MethodStart ResultSet::setDelayedOutputFormatStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* format = MessageMetadata::CheckedUnwrap(info.Env(), info[1], "format argument", true); - return [obj, status]() { + return [obj, status, format]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getPlugin(&statusWrapper); + obj->interface->setDelayedOutputFormat(&statusWrapper, (format ? format->interface : nullptr)); + return nullptr; }; } -Napi::Value PluginSet::getPluginFinish(const Napi::Env env, fb::IPluginBase* ret) +Napi::Value ResultSet::setDelayedOutputFormatFinish(const Napi::Env env, void* ret) { - return PluginBase::NewInstance(env, ret); + return env.Undefined(); } -MethodStart PluginSet::nextStart(bool async, const Napi::CallbackInfo& info) +MethodStart ResultSet::closeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->next(&statusWrapper); + obj->interface->close(&statusWrapper); return nullptr; }; } -Napi::Value PluginSet::nextFinish(const Napi::Env env, void* ret) +Napi::Value ResultSet::closeFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart PluginSet::setStart(bool async, const Napi::CallbackInfo& info) +MethodStart ResultSet::getInfoStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string s = info[1].ToString().Utf8Value(); + unsigned itemsLength = (unsigned) info[1].ToNumber(); + std::shared_ptr> itemsPersistent; + auto* items = getAddress(info.Env(), async, info[2], itemsPersistent); + unsigned bufferLength = (unsigned) info[3].ToNumber(); + std::shared_ptr> bufferPersistent; + auto* buffer = getAddress(info.Env(), async, info[4], bufferPersistent); - return [obj, status, s]() { + return [obj, status, itemsLength, items, itemsPersistent, bufferLength, buffer, bufferPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->set(&statusWrapper, s.c_str()); + obj->interface->getInfo(&statusWrapper, itemsLength, items, bufferLength, buffer); return nullptr; }; } -Napi::Value PluginSet::setFinish(const Napi::Env env, void* ret) +Napi::Value ResultSet::getInfoFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -void ConfigEntry::InitPrototype(std::vector::PropertyDescriptor>& properties) +void Statement::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("addRefSync", &ConfigEntry::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &ConfigEntry::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &ConfigEntry::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &ConfigEntry::releaseAsync)); - properties.push_back(InstanceMethod("getNameSync", &ConfigEntry::getNameSync)); - properties.push_back(InstanceMethod("getNameAsync", &ConfigEntry::getNameAsync)); - properties.push_back(InstanceMethod("getValueSync", &ConfigEntry::getValueSync)); - properties.push_back(InstanceMethod("getValueAsync", &ConfigEntry::getValueAsync)); - properties.push_back(InstanceMethod("getIntValueSync", &ConfigEntry::getIntValueSync)); - properties.push_back(InstanceMethod("getIntValueAsync", &ConfigEntry::getIntValueAsync)); - properties.push_back(InstanceMethod("getBoolValueSync", &ConfigEntry::getBoolValueSync)); - properties.push_back(InstanceMethod("getBoolValueAsync", &ConfigEntry::getBoolValueAsync)); - properties.push_back(InstanceMethod("getSubConfigSync", &ConfigEntry::getSubConfigSync)); - properties.push_back(InstanceMethod("getSubConfigAsync", &ConfigEntry::getSubConfigAsync)); + properties.push_back(InstanceMethod("addRefSync", &Statement::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Statement::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Statement::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Statement::releaseAsync)); + properties.push_back(InstanceMethod("getInfoSync", &Statement::getInfoSync)); + properties.push_back(InstanceMethod("getInfoAsync", &Statement::getInfoAsync)); + properties.push_back(InstanceMethod("getTypeSync", &Statement::getTypeSync)); + properties.push_back(InstanceMethod("getTypeAsync", &Statement::getTypeAsync)); + properties.push_back(InstanceMethod("getPlanSync", &Statement::getPlanSync)); + properties.push_back(InstanceMethod("getPlanAsync", &Statement::getPlanAsync)); + properties.push_back(InstanceMethod("getAffectedRecordsSync", &Statement::getAffectedRecordsSync)); + properties.push_back(InstanceMethod("getAffectedRecordsAsync", &Statement::getAffectedRecordsAsync)); + properties.push_back(InstanceMethod("getInputMetadataSync", &Statement::getInputMetadataSync)); + properties.push_back(InstanceMethod("getInputMetadataAsync", &Statement::getInputMetadataAsync)); + properties.push_back(InstanceMethod("getOutputMetadataSync", &Statement::getOutputMetadataSync)); + properties.push_back(InstanceMethod("getOutputMetadataAsync", &Statement::getOutputMetadataAsync)); + properties.push_back(InstanceMethod("executeSync", &Statement::executeSync)); + properties.push_back(InstanceMethod("executeAsync", &Statement::executeAsync)); + properties.push_back(InstanceMethod("openCursorSync", &Statement::openCursorSync)); + properties.push_back(InstanceMethod("openCursorAsync", &Statement::openCursorAsync)); + properties.push_back(InstanceMethod("setCursorNameSync", &Statement::setCursorNameSync)); + properties.push_back(InstanceMethod("setCursorNameAsync", &Statement::setCursorNameAsync)); + properties.push_back(InstanceMethod("deprecatedFreeSync", &Statement::deprecatedFreeSync)); + properties.push_back(InstanceMethod("deprecatedFreeAsync", &Statement::deprecatedFreeAsync)); + properties.push_back(InstanceMethod("getFlagsSync", &Statement::getFlagsSync)); + properties.push_back(InstanceMethod("getFlagsAsync", &Statement::getFlagsAsync)); + properties.push_back(InstanceMethod("getTimeoutSync", &Statement::getTimeoutSync)); + properties.push_back(InstanceMethod("getTimeoutAsync", &Statement::getTimeoutAsync)); + properties.push_back(InstanceMethod("setTimeoutSync", &Statement::setTimeoutSync)); + properties.push_back(InstanceMethod("setTimeoutAsync", &Statement::setTimeoutAsync)); + properties.push_back(InstanceMethod("createBatchSync", &Statement::createBatchSync)); + properties.push_back(InstanceMethod("createBatchAsync", &Statement::createBatchAsync)); + properties.push_back(InstanceMethod("freeSync", &Statement::freeSync)); + properties.push_back(InstanceMethod("freeAsync", &Statement::freeAsync)); + properties.push_back(InstanceMethod("getMaxInlineBlobSizeSync", &Statement::getMaxInlineBlobSizeSync)); + properties.push_back(InstanceMethod("getMaxInlineBlobSizeAsync", &Statement::getMaxInlineBlobSizeAsync)); + properties.push_back(InstanceMethod("setMaxInlineBlobSizeSync", &Statement::setMaxInlineBlobSizeSync)); + properties.push_back(InstanceMethod("setMaxInlineBlobSizeAsync", &Statement::setMaxInlineBlobSizeAsync)); } -MethodStart ConfigEntry::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::addRefStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { obj->interface->addRef(); @@ -10624,317 +16192,367 @@ MethodStart ConfigEntry::addRefStart(bool async, const Napi::CallbackInfo }; } -Napi::Value ConfigEntry::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Statement::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart ConfigEntry::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { return obj->interface->release(); }; } -Napi::Value ConfigEntry::releaseFinish(const Napi::Env env, int ret) +Napi::Value Statement::releaseFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart ConfigEntry::getNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::getInfoStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned itemsLength = (unsigned) info[1].ToNumber(); + std::shared_ptr> itemsPersistent; + auto* items = getAddress(info.Env(), async, info[2], itemsPersistent); + unsigned bufferLength = (unsigned) info[3].ToNumber(); + std::shared_ptr> bufferPersistent; + auto* buffer = getAddress(info.Env(), async, info[4], bufferPersistent); - return [obj]() { - return obj->interface->getName(); + return [obj, status, itemsLength, items, itemsPersistent, bufferLength, buffer, bufferPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->getInfo(&statusWrapper, itemsLength, items, bufferLength, buffer); + return nullptr; + }; +} + +Napi::Value Statement::getInfoFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Statement::getTypeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getType(&statusWrapper); }; } -Napi::Value ConfigEntry::getNameFinish(const Napi::Env env, OptString ret) +Napi::Value Statement::getTypeFinish(const Napi::Env env, unsigned ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return Napi::Value::From(env, ret); } -MethodStart ConfigEntry::getValueStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::getPlanStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + bool detailed = info[1].ToBoolean(); - return [obj]() { - return obj->interface->getValue(); + return [obj, status, detailed]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getPlan(&statusWrapper, detailed); }; } -Napi::Value ConfigEntry::getValueFinish(const Napi::Env env, OptString ret) +Napi::Value Statement::getPlanFinish(const Napi::Env env, OptString ret) { return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart ConfigEntry::getIntValueStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::getAffectedRecordsStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->getIntValue(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getAffectedRecords(&statusWrapper); }; } -Napi::Value ConfigEntry::getIntValueFinish(const Napi::Env env, int64_t ret) +Napi::Value Statement::getAffectedRecordsFinish(const Napi::Env env, uint64_t ret) { return Napi::Value::From(env, (double) ret); } -MethodStart ConfigEntry::getBoolValueStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::getInputMetadataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->getBoolValue(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getInputMetadata(&statusWrapper); }; } -Napi::Value ConfigEntry::getBoolValueFinish(const Napi::Env env, FB_BOOLEAN ret) +Napi::Value Statement::getInputMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret) { - return Napi::Value::From(env, (bool) ret); + return MessageMetadata::NewInstance(env, ret); } -MethodStart ConfigEntry::getSubConfigStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::getOutputMetadataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getSubConfig(&statusWrapper); + return obj->interface->getOutputMetadata(&statusWrapper); }; } -Napi::Value ConfigEntry::getSubConfigFinish(const Napi::Env env, fb::IConfig* ret) -{ - return Config::NewInstance(env, ret); -} - -void Config::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value Statement::getOutputMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret) { - properties.push_back(InstanceMethod("addRefSync", &Config::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &Config::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &Config::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &Config::releaseAsync)); - properties.push_back(InstanceMethod("findSync", &Config::findSync)); - properties.push_back(InstanceMethod("findAsync", &Config::findAsync)); - properties.push_back(InstanceMethod("findValueSync", &Config::findValueSync)); - properties.push_back(InstanceMethod("findValueAsync", &Config::findValueAsync)); - properties.push_back(InstanceMethod("findPosSync", &Config::findPosSync)); - properties.push_back(InstanceMethod("findPosAsync", &Config::findPosAsync)); + return MessageMetadata::NewInstance(env, ret); } -MethodStart Config::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::executeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); + auto* inMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[2], "inMetadata argument", true); + std::shared_ptr> inBufferPersistent; + auto* inBuffer = getAddress(info.Env(), async, info[3], inBufferPersistent); + auto* outMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[4], "outMetadata argument", true); + std::shared_ptr> outBufferPersistent; + auto* outBuffer = getAddress(info.Env(), async, info[5], outBufferPersistent); - return [obj]() { - obj->interface->addRef(); - return nullptr; + return [obj, status, transaction, inMetadata, inBuffer, inBufferPersistent, outMetadata, outBuffer, outBufferPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->execute(&statusWrapper, (transaction ? transaction->interface : nullptr), (inMetadata ? inMetadata->interface : nullptr), inBuffer, (outMetadata ? outMetadata->interface : nullptr), outBuffer); }; } -Napi::Value Config::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Statement::executeFinish(const Napi::Env env, fb::ITransaction* ret) { - return env.Undefined(); + return Transaction::NewInstance(env, ret); } -MethodStart Config::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::openCursorStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); + auto* inMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[2], "inMetadata argument", true); + std::shared_ptr> inBufferPersistent; + auto* inBuffer = getAddress(info.Env(), async, info[3], inBufferPersistent); + auto* outMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[4], "outMetadata argument", true); + unsigned flags = (unsigned) info[5].ToNumber(); - return [obj]() { - return obj->interface->release(); + return [obj, status, transaction, inMetadata, inBuffer, inBufferPersistent, outMetadata, flags]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->openCursor(&statusWrapper, (transaction ? transaction->interface : nullptr), (inMetadata ? inMetadata->interface : nullptr), inBuffer, (outMetadata ? outMetadata->interface : nullptr), flags); }; } -Napi::Value Config::releaseFinish(const Napi::Env env, int ret) +Napi::Value Statement::openCursorFinish(const Napi::Env env, fb::IResultSet* ret) { - return Napi::Value::From(env, ret); + return ResultSet::NewInstance(env, ret); } -MethodStart Config::findStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::setCursorNameStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); std::string name = info[1].ToString().Utf8Value(); return [obj, status, name]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->find(&statusWrapper, name.c_str()); + obj->interface->setCursorName(&statusWrapper, name.c_str()); + return nullptr; }; } -Napi::Value Config::findFinish(const Napi::Env env, fb::IConfigEntry* ret) +Napi::Value Statement::setCursorNameFinish(const Napi::Env env, void* ret) { - return ConfigEntry::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Config::findValueStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::deprecatedFreeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string name = info[1].ToString().Utf8Value(); - std::string value = info[2].ToString().Utf8Value(); - return [obj, status, name, value]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->findValue(&statusWrapper, name.c_str(), value.c_str()); + obj->interface->deprecatedFree(&statusWrapper); + return nullptr; }; } -Napi::Value Config::findValueFinish(const Napi::Env env, fb::IConfigEntry* ret) +Napi::Value Statement::deprecatedFreeFinish(const Napi::Env env, void* ret) { - return ConfigEntry::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Config::findPosStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::getFlagsStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string name = info[1].ToString().Utf8Value(); - unsigned pos = (unsigned) info[2].ToNumber(); - return [obj, status, name, pos]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->findPos(&statusWrapper, name.c_str(), pos); + return obj->interface->getFlags(&statusWrapper); }; } -Napi::Value Config::findPosFinish(const Napi::Env env, fb::IConfigEntry* ret) -{ - return ConfigEntry::NewInstance(env, ret); -} - -void FirebirdConf::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value Statement::getFlagsFinish(const Napi::Env env, unsigned ret) { - properties.push_back(InstanceMethod("addRefSync", &FirebirdConf::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &FirebirdConf::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &FirebirdConf::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &FirebirdConf::releaseAsync)); - properties.push_back(InstanceMethod("getKeySync", &FirebirdConf::getKeySync)); - properties.push_back(InstanceMethod("getKeyAsync", &FirebirdConf::getKeyAsync)); - properties.push_back(InstanceMethod("asIntegerSync", &FirebirdConf::asIntegerSync)); - properties.push_back(InstanceMethod("asIntegerAsync", &FirebirdConf::asIntegerAsync)); - properties.push_back(InstanceMethod("asStringSync", &FirebirdConf::asStringSync)); - properties.push_back(InstanceMethod("asStringAsync", &FirebirdConf::asStringAsync)); - properties.push_back(InstanceMethod("asBooleanSync", &FirebirdConf::asBooleanSync)); - properties.push_back(InstanceMethod("asBooleanAsync", &FirebirdConf::asBooleanAsync)); + return Napi::Value::From(env, ret); } -MethodStart FirebirdConf::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::getTimeoutStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - obj->interface->addRef(); - return nullptr; + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getTimeout(&statusWrapper); }; } -Napi::Value FirebirdConf::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Statement::getTimeoutFinish(const Napi::Env env, unsigned ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart FirebirdConf::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::setTimeoutStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned timeOut = (unsigned) info[1].ToNumber(); - return [obj]() { - return obj->interface->release(); + return [obj, status, timeOut]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setTimeout(&statusWrapper, timeOut); + return nullptr; }; } -Napi::Value FirebirdConf::releaseFinish(const Napi::Env env, int ret) +Napi::Value Statement::setTimeoutFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart FirebirdConf::getKeyStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::createBatchStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - std::string name = info[0].ToString().Utf8Value(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* inMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[1], "inMetadata argument", true); + unsigned parLength = (unsigned) info[2].ToNumber(); + std::shared_ptr> parPersistent; + auto* par = getAddress(info.Env(), async, info[3], parPersistent); - return [obj, name]() { - return obj->interface->getKey(name.c_str()); + return [obj, status, inMetadata, parLength, par, parPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->createBatch(&statusWrapper, (inMetadata ? inMetadata->interface : nullptr), parLength, par); }; } -Napi::Value FirebirdConf::getKeyFinish(const Napi::Env env, unsigned ret) +Napi::Value Statement::createBatchFinish(const Napi::Env env, fb::IBatch* ret) { - return Napi::Value::From(env, ret); + return Batch::NewInstance(env, ret); } -MethodStart FirebirdConf::asIntegerStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::freeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - unsigned key = (unsigned) info[0].ToNumber(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj, key]() { - return obj->interface->asInteger(key); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->free(&statusWrapper); + return nullptr; }; } -Napi::Value FirebirdConf::asIntegerFinish(const Napi::Env env, int64_t ret) +Napi::Value Statement::freeFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, (double) ret); + return env.Undefined(); } -MethodStart FirebirdConf::asStringStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::getMaxInlineBlobSizeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - unsigned key = (unsigned) info[0].ToNumber(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj, key]() { - return obj->interface->asString(key); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getMaxInlineBlobSize(&statusWrapper); }; } -Napi::Value FirebirdConf::asStringFinish(const Napi::Env env, OptString ret) +Napi::Value Statement::getMaxInlineBlobSizeFinish(const Napi::Env env, unsigned ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return Napi::Value::From(env, ret); } -MethodStart FirebirdConf::asBooleanStart(bool async, const Napi::CallbackInfo& info) +MethodStart Statement::setMaxInlineBlobSizeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - unsigned key = (unsigned) info[0].ToNumber(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned size = (unsigned) info[1].ToNumber(); - return [obj, key]() { - return obj->interface->asBoolean(key); + return [obj, status, size]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setMaxInlineBlobSize(&statusWrapper, size); + return nullptr; }; } -Napi::Value FirebirdConf::asBooleanFinish(const Napi::Env env, FB_BOOLEAN ret) -{ - return Napi::Value::From(env, (bool) ret); -} - -void PluginConfig::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value Statement::setMaxInlineBlobSizeFinish(const Napi::Env env, void* ret) { - properties.push_back(InstanceMethod("addRefSync", &PluginConfig::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &PluginConfig::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &PluginConfig::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &PluginConfig::releaseAsync)); - properties.push_back(InstanceMethod("getConfigFileNameSync", &PluginConfig::getConfigFileNameSync)); - properties.push_back(InstanceMethod("getConfigFileNameAsync", &PluginConfig::getConfigFileNameAsync)); - properties.push_back(InstanceMethod("getDefaultConfigSync", &PluginConfig::getDefaultConfigSync)); - properties.push_back(InstanceMethod("getDefaultConfigAsync", &PluginConfig::getDefaultConfigAsync)); - properties.push_back(InstanceMethod("getFirebirdConfSync", &PluginConfig::getFirebirdConfSync)); - properties.push_back(InstanceMethod("getFirebirdConfAsync", &PluginConfig::getFirebirdConfAsync)); - properties.push_back(InstanceMethod("setReleaseDelaySync", &PluginConfig::setReleaseDelaySync)); - properties.push_back(InstanceMethod("setReleaseDelayAsync", &PluginConfig::setReleaseDelayAsync)); + return env.Undefined(); } -MethodStart PluginConfig::addRefStart(bool async, const Napi::CallbackInfo& info) -{ - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); +void Batch::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("addRefSync", &Batch::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Batch::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Batch::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Batch::releaseAsync)); + properties.push_back(InstanceMethod("addSync", &Batch::addSync)); + properties.push_back(InstanceMethod("addAsync", &Batch::addAsync)); + properties.push_back(InstanceMethod("addBlobSync", &Batch::addBlobSync)); + properties.push_back(InstanceMethod("addBlobAsync", &Batch::addBlobAsync)); + properties.push_back(InstanceMethod("appendBlobDataSync", &Batch::appendBlobDataSync)); + properties.push_back(InstanceMethod("appendBlobDataAsync", &Batch::appendBlobDataAsync)); + properties.push_back(InstanceMethod("addBlobStreamSync", &Batch::addBlobStreamSync)); + properties.push_back(InstanceMethod("addBlobStreamAsync", &Batch::addBlobStreamAsync)); + properties.push_back(InstanceMethod("registerBlobSync", &Batch::registerBlobSync)); + properties.push_back(InstanceMethod("registerBlobAsync", &Batch::registerBlobAsync)); + properties.push_back(InstanceMethod("executeSync", &Batch::executeSync)); + properties.push_back(InstanceMethod("executeAsync", &Batch::executeAsync)); + properties.push_back(InstanceMethod("cancelSync", &Batch::cancelSync)); + properties.push_back(InstanceMethod("cancelAsync", &Batch::cancelAsync)); + properties.push_back(InstanceMethod("getBlobAlignmentSync", &Batch::getBlobAlignmentSync)); + properties.push_back(InstanceMethod("getBlobAlignmentAsync", &Batch::getBlobAlignmentAsync)); + properties.push_back(InstanceMethod("getMetadataSync", &Batch::getMetadataSync)); + properties.push_back(InstanceMethod("getMetadataAsync", &Batch::getMetadataAsync)); + properties.push_back(InstanceMethod("setDefaultBpbSync", &Batch::setDefaultBpbSync)); + properties.push_back(InstanceMethod("setDefaultBpbAsync", &Batch::setDefaultBpbAsync)); + properties.push_back(InstanceMethod("deprecatedCloseSync", &Batch::deprecatedCloseSync)); + properties.push_back(InstanceMethod("deprecatedCloseAsync", &Batch::deprecatedCloseAsync)); + properties.push_back(InstanceMethod("closeSync", &Batch::closeSync)); + properties.push_back(InstanceMethod("closeAsync", &Batch::closeAsync)); + properties.push_back(InstanceMethod("getInfoSync", &Batch::getInfoSync)); + properties.push_back(InstanceMethod("getInfoAsync", &Batch::getInfoAsync)); +} + +MethodStart Batch::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { obj->interface->addRef(); @@ -10942,371 +16560,496 @@ MethodStart PluginConfig::addRefStart(bool async, const Napi::CallbackInf }; } -Napi::Value PluginConfig::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Batch::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart PluginConfig::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Batch::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { return obj->interface->release(); }; } -Napi::Value PluginConfig::releaseFinish(const Napi::Env env, int ret) +Napi::Value Batch::releaseFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart PluginConfig::getConfigFileNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart Batch::addStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned count = (unsigned) info[1].ToNumber(); + std::shared_ptr> inBufferPersistent; + auto* inBuffer = getAddress(info.Env(), async, info[2], inBufferPersistent); - return [obj]() { - return obj->interface->getConfigFileName(); + return [obj, status, count, inBuffer, inBufferPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->add(&statusWrapper, count, inBuffer); + return nullptr; }; } -Napi::Value PluginConfig::getConfigFileNameFinish(const Napi::Env env, OptString ret) +Napi::Value Batch::addFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart PluginConfig::getDefaultConfigStart(bool async, const Napi::CallbackInfo& info) +MethodStart Batch::addBlobStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - - return [obj, status]() { + unsigned length = (unsigned) info[1].ToNumber(); + std::shared_ptr> inBufferPersistent; + auto* inBuffer = getAddress(info.Env(), async, info[2], inBufferPersistent); + std::shared_ptr> blobIdPersistent; + auto* blobId = (ISC_QUAD*) getAddress(info.Env(), async, info[3], blobIdPersistent); + unsigned parLength = (unsigned) info[4].ToNumber(); + std::shared_ptr> parPersistent; + auto* par = getAddress(info.Env(), async, info[5], parPersistent); + + return [obj, status, length, inBuffer, inBufferPersistent, blobId, blobIdPersistent, parLength, par, parPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getDefaultConfig(&statusWrapper); + obj->interface->addBlob(&statusWrapper, length, inBuffer, blobId, parLength, par); + return nullptr; }; } -Napi::Value PluginConfig::getDefaultConfigFinish(const Napi::Env env, fb::IConfig* ret) +Napi::Value Batch::addBlobFinish(const Napi::Env env, void* ret) { - return Config::NewInstance(env, ret); + return env.Undefined(); } -MethodStart PluginConfig::getFirebirdConfStart(bool async, const Napi::CallbackInfo& info) +MethodStart Batch::appendBlobDataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned length = (unsigned) info[1].ToNumber(); + std::shared_ptr> inBufferPersistent; + auto* inBuffer = getAddress(info.Env(), async, info[2], inBufferPersistent); - return [obj, status]() { + return [obj, status, length, inBuffer, inBufferPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getFirebirdConf(&statusWrapper); + obj->interface->appendBlobData(&statusWrapper, length, inBuffer); + return nullptr; }; } -Napi::Value PluginConfig::getFirebirdConfFinish(const Napi::Env env, fb::IFirebirdConf* ret) +Napi::Value Batch::appendBlobDataFinish(const Napi::Env env, void* ret) { - return FirebirdConf::NewInstance(env, ret); + return env.Undefined(); } -MethodStart PluginConfig::setReleaseDelayStart(bool async, const Napi::CallbackInfo& info) +MethodStart Batch::addBlobStreamStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - uint64_t microSeconds = (uint64_t) info[1].ToNumber().Int64Value(); + unsigned length = (unsigned) info[1].ToNumber(); + std::shared_ptr> inBufferPersistent; + auto* inBuffer = getAddress(info.Env(), async, info[2], inBufferPersistent); - return [obj, status, microSeconds]() { + return [obj, status, length, inBuffer, inBufferPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setReleaseDelay(&statusWrapper, microSeconds); + obj->interface->addBlobStream(&statusWrapper, length, inBuffer); return nullptr; }; } -Napi::Value PluginConfig::setReleaseDelayFinish(const Napi::Env env, void* ret) +Napi::Value Batch::addBlobStreamFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -void PluginFactory::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart Batch::registerBlobStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("createPluginSync", &PluginFactory::createPluginSync)); - properties.push_back(InstanceMethod("createPluginAsync", &PluginFactory::createPluginAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::shared_ptr> existingBlobPersistent; + auto* existingBlob = (const ISC_QUAD*) getAddress(info.Env(), async, info[1], existingBlobPersistent); + std::shared_ptr> blobIdPersistent; + auto* blobId = (ISC_QUAD*) getAddress(info.Env(), async, info[2], blobIdPersistent); + + return [obj, status, existingBlob, existingBlobPersistent, blobId, blobIdPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->registerBlob(&statusWrapper, existingBlob, blobId); + return nullptr; + }; } -MethodStart PluginFactory::createPluginStart(bool async, const Napi::CallbackInfo& info) +Napi::Value Batch::registerBlobFinish(const Napi::Env env, void* ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + return env.Undefined(); +} + +MethodStart Batch::executeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* factoryParameter = PluginConfig::CheckedUnwrap(info.Env(), info[1], "factoryParameter argument", true); + auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); - return [obj, status, factoryParameter]() { + return [obj, status, transaction]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->createPlugin(&statusWrapper, (factoryParameter ? factoryParameter->interface : nullptr)); + return obj->interface->execute(&statusWrapper, (transaction ? transaction->interface : nullptr)); }; } -Napi::Value PluginFactory::createPluginFinish(const Napi::Env env, fb::IPluginBase* ret) +Napi::Value Batch::executeFinish(const Napi::Env env, fb::IBatchCompletionState* ret) { - return PluginBase::NewInstance(env, ret); + return BatchCompletionState::NewInstance(env, ret); } -void PluginModule::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart Batch::cancelStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("doCleanSync", &PluginModule::doCleanSync)); - properties.push_back(InstanceMethod("doCleanAsync", &PluginModule::doCleanAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->cancel(&statusWrapper); + return nullptr; + }; } -MethodStart PluginModule::doCleanStart(bool async, const Napi::CallbackInfo& info) +Napi::Value Batch::cancelFinish(const Napi::Env env, void* ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + return env.Undefined(); +} - return [obj]() { - obj->interface->doClean(); - return nullptr; +MethodStart Batch::getBlobAlignmentStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getBlobAlignment(&statusWrapper); }; } -Napi::Value PluginModule::doCleanFinish(const Napi::Env env, void* ret) +Napi::Value Batch::getBlobAlignmentFinish(const Napi::Env env, unsigned ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -void PluginManager::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart Batch::getMetadataStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("registerPluginFactorySync", &PluginManager::registerPluginFactorySync)); - properties.push_back(InstanceMethod("registerPluginFactoryAsync", &PluginManager::registerPluginFactoryAsync)); - properties.push_back(InstanceMethod("registerModuleSync", &PluginManager::registerModuleSync)); - properties.push_back(InstanceMethod("registerModuleAsync", &PluginManager::registerModuleAsync)); - properties.push_back(InstanceMethod("unregisterModuleSync", &PluginManager::unregisterModuleSync)); - properties.push_back(InstanceMethod("unregisterModuleAsync", &PluginManager::unregisterModuleAsync)); - properties.push_back(InstanceMethod("getPluginsSync", &PluginManager::getPluginsSync)); - properties.push_back(InstanceMethod("getPluginsAsync", &PluginManager::getPluginsAsync)); - properties.push_back(InstanceMethod("getConfigSync", &PluginManager::getConfigSync)); - properties.push_back(InstanceMethod("getConfigAsync", &PluginManager::getConfigAsync)); - properties.push_back(InstanceMethod("releasePluginSync", &PluginManager::releasePluginSync)); - properties.push_back(InstanceMethod("releasePluginAsync", &PluginManager::releasePluginAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getMetadata(&statusWrapper); + }; } -MethodStart PluginManager::registerPluginFactoryStart(bool async, const Napi::CallbackInfo& info) +Napi::Value Batch::getMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - unsigned pluginType = (unsigned) info[0].ToNumber(); - std::string defaultName = info[1].ToString().Utf8Value(); - auto* factory = PluginFactory::CheckedUnwrap(info.Env(), info[2], "factory argument", true); + return MessageMetadata::NewInstance(env, ret); +} - return [obj, pluginType, defaultName, factory]() { - obj->interface->registerPluginFactory(pluginType, defaultName.c_str(), (factory ? factory->interface : nullptr)); +MethodStart Batch::setDefaultBpbStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned parLength = (unsigned) info[1].ToNumber(); + std::shared_ptr> parPersistent; + auto* par = getAddress(info.Env(), async, info[2], parPersistent); + + return [obj, status, parLength, par, parPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setDefaultBpb(&statusWrapper, parLength, par); return nullptr; }; } -Napi::Value PluginManager::registerPluginFactoryFinish(const Napi::Env env, void* ret) +Napi::Value Batch::setDefaultBpbFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart PluginManager::registerModuleStart(bool async, const Napi::CallbackInfo& info) +MethodStart Batch::deprecatedCloseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* cleanup = PluginModule::CheckedUnwrap(info.Env(), info[0], "cleanup argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj, cleanup]() { - obj->interface->registerModule((cleanup ? cleanup->interface : nullptr)); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->deprecatedClose(&statusWrapper); return nullptr; }; } -Napi::Value PluginManager::registerModuleFinish(const Napi::Env env, void* ret) +Napi::Value Batch::deprecatedCloseFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart PluginManager::unregisterModuleStart(bool async, const Napi::CallbackInfo& info) +MethodStart Batch::closeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* cleanup = PluginModule::CheckedUnwrap(info.Env(), info[0], "cleanup argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj, cleanup]() { - obj->interface->unregisterModule((cleanup ? cleanup->interface : nullptr)); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->close(&statusWrapper); return nullptr; }; } -Napi::Value PluginManager::unregisterModuleFinish(const Napi::Env env, void* ret) +Napi::Value Batch::closeFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart PluginManager::getPluginsStart(bool async, const Napi::CallbackInfo& info) +MethodStart Batch::getInfoStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned pluginType = (unsigned) info[1].ToNumber(); - std::string namesList = info[2].ToString().Utf8Value(); - auto* firebirdConf = FirebirdConf::CheckedUnwrap(info.Env(), info[3], "firebirdConf argument", true); + unsigned itemsLength = (unsigned) info[1].ToNumber(); + std::shared_ptr> itemsPersistent; + auto* items = getAddress(info.Env(), async, info[2], itemsPersistent); + unsigned bufferLength = (unsigned) info[3].ToNumber(); + std::shared_ptr> bufferPersistent; + auto* buffer = getAddress(info.Env(), async, info[4], bufferPersistent); - return [obj, status, pluginType, namesList, firebirdConf]() { + return [obj, status, itemsLength, items, itemsPersistent, bufferLength, buffer, bufferPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getPlugins(&statusWrapper, pluginType, namesList.c_str(), (firebirdConf ? firebirdConf->interface : nullptr)); + obj->interface->getInfo(&statusWrapper, itemsLength, items, bufferLength, buffer); + return nullptr; }; } -Napi::Value PluginManager::getPluginsFinish(const Napi::Env env, fb::IPluginSet* ret) +Napi::Value Batch::getInfoFinish(const Napi::Env env, void* ret) { - return PluginSet::NewInstance(env, ret); + return env.Undefined(); } -MethodStart PluginManager::getConfigStart(bool async, const Napi::CallbackInfo& info) +void BatchCompletionState::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("disposeSync", &BatchCompletionState::disposeSync)); + properties.push_back(InstanceMethod("disposeAsync", &BatchCompletionState::disposeAsync)); + properties.push_back(InstanceMethod("getSizeSync", &BatchCompletionState::getSizeSync)); + properties.push_back(InstanceMethod("getSizeAsync", &BatchCompletionState::getSizeAsync)); + properties.push_back(InstanceMethod("getStateSync", &BatchCompletionState::getStateSync)); + properties.push_back(InstanceMethod("getStateAsync", &BatchCompletionState::getStateAsync)); + properties.push_back(InstanceMethod("findErrorSync", &BatchCompletionState::findErrorSync)); + properties.push_back(InstanceMethod("findErrorAsync", &BatchCompletionState::findErrorAsync)); + properties.push_back(InstanceMethod("getStatusSync", &BatchCompletionState::getStatusSync)); + properties.push_back(InstanceMethod("getStatusAsync", &BatchCompletionState::getStatusAsync)); +} + +MethodStart BatchCompletionState::disposeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->dispose(); + return nullptr; + }; +} + +Napi::Value BatchCompletionState::disposeFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart BatchCompletionState::getSizeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string filename = info[1].ToString().Utf8Value(); - return [obj, status, filename]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getConfig(&statusWrapper, filename.c_str()); + return obj->interface->getSize(&statusWrapper); }; } -Napi::Value PluginManager::getConfigFinish(const Napi::Env env, fb::IConfig* ret) +Napi::Value BatchCompletionState::getSizeFinish(const Napi::Env env, unsigned ret) { - return Config::NewInstance(env, ret); + return Napi::Value::From(env, ret); } -MethodStart PluginManager::releasePluginStart(bool async, const Napi::CallbackInfo& info) +MethodStart BatchCompletionState::getStateStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* plugin = PluginBase::CheckedUnwrap(info.Env(), info[0], "plugin argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned pos = (unsigned) info[1].ToNumber(); - return [obj, plugin]() { - obj->interface->releasePlugin((plugin ? plugin->interface : nullptr)); - return nullptr; + return [obj, status, pos]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getState(&statusWrapper, pos); }; } -Napi::Value PluginManager::releasePluginFinish(const Napi::Env env, void* ret) +Napi::Value BatchCompletionState::getStateFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -void CryptKey::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart BatchCompletionState::findErrorStart(bool async, const Napi::CallbackInfo& info) { + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned pos = (unsigned) info[1].ToNumber(); + + return [obj, status, pos]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->findError(&statusWrapper, pos); + }; } -void ConfigManager::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value BatchCompletionState::findErrorFinish(const Napi::Env env, unsigned ret) { - properties.push_back(InstanceMethod("getDirectorySync", &ConfigManager::getDirectorySync)); - properties.push_back(InstanceMethod("getDirectoryAsync", &ConfigManager::getDirectoryAsync)); - properties.push_back(InstanceMethod("getFirebirdConfSync", &ConfigManager::getFirebirdConfSync)); - properties.push_back(InstanceMethod("getFirebirdConfAsync", &ConfigManager::getFirebirdConfAsync)); - properties.push_back(InstanceMethod("getDatabaseConfSync", &ConfigManager::getDatabaseConfSync)); - properties.push_back(InstanceMethod("getDatabaseConfAsync", &ConfigManager::getDatabaseConfAsync)); - properties.push_back(InstanceMethod("getPluginConfigSync", &ConfigManager::getPluginConfigSync)); - properties.push_back(InstanceMethod("getPluginConfigAsync", &ConfigManager::getPluginConfigAsync)); - properties.push_back(InstanceMethod("getInstallDirectorySync", &ConfigManager::getInstallDirectorySync)); - properties.push_back(InstanceMethod("getInstallDirectoryAsync", &ConfigManager::getInstallDirectoryAsync)); - properties.push_back(InstanceMethod("getRootDirectorySync", &ConfigManager::getRootDirectorySync)); - properties.push_back(InstanceMethod("getRootDirectoryAsync", &ConfigManager::getRootDirectoryAsync)); + return Napi::Value::From(env, ret); } -MethodStart ConfigManager::getDirectoryStart(bool async, const Napi::CallbackInfo& info) +MethodStart BatchCompletionState::getStatusStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - unsigned code = (unsigned) info[0].ToNumber(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* to = Status::CheckedUnwrap(info.Env(), info[1], "to argument", true); + unsigned pos = (unsigned) info[2].ToNumber(); - return [obj, code]() { - return obj->interface->getDirectory(code); + return [obj, status, to, pos]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->getStatus(&statusWrapper, (to ? to->interface : nullptr), pos); + return nullptr; }; } -Napi::Value ConfigManager::getDirectoryFinish(const Napi::Env env, OptString ret) +Napi::Value BatchCompletionState::getStatusFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart ConfigManager::getFirebirdConfStart(bool async, const Napi::CallbackInfo& info) +void Replicator::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("addRefSync", &Replicator::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Replicator::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Replicator::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Replicator::releaseAsync)); + properties.push_back(InstanceMethod("processSync", &Replicator::processSync)); + properties.push_back(InstanceMethod("processAsync", &Replicator::processAsync)); + properties.push_back(InstanceMethod("deprecatedCloseSync", &Replicator::deprecatedCloseSync)); + properties.push_back(InstanceMethod("deprecatedCloseAsync", &Replicator::deprecatedCloseAsync)); + properties.push_back(InstanceMethod("closeSync", &Replicator::closeSync)); + properties.push_back(InstanceMethod("closeAsync", &Replicator::closeAsync)); +} + +MethodStart Replicator::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getFirebirdConf(); + obj->interface->addRef(); + return nullptr; }; } -Napi::Value ConfigManager::getFirebirdConfFinish(const Napi::Env env, fb::IFirebirdConf* ret) +Napi::Value Replicator::addRefFinish(const Napi::Env env, void* ret) { - return FirebirdConf::NewInstance(env, ret); + return env.Undefined(); } -MethodStart ConfigManager::getDatabaseConfStart(bool async, const Napi::CallbackInfo& info) +MethodStart Replicator::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - std::string dbName = info[0].ToString().Utf8Value(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, dbName]() { - return obj->interface->getDatabaseConf(dbName.c_str()); + return [obj]() { + return obj->interface->release(); }; } -Napi::Value ConfigManager::getDatabaseConfFinish(const Napi::Env env, fb::IFirebirdConf* ret) +Napi::Value Replicator::releaseFinish(const Napi::Env env, int ret) { - return FirebirdConf::NewInstance(env, ret); + return Napi::Value::From(env, ret); } -MethodStart ConfigManager::getPluginConfigStart(bool async, const Napi::CallbackInfo& info) +MethodStart Replicator::processStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - std::string configuredPlugin = info[0].ToString().Utf8Value(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned length = (unsigned) info[1].ToNumber(); + std::shared_ptr> dataPersistent; + auto* data = getAddress(info.Env(), async, info[2], dataPersistent); - return [obj, configuredPlugin]() { - return obj->interface->getPluginConfig(configuredPlugin.c_str()); + return [obj, status, length, data, dataPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->process(&statusWrapper, length, data); + return nullptr; }; } -Napi::Value ConfigManager::getPluginConfigFinish(const Napi::Env env, fb::IConfig* ret) +Napi::Value Replicator::processFinish(const Napi::Env env, void* ret) { - return Config::NewInstance(env, ret); + return env.Undefined(); } -MethodStart ConfigManager::getInstallDirectoryStart(bool async, const Napi::CallbackInfo& info) +MethodStart Replicator::deprecatedCloseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->getInstallDirectory(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->deprecatedClose(&statusWrapper); + return nullptr; }; } -Napi::Value ConfigManager::getInstallDirectoryFinish(const Napi::Env env, OptString ret) +Napi::Value Replicator::deprecatedCloseFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart ConfigManager::getRootDirectoryStart(bool async, const Napi::CallbackInfo& info) +MethodStart Replicator::closeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->getRootDirectory(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->close(&statusWrapper); + return nullptr; }; } -Napi::Value ConfigManager::getRootDirectoryFinish(const Napi::Env env, OptString ret) +Napi::Value Replicator::closeFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -void EventCallback::InitPrototype(std::vector::PropertyDescriptor>& properties) +void Request::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("addRefSync", &EventCallback::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &EventCallback::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &EventCallback::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &EventCallback::releaseAsync)); - properties.push_back(InstanceMethod("eventCallbackFunctionSync", &EventCallback::eventCallbackFunctionSync)); - properties.push_back(InstanceMethod("eventCallbackFunctionAsync", &EventCallback::eventCallbackFunctionAsync)); + properties.push_back(InstanceMethod("addRefSync", &Request::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Request::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Request::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Request::releaseAsync)); + properties.push_back(InstanceMethod("receiveSync", &Request::receiveSync)); + properties.push_back(InstanceMethod("receiveAsync", &Request::receiveAsync)); + properties.push_back(InstanceMethod("sendSync", &Request::sendSync)); + properties.push_back(InstanceMethod("sendAsync", &Request::sendAsync)); + properties.push_back(InstanceMethod("getInfoSync", &Request::getInfoSync)); + properties.push_back(InstanceMethod("getInfoAsync", &Request::getInfoAsync)); + properties.push_back(InstanceMethod("startSync", &Request::startSync)); + properties.push_back(InstanceMethod("startAsync", &Request::startAsync)); + properties.push_back(InstanceMethod("startAndSendSync", &Request::startAndSendSync)); + properties.push_back(InstanceMethod("startAndSendAsync", &Request::startAndSendAsync)); + properties.push_back(InstanceMethod("unwindSync", &Request::unwindSync)); + properties.push_back(InstanceMethod("unwindAsync", &Request::unwindAsync)); + properties.push_back(InstanceMethod("deprecatedFreeSync", &Request::deprecatedFreeSync)); + properties.push_back(InstanceMethod("deprecatedFreeAsync", &Request::deprecatedFreeAsync)); + properties.push_back(InstanceMethod("freeSync", &Request::freeSync)); + properties.push_back(InstanceMethod("freeAsync", &Request::freeAsync)); } -MethodStart EventCallback::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart Request::addRefStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { obj->interface->addRef(); @@ -11314,239 +17057,329 @@ MethodStart EventCallback::addRefStart(bool async, const Napi::CallbackIn }; } -Napi::Value EventCallback::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Request::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart EventCallback::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Request::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { return obj->interface->release(); }; } -Napi::Value EventCallback::releaseFinish(const Napi::Env env, int ret) +Napi::Value Request::releaseFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart EventCallback::eventCallbackFunctionStart(bool async, const Napi::CallbackInfo& info) +MethodStart Request::receiveStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - unsigned length = (unsigned) info[0].ToNumber(); - std::shared_ptr> eventsPersistent; - auto* events = getAddress(info.Env(), async, info[1], eventsPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + int level = (int) info[1].ToNumber(); + unsigned msgType = (unsigned) info[2].ToNumber(); + unsigned length = (unsigned) info[3].ToNumber(); + std::shared_ptr> messagePersistent; + auto* message = getAddress(info.Env(), async, info[4], messagePersistent); - return [obj, length, events, eventsPersistent]() { - obj->interface->eventCallbackFunction(length, events); + return [obj, status, level, msgType, length, message, messagePersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->receive(&statusWrapper, level, msgType, length, message); return nullptr; }; } -Napi::Value EventCallback::eventCallbackFunctionFinish(const Napi::Env env, void* ret) +Napi::Value Request::receiveFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -void Blob::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart Request::sendStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("addRefSync", &Blob::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &Blob::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &Blob::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &Blob::releaseAsync)); - properties.push_back(InstanceMethod("getInfoSync", &Blob::getInfoSync)); - properties.push_back(InstanceMethod("getInfoAsync", &Blob::getInfoAsync)); - properties.push_back(InstanceMethod("getSegmentSync", &Blob::getSegmentSync)); - properties.push_back(InstanceMethod("getSegmentAsync", &Blob::getSegmentAsync)); - properties.push_back(InstanceMethod("putSegmentSync", &Blob::putSegmentSync)); - properties.push_back(InstanceMethod("putSegmentAsync", &Blob::putSegmentAsync)); - properties.push_back(InstanceMethod("cancelSync", &Blob::cancelSync)); - properties.push_back(InstanceMethod("cancelAsync", &Blob::cancelAsync)); - properties.push_back(InstanceMethod("closeSync", &Blob::closeSync)); - properties.push_back(InstanceMethod("closeAsync", &Blob::closeAsync)); - properties.push_back(InstanceMethod("seekSync", &Blob::seekSync)); - properties.push_back(InstanceMethod("seekAsync", &Blob::seekAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + int level = (int) info[1].ToNumber(); + unsigned msgType = (unsigned) info[2].ToNumber(); + unsigned length = (unsigned) info[3].ToNumber(); + std::shared_ptr> messagePersistent; + auto* message = getAddress(info.Env(), async, info[4], messagePersistent); + + return [obj, status, level, msgType, length, message, messagePersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->send(&statusWrapper, level, msgType, length, message); + return nullptr; + }; } -MethodStart Blob::addRefStart(bool async, const Napi::CallbackInfo& info) +Napi::Value Request::sendFinish(const Napi::Env env, void* ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + return env.Undefined(); +} - return [obj]() { - obj->interface->addRef(); +MethodStart Request::getInfoStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + int level = (int) info[1].ToNumber(); + unsigned itemsLength = (unsigned) info[2].ToNumber(); + std::shared_ptr> itemsPersistent; + auto* items = getAddress(info.Env(), async, info[3], itemsPersistent); + unsigned bufferLength = (unsigned) info[4].ToNumber(); + std::shared_ptr> bufferPersistent; + auto* buffer = getAddress(info.Env(), async, info[5], bufferPersistent); + + return [obj, status, level, itemsLength, items, itemsPersistent, bufferLength, buffer, bufferPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->getInfo(&statusWrapper, level, itemsLength, items, bufferLength, buffer); return nullptr; }; } -Napi::Value Blob::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Request::getInfoFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Blob::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Request::startStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* tra = Transaction::CheckedUnwrap(info.Env(), info[1], "tra argument", true); + int level = (int) info[2].ToNumber(); - return [obj]() { - return obj->interface->release(); + return [obj, status, tra, level]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->start(&statusWrapper, (tra ? tra->interface : nullptr), level); + return nullptr; }; } -Napi::Value Blob::releaseFinish(const Napi::Env env, int ret) +Napi::Value Request::startFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart Blob::getInfoStart(bool async, const Napi::CallbackInfo& info) +MethodStart Request::startAndSendStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned itemsLength = (unsigned) info[1].ToNumber(); - std::shared_ptr> itemsPersistent; - auto* items = getAddress(info.Env(), async, info[2], itemsPersistent); - unsigned bufferLength = (unsigned) info[3].ToNumber(); - std::shared_ptr> bufferPersistent; - auto* buffer = getAddress(info.Env(), async, info[4], bufferPersistent); + auto* tra = Transaction::CheckedUnwrap(info.Env(), info[1], "tra argument", true); + int level = (int) info[2].ToNumber(); + unsigned msgType = (unsigned) info[3].ToNumber(); + unsigned length = (unsigned) info[4].ToNumber(); + std::shared_ptr> messagePersistent; + auto* message = getAddress(info.Env(), async, info[5], messagePersistent); - return [obj, status, itemsLength, items, itemsPersistent, bufferLength, buffer, bufferPersistent]() { + return [obj, status, tra, level, msgType, length, message, messagePersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->getInfo(&statusWrapper, itemsLength, items, bufferLength, buffer); + obj->interface->startAndSend(&statusWrapper, (tra ? tra->interface : nullptr), level, msgType, length, message); return nullptr; }; } -Napi::Value Blob::getInfoFinish(const Napi::Env env, void* ret) +Napi::Value Request::startAndSendFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Blob::getSegmentStart(bool async, const Napi::CallbackInfo& info) +MethodStart Request::unwindStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned bufferLength = (unsigned) info[1].ToNumber(); - std::shared_ptr> bufferPersistent; - auto* buffer = getAddress(info.Env(), async, info[2], bufferPersistent); - std::shared_ptr> segmentLengthPersistent; - auto* segmentLength = getAddress(info.Env(), async, info[3], segmentLengthPersistent); + int level = (int) info[1].ToNumber(); - return [obj, status, bufferLength, buffer, bufferPersistent, segmentLength, segmentLengthPersistent]() { + return [obj, status, level]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getSegment(&statusWrapper, bufferLength, buffer, segmentLength); + obj->interface->unwind(&statusWrapper, level); + return nullptr; }; } -Napi::Value Blob::getSegmentFinish(const Napi::Env env, int ret) +Napi::Value Request::unwindFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart Blob::putSegmentStart(bool async, const Napi::CallbackInfo& info) +MethodStart Request::deprecatedFreeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned length = (unsigned) info[1].ToNumber(); - std::shared_ptr> bufferPersistent; - auto* buffer = getAddress(info.Env(), async, info[2], bufferPersistent); - return [obj, status, length, buffer, bufferPersistent]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->putSegment(&statusWrapper, length, buffer); + obj->interface->deprecatedFree(&statusWrapper); return nullptr; }; } -Napi::Value Blob::putSegmentFinish(const Napi::Env env, void* ret) +Napi::Value Request::deprecatedFreeFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Blob::cancelStart(bool async, const Napi::CallbackInfo& info) +MethodStart Request::freeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->cancel(&statusWrapper); - return nullptr; + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->free(&statusWrapper); + return nullptr; + }; +} + +Napi::Value Request::freeFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +void Events::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("addRefSync", &Events::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Events::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Events::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Events::releaseAsync)); + properties.push_back(InstanceMethod("deprecatedCancelSync", &Events::deprecatedCancelSync)); + properties.push_back(InstanceMethod("deprecatedCancelAsync", &Events::deprecatedCancelAsync)); + properties.push_back(InstanceMethod("cancelSync", &Events::cancelSync)); + properties.push_back(InstanceMethod("cancelAsync", &Events::cancelAsync)); +} + +MethodStart Events::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); + return nullptr; + }; +} + +Napi::Value Events::addRefFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart Events::releaseStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->release(); }; } -Napi::Value Blob::cancelFinish(const Napi::Env env, void* ret) +Napi::Value Events::releaseFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart Blob::closeStart(bool async, const Napi::CallbackInfo& info) +MethodStart Events::deprecatedCancelStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->close(&statusWrapper); + obj->interface->deprecatedCancel(&statusWrapper); return nullptr; }; } -Napi::Value Blob::closeFinish(const Napi::Env env, void* ret) +Napi::Value Events::deprecatedCancelFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Blob::seekStart(bool async, const Napi::CallbackInfo& info) +MethodStart Events::cancelStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - int mode = (int) info[1].ToNumber(); - int offset = (int) info[2].ToNumber(); - return [obj, status, mode, offset]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->seek(&statusWrapper, mode, offset); + obj->interface->cancel(&statusWrapper); + return nullptr; }; } -Napi::Value Blob::seekFinish(const Napi::Env env, int ret) +Napi::Value Events::cancelFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -void Transaction::InitPrototype(std::vector::PropertyDescriptor>& properties) +void Attachment::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("addRefSync", &Transaction::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &Transaction::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &Transaction::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &Transaction::releaseAsync)); - properties.push_back(InstanceMethod("getInfoSync", &Transaction::getInfoSync)); - properties.push_back(InstanceMethod("getInfoAsync", &Transaction::getInfoAsync)); - properties.push_back(InstanceMethod("prepareSync", &Transaction::prepareSync)); - properties.push_back(InstanceMethod("prepareAsync", &Transaction::prepareAsync)); - properties.push_back(InstanceMethod("commitSync", &Transaction::commitSync)); - properties.push_back(InstanceMethod("commitAsync", &Transaction::commitAsync)); - properties.push_back(InstanceMethod("commitRetainingSync", &Transaction::commitRetainingSync)); - properties.push_back(InstanceMethod("commitRetainingAsync", &Transaction::commitRetainingAsync)); - properties.push_back(InstanceMethod("rollbackSync", &Transaction::rollbackSync)); - properties.push_back(InstanceMethod("rollbackAsync", &Transaction::rollbackAsync)); - properties.push_back(InstanceMethod("rollbackRetainingSync", &Transaction::rollbackRetainingSync)); - properties.push_back(InstanceMethod("rollbackRetainingAsync", &Transaction::rollbackRetainingAsync)); - properties.push_back(InstanceMethod("disconnectSync", &Transaction::disconnectSync)); - properties.push_back(InstanceMethod("disconnectAsync", &Transaction::disconnectAsync)); - properties.push_back(InstanceMethod("joinSync", &Transaction::joinSync)); - properties.push_back(InstanceMethod("joinAsync", &Transaction::joinAsync)); - properties.push_back(InstanceMethod("validateSync", &Transaction::validateSync)); - properties.push_back(InstanceMethod("validateAsync", &Transaction::validateAsync)); - properties.push_back(InstanceMethod("enterDtcSync", &Transaction::enterDtcSync)); - properties.push_back(InstanceMethod("enterDtcAsync", &Transaction::enterDtcAsync)); + properties.push_back(InstanceMethod("addRefSync", &Attachment::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Attachment::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Attachment::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Attachment::releaseAsync)); + properties.push_back(InstanceMethod("getInfoSync", &Attachment::getInfoSync)); + properties.push_back(InstanceMethod("getInfoAsync", &Attachment::getInfoAsync)); + properties.push_back(InstanceMethod("startTransactionSync", &Attachment::startTransactionSync)); + properties.push_back(InstanceMethod("startTransactionAsync", &Attachment::startTransactionAsync)); + properties.push_back(InstanceMethod("reconnectTransactionSync", &Attachment::reconnectTransactionSync)); + properties.push_back(InstanceMethod("reconnectTransactionAsync", &Attachment::reconnectTransactionAsync)); + properties.push_back(InstanceMethod("compileRequestSync", &Attachment::compileRequestSync)); + properties.push_back(InstanceMethod("compileRequestAsync", &Attachment::compileRequestAsync)); + properties.push_back(InstanceMethod("transactRequestSync", &Attachment::transactRequestSync)); + properties.push_back(InstanceMethod("transactRequestAsync", &Attachment::transactRequestAsync)); + properties.push_back(InstanceMethod("createBlobSync", &Attachment::createBlobSync)); + properties.push_back(InstanceMethod("createBlobAsync", &Attachment::createBlobAsync)); + properties.push_back(InstanceMethod("openBlobSync", &Attachment::openBlobSync)); + properties.push_back(InstanceMethod("openBlobAsync", &Attachment::openBlobAsync)); + properties.push_back(InstanceMethod("executeDynSync", &Attachment::executeDynSync)); + properties.push_back(InstanceMethod("executeDynAsync", &Attachment::executeDynAsync)); + properties.push_back(InstanceMethod("prepareSync", &Attachment::prepareSync)); + properties.push_back(InstanceMethod("prepareAsync", &Attachment::prepareAsync)); + properties.push_back(InstanceMethod("executeSync", &Attachment::executeSync)); + properties.push_back(InstanceMethod("executeAsync", &Attachment::executeAsync)); + properties.push_back(InstanceMethod("openCursorSync", &Attachment::openCursorSync)); + properties.push_back(InstanceMethod("openCursorAsync", &Attachment::openCursorAsync)); + properties.push_back(InstanceMethod("queEventsSync", &Attachment::queEventsSync)); + properties.push_back(InstanceMethod("queEventsAsync", &Attachment::queEventsAsync)); + properties.push_back(InstanceMethod("cancelOperationSync", &Attachment::cancelOperationSync)); + properties.push_back(InstanceMethod("cancelOperationAsync", &Attachment::cancelOperationAsync)); + properties.push_back(InstanceMethod("pingSync", &Attachment::pingSync)); + properties.push_back(InstanceMethod("pingAsync", &Attachment::pingAsync)); + properties.push_back(InstanceMethod("deprecatedDetachSync", &Attachment::deprecatedDetachSync)); + properties.push_back(InstanceMethod("deprecatedDetachAsync", &Attachment::deprecatedDetachAsync)); + properties.push_back(InstanceMethod("deprecatedDropDatabaseSync", &Attachment::deprecatedDropDatabaseSync)); + properties.push_back(InstanceMethod("deprecatedDropDatabaseAsync", &Attachment::deprecatedDropDatabaseAsync)); + properties.push_back(InstanceMethod("getIdleTimeoutSync", &Attachment::getIdleTimeoutSync)); + properties.push_back(InstanceMethod("getIdleTimeoutAsync", &Attachment::getIdleTimeoutAsync)); + properties.push_back(InstanceMethod("setIdleTimeoutSync", &Attachment::setIdleTimeoutSync)); + properties.push_back(InstanceMethod("setIdleTimeoutAsync", &Attachment::setIdleTimeoutAsync)); + properties.push_back(InstanceMethod("getStatementTimeoutSync", &Attachment::getStatementTimeoutSync)); + properties.push_back(InstanceMethod("getStatementTimeoutAsync", &Attachment::getStatementTimeoutAsync)); + properties.push_back(InstanceMethod("setStatementTimeoutSync", &Attachment::setStatementTimeoutSync)); + properties.push_back(InstanceMethod("setStatementTimeoutAsync", &Attachment::setStatementTimeoutAsync)); + properties.push_back(InstanceMethod("createBatchSync", &Attachment::createBatchSync)); + properties.push_back(InstanceMethod("createBatchAsync", &Attachment::createBatchAsync)); + properties.push_back(InstanceMethod("createReplicatorSync", &Attachment::createReplicatorSync)); + properties.push_back(InstanceMethod("createReplicatorAsync", &Attachment::createReplicatorAsync)); + properties.push_back(InstanceMethod("detachSync", &Attachment::detachSync)); + properties.push_back(InstanceMethod("detachAsync", &Attachment::detachAsync)); + properties.push_back(InstanceMethod("dropDatabaseSync", &Attachment::dropDatabaseSync)); + properties.push_back(InstanceMethod("dropDatabaseAsync", &Attachment::dropDatabaseAsync)); + properties.push_back(InstanceMethod("getMaxBlobCacheSizeSync", &Attachment::getMaxBlobCacheSizeSync)); + properties.push_back(InstanceMethod("getMaxBlobCacheSizeAsync", &Attachment::getMaxBlobCacheSizeAsync)); + properties.push_back(InstanceMethod("setMaxBlobCacheSizeSync", &Attachment::setMaxBlobCacheSizeSync)); + properties.push_back(InstanceMethod("setMaxBlobCacheSizeAsync", &Attachment::setMaxBlobCacheSizeAsync)); + properties.push_back(InstanceMethod("getMaxInlineBlobSizeSync", &Attachment::getMaxInlineBlobSizeSync)); + properties.push_back(InstanceMethod("getMaxInlineBlobSizeAsync", &Attachment::getMaxInlineBlobSizeAsync)); + properties.push_back(InstanceMethod("setMaxInlineBlobSizeSync", &Attachment::setMaxInlineBlobSizeSync)); + properties.push_back(InstanceMethod("setMaxInlineBlobSizeAsync", &Attachment::setMaxInlineBlobSizeAsync)); } -MethodStart Transaction::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::addRefStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { obj->interface->addRef(); @@ -11554,28 +17387,28 @@ MethodStart Transaction::addRefStart(bool async, const Napi::CallbackInfo }; } -Napi::Value Transaction::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Attachment::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Transaction::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { return obj->interface->release(); }; } -Napi::Value Transaction::releaseFinish(const Napi::Env env, int ret) +Napi::Value Attachment::releaseFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart Transaction::getInfoStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::getInfoStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); unsigned itemsLength = (unsigned) info[1].ToNumber(); std::shared_ptr> itemsPersistent; @@ -11591,1009 +17424,993 @@ MethodStart Transaction::getInfoStart(bool async, const Napi::CallbackInf }; } -Napi::Value Transaction::getInfoFinish(const Napi::Env env, void* ret) -{ - return env.Undefined(); -} - -MethodStart Transaction::prepareStart(bool async, const Napi::CallbackInfo& info) -{ - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned msgLength = (unsigned) info[1].ToNumber(); - std::shared_ptr> messagePersistent; - auto* message = getAddress(info.Env(), async, info[2], messagePersistent); - - return [obj, status, msgLength, message, messagePersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->prepare(&statusWrapper, msgLength, message); - return nullptr; - }; -} - -Napi::Value Transaction::prepareFinish(const Napi::Env env, void* ret) -{ - return env.Undefined(); -} - -MethodStart Transaction::commitStart(bool async, const Napi::CallbackInfo& info) -{ - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->commit(&statusWrapper); - return nullptr; - }; -} - -Napi::Value Transaction::commitFinish(const Napi::Env env, void* ret) +Napi::Value Attachment::getInfoFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Transaction::commitRetainingStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::startTransactionStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned tpbLength = (unsigned) info[1].ToNumber(); + std::shared_ptr> tpbPersistent; + auto* tpb = getAddress(info.Env(), async, info[2], tpbPersistent); - return [obj, status]() { + return [obj, status, tpbLength, tpb, tpbPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->commitRetaining(&statusWrapper); - return nullptr; + return obj->interface->startTransaction(&statusWrapper, tpbLength, tpb); }; } -Napi::Value Transaction::commitRetainingFinish(const Napi::Env env, void* ret) +Napi::Value Attachment::startTransactionFinish(const Napi::Env env, fb::ITransaction* ret) { - return env.Undefined(); + return Transaction::NewInstance(env, ret); } -MethodStart Transaction::rollbackStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::reconnectTransactionStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned length = (unsigned) info[1].ToNumber(); + std::shared_ptr> idPersistent; + auto* id = getAddress(info.Env(), async, info[2], idPersistent); - return [obj, status]() { + return [obj, status, length, id, idPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->rollback(&statusWrapper); - return nullptr; + return obj->interface->reconnectTransaction(&statusWrapper, length, id); }; } -Napi::Value Transaction::rollbackFinish(const Napi::Env env, void* ret) +Napi::Value Attachment::reconnectTransactionFinish(const Napi::Env env, fb::ITransaction* ret) { - return env.Undefined(); + return Transaction::NewInstance(env, ret); } -MethodStart Transaction::rollbackRetainingStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::compileRequestStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned blrLength = (unsigned) info[1].ToNumber(); + std::shared_ptr> blrPersistent; + auto* blr = getAddress(info.Env(), async, info[2], blrPersistent); - return [obj, status]() { + return [obj, status, blrLength, blr, blrPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->rollbackRetaining(&statusWrapper); - return nullptr; + return obj->interface->compileRequest(&statusWrapper, blrLength, blr); }; } -Napi::Value Transaction::rollbackRetainingFinish(const Napi::Env env, void* ret) +Napi::Value Attachment::compileRequestFinish(const Napi::Env env, fb::IRequest* ret) { - return env.Undefined(); + return Request::NewInstance(env, ret); } -MethodStart Transaction::disconnectStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::transactRequestStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); + unsigned blrLength = (unsigned) info[2].ToNumber(); + std::shared_ptr> blrPersistent; + auto* blr = getAddress(info.Env(), async, info[3], blrPersistent); + unsigned inMsgLength = (unsigned) info[4].ToNumber(); + std::shared_ptr> inMsgPersistent; + auto* inMsg = getAddress(info.Env(), async, info[5], inMsgPersistent); + unsigned outMsgLength = (unsigned) info[6].ToNumber(); + std::shared_ptr> outMsgPersistent; + auto* outMsg = getAddress(info.Env(), async, info[7], outMsgPersistent); - return [obj, status]() { + return [obj, status, transaction, blrLength, blr, blrPersistent, inMsgLength, inMsg, inMsgPersistent, outMsgLength, outMsg, outMsgPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->disconnect(&statusWrapper); + obj->interface->transactRequest(&statusWrapper, (transaction ? transaction->interface : nullptr), blrLength, blr, inMsgLength, inMsg, outMsgLength, outMsg); return nullptr; }; } -Napi::Value Transaction::disconnectFinish(const Napi::Env env, void* ret) +Napi::Value Attachment::transactRequestFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Transaction::joinStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::createBlobStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); + std::shared_ptr> idPersistent; + auto* id = (ISC_QUAD*) getAddress(info.Env(), async, info[2], idPersistent); + unsigned bpbLength = (unsigned) info[3].ToNumber(); + std::shared_ptr> bpbPersistent; + auto* bpb = getAddress(info.Env(), async, info[4], bpbPersistent); - return [obj, status, transaction]() { + return [obj, status, transaction, id, idPersistent, bpbLength, bpb, bpbPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->join(&statusWrapper, (transaction ? transaction->interface : nullptr)); + return obj->interface->createBlob(&statusWrapper, (transaction ? transaction->interface : nullptr), id, bpbLength, bpb); }; } -Napi::Value Transaction::joinFinish(const Napi::Env env, fb::ITransaction* ret) +Napi::Value Attachment::createBlobFinish(const Napi::Env env, fb::IBlob* ret) { - return Transaction::NewInstance(env, ret); + return Blob::NewInstance(env, ret); } -MethodStart Transaction::validateStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::openBlobStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* attachment = Attachment::CheckedUnwrap(info.Env(), info[1], "attachment argument", true); + auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); + std::shared_ptr> idPersistent; + auto* id = (ISC_QUAD*) getAddress(info.Env(), async, info[2], idPersistent); + unsigned bpbLength = (unsigned) info[3].ToNumber(); + std::shared_ptr> bpbPersistent; + auto* bpb = getAddress(info.Env(), async, info[4], bpbPersistent); - return [obj, status, attachment]() { + return [obj, status, transaction, id, idPersistent, bpbLength, bpb, bpbPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->validate(&statusWrapper, (attachment ? attachment->interface : nullptr)); + return obj->interface->openBlob(&statusWrapper, (transaction ? transaction->interface : nullptr), id, bpbLength, bpb); }; } -Napi::Value Transaction::validateFinish(const Napi::Env env, fb::ITransaction* ret) +Napi::Value Attachment::openBlobFinish(const Napi::Env env, fb::IBlob* ret) { - return Transaction::NewInstance(env, ret); + return Blob::NewInstance(env, ret); } -MethodStart Transaction::enterDtcStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::executeDynStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); + unsigned length = (unsigned) info[2].ToNumber(); + std::shared_ptr> dynPersistent; + auto* dyn = getAddress(info.Env(), async, info[3], dynPersistent); - return [obj, status]() { + return [obj, status, transaction, length, dyn, dynPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->enterDtc(&statusWrapper); + obj->interface->executeDyn(&statusWrapper, (transaction ? transaction->interface : nullptr), length, dyn); + return nullptr; }; } -Napi::Value Transaction::enterDtcFinish(const Napi::Env env, fb::ITransaction* ret) -{ - return Transaction::NewInstance(env, ret); -} - -void MessageMetadata::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value Attachment::executeDynFinish(const Napi::Env env, void* ret) { - properties.push_back(InstanceMethod("addRefSync", &MessageMetadata::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &MessageMetadata::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &MessageMetadata::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &MessageMetadata::releaseAsync)); - properties.push_back(InstanceMethod("getCountSync", &MessageMetadata::getCountSync)); - properties.push_back(InstanceMethod("getCountAsync", &MessageMetadata::getCountAsync)); - properties.push_back(InstanceMethod("getFieldSync", &MessageMetadata::getFieldSync)); - properties.push_back(InstanceMethod("getFieldAsync", &MessageMetadata::getFieldAsync)); - properties.push_back(InstanceMethod("getRelationSync", &MessageMetadata::getRelationSync)); - properties.push_back(InstanceMethod("getRelationAsync", &MessageMetadata::getRelationAsync)); - properties.push_back(InstanceMethod("getOwnerSync", &MessageMetadata::getOwnerSync)); - properties.push_back(InstanceMethod("getOwnerAsync", &MessageMetadata::getOwnerAsync)); - properties.push_back(InstanceMethod("getAliasSync", &MessageMetadata::getAliasSync)); - properties.push_back(InstanceMethod("getAliasAsync", &MessageMetadata::getAliasAsync)); - properties.push_back(InstanceMethod("getTypeSync", &MessageMetadata::getTypeSync)); - properties.push_back(InstanceMethod("getTypeAsync", &MessageMetadata::getTypeAsync)); - properties.push_back(InstanceMethod("isNullableSync", &MessageMetadata::isNullableSync)); - properties.push_back(InstanceMethod("isNullableAsync", &MessageMetadata::isNullableAsync)); - properties.push_back(InstanceMethod("getSubTypeSync", &MessageMetadata::getSubTypeSync)); - properties.push_back(InstanceMethod("getSubTypeAsync", &MessageMetadata::getSubTypeAsync)); - properties.push_back(InstanceMethod("getLengthSync", &MessageMetadata::getLengthSync)); - properties.push_back(InstanceMethod("getLengthAsync", &MessageMetadata::getLengthAsync)); - properties.push_back(InstanceMethod("getScaleSync", &MessageMetadata::getScaleSync)); - properties.push_back(InstanceMethod("getScaleAsync", &MessageMetadata::getScaleAsync)); - properties.push_back(InstanceMethod("getCharSetSync", &MessageMetadata::getCharSetSync)); - properties.push_back(InstanceMethod("getCharSetAsync", &MessageMetadata::getCharSetAsync)); - properties.push_back(InstanceMethod("getOffsetSync", &MessageMetadata::getOffsetSync)); - properties.push_back(InstanceMethod("getOffsetAsync", &MessageMetadata::getOffsetAsync)); - properties.push_back(InstanceMethod("getNullOffsetSync", &MessageMetadata::getNullOffsetSync)); - properties.push_back(InstanceMethod("getNullOffsetAsync", &MessageMetadata::getNullOffsetAsync)); - properties.push_back(InstanceMethod("getBuilderSync", &MessageMetadata::getBuilderSync)); - properties.push_back(InstanceMethod("getBuilderAsync", &MessageMetadata::getBuilderAsync)); - properties.push_back(InstanceMethod("getMessageLengthSync", &MessageMetadata::getMessageLengthSync)); - properties.push_back(InstanceMethod("getMessageLengthAsync", &MessageMetadata::getMessageLengthAsync)); + return env.Undefined(); } -MethodStart MessageMetadata::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::prepareStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* tra = Transaction::CheckedUnwrap(info.Env(), info[1], "tra argument", true); + unsigned stmtLength = (unsigned) info[2].ToNumber(); + std::string sqlStmt = info[3].ToString().Utf8Value(); + unsigned dialect = (unsigned) info[4].ToNumber(); + unsigned flags = (unsigned) info[5].ToNumber(); - return [obj]() { - obj->interface->addRef(); - return nullptr; + return [obj, status, tra, stmtLength, sqlStmt, dialect, flags]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->prepare(&statusWrapper, (tra ? tra->interface : nullptr), stmtLength, sqlStmt.c_str(), dialect, flags); }; } -Napi::Value MessageMetadata::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Attachment::prepareFinish(const Napi::Env env, fb::IStatement* ret) { - return env.Undefined(); + return Statement::NewInstance(env, ret); } -MethodStart MessageMetadata::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::executeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); + unsigned stmtLength = (unsigned) info[2].ToNumber(); + std::string sqlStmt = info[3].ToString().Utf8Value(); + unsigned dialect = (unsigned) info[4].ToNumber(); + auto* inMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[5], "inMetadata argument", true); + std::shared_ptr> inBufferPersistent; + auto* inBuffer = getAddress(info.Env(), async, info[6], inBufferPersistent); + auto* outMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[7], "outMetadata argument", true); + std::shared_ptr> outBufferPersistent; + auto* outBuffer = getAddress(info.Env(), async, info[8], outBufferPersistent); - return [obj]() { - return obj->interface->release(); + return [obj, status, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, inBufferPersistent, outMetadata, outBuffer, outBufferPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->execute(&statusWrapper, (transaction ? transaction->interface : nullptr), stmtLength, sqlStmt.c_str(), dialect, (inMetadata ? inMetadata->interface : nullptr), inBuffer, (outMetadata ? outMetadata->interface : nullptr), outBuffer); }; } -Napi::Value MessageMetadata::releaseFinish(const Napi::Env env, int ret) +Napi::Value Attachment::executeFinish(const Napi::Env env, fb::ITransaction* ret) { - return Napi::Value::From(env, ret); + return Transaction::NewInstance(env, ret); } -MethodStart MessageMetadata::getCountStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::openCursorStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); + unsigned stmtLength = (unsigned) info[2].ToNumber(); + std::string sqlStmt = info[3].ToString().Utf8Value(); + unsigned dialect = (unsigned) info[4].ToNumber(); + auto* inMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[5], "inMetadata argument", true); + std::shared_ptr> inBufferPersistent; + auto* inBuffer = getAddress(info.Env(), async, info[6], inBufferPersistent); + auto* outMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[7], "outMetadata argument", true); + std::string cursorName = info[8].ToString().Utf8Value(); + unsigned cursorFlags = (unsigned) info[9].ToNumber(); - return [obj, status]() { + return [obj, status, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, inBufferPersistent, outMetadata, cursorName, cursorFlags]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getCount(&statusWrapper); + return obj->interface->openCursor(&statusWrapper, (transaction ? transaction->interface : nullptr), stmtLength, sqlStmt.c_str(), dialect, (inMetadata ? inMetadata->interface : nullptr), inBuffer, (outMetadata ? outMetadata->interface : nullptr), cursorName.c_str(), cursorFlags); }; } -Napi::Value MessageMetadata::getCountFinish(const Napi::Env env, unsigned ret) +Napi::Value Attachment::openCursorFinish(const Napi::Env env, fb::IResultSet* ret) { - return Napi::Value::From(env, ret); + return ResultSet::NewInstance(env, ret); } -MethodStart MessageMetadata::getFieldStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::queEventsStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); + auto* callback = EventCallback::CheckedUnwrap(info.Env(), info[1], "callback argument", true); + unsigned length = (unsigned) info[2].ToNumber(); + std::shared_ptr> eventsPersistent; + auto* events = getAddress(info.Env(), async, info[3], eventsPersistent); - return [obj, status, index]() { + return [obj, status, callback, length, events, eventsPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getField(&statusWrapper, index); + return obj->interface->queEvents(&statusWrapper, (callback ? callback->interface : nullptr), length, events); }; } -Napi::Value MessageMetadata::getFieldFinish(const Napi::Env env, OptString ret) +Napi::Value Attachment::queEventsFinish(const Napi::Env env, fb::IEvents* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return Events::NewInstance(env, ret); } -MethodStart MessageMetadata::getRelationStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::cancelOperationStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); + int option = (int) info[1].ToNumber(); - return [obj, status, index]() { + return [obj, status, option]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getRelation(&statusWrapper, index); + obj->interface->cancelOperation(&statusWrapper, option); + return nullptr; }; } -Napi::Value MessageMetadata::getRelationFinish(const Napi::Env env, OptString ret) +Napi::Value Attachment::cancelOperationFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart MessageMetadata::getOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::pingStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); - return [obj, status, index]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getOwner(&statusWrapper, index); + obj->interface->ping(&statusWrapper); + return nullptr; }; } -Napi::Value MessageMetadata::getOwnerFinish(const Napi::Env env, OptString ret) +Napi::Value Attachment::pingFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart MessageMetadata::getAliasStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::deprecatedDetachStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); - return [obj, status, index]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getAlias(&statusWrapper, index); + obj->interface->deprecatedDetach(&statusWrapper); + return nullptr; }; } -Napi::Value MessageMetadata::getAliasFinish(const Napi::Env env, OptString ret) +Napi::Value Attachment::deprecatedDetachFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart MessageMetadata::getTypeStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::deprecatedDropDatabaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); - return [obj, status, index]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getType(&statusWrapper, index); + obj->interface->deprecatedDropDatabase(&statusWrapper); + return nullptr; }; } -Napi::Value MessageMetadata::getTypeFinish(const Napi::Env env, unsigned ret) +Napi::Value Attachment::deprecatedDropDatabaseFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart MessageMetadata::isNullableStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::getIdleTimeoutStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); - return [obj, status, index]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->isNullable(&statusWrapper, index); + return obj->interface->getIdleTimeout(&statusWrapper); }; } -Napi::Value MessageMetadata::isNullableFinish(const Napi::Env env, FB_BOOLEAN ret) +Napi::Value Attachment::getIdleTimeoutFinish(const Napi::Env env, unsigned ret) { - return Napi::Value::From(env, (bool) ret); + return Napi::Value::From(env, ret); } -MethodStart MessageMetadata::getSubTypeStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::setIdleTimeoutStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); + unsigned timeOut = (unsigned) info[1].ToNumber(); - return [obj, status, index]() { + return [obj, status, timeOut]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getSubType(&statusWrapper, index); + obj->interface->setIdleTimeout(&statusWrapper, timeOut); + return nullptr; }; } -Napi::Value MessageMetadata::getSubTypeFinish(const Napi::Env env, int ret) +Napi::Value Attachment::setIdleTimeoutFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart MessageMetadata::getLengthStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::getStatementTimeoutStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); - return [obj, status, index]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getLength(&statusWrapper, index); + return obj->interface->getStatementTimeout(&statusWrapper); }; } -Napi::Value MessageMetadata::getLengthFinish(const Napi::Env env, unsigned ret) +Napi::Value Attachment::getStatementTimeoutFinish(const Napi::Env env, unsigned ret) { return Napi::Value::From(env, ret); } -MethodStart MessageMetadata::getScaleStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::setStatementTimeoutStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); + unsigned timeOut = (unsigned) info[1].ToNumber(); - return [obj, status, index]() { + return [obj, status, timeOut]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getScale(&statusWrapper, index); + obj->interface->setStatementTimeout(&statusWrapper, timeOut); + return nullptr; }; } -Napi::Value MessageMetadata::getScaleFinish(const Napi::Env env, int ret) +Napi::Value Attachment::setStatementTimeoutFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart MessageMetadata::getCharSetStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::createBatchStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); + auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); + unsigned stmtLength = (unsigned) info[2].ToNumber(); + std::string sqlStmt = info[3].ToString().Utf8Value(); + unsigned dialect = (unsigned) info[4].ToNumber(); + auto* inMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[5], "inMetadata argument", true); + unsigned parLength = (unsigned) info[6].ToNumber(); + std::shared_ptr> parPersistent; + auto* par = getAddress(info.Env(), async, info[7], parPersistent); - return [obj, status, index]() { + return [obj, status, transaction, stmtLength, sqlStmt, dialect, inMetadata, parLength, par, parPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getCharSet(&statusWrapper, index); + return obj->interface->createBatch(&statusWrapper, (transaction ? transaction->interface : nullptr), stmtLength, sqlStmt.c_str(), dialect, (inMetadata ? inMetadata->interface : nullptr), parLength, par); }; } -Napi::Value MessageMetadata::getCharSetFinish(const Napi::Env env, unsigned ret) +Napi::Value Attachment::createBatchFinish(const Napi::Env env, fb::IBatch* ret) { - return Napi::Value::From(env, ret); + return Batch::NewInstance(env, ret); } -MethodStart MessageMetadata::getOffsetStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::createReplicatorStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); - return [obj, status, index]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getOffset(&statusWrapper, index); + return obj->interface->createReplicator(&statusWrapper); }; } -Napi::Value MessageMetadata::getOffsetFinish(const Napi::Env env, unsigned ret) +Napi::Value Attachment::createReplicatorFinish(const Napi::Env env, fb::IReplicator* ret) { - return Napi::Value::From(env, ret); + return Replicator::NewInstance(env, ret); } -MethodStart MessageMetadata::getNullOffsetStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::detachStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); - return [obj, status, index]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getNullOffset(&statusWrapper, index); + obj->interface->detach(&statusWrapper); + return nullptr; }; } -Napi::Value MessageMetadata::getNullOffsetFinish(const Napi::Env env, unsigned ret) +Napi::Value Attachment::detachFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart MessageMetadata::getBuilderStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::dropDatabaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getBuilder(&statusWrapper); + obj->interface->dropDatabase(&statusWrapper); + return nullptr; }; } -Napi::Value MessageMetadata::getBuilderFinish(const Napi::Env env, fb::IMetadataBuilder* ret) +Napi::Value Attachment::dropDatabaseFinish(const Napi::Env env, void* ret) { - return MetadataBuilder::NewInstance(env, ret); + return env.Undefined(); } -MethodStart MessageMetadata::getMessageLengthStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::getMaxBlobCacheSizeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getMessageLength(&statusWrapper); + return obj->interface->getMaxBlobCacheSize(&statusWrapper); }; } -Napi::Value MessageMetadata::getMessageLengthFinish(const Napi::Env env, unsigned ret) +Napi::Value Attachment::getMaxBlobCacheSizeFinish(const Napi::Env env, unsigned ret) { return Napi::Value::From(env, ret); } -void MetadataBuilder::InitPrototype(std::vector::PropertyDescriptor>& properties) -{ - properties.push_back(InstanceMethod("addRefSync", &MetadataBuilder::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &MetadataBuilder::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &MetadataBuilder::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &MetadataBuilder::releaseAsync)); - properties.push_back(InstanceMethod("setTypeSync", &MetadataBuilder::setTypeSync)); - properties.push_back(InstanceMethod("setTypeAsync", &MetadataBuilder::setTypeAsync)); - properties.push_back(InstanceMethod("setSubTypeSync", &MetadataBuilder::setSubTypeSync)); - properties.push_back(InstanceMethod("setSubTypeAsync", &MetadataBuilder::setSubTypeAsync)); - properties.push_back(InstanceMethod("setLengthSync", &MetadataBuilder::setLengthSync)); - properties.push_back(InstanceMethod("setLengthAsync", &MetadataBuilder::setLengthAsync)); - properties.push_back(InstanceMethod("setCharSetSync", &MetadataBuilder::setCharSetSync)); - properties.push_back(InstanceMethod("setCharSetAsync", &MetadataBuilder::setCharSetAsync)); - properties.push_back(InstanceMethod("setScaleSync", &MetadataBuilder::setScaleSync)); - properties.push_back(InstanceMethod("setScaleAsync", &MetadataBuilder::setScaleAsync)); - properties.push_back(InstanceMethod("truncateSync", &MetadataBuilder::truncateSync)); - properties.push_back(InstanceMethod("truncateAsync", &MetadataBuilder::truncateAsync)); - properties.push_back(InstanceMethod("moveNameToIndexSync", &MetadataBuilder::moveNameToIndexSync)); - properties.push_back(InstanceMethod("moveNameToIndexAsync", &MetadataBuilder::moveNameToIndexAsync)); - properties.push_back(InstanceMethod("removeSync", &MetadataBuilder::removeSync)); - properties.push_back(InstanceMethod("removeAsync", &MetadataBuilder::removeAsync)); - properties.push_back(InstanceMethod("addFieldSync", &MetadataBuilder::addFieldSync)); - properties.push_back(InstanceMethod("addFieldAsync", &MetadataBuilder::addFieldAsync)); - properties.push_back(InstanceMethod("getMetadataSync", &MetadataBuilder::getMetadataSync)); - properties.push_back(InstanceMethod("getMetadataAsync", &MetadataBuilder::getMetadataAsync)); -} - -MethodStart MetadataBuilder::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::setMaxBlobCacheSizeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned size = (unsigned) info[1].ToNumber(); - return [obj]() { - obj->interface->addRef(); + return [obj, status, size]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setMaxBlobCacheSize(&statusWrapper, size); return nullptr; }; } -Napi::Value MetadataBuilder::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Attachment::setMaxBlobCacheSizeFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart MetadataBuilder::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::getMaxInlineBlobSizeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->release(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getMaxInlineBlobSize(&statusWrapper); }; } -Napi::Value MetadataBuilder::releaseFinish(const Napi::Env env, int ret) +Napi::Value Attachment::getMaxInlineBlobSizeFinish(const Napi::Env env, unsigned ret) { return Napi::Value::From(env, ret); } -MethodStart MetadataBuilder::setTypeStart(bool async, const Napi::CallbackInfo& info) +MethodStart Attachment::setMaxInlineBlobSizeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); - unsigned type = (unsigned) info[2].ToNumber(); + unsigned size = (unsigned) info[1].ToNumber(); - return [obj, status, index, type]() { + return [obj, status, size]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setType(&statusWrapper, index, type); + obj->interface->setMaxInlineBlobSize(&statusWrapper, size); return nullptr; }; } -Napi::Value MetadataBuilder::setTypeFinish(const Napi::Env env, void* ret) +Napi::Value Attachment::setMaxInlineBlobSizeFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart MetadataBuilder::setSubTypeStart(bool async, const Napi::CallbackInfo& info) +void Service::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); - int subType = (int) info[2].ToNumber(); + properties.push_back(InstanceMethod("addRefSync", &Service::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Service::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Service::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Service::releaseAsync)); + properties.push_back(InstanceMethod("deprecatedDetachSync", &Service::deprecatedDetachSync)); + properties.push_back(InstanceMethod("deprecatedDetachAsync", &Service::deprecatedDetachAsync)); + properties.push_back(InstanceMethod("querySync", &Service::querySync)); + properties.push_back(InstanceMethod("queryAsync", &Service::queryAsync)); + properties.push_back(InstanceMethod("startSync", &Service::startSync)); + properties.push_back(InstanceMethod("startAsync", &Service::startAsync)); + properties.push_back(InstanceMethod("detachSync", &Service::detachSync)); + properties.push_back(InstanceMethod("detachAsync", &Service::detachAsync)); + properties.push_back(InstanceMethod("cancelSync", &Service::cancelSync)); + properties.push_back(InstanceMethod("cancelAsync", &Service::cancelAsync)); +} - return [obj, status, index, subType]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setSubType(&statusWrapper, index, subType); +MethodStart Service::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); return nullptr; }; } -Napi::Value MetadataBuilder::setSubTypeFinish(const Napi::Env env, void* ret) +Napi::Value Service::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart MetadataBuilder::setLengthStart(bool async, const Napi::CallbackInfo& info) +MethodStart Service::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); - unsigned length = (unsigned) info[2].ToNumber(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, index, length]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setLength(&statusWrapper, index, length); - return nullptr; + return [obj]() { + return obj->interface->release(); }; } -Napi::Value MetadataBuilder::setLengthFinish(const Napi::Env env, void* ret) +Napi::Value Service::releaseFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart MetadataBuilder::setCharSetStart(bool async, const Napi::CallbackInfo& info) +MethodStart Service::deprecatedDetachStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); - unsigned charSet = (unsigned) info[2].ToNumber(); - return [obj, status, index, charSet]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setCharSet(&statusWrapper, index, charSet); + obj->interface->deprecatedDetach(&statusWrapper); return nullptr; }; } -Napi::Value MetadataBuilder::setCharSetFinish(const Napi::Env env, void* ret) +Napi::Value Service::deprecatedDetachFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart MetadataBuilder::setScaleStart(bool async, const Napi::CallbackInfo& info) +MethodStart Service::queryStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); - unsigned scale = (unsigned) info[2].ToNumber(); + unsigned sendLength = (unsigned) info[1].ToNumber(); + std::shared_ptr> sendItemsPersistent; + auto* sendItems = getAddress(info.Env(), async, info[2], sendItemsPersistent); + unsigned receiveLength = (unsigned) info[3].ToNumber(); + std::shared_ptr> receiveItemsPersistent; + auto* receiveItems = getAddress(info.Env(), async, info[4], receiveItemsPersistent); + unsigned bufferLength = (unsigned) info[5].ToNumber(); + std::shared_ptr> bufferPersistent; + auto* buffer = getAddress(info.Env(), async, info[6], bufferPersistent); - return [obj, status, index, scale]() { + return [obj, status, sendLength, sendItems, sendItemsPersistent, receiveLength, receiveItems, receiveItemsPersistent, bufferLength, buffer, bufferPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setScale(&statusWrapper, index, scale); + obj->interface->query(&statusWrapper, sendLength, sendItems, receiveLength, receiveItems, bufferLength, buffer); return nullptr; }; } -Napi::Value MetadataBuilder::setScaleFinish(const Napi::Env env, void* ret) +Napi::Value Service::queryFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart MetadataBuilder::truncateStart(bool async, const Napi::CallbackInfo& info) +MethodStart Service::startStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned count = (unsigned) info[1].ToNumber(); + unsigned spbLength = (unsigned) info[1].ToNumber(); + std::shared_ptr> spbPersistent; + auto* spb = getAddress(info.Env(), async, info[2], spbPersistent); - return [obj, status, count]() { + return [obj, status, spbLength, spb, spbPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->truncate(&statusWrapper, count); + obj->interface->start(&statusWrapper, spbLength, spb); return nullptr; }; } -Napi::Value MetadataBuilder::truncateFinish(const Napi::Env env, void* ret) +Napi::Value Service::startFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart MetadataBuilder::moveNameToIndexStart(bool async, const Napi::CallbackInfo& info) +MethodStart Service::detachStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string name = info[1].ToString().Utf8Value(); - unsigned index = (unsigned) info[2].ToNumber(); - return [obj, status, name, index]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->moveNameToIndex(&statusWrapper, name.c_str(), index); + obj->interface->detach(&statusWrapper); return nullptr; }; } -Napi::Value MetadataBuilder::moveNameToIndexFinish(const Napi::Env env, void* ret) +Napi::Value Service::detachFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart MetadataBuilder::removeStart(bool async, const Napi::CallbackInfo& info) +MethodStart Service::cancelStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); - return [obj, status, index]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->remove(&statusWrapper, index); + obj->interface->cancel(&statusWrapper); return nullptr; }; } -Napi::Value MetadataBuilder::removeFinish(const Napi::Env env, void* ret) +Napi::Value Service::cancelFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart MetadataBuilder::addFieldStart(bool async, const Napi::CallbackInfo& info) -{ - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->addField(&statusWrapper); - }; -} - -Napi::Value MetadataBuilder::addFieldFinish(const Napi::Env env, unsigned ret) +void Provider::InitPrototype(std::vector::PropertyDescriptor>& properties) { - return Napi::Value::From(env, ret); + properties.push_back(InstanceMethod("addRefSync", &Provider::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Provider::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Provider::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Provider::releaseAsync)); + properties.push_back(InstanceMethod("setOwnerSync", &Provider::setOwnerSync)); + properties.push_back(InstanceMethod("setOwnerAsync", &Provider::setOwnerAsync)); + properties.push_back(InstanceMethod("getOwnerSync", &Provider::getOwnerSync)); + properties.push_back(InstanceMethod("getOwnerAsync", &Provider::getOwnerAsync)); + properties.push_back(InstanceMethod("attachDatabaseSync", &Provider::attachDatabaseSync)); + properties.push_back(InstanceMethod("attachDatabaseAsync", &Provider::attachDatabaseAsync)); + properties.push_back(InstanceMethod("createDatabaseSync", &Provider::createDatabaseSync)); + properties.push_back(InstanceMethod("createDatabaseAsync", &Provider::createDatabaseAsync)); + properties.push_back(InstanceMethod("attachServiceManagerSync", &Provider::attachServiceManagerSync)); + properties.push_back(InstanceMethod("attachServiceManagerAsync", &Provider::attachServiceManagerAsync)); + properties.push_back(InstanceMethod("shutdownSync", &Provider::shutdownSync)); + properties.push_back(InstanceMethod("shutdownAsync", &Provider::shutdownAsync)); + properties.push_back(InstanceMethod("setDbCryptCallbackSync", &Provider::setDbCryptCallbackSync)); + properties.push_back(InstanceMethod("setDbCryptCallbackAsync", &Provider::setDbCryptCallbackAsync)); } -MethodStart MetadataBuilder::getMetadataStart(bool async, const Napi::CallbackInfo& info) +MethodStart Provider::addRefStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getMetadata(&statusWrapper); + return [obj]() { + obj->interface->addRef(); + return nullptr; }; } -Napi::Value MetadataBuilder::getMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret) +Napi::Value Provider::addRefFinish(const Napi::Env env, void* ret) { - return MessageMetadata::NewInstance(env, ret); + return env.Undefined(); } -void ResultSet::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart Provider::releaseStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("addRefSync", &ResultSet::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &ResultSet::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &ResultSet::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &ResultSet::releaseAsync)); - properties.push_back(InstanceMethod("fetchNextSync", &ResultSet::fetchNextSync)); - properties.push_back(InstanceMethod("fetchNextAsync", &ResultSet::fetchNextAsync)); - properties.push_back(InstanceMethod("fetchPriorSync", &ResultSet::fetchPriorSync)); - properties.push_back(InstanceMethod("fetchPriorAsync", &ResultSet::fetchPriorAsync)); - properties.push_back(InstanceMethod("fetchFirstSync", &ResultSet::fetchFirstSync)); - properties.push_back(InstanceMethod("fetchFirstAsync", &ResultSet::fetchFirstAsync)); - properties.push_back(InstanceMethod("fetchLastSync", &ResultSet::fetchLastSync)); - properties.push_back(InstanceMethod("fetchLastAsync", &ResultSet::fetchLastAsync)); - properties.push_back(InstanceMethod("fetchAbsoluteSync", &ResultSet::fetchAbsoluteSync)); - properties.push_back(InstanceMethod("fetchAbsoluteAsync", &ResultSet::fetchAbsoluteAsync)); - properties.push_back(InstanceMethod("fetchRelativeSync", &ResultSet::fetchRelativeSync)); - properties.push_back(InstanceMethod("fetchRelativeAsync", &ResultSet::fetchRelativeAsync)); - properties.push_back(InstanceMethod("isEofSync", &ResultSet::isEofSync)); - properties.push_back(InstanceMethod("isEofAsync", &ResultSet::isEofAsync)); - properties.push_back(InstanceMethod("isBofSync", &ResultSet::isBofSync)); - properties.push_back(InstanceMethod("isBofAsync", &ResultSet::isBofAsync)); - properties.push_back(InstanceMethod("getMetadataSync", &ResultSet::getMetadataSync)); - properties.push_back(InstanceMethod("getMetadataAsync", &ResultSet::getMetadataAsync)); - properties.push_back(InstanceMethod("closeSync", &ResultSet::closeSync)); - properties.push_back(InstanceMethod("closeAsync", &ResultSet::closeAsync)); - properties.push_back(InstanceMethod("setDelayedOutputFormatSync", &ResultSet::setDelayedOutputFormatSync)); - properties.push_back(InstanceMethod("setDelayedOutputFormatAsync", &ResultSet::setDelayedOutputFormatAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->release(); + }; } -MethodStart ResultSet::addRefStart(bool async, const Napi::CallbackInfo& info) +Napi::Value Provider::releaseFinish(const Napi::Env env, int ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + return Napi::Value::From(env, ret); +} - return [obj]() { - obj->interface->addRef(); +MethodStart Provider::setOwnerStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); + + return [obj, r]() { + obj->interface->setOwner((r ? r->interface : nullptr)); return nullptr; }; } -Napi::Value ResultSet::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Provider::setOwnerFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart ResultSet::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Provider::getOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->release(); + return obj->interface->getOwner(); }; } -Napi::Value ResultSet::releaseFinish(const Napi::Env env, int ret) +Napi::Value Provider::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) { - return Napi::Value::From(env, ret); + return ReferenceCounted::NewInstance(env, ret); } -MethodStart ResultSet::fetchNextStart(bool async, const Napi::CallbackInfo& info) +MethodStart Provider::attachDatabaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::shared_ptr> messagePersistent; - auto* message = getAddress(info.Env(), async, info[1], messagePersistent); + std::string fileName = info[1].ToString().Utf8Value(); + unsigned dpbLength = (unsigned) info[2].ToNumber(); + std::shared_ptr> dpbPersistent; + auto* dpb = getAddress(info.Env(), async, info[3], dpbPersistent); - return [obj, status, message, messagePersistent]() { + return [obj, status, fileName, dpbLength, dpb, dpbPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->fetchNext(&statusWrapper, message); + return obj->interface->attachDatabase(&statusWrapper, fileName.c_str(), dpbLength, dpb); }; } -Napi::Value ResultSet::fetchNextFinish(const Napi::Env env, int ret) +Napi::Value Provider::attachDatabaseFinish(const Napi::Env env, fb::IAttachment* ret) { - return Napi::Value::From(env, ret); + return Attachment::NewInstance(env, ret); } -MethodStart ResultSet::fetchPriorStart(bool async, const Napi::CallbackInfo& info) +MethodStart Provider::createDatabaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::shared_ptr> messagePersistent; - auto* message = getAddress(info.Env(), async, info[1], messagePersistent); + std::string fileName = info[1].ToString().Utf8Value(); + unsigned dpbLength = (unsigned) info[2].ToNumber(); + std::shared_ptr> dpbPersistent; + auto* dpb = getAddress(info.Env(), async, info[3], dpbPersistent); - return [obj, status, message, messagePersistent]() { + return [obj, status, fileName, dpbLength, dpb, dpbPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->fetchPrior(&statusWrapper, message); + return obj->interface->createDatabase(&statusWrapper, fileName.c_str(), dpbLength, dpb); }; } -Napi::Value ResultSet::fetchPriorFinish(const Napi::Env env, int ret) +Napi::Value Provider::createDatabaseFinish(const Napi::Env env, fb::IAttachment* ret) { - return Napi::Value::From(env, ret); + return Attachment::NewInstance(env, ret); } -MethodStart ResultSet::fetchFirstStart(bool async, const Napi::CallbackInfo& info) +MethodStart Provider::attachServiceManagerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::shared_ptr> messagePersistent; - auto* message = getAddress(info.Env(), async, info[1], messagePersistent); + std::string service = info[1].ToString().Utf8Value(); + unsigned spbLength = (unsigned) info[2].ToNumber(); + std::shared_ptr> spbPersistent; + auto* spb = getAddress(info.Env(), async, info[3], spbPersistent); - return [obj, status, message, messagePersistent]() { + return [obj, status, service, spbLength, spb, spbPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->fetchFirst(&statusWrapper, message); + return obj->interface->attachServiceManager(&statusWrapper, service.c_str(), spbLength, spb); }; } -Napi::Value ResultSet::fetchFirstFinish(const Napi::Env env, int ret) +Napi::Value Provider::attachServiceManagerFinish(const Napi::Env env, fb::IService* ret) { - return Napi::Value::From(env, ret); + return Service::NewInstance(env, ret); } -MethodStart ResultSet::fetchLastStart(bool async, const Napi::CallbackInfo& info) +MethodStart Provider::shutdownStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::shared_ptr> messagePersistent; - auto* message = getAddress(info.Env(), async, info[1], messagePersistent); + unsigned timeout = (unsigned) info[1].ToNumber(); + int reason = (int) info[2].ToNumber(); - return [obj, status, message, messagePersistent]() { + return [obj, status, timeout, reason]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->fetchLast(&statusWrapper, message); + obj->interface->shutdown(&statusWrapper, timeout, reason); + return nullptr; }; } -Napi::Value ResultSet::fetchLastFinish(const Napi::Env env, int ret) +Napi::Value Provider::shutdownFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart ResultSet::fetchAbsoluteStart(bool async, const Napi::CallbackInfo& info) +MethodStart Provider::setDbCryptCallbackStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - int position = (int) info[1].ToNumber(); - std::shared_ptr> messagePersistent; - auto* message = getAddress(info.Env(), async, info[2], messagePersistent); + auto* cryptCallback = CryptKeyCallback::CheckedUnwrap(info.Env(), info[1], "cryptCallback argument", true); - return [obj, status, position, message, messagePersistent]() { + return [obj, status, cryptCallback]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->fetchAbsolute(&statusWrapper, position, message); + obj->interface->setDbCryptCallback(&statusWrapper, (cryptCallback ? cryptCallback->interface : nullptr)); + return nullptr; }; } -Napi::Value ResultSet::fetchAbsoluteFinish(const Napi::Env env, int ret) +Napi::Value Provider::setDbCryptCallbackFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart ResultSet::fetchRelativeStart(bool async, const Napi::CallbackInfo& info) +void DtcStart::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - int offset = (int) info[1].ToNumber(); - std::shared_ptr> messagePersistent; - auto* message = getAddress(info.Env(), async, info[2], messagePersistent); + properties.push_back(InstanceMethod("disposeSync", &DtcStart::disposeSync)); + properties.push_back(InstanceMethod("disposeAsync", &DtcStart::disposeAsync)); + properties.push_back(InstanceMethod("addAttachmentSync", &DtcStart::addAttachmentSync)); + properties.push_back(InstanceMethod("addAttachmentAsync", &DtcStart::addAttachmentAsync)); + properties.push_back(InstanceMethod("addWithTpbSync", &DtcStart::addWithTpbSync)); + properties.push_back(InstanceMethod("addWithTpbAsync", &DtcStart::addWithTpbAsync)); + properties.push_back(InstanceMethod("startSync", &DtcStart::startSync)); + properties.push_back(InstanceMethod("startAsync", &DtcStart::startAsync)); +} - return [obj, status, offset, message, messagePersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->fetchRelative(&statusWrapper, offset, message); +MethodStart DtcStart::disposeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->dispose(); + return nullptr; }; } -Napi::Value ResultSet::fetchRelativeFinish(const Napi::Env env, int ret) +Napi::Value DtcStart::disposeFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart ResultSet::isEofStart(bool async, const Napi::CallbackInfo& info) +MethodStart DtcStart::addAttachmentStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* att = Attachment::CheckedUnwrap(info.Env(), info[1], "att argument", true); - return [obj, status]() { + return [obj, status, att]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->isEof(&statusWrapper); + obj->interface->addAttachment(&statusWrapper, (att ? att->interface : nullptr)); + return nullptr; }; } -Napi::Value ResultSet::isEofFinish(const Napi::Env env, FB_BOOLEAN ret) +Napi::Value DtcStart::addAttachmentFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, (bool) ret); + return env.Undefined(); } -MethodStart ResultSet::isBofStart(bool async, const Napi::CallbackInfo& info) +MethodStart DtcStart::addWithTpbStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* att = Attachment::CheckedUnwrap(info.Env(), info[1], "att argument", true); + unsigned length = (unsigned) info[2].ToNumber(); + std::shared_ptr> tpbPersistent; + auto* tpb = getAddress(info.Env(), async, info[3], tpbPersistent); - return [obj, status]() { + return [obj, status, att, length, tpb, tpbPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->isBof(&statusWrapper); + obj->interface->addWithTpb(&statusWrapper, (att ? att->interface : nullptr), length, tpb); + return nullptr; }; } -Napi::Value ResultSet::isBofFinish(const Napi::Env env, FB_BOOLEAN ret) +Napi::Value DtcStart::addWithTpbFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, (bool) ret); + return env.Undefined(); } -MethodStart ResultSet::getMetadataStart(bool async, const Napi::CallbackInfo& info) +MethodStart DtcStart::startStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getMetadata(&statusWrapper); + return obj->interface->start(&statusWrapper); }; } -Napi::Value ResultSet::getMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret) +Napi::Value DtcStart::startFinish(const Napi::Env env, fb::ITransaction* ret) { - return MessageMetadata::NewInstance(env, ret); + return Transaction::NewInstance(env, ret); } -MethodStart ResultSet::closeStart(bool async, const Napi::CallbackInfo& info) +void Dtc::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("joinSync", &Dtc::joinSync)); + properties.push_back(InstanceMethod("joinAsync", &Dtc::joinAsync)); + properties.push_back(InstanceMethod("startBuilderSync", &Dtc::startBuilderSync)); + properties.push_back(InstanceMethod("startBuilderAsync", &Dtc::startBuilderAsync)); +} + +MethodStart Dtc::joinStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* one = Transaction::CheckedUnwrap(info.Env(), info[1], "one argument", true); + auto* two = Transaction::CheckedUnwrap(info.Env(), info[2], "two argument", true); - return [obj, status]() { + return [obj, status, one, two]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->close(&statusWrapper); - return nullptr; + return obj->interface->join(&statusWrapper, (one ? one->interface : nullptr), (two ? two->interface : nullptr)); }; } -Napi::Value ResultSet::closeFinish(const Napi::Env env, void* ret) +Napi::Value Dtc::joinFinish(const Napi::Env env, fb::ITransaction* ret) { - return env.Undefined(); + return Transaction::NewInstance(env, ret); } -MethodStart ResultSet::setDelayedOutputFormatStart(bool async, const Napi::CallbackInfo& info) +MethodStart Dtc::startBuilderStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* format = MessageMetadata::CheckedUnwrap(info.Env(), info[1], "format argument", true); - return [obj, status, format]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setDelayedOutputFormat(&statusWrapper, (format ? format->interface : nullptr)); - return nullptr; + return obj->interface->startBuilder(&statusWrapper); }; } -Napi::Value ResultSet::setDelayedOutputFormatFinish(const Napi::Env env, void* ret) -{ - return env.Undefined(); -} - -void Statement::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value Dtc::startBuilderFinish(const Napi::Env env, fb::IDtcStart* ret) { - properties.push_back(InstanceMethod("addRefSync", &Statement::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &Statement::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &Statement::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &Statement::releaseAsync)); - properties.push_back(InstanceMethod("getInfoSync", &Statement::getInfoSync)); - properties.push_back(InstanceMethod("getInfoAsync", &Statement::getInfoAsync)); - properties.push_back(InstanceMethod("getTypeSync", &Statement::getTypeSync)); - properties.push_back(InstanceMethod("getTypeAsync", &Statement::getTypeAsync)); - properties.push_back(InstanceMethod("getPlanSync", &Statement::getPlanSync)); - properties.push_back(InstanceMethod("getPlanAsync", &Statement::getPlanAsync)); - properties.push_back(InstanceMethod("getAffectedRecordsSync", &Statement::getAffectedRecordsSync)); - properties.push_back(InstanceMethod("getAffectedRecordsAsync", &Statement::getAffectedRecordsAsync)); - properties.push_back(InstanceMethod("getInputMetadataSync", &Statement::getInputMetadataSync)); - properties.push_back(InstanceMethod("getInputMetadataAsync", &Statement::getInputMetadataAsync)); - properties.push_back(InstanceMethod("getOutputMetadataSync", &Statement::getOutputMetadataSync)); - properties.push_back(InstanceMethod("getOutputMetadataAsync", &Statement::getOutputMetadataAsync)); - properties.push_back(InstanceMethod("executeSync", &Statement::executeSync)); - properties.push_back(InstanceMethod("executeAsync", &Statement::executeAsync)); - properties.push_back(InstanceMethod("openCursorSync", &Statement::openCursorSync)); - properties.push_back(InstanceMethod("openCursorAsync", &Statement::openCursorAsync)); - properties.push_back(InstanceMethod("setCursorNameSync", &Statement::setCursorNameSync)); - properties.push_back(InstanceMethod("setCursorNameAsync", &Statement::setCursorNameAsync)); - properties.push_back(InstanceMethod("freeSync", &Statement::freeSync)); - properties.push_back(InstanceMethod("freeAsync", &Statement::freeAsync)); - properties.push_back(InstanceMethod("getFlagsSync", &Statement::getFlagsSync)); - properties.push_back(InstanceMethod("getFlagsAsync", &Statement::getFlagsAsync)); + return DtcStart::NewInstance(env, ret); } -MethodStart Statement::addRefStart(bool async, const Napi::CallbackInfo& info) +void Auth::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("addRefSync", &Auth::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Auth::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Auth::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Auth::releaseAsync)); + properties.push_back(InstanceMethod("setOwnerSync", &Auth::setOwnerSync)); + properties.push_back(InstanceMethod("setOwnerAsync", &Auth::setOwnerAsync)); + properties.push_back(InstanceMethod("getOwnerSync", &Auth::getOwnerSync)); + properties.push_back(InstanceMethod("getOwnerAsync", &Auth::getOwnerAsync)); +} + +MethodStart Auth::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { obj->interface->addRef(); @@ -12601,250 +18418,237 @@ MethodStart Statement::addRefStart(bool async, const Napi::CallbackInfo& }; } -Napi::Value Statement::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Auth::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Statement::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Auth::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { return obj->interface->release(); }; } -Napi::Value Statement::releaseFinish(const Napi::Env env, int ret) +Napi::Value Auth::releaseFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart Statement::getInfoStart(bool async, const Napi::CallbackInfo& info) +MethodStart Auth::setOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned itemsLength = (unsigned) info[1].ToNumber(); - std::shared_ptr> itemsPersistent; - auto* items = getAddress(info.Env(), async, info[2], itemsPersistent); - unsigned bufferLength = (unsigned) info[3].ToNumber(); - std::shared_ptr> bufferPersistent; - auto* buffer = getAddress(info.Env(), async, info[4], bufferPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); - return [obj, status, itemsLength, items, itemsPersistent, bufferLength, buffer, bufferPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->getInfo(&statusWrapper, itemsLength, items, bufferLength, buffer); + return [obj, r]() { + obj->interface->setOwner((r ? r->interface : nullptr)); return nullptr; }; } -Napi::Value Statement::getInfoFinish(const Napi::Env env, void* ret) +Napi::Value Auth::setOwnerFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Statement::getTypeStart(bool async, const Napi::CallbackInfo& info) +MethodStart Auth::getOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getType(&statusWrapper); + return [obj]() { + return obj->interface->getOwner(); }; } -Napi::Value Statement::getTypeFinish(const Napi::Env env, unsigned ret) -{ - return Napi::Value::From(env, ret); -} - -MethodStart Statement::getPlanStart(bool async, const Napi::CallbackInfo& info) +Napi::Value Auth::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - bool detailed = info[1].ToBoolean(); - - return [obj, status, detailed]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getPlan(&statusWrapper, detailed); - }; + return ReferenceCounted::NewInstance(env, ret); } -Napi::Value Statement::getPlanFinish(const Napi::Env env, OptString ret) +void Writer::InitPrototype(std::vector::PropertyDescriptor>& properties) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + properties.push_back(InstanceMethod("resetSync", &Writer::resetSync)); + properties.push_back(InstanceMethod("resetAsync", &Writer::resetAsync)); + properties.push_back(InstanceMethod("addSync", &Writer::addSync)); + properties.push_back(InstanceMethod("addAsync", &Writer::addAsync)); + properties.push_back(InstanceMethod("setTypeSync", &Writer::setTypeSync)); + properties.push_back(InstanceMethod("setTypeAsync", &Writer::setTypeAsync)); + properties.push_back(InstanceMethod("setDbSync", &Writer::setDbSync)); + properties.push_back(InstanceMethod("setDbAsync", &Writer::setDbAsync)); } -MethodStart Statement::getAffectedRecordsStart(bool async, const Napi::CallbackInfo& info) +MethodStart Writer::resetStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getAffectedRecords(&statusWrapper); + return [obj]() { + obj->interface->reset(); + return nullptr; }; } -Napi::Value Statement::getAffectedRecordsFinish(const Napi::Env env, uint64_t ret) +Napi::Value Writer::resetFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, (double) ret); + return env.Undefined(); } -MethodStart Statement::getInputMetadataStart(bool async, const Napi::CallbackInfo& info) +MethodStart Writer::addStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string name = info[1].ToString().Utf8Value(); - return [obj, status]() { + return [obj, status, name]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getInputMetadata(&statusWrapper); + obj->interface->add(&statusWrapper, name.c_str()); + return nullptr; }; } -Napi::Value Statement::getInputMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret) +Napi::Value Writer::addFinish(const Napi::Env env, void* ret) { - return MessageMetadata::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Statement::getOutputMetadataStart(bool async, const Napi::CallbackInfo& info) +MethodStart Writer::setTypeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string value = info[1].ToString().Utf8Value(); - return [obj, status]() { + return [obj, status, value]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getOutputMetadata(&statusWrapper); + obj->interface->setType(&statusWrapper, value.c_str()); + return nullptr; }; } -Napi::Value Statement::getOutputMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret) +Napi::Value Writer::setTypeFinish(const Napi::Env env, void* ret) { - return MessageMetadata::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Statement::executeStart(bool async, const Napi::CallbackInfo& info) +MethodStart Writer::setDbStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); - auto* inMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[2], "inMetadata argument", true); - std::shared_ptr> inBufferPersistent; - auto* inBuffer = getAddress(info.Env(), async, info[3], inBufferPersistent); - auto* outMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[4], "outMetadata argument", true); - std::shared_ptr> outBufferPersistent; - auto* outBuffer = getAddress(info.Env(), async, info[5], outBufferPersistent); + std::string value = info[1].ToString().Utf8Value(); - return [obj, status, transaction, inMetadata, inBuffer, inBufferPersistent, outMetadata, outBuffer, outBufferPersistent]() { + return [obj, status, value]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->execute(&statusWrapper, (transaction ? transaction->interface : nullptr), (inMetadata ? inMetadata->interface : nullptr), inBuffer, (outMetadata ? outMetadata->interface : nullptr), outBuffer); + obj->interface->setDb(&statusWrapper, value.c_str()); + return nullptr; }; } -Napi::Value Statement::executeFinish(const Napi::Env env, fb::ITransaction* ret) +Napi::Value Writer::setDbFinish(const Napi::Env env, void* ret) { - return Transaction::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Statement::openCursorStart(bool async, const Napi::CallbackInfo& info) +void ServerBlock::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); - auto* inMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[2], "inMetadata argument", true); - std::shared_ptr> inBufferPersistent; - auto* inBuffer = getAddress(info.Env(), async, info[3], inBufferPersistent); - auto* outMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[4], "outMetadata argument", true); - unsigned flags = (unsigned) info[5].ToNumber(); + properties.push_back(InstanceMethod("getLoginSync", &ServerBlock::getLoginSync)); + properties.push_back(InstanceMethod("getLoginAsync", &ServerBlock::getLoginAsync)); + properties.push_back(InstanceMethod("getDataSync", &ServerBlock::getDataSync)); + properties.push_back(InstanceMethod("getDataAsync", &ServerBlock::getDataAsync)); + properties.push_back(InstanceMethod("putDataSync", &ServerBlock::putDataSync)); + properties.push_back(InstanceMethod("putDataAsync", &ServerBlock::putDataAsync)); + properties.push_back(InstanceMethod("newKeySync", &ServerBlock::newKeySync)); + properties.push_back(InstanceMethod("newKeyAsync", &ServerBlock::newKeyAsync)); +} - return [obj, status, transaction, inMetadata, inBuffer, inBufferPersistent, outMetadata, flags]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->openCursor(&statusWrapper, (transaction ? transaction->interface : nullptr), (inMetadata ? inMetadata->interface : nullptr), inBuffer, (outMetadata ? outMetadata->interface : nullptr), flags); +MethodStart ServerBlock::getLoginStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getLogin(); }; } -Napi::Value Statement::openCursorFinish(const Napi::Env env, fb::IResultSet* ret) +Napi::Value ServerBlock::getLoginFinish(const Napi::Env env, OptString ret) { - return ResultSet::NewInstance(env, ret); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart Statement::setCursorNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart ServerBlock::getDataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string name = info[1].ToString().Utf8Value(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + std::shared_ptr> lengthPersistent; + auto* length = getAddress(info.Env(), async, info[0], lengthPersistent); - return [obj, status, name]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setCursorName(&statusWrapper, name.c_str()); - return nullptr; + return [obj, length, lengthPersistent]() { + return obj->interface->getData(length); }; } -Napi::Value Statement::setCursorNameFinish(const Napi::Env env, void* ret) +Napi::Value ServerBlock::getDataFinish(const Napi::Env env, const unsigned char* ret) { - return env.Undefined(); + return Pointer::NewInstance(env, ret); } -MethodStart Statement::freeStart(bool async, const Napi::CallbackInfo& info) +MethodStart ServerBlock::putDataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned length = (unsigned) info[1].ToNumber(); + std::shared_ptr> dataPersistent; + auto* data = getAddress(info.Env(), async, info[2], dataPersistent); - return [obj, status]() { + return [obj, status, length, data, dataPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->free(&statusWrapper); + obj->interface->putData(&statusWrapper, length, data); return nullptr; }; } -Napi::Value Statement::freeFinish(const Napi::Env env, void* ret) +Napi::Value ServerBlock::putDataFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Statement::getFlagsStart(bool async, const Napi::CallbackInfo& info) +MethodStart ServerBlock::newKeyStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getFlags(&statusWrapper); + return obj->interface->newKey(&statusWrapper); }; } -Napi::Value Statement::getFlagsFinish(const Napi::Env env, unsigned ret) +Napi::Value ServerBlock::newKeyFinish(const Napi::Env env, fb::ICryptKey* ret) { - return Napi::Value::From(env, ret); + return CryptKey::NewInstance(env, ret); } -void Request::InitPrototype(std::vector::PropertyDescriptor>& properties) +void ClientBlock::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("addRefSync", &Request::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &Request::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &Request::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &Request::releaseAsync)); - properties.push_back(InstanceMethod("receiveSync", &Request::receiveSync)); - properties.push_back(InstanceMethod("receiveAsync", &Request::receiveAsync)); - properties.push_back(InstanceMethod("sendSync", &Request::sendSync)); - properties.push_back(InstanceMethod("sendAsync", &Request::sendAsync)); - properties.push_back(InstanceMethod("getInfoSync", &Request::getInfoSync)); - properties.push_back(InstanceMethod("getInfoAsync", &Request::getInfoAsync)); - properties.push_back(InstanceMethod("startSync", &Request::startSync)); - properties.push_back(InstanceMethod("startAsync", &Request::startAsync)); - properties.push_back(InstanceMethod("startAndSendSync", &Request::startAndSendSync)); - properties.push_back(InstanceMethod("startAndSendAsync", &Request::startAndSendAsync)); - properties.push_back(InstanceMethod("unwindSync", &Request::unwindSync)); - properties.push_back(InstanceMethod("unwindAsync", &Request::unwindAsync)); - properties.push_back(InstanceMethod("freeSync", &Request::freeSync)); - properties.push_back(InstanceMethod("freeAsync", &Request::freeAsync)); + properties.push_back(InstanceMethod("addRefSync", &ClientBlock::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &ClientBlock::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &ClientBlock::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &ClientBlock::releaseAsync)); + properties.push_back(InstanceMethod("getLoginSync", &ClientBlock::getLoginSync)); + properties.push_back(InstanceMethod("getLoginAsync", &ClientBlock::getLoginAsync)); + properties.push_back(InstanceMethod("getPasswordSync", &ClientBlock::getPasswordSync)); + properties.push_back(InstanceMethod("getPasswordAsync", &ClientBlock::getPasswordAsync)); + properties.push_back(InstanceMethod("getDataSync", &ClientBlock::getDataSync)); + properties.push_back(InstanceMethod("getDataAsync", &ClientBlock::getDataAsync)); + properties.push_back(InstanceMethod("putDataSync", &ClientBlock::putDataSync)); + properties.push_back(InstanceMethod("putDataAsync", &ClientBlock::putDataAsync)); + properties.push_back(InstanceMethod("newKeySync", &ClientBlock::newKeySync)); + properties.push_back(InstanceMethod("newKeyAsync", &ClientBlock::newKeyAsync)); + properties.push_back(InstanceMethod("getAuthBlockSync", &ClientBlock::getAuthBlockSync)); + properties.push_back(InstanceMethod("getAuthBlockAsync", &ClientBlock::getAuthBlockAsync)); } -MethodStart Request::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart ClientBlock::addRefStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { obj->interface->addRef(); @@ -12852,183 +18656,140 @@ MethodStart Request::addRefStart(bool async, const Napi::CallbackInfo& in }; } -Napi::Value Request::addRefFinish(const Napi::Env env, void* ret) +Napi::Value ClientBlock::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Request::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart ClientBlock::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { return obj->interface->release(); }; } -Napi::Value Request::releaseFinish(const Napi::Env env, int ret) +Napi::Value ClientBlock::releaseFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart Request::receiveStart(bool async, const Napi::CallbackInfo& info) -{ - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - int level = (int) info[1].ToNumber(); - unsigned msgType = (unsigned) info[2].ToNumber(); - unsigned length = (unsigned) info[3].ToNumber(); - std::shared_ptr> messagePersistent; - auto* message = getAddress(info.Env(), async, info[4], messagePersistent); - - return [obj, status, level, msgType, length, message, messagePersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->receive(&statusWrapper, level, msgType, length, message); - return nullptr; - }; -} - -Napi::Value Request::receiveFinish(const Napi::Env env, void* ret) -{ - return env.Undefined(); -} - -MethodStart Request::sendStart(bool async, const Napi::CallbackInfo& info) +MethodStart ClientBlock::getLoginStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - int level = (int) info[1].ToNumber(); - unsigned msgType = (unsigned) info[2].ToNumber(); - unsigned length = (unsigned) info[3].ToNumber(); - std::shared_ptr> messagePersistent; - auto* message = getAddress(info.Env(), async, info[4], messagePersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, level, msgType, length, message, messagePersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->send(&statusWrapper, level, msgType, length, message); - return nullptr; + return [obj]() { + return obj->interface->getLogin(); }; } -Napi::Value Request::sendFinish(const Napi::Env env, void* ret) +Napi::Value ClientBlock::getLoginFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart Request::getInfoStart(bool async, const Napi::CallbackInfo& info) +MethodStart ClientBlock::getPasswordStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - int level = (int) info[1].ToNumber(); - unsigned itemsLength = (unsigned) info[2].ToNumber(); - std::shared_ptr> itemsPersistent; - auto* items = getAddress(info.Env(), async, info[3], itemsPersistent); - unsigned bufferLength = (unsigned) info[4].ToNumber(); - std::shared_ptr> bufferPersistent; - auto* buffer = getAddress(info.Env(), async, info[5], bufferPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, level, itemsLength, items, itemsPersistent, bufferLength, buffer, bufferPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->getInfo(&statusWrapper, level, itemsLength, items, bufferLength, buffer); - return nullptr; + return [obj]() { + return obj->interface->getPassword(); }; } -Napi::Value Request::getInfoFinish(const Napi::Env env, void* ret) +Napi::Value ClientBlock::getPasswordFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart Request::startStart(bool async, const Napi::CallbackInfo& info) +MethodStart ClientBlock::getDataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* tra = Transaction::CheckedUnwrap(info.Env(), info[1], "tra argument", true); - int level = (int) info[2].ToNumber(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + std::shared_ptr> lengthPersistent; + auto* length = getAddress(info.Env(), async, info[0], lengthPersistent); - return [obj, status, tra, level]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->start(&statusWrapper, (tra ? tra->interface : nullptr), level); - return nullptr; + return [obj, length, lengthPersistent]() { + return obj->interface->getData(length); }; } -Napi::Value Request::startFinish(const Napi::Env env, void* ret) +Napi::Value ClientBlock::getDataFinish(const Napi::Env env, const unsigned char* ret) { - return env.Undefined(); + return Pointer::NewInstance(env, ret); } -MethodStart Request::startAndSendStart(bool async, const Napi::CallbackInfo& info) +MethodStart ClientBlock::putDataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* tra = Transaction::CheckedUnwrap(info.Env(), info[1], "tra argument", true); - int level = (int) info[2].ToNumber(); - unsigned msgType = (unsigned) info[3].ToNumber(); - unsigned length = (unsigned) info[4].ToNumber(); - std::shared_ptr> messagePersistent; - auto* message = getAddress(info.Env(), async, info[5], messagePersistent); + unsigned length = (unsigned) info[1].ToNumber(); + std::shared_ptr> dataPersistent; + auto* data = getAddress(info.Env(), async, info[2], dataPersistent); - return [obj, status, tra, level, msgType, length, message, messagePersistent]() { + return [obj, status, length, data, dataPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->startAndSend(&statusWrapper, (tra ? tra->interface : nullptr), level, msgType, length, message); + obj->interface->putData(&statusWrapper, length, data); return nullptr; }; } -Napi::Value Request::startAndSendFinish(const Napi::Env env, void* ret) +Napi::Value ClientBlock::putDataFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Request::unwindStart(bool async, const Napi::CallbackInfo& info) +MethodStart ClientBlock::newKeyStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - int level = (int) info[1].ToNumber(); - return [obj, status, level]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->unwind(&statusWrapper, level); - return nullptr; + return obj->interface->newKey(&statusWrapper); }; } -Napi::Value Request::unwindFinish(const Napi::Env env, void* ret) +Napi::Value ClientBlock::newKeyFinish(const Napi::Env env, fb::ICryptKey* ret) { - return env.Undefined(); + return CryptKey::NewInstance(env, ret); } -MethodStart Request::freeStart(bool async, const Napi::CallbackInfo& info) +MethodStart ClientBlock::getAuthBlockStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->free(&statusWrapper); - return nullptr; + return obj->interface->getAuthBlock(&statusWrapper); }; } -Napi::Value Request::freeFinish(const Napi::Env env, void* ret) +Napi::Value ClientBlock::getAuthBlockFinish(const Napi::Env env, fb::IAuthBlock* ret) { - return env.Undefined(); + return AuthBlock::NewInstance(env, ret); } -void Events::InitPrototype(std::vector::PropertyDescriptor>& properties) +void Server::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("addRefSync", &Events::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &Events::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &Events::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &Events::releaseAsync)); - properties.push_back(InstanceMethod("cancelSync", &Events::cancelSync)); - properties.push_back(InstanceMethod("cancelAsync", &Events::cancelAsync)); + properties.push_back(InstanceMethod("addRefSync", &Server::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Server::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Server::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Server::releaseAsync)); + properties.push_back(InstanceMethod("setOwnerSync", &Server::setOwnerSync)); + properties.push_back(InstanceMethod("setOwnerAsync", &Server::setOwnerAsync)); + properties.push_back(InstanceMethod("getOwnerSync", &Server::getOwnerSync)); + properties.push_back(InstanceMethod("getOwnerAsync", &Server::getOwnerAsync)); + properties.push_back(InstanceMethod("authenticateSync", &Server::authenticateSync)); + properties.push_back(InstanceMethod("authenticateAsync", &Server::authenticateAsync)); + properties.push_back(InstanceMethod("setDbCryptCallbackSync", &Server::setDbCryptCallbackSync)); + properties.push_back(InstanceMethod("setDbCryptCallbackAsync", &Server::setDbCryptCallbackAsync)); } -MethodStart Events::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart Server::addRefStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { obj->interface->addRef(); @@ -13036,868 +18797,773 @@ MethodStart Events::addRefStart(bool async, const Napi::CallbackInfo& inf }; } -Napi::Value Events::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Server::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Events::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Server::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { return obj->interface->release(); }; } -Napi::Value Events::releaseFinish(const Napi::Env env, int ret) +Napi::Value Server::releaseFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart Events::cancelStart(bool async, const Napi::CallbackInfo& info) -{ - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->cancel(&statusWrapper); - return nullptr; - }; -} - -Napi::Value Events::cancelFinish(const Napi::Env env, void* ret) -{ - return env.Undefined(); -} - -void Attachment::InitPrototype(std::vector::PropertyDescriptor>& properties) -{ - properties.push_back(InstanceMethod("addRefSync", &Attachment::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &Attachment::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &Attachment::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &Attachment::releaseAsync)); - properties.push_back(InstanceMethod("getInfoSync", &Attachment::getInfoSync)); - properties.push_back(InstanceMethod("getInfoAsync", &Attachment::getInfoAsync)); - properties.push_back(InstanceMethod("startTransactionSync", &Attachment::startTransactionSync)); - properties.push_back(InstanceMethod("startTransactionAsync", &Attachment::startTransactionAsync)); - properties.push_back(InstanceMethod("reconnectTransactionSync", &Attachment::reconnectTransactionSync)); - properties.push_back(InstanceMethod("reconnectTransactionAsync", &Attachment::reconnectTransactionAsync)); - properties.push_back(InstanceMethod("compileRequestSync", &Attachment::compileRequestSync)); - properties.push_back(InstanceMethod("compileRequestAsync", &Attachment::compileRequestAsync)); - properties.push_back(InstanceMethod("transactRequestSync", &Attachment::transactRequestSync)); - properties.push_back(InstanceMethod("transactRequestAsync", &Attachment::transactRequestAsync)); - properties.push_back(InstanceMethod("createBlobSync", &Attachment::createBlobSync)); - properties.push_back(InstanceMethod("createBlobAsync", &Attachment::createBlobAsync)); - properties.push_back(InstanceMethod("openBlobSync", &Attachment::openBlobSync)); - properties.push_back(InstanceMethod("openBlobAsync", &Attachment::openBlobAsync)); - properties.push_back(InstanceMethod("executeDynSync", &Attachment::executeDynSync)); - properties.push_back(InstanceMethod("executeDynAsync", &Attachment::executeDynAsync)); - properties.push_back(InstanceMethod("prepareSync", &Attachment::prepareSync)); - properties.push_back(InstanceMethod("prepareAsync", &Attachment::prepareAsync)); - properties.push_back(InstanceMethod("executeSync", &Attachment::executeSync)); - properties.push_back(InstanceMethod("executeAsync", &Attachment::executeAsync)); - properties.push_back(InstanceMethod("openCursorSync", &Attachment::openCursorSync)); - properties.push_back(InstanceMethod("openCursorAsync", &Attachment::openCursorAsync)); - properties.push_back(InstanceMethod("queEventsSync", &Attachment::queEventsSync)); - properties.push_back(InstanceMethod("queEventsAsync", &Attachment::queEventsAsync)); - properties.push_back(InstanceMethod("cancelOperationSync", &Attachment::cancelOperationSync)); - properties.push_back(InstanceMethod("cancelOperationAsync", &Attachment::cancelOperationAsync)); - properties.push_back(InstanceMethod("pingSync", &Attachment::pingSync)); - properties.push_back(InstanceMethod("pingAsync", &Attachment::pingAsync)); - properties.push_back(InstanceMethod("detachSync", &Attachment::detachSync)); - properties.push_back(InstanceMethod("detachAsync", &Attachment::detachAsync)); - properties.push_back(InstanceMethod("dropDatabaseSync", &Attachment::dropDatabaseSync)); - properties.push_back(InstanceMethod("dropDatabaseAsync", &Attachment::dropDatabaseAsync)); -} - -MethodStart Attachment::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart Server::setOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); - return [obj]() { - obj->interface->addRef(); + return [obj, r]() { + obj->interface->setOwner((r ? r->interface : nullptr)); return nullptr; }; } -Napi::Value Attachment::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Server::setOwnerFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Attachment::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Server::getOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->release(); + return obj->interface->getOwner(); }; } -Napi::Value Attachment::releaseFinish(const Napi::Env env, int ret) +Napi::Value Server::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) { - return Napi::Value::From(env, ret); + return ReferenceCounted::NewInstance(env, ret); } -MethodStart Attachment::getInfoStart(bool async, const Napi::CallbackInfo& info) +MethodStart Server::authenticateStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned itemsLength = (unsigned) info[1].ToNumber(); - std::shared_ptr> itemsPersistent; - auto* items = getAddress(info.Env(), async, info[2], itemsPersistent); - unsigned bufferLength = (unsigned) info[3].ToNumber(); - std::shared_ptr> bufferPersistent; - auto* buffer = getAddress(info.Env(), async, info[4], bufferPersistent); + auto* sBlock = ServerBlock::CheckedUnwrap(info.Env(), info[1], "sBlock argument", true); + auto* writerInterface = Writer::CheckedUnwrap(info.Env(), info[2], "writerInterface argument", true); - return [obj, status, itemsLength, items, itemsPersistent, bufferLength, buffer, bufferPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->getInfo(&statusWrapper, itemsLength, items, bufferLength, buffer); - return nullptr; + return [obj, status, sBlock, writerInterface]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->authenticate(&statusWrapper, (sBlock ? sBlock->interface : nullptr), (writerInterface ? writerInterface->interface : nullptr)); }; } -Napi::Value Attachment::getInfoFinish(const Napi::Env env, void* ret) +Napi::Value Server::authenticateFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart Attachment::startTransactionStart(bool async, const Napi::CallbackInfo& info) +MethodStart Server::setDbCryptCallbackStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned tpbLength = (unsigned) info[1].ToNumber(); - std::shared_ptr> tpbPersistent; - auto* tpb = getAddress(info.Env(), async, info[2], tpbPersistent); + auto* cryptCallback = CryptKeyCallback::CheckedUnwrap(info.Env(), info[1], "cryptCallback argument", true); - return [obj, status, tpbLength, tpb, tpbPersistent]() { + return [obj, status, cryptCallback]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->startTransaction(&statusWrapper, tpbLength, tpb); + obj->interface->setDbCryptCallback(&statusWrapper, (cryptCallback ? cryptCallback->interface : nullptr)); + return nullptr; }; } -Napi::Value Attachment::startTransactionFinish(const Napi::Env env, fb::ITransaction* ret) +Napi::Value Server::setDbCryptCallbackFinish(const Napi::Env env, void* ret) { - return Transaction::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Attachment::reconnectTransactionStart(bool async, const Napi::CallbackInfo& info) +void Client::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned length = (unsigned) info[1].ToNumber(); - std::shared_ptr> idPersistent; - auto* id = getAddress(info.Env(), async, info[2], idPersistent); + properties.push_back(InstanceMethod("addRefSync", &Client::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Client::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Client::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Client::releaseAsync)); + properties.push_back(InstanceMethod("setOwnerSync", &Client::setOwnerSync)); + properties.push_back(InstanceMethod("setOwnerAsync", &Client::setOwnerAsync)); + properties.push_back(InstanceMethod("getOwnerSync", &Client::getOwnerSync)); + properties.push_back(InstanceMethod("getOwnerAsync", &Client::getOwnerAsync)); + properties.push_back(InstanceMethod("authenticateSync", &Client::authenticateSync)); + properties.push_back(InstanceMethod("authenticateAsync", &Client::authenticateAsync)); +} - return [obj, status, length, id, idPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->reconnectTransaction(&statusWrapper, length, id); +MethodStart Client::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); + return nullptr; }; } -Napi::Value Attachment::reconnectTransactionFinish(const Napi::Env env, fb::ITransaction* ret) +Napi::Value Client::addRefFinish(const Napi::Env env, void* ret) { - return Transaction::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Attachment::compileRequestStart(bool async, const Napi::CallbackInfo& info) +MethodStart Client::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned blrLength = (unsigned) info[1].ToNumber(); - std::shared_ptr> blrPersistent; - auto* blr = getAddress(info.Env(), async, info[2], blrPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, blrLength, blr, blrPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->compileRequest(&statusWrapper, blrLength, blr); + return [obj]() { + return obj->interface->release(); }; } -Napi::Value Attachment::compileRequestFinish(const Napi::Env env, fb::IRequest* ret) +Napi::Value Client::releaseFinish(const Napi::Env env, int ret) { - return Request::NewInstance(env, ret); + return Napi::Value::From(env, ret); } -MethodStart Attachment::transactRequestStart(bool async, const Napi::CallbackInfo& info) +MethodStart Client::setOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); - unsigned blrLength = (unsigned) info[2].ToNumber(); - std::shared_ptr> blrPersistent; - auto* blr = getAddress(info.Env(), async, info[3], blrPersistent); - unsigned inMsgLength = (unsigned) info[4].ToNumber(); - std::shared_ptr> inMsgPersistent; - auto* inMsg = getAddress(info.Env(), async, info[5], inMsgPersistent); - unsigned outMsgLength = (unsigned) info[6].ToNumber(); - std::shared_ptr> outMsgPersistent; - auto* outMsg = getAddress(info.Env(), async, info[7], outMsgPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); - return [obj, status, transaction, blrLength, blr, blrPersistent, inMsgLength, inMsg, inMsgPersistent, outMsgLength, outMsg, outMsgPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->transactRequest(&statusWrapper, (transaction ? transaction->interface : nullptr), blrLength, blr, inMsgLength, inMsg, outMsgLength, outMsg); + return [obj, r]() { + obj->interface->setOwner((r ? r->interface : nullptr)); return nullptr; }; } -Napi::Value Attachment::transactRequestFinish(const Napi::Env env, void* ret) +Napi::Value Client::setOwnerFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Attachment::createBlobStart(bool async, const Napi::CallbackInfo& info) +MethodStart Client::getOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); - std::shared_ptr> idPersistent; - auto* id = (ISC_QUAD*) getAddress(info.Env(), async, info[2], idPersistent); - unsigned bpbLength = (unsigned) info[3].ToNumber(); - std::shared_ptr> bpbPersistent; - auto* bpb = getAddress(info.Env(), async, info[4], bpbPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, transaction, id, idPersistent, bpbLength, bpb, bpbPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->createBlob(&statusWrapper, (transaction ? transaction->interface : nullptr), id, bpbLength, bpb); + return [obj]() { + return obj->interface->getOwner(); }; } -Napi::Value Attachment::createBlobFinish(const Napi::Env env, fb::IBlob* ret) +Napi::Value Client::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) { - return Blob::NewInstance(env, ret); + return ReferenceCounted::NewInstance(env, ret); } -MethodStart Attachment::openBlobStart(bool async, const Napi::CallbackInfo& info) +MethodStart Client::authenticateStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); - std::shared_ptr> idPersistent; - auto* id = (ISC_QUAD*) getAddress(info.Env(), async, info[2], idPersistent); - unsigned bpbLength = (unsigned) info[3].ToNumber(); - std::shared_ptr> bpbPersistent; - auto* bpb = getAddress(info.Env(), async, info[4], bpbPersistent); + auto* cBlock = ClientBlock::CheckedUnwrap(info.Env(), info[1], "cBlock argument", true); - return [obj, status, transaction, id, idPersistent, bpbLength, bpb, bpbPersistent]() { + return [obj, status, cBlock]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->openBlob(&statusWrapper, (transaction ? transaction->interface : nullptr), id, bpbLength, bpb); + return obj->interface->authenticate(&statusWrapper, (cBlock ? cBlock->interface : nullptr)); }; } -Napi::Value Attachment::openBlobFinish(const Napi::Env env, fb::IBlob* ret) +Napi::Value Client::authenticateFinish(const Napi::Env env, int ret) { - return Blob::NewInstance(env, ret); + return Napi::Value::From(env, ret); } -MethodStart Attachment::executeDynStart(bool async, const Napi::CallbackInfo& info) +void UserField::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); - unsigned length = (unsigned) info[2].ToNumber(); - std::shared_ptr> dynPersistent; - auto* dyn = getAddress(info.Env(), async, info[3], dynPersistent); + properties.push_back(InstanceMethod("enteredSync", &UserField::enteredSync)); + properties.push_back(InstanceMethod("enteredAsync", &UserField::enteredAsync)); + properties.push_back(InstanceMethod("specifiedSync", &UserField::specifiedSync)); + properties.push_back(InstanceMethod("specifiedAsync", &UserField::specifiedAsync)); + properties.push_back(InstanceMethod("setEnteredSync", &UserField::setEnteredSync)); + properties.push_back(InstanceMethod("setEnteredAsync", &UserField::setEnteredAsync)); +} - return [obj, status, transaction, length, dyn, dynPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->executeDyn(&statusWrapper, (transaction ? transaction->interface : nullptr), length, dyn); - return nullptr; +MethodStart UserField::enteredStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->entered(); }; } -Napi::Value Attachment::executeDynFinish(const Napi::Env env, void* ret) +Napi::Value UserField::enteredFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart Attachment::prepareStart(bool async, const Napi::CallbackInfo& info) +MethodStart UserField::specifiedStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* tra = Transaction::CheckedUnwrap(info.Env(), info[1], "tra argument", true); - unsigned stmtLength = (unsigned) info[2].ToNumber(); - std::string sqlStmt = info[3].ToString().Utf8Value(); - unsigned dialect = (unsigned) info[4].ToNumber(); - unsigned flags = (unsigned) info[5].ToNumber(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, tra, stmtLength, sqlStmt, dialect, flags]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->prepare(&statusWrapper, (tra ? tra->interface : nullptr), stmtLength, sqlStmt.c_str(), dialect, flags); + return [obj]() { + return obj->interface->specified(); }; } -Napi::Value Attachment::prepareFinish(const Napi::Env env, fb::IStatement* ret) +Napi::Value UserField::specifiedFinish(const Napi::Env env, int ret) { - return Statement::NewInstance(env, ret); + return Napi::Value::From(env, ret); } -MethodStart Attachment::executeStart(bool async, const Napi::CallbackInfo& info) +MethodStart UserField::setEnteredStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); - unsigned stmtLength = (unsigned) info[2].ToNumber(); - std::string sqlStmt = info[3].ToString().Utf8Value(); - unsigned dialect = (unsigned) info[4].ToNumber(); - auto* inMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[5], "inMetadata argument", true); - std::shared_ptr> inBufferPersistent; - auto* inBuffer = getAddress(info.Env(), async, info[6], inBufferPersistent); - auto* outMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[7], "outMetadata argument", true); - std::shared_ptr> outBufferPersistent; - auto* outBuffer = getAddress(info.Env(), async, info[8], outBufferPersistent); + int newValue = (int) info[1].ToNumber(); - return [obj, status, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, inBufferPersistent, outMetadata, outBuffer, outBufferPersistent]() { + return [obj, status, newValue]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->execute(&statusWrapper, (transaction ? transaction->interface : nullptr), stmtLength, sqlStmt.c_str(), dialect, (inMetadata ? inMetadata->interface : nullptr), inBuffer, (outMetadata ? outMetadata->interface : nullptr), outBuffer); + obj->interface->setEntered(&statusWrapper, newValue); + return nullptr; }; } -Napi::Value Attachment::executeFinish(const Napi::Env env, fb::ITransaction* ret) +Napi::Value UserField::setEnteredFinish(const Napi::Env env, void* ret) { - return Transaction::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Attachment::openCursorStart(bool async, const Napi::CallbackInfo& info) +void CharUserField::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); - unsigned stmtLength = (unsigned) info[2].ToNumber(); - std::string sqlStmt = info[3].ToString().Utf8Value(); - unsigned dialect = (unsigned) info[4].ToNumber(); - auto* inMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[5], "inMetadata argument", true); - std::shared_ptr> inBufferPersistent; - auto* inBuffer = getAddress(info.Env(), async, info[6], inBufferPersistent); - auto* outMetadata = MessageMetadata::CheckedUnwrap(info.Env(), info[7], "outMetadata argument", true); - std::string cursorName = info[8].ToString().Utf8Value(); - unsigned cursorFlags = (unsigned) info[9].ToNumber(); + properties.push_back(InstanceMethod("enteredSync", &CharUserField::enteredSync)); + properties.push_back(InstanceMethod("enteredAsync", &CharUserField::enteredAsync)); + properties.push_back(InstanceMethod("specifiedSync", &CharUserField::specifiedSync)); + properties.push_back(InstanceMethod("specifiedAsync", &CharUserField::specifiedAsync)); + properties.push_back(InstanceMethod("setEnteredSync", &CharUserField::setEnteredSync)); + properties.push_back(InstanceMethod("setEnteredAsync", &CharUserField::setEnteredAsync)); + properties.push_back(InstanceMethod("getSync", &CharUserField::getSync)); + properties.push_back(InstanceMethod("getAsync", &CharUserField::getAsync)); + properties.push_back(InstanceMethod("setSync", &CharUserField::setSync)); + properties.push_back(InstanceMethod("setAsync", &CharUserField::setAsync)); +} - return [obj, status, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, inBufferPersistent, outMetadata, cursorName, cursorFlags]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->openCursor(&statusWrapper, (transaction ? transaction->interface : nullptr), stmtLength, sqlStmt.c_str(), dialect, (inMetadata ? inMetadata->interface : nullptr), inBuffer, (outMetadata ? outMetadata->interface : nullptr), cursorName.c_str(), cursorFlags); +MethodStart CharUserField::enteredStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->entered(); }; } -Napi::Value Attachment::openCursorFinish(const Napi::Env env, fb::IResultSet* ret) +Napi::Value CharUserField::enteredFinish(const Napi::Env env, int ret) { - return ResultSet::NewInstance(env, ret); + return Napi::Value::From(env, ret); } -MethodStart Attachment::queEventsStart(bool async, const Napi::CallbackInfo& info) +MethodStart CharUserField::specifiedStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* callback = EventCallback::CheckedUnwrap(info.Env(), info[1], "callback argument", true); - unsigned length = (unsigned) info[2].ToNumber(); - std::shared_ptr> eventsPersistent; - auto* events = getAddress(info.Env(), async, info[3], eventsPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, callback, length, events, eventsPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->queEvents(&statusWrapper, (callback ? callback->interface : nullptr), length, events); + return [obj]() { + return obj->interface->specified(); }; } -Napi::Value Attachment::queEventsFinish(const Napi::Env env, fb::IEvents* ret) +Napi::Value CharUserField::specifiedFinish(const Napi::Env env, int ret) { - return Events::NewInstance(env, ret); + return Napi::Value::From(env, ret); } -MethodStart Attachment::cancelOperationStart(bool async, const Napi::CallbackInfo& info) +MethodStart CharUserField::setEnteredStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - int option = (int) info[1].ToNumber(); + int newValue = (int) info[1].ToNumber(); - return [obj, status, option]() { + return [obj, status, newValue]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->cancelOperation(&statusWrapper, option); + obj->interface->setEntered(&statusWrapper, newValue); return nullptr; }; } -Napi::Value Attachment::cancelOperationFinish(const Napi::Env env, void* ret) +Napi::Value CharUserField::setEnteredFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Attachment::pingStart(bool async, const Napi::CallbackInfo& info) +MethodStart CharUserField::getStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->ping(&statusWrapper); - return nullptr; + return [obj]() { + return obj->interface->get(); }; } -Napi::Value Attachment::pingFinish(const Napi::Env env, void* ret) +Napi::Value CharUserField::getFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart Attachment::detachStart(bool async, const Napi::CallbackInfo& info) +MethodStart CharUserField::setStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string newValue = info[1].ToString().Utf8Value(); - return [obj, status]() { + return [obj, status, newValue]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->detach(&statusWrapper); + obj->interface->set(&statusWrapper, newValue.c_str()); return nullptr; }; } -Napi::Value Attachment::detachFinish(const Napi::Env env, void* ret) +Napi::Value CharUserField::setFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Attachment::dropDatabaseStart(bool async, const Napi::CallbackInfo& info) +void IntUserField::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + properties.push_back(InstanceMethod("enteredSync", &IntUserField::enteredSync)); + properties.push_back(InstanceMethod("enteredAsync", &IntUserField::enteredAsync)); + properties.push_back(InstanceMethod("specifiedSync", &IntUserField::specifiedSync)); + properties.push_back(InstanceMethod("specifiedAsync", &IntUserField::specifiedAsync)); + properties.push_back(InstanceMethod("setEnteredSync", &IntUserField::setEnteredSync)); + properties.push_back(InstanceMethod("setEnteredAsync", &IntUserField::setEnteredAsync)); + properties.push_back(InstanceMethod("getSync", &IntUserField::getSync)); + properties.push_back(InstanceMethod("getAsync", &IntUserField::getAsync)); + properties.push_back(InstanceMethod("setSync", &IntUserField::setSync)); + properties.push_back(InstanceMethod("setAsync", &IntUserField::setAsync)); +} - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->dropDatabase(&statusWrapper); - return nullptr; +MethodStart IntUserField::enteredStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->entered(); }; } -Napi::Value Attachment::dropDatabaseFinish(const Napi::Env env, void* ret) +Napi::Value IntUserField::enteredFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -void Service::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart IntUserField::specifiedStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("addRefSync", &Service::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &Service::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &Service::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &Service::releaseAsync)); - properties.push_back(InstanceMethod("detachSync", &Service::detachSync)); - properties.push_back(InstanceMethod("detachAsync", &Service::detachAsync)); - properties.push_back(InstanceMethod("querySync", &Service::querySync)); - properties.push_back(InstanceMethod("queryAsync", &Service::queryAsync)); - properties.push_back(InstanceMethod("startSync", &Service::startSync)); - properties.push_back(InstanceMethod("startAsync", &Service::startAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->specified(); + }; } -MethodStart Service::addRefStart(bool async, const Napi::CallbackInfo& info) +Napi::Value IntUserField::specifiedFinish(const Napi::Env env, int ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + return Napi::Value::From(env, ret); +} - return [obj]() { - obj->interface->addRef(); +MethodStart IntUserField::setEnteredStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + int newValue = (int) info[1].ToNumber(); + + return [obj, status, newValue]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setEntered(&statusWrapper, newValue); return nullptr; }; } -Napi::Value Service::addRefFinish(const Napi::Env env, void* ret) +Napi::Value IntUserField::setEnteredFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Service::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart IntUserField::getStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->release(); + return obj->interface->get(); }; } -Napi::Value Service::releaseFinish(const Napi::Env env, int ret) +Napi::Value IntUserField::getFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart Service::detachStart(bool async, const Napi::CallbackInfo& info) +MethodStart IntUserField::setStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + int newValue = (int) info[1].ToNumber(); - return [obj, status]() { + return [obj, status, newValue]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->detach(&statusWrapper); + obj->interface->set(&statusWrapper, newValue); return nullptr; }; } -Napi::Value Service::detachFinish(const Napi::Env env, void* ret) +Napi::Value IntUserField::setFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Service::queryStart(bool async, const Napi::CallbackInfo& info) +void User::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned sendLength = (unsigned) info[1].ToNumber(); - std::shared_ptr> sendItemsPersistent; - auto* sendItems = getAddress(info.Env(), async, info[2], sendItemsPersistent); - unsigned receiveLength = (unsigned) info[3].ToNumber(); - std::shared_ptr> receiveItemsPersistent; - auto* receiveItems = getAddress(info.Env(), async, info[4], receiveItemsPersistent); - unsigned bufferLength = (unsigned) info[5].ToNumber(); - std::shared_ptr> bufferPersistent; - auto* buffer = getAddress(info.Env(), async, info[6], bufferPersistent); + properties.push_back(InstanceMethod("operationSync", &User::operationSync)); + properties.push_back(InstanceMethod("operationAsync", &User::operationAsync)); + properties.push_back(InstanceMethod("userNameSync", &User::userNameSync)); + properties.push_back(InstanceMethod("userNameAsync", &User::userNameAsync)); + properties.push_back(InstanceMethod("passwordSync", &User::passwordSync)); + properties.push_back(InstanceMethod("passwordAsync", &User::passwordAsync)); + properties.push_back(InstanceMethod("firstNameSync", &User::firstNameSync)); + properties.push_back(InstanceMethod("firstNameAsync", &User::firstNameAsync)); + properties.push_back(InstanceMethod("lastNameSync", &User::lastNameSync)); + properties.push_back(InstanceMethod("lastNameAsync", &User::lastNameAsync)); + properties.push_back(InstanceMethod("middleNameSync", &User::middleNameSync)); + properties.push_back(InstanceMethod("middleNameAsync", &User::middleNameAsync)); + properties.push_back(InstanceMethod("commentSync", &User::commentSync)); + properties.push_back(InstanceMethod("commentAsync", &User::commentAsync)); + properties.push_back(InstanceMethod("attributesSync", &User::attributesSync)); + properties.push_back(InstanceMethod("attributesAsync", &User::attributesAsync)); + properties.push_back(InstanceMethod("activeSync", &User::activeSync)); + properties.push_back(InstanceMethod("activeAsync", &User::activeAsync)); + properties.push_back(InstanceMethod("adminSync", &User::adminSync)); + properties.push_back(InstanceMethod("adminAsync", &User::adminAsync)); + properties.push_back(InstanceMethod("clearSync", &User::clearSync)); + properties.push_back(InstanceMethod("clearAsync", &User::clearAsync)); +} - return [obj, status, sendLength, sendItems, sendItemsPersistent, receiveLength, receiveItems, receiveItemsPersistent, bufferLength, buffer, bufferPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->query(&statusWrapper, sendLength, sendItems, receiveLength, receiveItems, bufferLength, buffer); - return nullptr; +MethodStart User::operationStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->operation(); }; } -Napi::Value Service::queryFinish(const Napi::Env env, void* ret) +Napi::Value User::operationFinish(const Napi::Env env, unsigned ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart Service::startStart(bool async, const Napi::CallbackInfo& info) +MethodStart User::userNameStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned spbLength = (unsigned) info[1].ToNumber(); - std::shared_ptr> spbPersistent; - auto* spb = getAddress(info.Env(), async, info[2], spbPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, spbLength, spb, spbPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->start(&statusWrapper, spbLength, spb); - return nullptr; + return [obj]() { + return obj->interface->userName(); }; } -Napi::Value Service::startFinish(const Napi::Env env, void* ret) +Napi::Value User::userNameFinish(const Napi::Env env, fb::ICharUserField* ret) { - return env.Undefined(); + return CharUserField::NewInstance(env, ret); } -void Provider::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart User::passwordStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("addRefSync", &Provider::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &Provider::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &Provider::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &Provider::releaseAsync)); - properties.push_back(InstanceMethod("setOwnerSync", &Provider::setOwnerSync)); - properties.push_back(InstanceMethod("setOwnerAsync", &Provider::setOwnerAsync)); - properties.push_back(InstanceMethod("getOwnerSync", &Provider::getOwnerSync)); - properties.push_back(InstanceMethod("getOwnerAsync", &Provider::getOwnerAsync)); - properties.push_back(InstanceMethod("attachDatabaseSync", &Provider::attachDatabaseSync)); - properties.push_back(InstanceMethod("attachDatabaseAsync", &Provider::attachDatabaseAsync)); - properties.push_back(InstanceMethod("createDatabaseSync", &Provider::createDatabaseSync)); - properties.push_back(InstanceMethod("createDatabaseAsync", &Provider::createDatabaseAsync)); - properties.push_back(InstanceMethod("attachServiceManagerSync", &Provider::attachServiceManagerSync)); - properties.push_back(InstanceMethod("attachServiceManagerAsync", &Provider::attachServiceManagerAsync)); - properties.push_back(InstanceMethod("shutdownSync", &Provider::shutdownSync)); - properties.push_back(InstanceMethod("shutdownAsync", &Provider::shutdownAsync)); - properties.push_back(InstanceMethod("setDbCryptCallbackSync", &Provider::setDbCryptCallbackSync)); - properties.push_back(InstanceMethod("setDbCryptCallbackAsync", &Provider::setDbCryptCallbackAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->password(); + }; } -MethodStart Provider::addRefStart(bool async, const Napi::CallbackInfo& info) +Napi::Value User::passwordFinish(const Napi::Env env, fb::ICharUserField* ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + return CharUserField::NewInstance(env, ret); +} + +MethodStart User::firstNameStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - obj->interface->addRef(); - return nullptr; + return obj->interface->firstName(); }; } -Napi::Value Provider::addRefFinish(const Napi::Env env, void* ret) +Napi::Value User::firstNameFinish(const Napi::Env env, fb::ICharUserField* ret) { - return env.Undefined(); + return CharUserField::NewInstance(env, ret); } -MethodStart Provider::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart User::lastNameStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->release(); + return obj->interface->lastName(); }; } -Napi::Value Provider::releaseFinish(const Napi::Env env, int ret) +Napi::Value User::lastNameFinish(const Napi::Env env, fb::ICharUserField* ret) { - return Napi::Value::From(env, ret); + return CharUserField::NewInstance(env, ret); } -MethodStart Provider::setOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart User::middleNameStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, r]() { - obj->interface->setOwner((r ? r->interface : nullptr)); - return nullptr; + return [obj]() { + return obj->interface->middleName(); }; } -Napi::Value Provider::setOwnerFinish(const Napi::Env env, void* ret) +Napi::Value User::middleNameFinish(const Napi::Env env, fb::ICharUserField* ret) { - return env.Undefined(); + return CharUserField::NewInstance(env, ret); } -MethodStart Provider::getOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart User::commentStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getOwner(); + return obj->interface->comment(); }; } -Napi::Value Provider::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) +Napi::Value User::commentFinish(const Napi::Env env, fb::ICharUserField* ret) { - return ReferenceCounted::NewInstance(env, ret); + return CharUserField::NewInstance(env, ret); } -MethodStart Provider::attachDatabaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart User::attributesStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string fileName = info[1].ToString().Utf8Value(); - unsigned dpbLength = (unsigned) info[2].ToNumber(); - std::shared_ptr> dpbPersistent; - auto* dpb = getAddress(info.Env(), async, info[3], dpbPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, fileName, dpbLength, dpb, dpbPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->attachDatabase(&statusWrapper, fileName.c_str(), dpbLength, dpb); + return [obj]() { + return obj->interface->attributes(); }; } -Napi::Value Provider::attachDatabaseFinish(const Napi::Env env, fb::IAttachment* ret) +Napi::Value User::attributesFinish(const Napi::Env env, fb::ICharUserField* ret) { - return Attachment::NewInstance(env, ret); + return CharUserField::NewInstance(env, ret); } -MethodStart Provider::createDatabaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart User::activeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string fileName = info[1].ToString().Utf8Value(); - unsigned dpbLength = (unsigned) info[2].ToNumber(); - std::shared_ptr> dpbPersistent; - auto* dpb = getAddress(info.Env(), async, info[3], dpbPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, fileName, dpbLength, dpb, dpbPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->createDatabase(&statusWrapper, fileName.c_str(), dpbLength, dpb); + return [obj]() { + return obj->interface->active(); }; } -Napi::Value Provider::createDatabaseFinish(const Napi::Env env, fb::IAttachment* ret) +Napi::Value User::activeFinish(const Napi::Env env, fb::IIntUserField* ret) { - return Attachment::NewInstance(env, ret); + return IntUserField::NewInstance(env, ret); } -MethodStart Provider::attachServiceManagerStart(bool async, const Napi::CallbackInfo& info) +MethodStart User::adminStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string service = info[1].ToString().Utf8Value(); - unsigned spbLength = (unsigned) info[2].ToNumber(); - std::shared_ptr> spbPersistent; - auto* spb = getAddress(info.Env(), async, info[3], spbPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, service, spbLength, spb, spbPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->attachServiceManager(&statusWrapper, service.c_str(), spbLength, spb); + return [obj]() { + return obj->interface->admin(); }; } -Napi::Value Provider::attachServiceManagerFinish(const Napi::Env env, fb::IService* ret) +Napi::Value User::adminFinish(const Napi::Env env, fb::IIntUserField* ret) { - return Service::NewInstance(env, ret); + return IntUserField::NewInstance(env, ret); } -MethodStart Provider::shutdownStart(bool async, const Napi::CallbackInfo& info) +MethodStart User::clearStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned timeout = (unsigned) info[1].ToNumber(); - int reason = (int) info[2].ToNumber(); - return [obj, status, timeout, reason]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->shutdown(&statusWrapper, timeout, reason); + obj->interface->clear(&statusWrapper); return nullptr; }; } -Napi::Value Provider::shutdownFinish(const Napi::Env env, void* ret) +Napi::Value User::clearFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Provider::setDbCryptCallbackStart(bool async, const Napi::CallbackInfo& info) +void ListUsers::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("listSync", &ListUsers::listSync)); + properties.push_back(InstanceMethod("listAsync", &ListUsers::listAsync)); +} + +MethodStart ListUsers::listStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* cryptCallback = CryptKeyCallback::CheckedUnwrap(info.Env(), info[1], "cryptCallback argument", true); + auto* user = User::CheckedUnwrap(info.Env(), info[1], "user argument", true); - return [obj, status, cryptCallback]() { + return [obj, status, user]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setDbCryptCallback(&statusWrapper, (cryptCallback ? cryptCallback->interface : nullptr)); + obj->interface->list(&statusWrapper, (user ? user->interface : nullptr)); return nullptr; }; } -Napi::Value Provider::setDbCryptCallbackFinish(const Napi::Env env, void* ret) +Napi::Value ListUsers::listFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -void DtcStart::InitPrototype(std::vector::PropertyDescriptor>& properties) +void LogonInfo::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("disposeSync", &DtcStart::disposeSync)); - properties.push_back(InstanceMethod("disposeAsync", &DtcStart::disposeAsync)); - properties.push_back(InstanceMethod("addAttachmentSync", &DtcStart::addAttachmentSync)); - properties.push_back(InstanceMethod("addAttachmentAsync", &DtcStart::addAttachmentAsync)); - properties.push_back(InstanceMethod("addWithTpbSync", &DtcStart::addWithTpbSync)); - properties.push_back(InstanceMethod("addWithTpbAsync", &DtcStart::addWithTpbAsync)); - properties.push_back(InstanceMethod("startSync", &DtcStart::startSync)); - properties.push_back(InstanceMethod("startAsync", &DtcStart::startAsync)); + properties.push_back(InstanceMethod("nameSync", &LogonInfo::nameSync)); + properties.push_back(InstanceMethod("nameAsync", &LogonInfo::nameAsync)); + properties.push_back(InstanceMethod("roleSync", &LogonInfo::roleSync)); + properties.push_back(InstanceMethod("roleAsync", &LogonInfo::roleAsync)); + properties.push_back(InstanceMethod("networkProtocolSync", &LogonInfo::networkProtocolSync)); + properties.push_back(InstanceMethod("networkProtocolAsync", &LogonInfo::networkProtocolAsync)); + properties.push_back(InstanceMethod("remoteAddressSync", &LogonInfo::remoteAddressSync)); + properties.push_back(InstanceMethod("remoteAddressAsync", &LogonInfo::remoteAddressAsync)); + properties.push_back(InstanceMethod("authBlockSync", &LogonInfo::authBlockSync)); + properties.push_back(InstanceMethod("authBlockAsync", &LogonInfo::authBlockAsync)); + properties.push_back(InstanceMethod("attachmentSync", &LogonInfo::attachmentSync)); + properties.push_back(InstanceMethod("attachmentAsync", &LogonInfo::attachmentAsync)); + properties.push_back(InstanceMethod("transactionSync", &LogonInfo::transactionSync)); + properties.push_back(InstanceMethod("transactionAsync", &LogonInfo::transactionAsync)); } -MethodStart DtcStart::disposeStart(bool async, const Napi::CallbackInfo& info) +MethodStart LogonInfo::nameStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - obj->interface->dispose(); - return nullptr; + return obj->interface->name(); }; } -Napi::Value DtcStart::disposeFinish(const Napi::Env env, void* ret) +Napi::Value LogonInfo::nameFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart DtcStart::addAttachmentStart(bool async, const Napi::CallbackInfo& info) +MethodStart LogonInfo::roleStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* att = Attachment::CheckedUnwrap(info.Env(), info[1], "att argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, att]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->addAttachment(&statusWrapper, (att ? att->interface : nullptr)); - return nullptr; + return [obj]() { + return obj->interface->role(); }; } -Napi::Value DtcStart::addAttachmentFinish(const Napi::Env env, void* ret) +Napi::Value LogonInfo::roleFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart DtcStart::addWithTpbStart(bool async, const Napi::CallbackInfo& info) +MethodStart LogonInfo::networkProtocolStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* att = Attachment::CheckedUnwrap(info.Env(), info[1], "att argument", true); - unsigned length = (unsigned) info[2].ToNumber(); - std::shared_ptr> tpbPersistent; - auto* tpb = getAddress(info.Env(), async, info[3], tpbPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, att, length, tpb, tpbPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->addWithTpb(&statusWrapper, (att ? att->interface : nullptr), length, tpb); - return nullptr; + return [obj]() { + return obj->interface->networkProtocol(); }; } -Napi::Value DtcStart::addWithTpbFinish(const Napi::Env env, void* ret) +Napi::Value LogonInfo::networkProtocolFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart DtcStart::startStart(bool async, const Napi::CallbackInfo& info) +MethodStart LogonInfo::remoteAddressStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->start(&statusWrapper); + return [obj]() { + return obj->interface->remoteAddress(); }; } -Napi::Value DtcStart::startFinish(const Napi::Env env, fb::ITransaction* ret) +Napi::Value LogonInfo::remoteAddressFinish(const Napi::Env env, OptString ret) { - return Transaction::NewInstance(env, ret); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -void Dtc::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart LogonInfo::authBlockStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("joinSync", &Dtc::joinSync)); - properties.push_back(InstanceMethod("joinAsync", &Dtc::joinAsync)); - properties.push_back(InstanceMethod("startBuilderSync", &Dtc::startBuilderSync)); - properties.push_back(InstanceMethod("startBuilderAsync", &Dtc::startBuilderAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + std::shared_ptr> lengthPersistent; + auto* length = getAddress(info.Env(), async, info[0], lengthPersistent); + + return [obj, length, lengthPersistent]() { + return obj->interface->authBlock(length); + }; } -MethodStart Dtc::joinStart(bool async, const Napi::CallbackInfo& info) +Napi::Value LogonInfo::authBlockFinish(const Napi::Env env, const unsigned char* ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + return Pointer::NewInstance(env, ret); +} + +MethodStart LogonInfo::attachmentStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* one = Transaction::CheckedUnwrap(info.Env(), info[1], "one argument", true); - auto* two = Transaction::CheckedUnwrap(info.Env(), info[2], "two argument", true); - return [obj, status, one, two]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->join(&statusWrapper, (one ? one->interface : nullptr), (two ? two->interface : nullptr)); + return obj->interface->attachment(&statusWrapper); }; } -Napi::Value Dtc::joinFinish(const Napi::Env env, fb::ITransaction* ret) +Napi::Value LogonInfo::attachmentFinish(const Napi::Env env, fb::IAttachment* ret) { - return Transaction::NewInstance(env, ret); + return Attachment::NewInstance(env, ret); } -MethodStart Dtc::startBuilderStart(bool async, const Napi::CallbackInfo& info) +MethodStart LogonInfo::transactionStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->startBuilder(&statusWrapper); + return obj->interface->transaction(&statusWrapper); }; } -Napi::Value Dtc::startBuilderFinish(const Napi::Env env, fb::IDtcStart* ret) +Napi::Value LogonInfo::transactionFinish(const Napi::Env env, fb::ITransaction* ret) { - return DtcStart::NewInstance(env, ret); + return Transaction::NewInstance(env, ret); } -void Auth::InitPrototype(std::vector::PropertyDescriptor>& properties) +void Management::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("addRefSync", &Auth::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &Auth::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &Auth::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &Auth::releaseAsync)); - properties.push_back(InstanceMethod("setOwnerSync", &Auth::setOwnerSync)); - properties.push_back(InstanceMethod("setOwnerAsync", &Auth::setOwnerAsync)); - properties.push_back(InstanceMethod("getOwnerSync", &Auth::getOwnerSync)); - properties.push_back(InstanceMethod("getOwnerAsync", &Auth::getOwnerAsync)); + properties.push_back(InstanceMethod("addRefSync", &Management::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Management::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Management::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Management::releaseAsync)); + properties.push_back(InstanceMethod("setOwnerSync", &Management::setOwnerSync)); + properties.push_back(InstanceMethod("setOwnerAsync", &Management::setOwnerAsync)); + properties.push_back(InstanceMethod("getOwnerSync", &Management::getOwnerSync)); + properties.push_back(InstanceMethod("getOwnerAsync", &Management::getOwnerAsync)); + properties.push_back(InstanceMethod("startSync", &Management::startSync)); + properties.push_back(InstanceMethod("startAsync", &Management::startAsync)); + properties.push_back(InstanceMethod("executeSync", &Management::executeSync)); + properties.push_back(InstanceMethod("executeAsync", &Management::executeAsync)); + properties.push_back(InstanceMethod("commitSync", &Management::commitSync)); + properties.push_back(InstanceMethod("commitAsync", &Management::commitAsync)); + properties.push_back(InstanceMethod("rollbackSync", &Management::rollbackSync)); + properties.push_back(InstanceMethod("rollbackAsync", &Management::rollbackAsync)); } -MethodStart Auth::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart Management::addRefStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { obj->interface->addRef(); @@ -13905,28 +19571,28 @@ MethodStart Auth::addRefStart(bool async, const Napi::CallbackInfo& info) }; } -Napi::Value Auth::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Management::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Auth::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Management::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { return obj->interface->release(); }; } -Napi::Value Auth::releaseFinish(const Napi::Env env, int ret) +Napi::Value Management::releaseFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart Auth::setOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart Management::setOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); return [obj, r]() { @@ -13935,205 +19601,242 @@ MethodStart Auth::setOwnerStart(bool async, const Napi::CallbackInfo& inf }; } -Napi::Value Auth::setOwnerFinish(const Napi::Env env, void* ret) +Napi::Value Management::setOwnerFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Auth::getOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart Management::getOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { return obj->interface->getOwner(); }; } -Napi::Value Auth::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) +Napi::Value Management::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) { return ReferenceCounted::NewInstance(env, ret); } -void Writer::InitPrototype(std::vector::PropertyDescriptor>& properties) -{ - properties.push_back(InstanceMethod("resetSync", &Writer::resetSync)); - properties.push_back(InstanceMethod("resetAsync", &Writer::resetAsync)); - properties.push_back(InstanceMethod("addSync", &Writer::addSync)); - properties.push_back(InstanceMethod("addAsync", &Writer::addAsync)); - properties.push_back(InstanceMethod("setTypeSync", &Writer::setTypeSync)); - properties.push_back(InstanceMethod("setTypeAsync", &Writer::setTypeAsync)); - properties.push_back(InstanceMethod("setDbSync", &Writer::setDbSync)); - properties.push_back(InstanceMethod("setDbAsync", &Writer::setDbAsync)); -} - -MethodStart Writer::resetStart(bool async, const Napi::CallbackInfo& info) +MethodStart Management::startStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* logonInfo = LogonInfo::CheckedUnwrap(info.Env(), info[1], "logonInfo argument", true); - return [obj]() { - obj->interface->reset(); + return [obj, status, logonInfo]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->start(&statusWrapper, (logonInfo ? logonInfo->interface : nullptr)); return nullptr; }; } -Napi::Value Writer::resetFinish(const Napi::Env env, void* ret) +Napi::Value Management::startFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Writer::addStart(bool async, const Napi::CallbackInfo& info) +MethodStart Management::executeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string name = info[1].ToString().Utf8Value(); + auto* user = User::CheckedUnwrap(info.Env(), info[1], "user argument", true); + auto* callback = ListUsers::CheckedUnwrap(info.Env(), info[2], "callback argument", true); - return [obj, status, name]() { + return [obj, status, user, callback]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->add(&statusWrapper, name.c_str()); - return nullptr; + return obj->interface->execute(&statusWrapper, (user ? user->interface : nullptr), (callback ? callback->interface : nullptr)); }; } -Napi::Value Writer::addFinish(const Napi::Env env, void* ret) +Napi::Value Management::executeFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart Writer::setTypeStart(bool async, const Napi::CallbackInfo& info) +MethodStart Management::commitStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string value = info[1].ToString().Utf8Value(); - return [obj, status, value]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setType(&statusWrapper, value.c_str()); + obj->interface->commit(&statusWrapper); return nullptr; }; } -Napi::Value Writer::setTypeFinish(const Napi::Env env, void* ret) +Napi::Value Management::commitFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Writer::setDbStart(bool async, const Napi::CallbackInfo& info) +MethodStart Management::rollbackStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string value = info[1].ToString().Utf8Value(); - return [obj, status, value]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setDb(&statusWrapper, value.c_str()); + obj->interface->rollback(&statusWrapper); return nullptr; }; } -Napi::Value Writer::setDbFinish(const Napi::Env env, void* ret) +Napi::Value Management::rollbackFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -void ServerBlock::InitPrototype(std::vector::PropertyDescriptor>& properties) +void AuthBlock::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("getLoginSync", &ServerBlock::getLoginSync)); - properties.push_back(InstanceMethod("getLoginAsync", &ServerBlock::getLoginAsync)); - properties.push_back(InstanceMethod("getDataSync", &ServerBlock::getDataSync)); - properties.push_back(InstanceMethod("getDataAsync", &ServerBlock::getDataAsync)); - properties.push_back(InstanceMethod("putDataSync", &ServerBlock::putDataSync)); - properties.push_back(InstanceMethod("putDataAsync", &ServerBlock::putDataAsync)); - properties.push_back(InstanceMethod("newKeySync", &ServerBlock::newKeySync)); - properties.push_back(InstanceMethod("newKeyAsync", &ServerBlock::newKeyAsync)); + properties.push_back(InstanceMethod("getTypeSync", &AuthBlock::getTypeSync)); + properties.push_back(InstanceMethod("getTypeAsync", &AuthBlock::getTypeAsync)); + properties.push_back(InstanceMethod("getNameSync", &AuthBlock::getNameSync)); + properties.push_back(InstanceMethod("getNameAsync", &AuthBlock::getNameAsync)); + properties.push_back(InstanceMethod("getPluginSync", &AuthBlock::getPluginSync)); + properties.push_back(InstanceMethod("getPluginAsync", &AuthBlock::getPluginAsync)); + properties.push_back(InstanceMethod("getSecurityDbSync", &AuthBlock::getSecurityDbSync)); + properties.push_back(InstanceMethod("getSecurityDbAsync", &AuthBlock::getSecurityDbAsync)); + properties.push_back(InstanceMethod("getOriginalPluginSync", &AuthBlock::getOriginalPluginSync)); + properties.push_back(InstanceMethod("getOriginalPluginAsync", &AuthBlock::getOriginalPluginAsync)); + properties.push_back(InstanceMethod("nextSync", &AuthBlock::nextSync)); + properties.push_back(InstanceMethod("nextAsync", &AuthBlock::nextAsync)); + properties.push_back(InstanceMethod("firstSync", &AuthBlock::firstSync)); + properties.push_back(InstanceMethod("firstAsync", &AuthBlock::firstAsync)); } -MethodStart ServerBlock::getLoginStart(bool async, const Napi::CallbackInfo& info) +MethodStart AuthBlock::getTypeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getLogin(); + return obj->interface->getType(); }; } -Napi::Value ServerBlock::getLoginFinish(const Napi::Env env, OptString ret) +Napi::Value AuthBlock::getTypeFinish(const Napi::Env env, OptString ret) { return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart ServerBlock::getDataStart(bool async, const Napi::CallbackInfo& info) +MethodStart AuthBlock::getNameStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - std::shared_ptr> lengthPersistent; - auto* length = getAddress(info.Env(), async, info[0], lengthPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, length, lengthPersistent]() { - return obj->interface->getData(length); + return [obj]() { + return obj->interface->getName(); }; } -Napi::Value ServerBlock::getDataFinish(const Napi::Env env, const unsigned char* ret) +Napi::Value AuthBlock::getNameFinish(const Napi::Env env, OptString ret) { - return Pointer::NewInstance(env, ret); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart ServerBlock::putDataStart(bool async, const Napi::CallbackInfo& info) +MethodStart AuthBlock::getPluginStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getPlugin(); + }; +} + +Napi::Value AuthBlock::getPluginFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart AuthBlock::getSecurityDbStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getSecurityDb(); + }; +} + +Napi::Value AuthBlock::getSecurityDbFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart AuthBlock::getOriginalPluginStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getOriginalPlugin(); + }; +} + +Napi::Value AuthBlock::getOriginalPluginFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart AuthBlock::nextStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned length = (unsigned) info[1].ToNumber(); - std::shared_ptr> dataPersistent; - auto* data = getAddress(info.Env(), async, info[2], dataPersistent); - return [obj, status, length, data, dataPersistent]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->putData(&statusWrapper, length, data); - return nullptr; + return obj->interface->next(&statusWrapper); }; } -Napi::Value ServerBlock::putDataFinish(const Napi::Env env, void* ret) +Napi::Value AuthBlock::nextFinish(const Napi::Env env, FB_BOOLEAN ret) { - return env.Undefined(); + return Napi::Value::From(env, (bool) ret); } -MethodStart ServerBlock::newKeyStart(bool async, const Napi::CallbackInfo& info) +MethodStart AuthBlock::firstStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->newKey(&statusWrapper); + return obj->interface->first(&statusWrapper); }; } -Napi::Value ServerBlock::newKeyFinish(const Napi::Env env, fb::ICryptKey* ret) +Napi::Value AuthBlock::firstFinish(const Napi::Env env, FB_BOOLEAN ret) { - return CryptKey::NewInstance(env, ret); + return Napi::Value::From(env, (bool) ret); } -void ClientBlock::InitPrototype(std::vector::PropertyDescriptor>& properties) +void WireCryptPlugin::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("addRefSync", &ClientBlock::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &ClientBlock::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &ClientBlock::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &ClientBlock::releaseAsync)); - properties.push_back(InstanceMethod("getLoginSync", &ClientBlock::getLoginSync)); - properties.push_back(InstanceMethod("getLoginAsync", &ClientBlock::getLoginAsync)); - properties.push_back(InstanceMethod("getPasswordSync", &ClientBlock::getPasswordSync)); - properties.push_back(InstanceMethod("getPasswordAsync", &ClientBlock::getPasswordAsync)); - properties.push_back(InstanceMethod("getDataSync", &ClientBlock::getDataSync)); - properties.push_back(InstanceMethod("getDataAsync", &ClientBlock::getDataAsync)); - properties.push_back(InstanceMethod("putDataSync", &ClientBlock::putDataSync)); - properties.push_back(InstanceMethod("putDataAsync", &ClientBlock::putDataAsync)); - properties.push_back(InstanceMethod("newKeySync", &ClientBlock::newKeySync)); - properties.push_back(InstanceMethod("newKeyAsync", &ClientBlock::newKeyAsync)); + properties.push_back(InstanceMethod("addRefSync", &WireCryptPlugin::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &WireCryptPlugin::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &WireCryptPlugin::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &WireCryptPlugin::releaseAsync)); + properties.push_back(InstanceMethod("setOwnerSync", &WireCryptPlugin::setOwnerSync)); + properties.push_back(InstanceMethod("setOwnerAsync", &WireCryptPlugin::setOwnerAsync)); + properties.push_back(InstanceMethod("getOwnerSync", &WireCryptPlugin::getOwnerSync)); + properties.push_back(InstanceMethod("getOwnerAsync", &WireCryptPlugin::getOwnerAsync)); + properties.push_back(InstanceMethod("getKnownTypesSync", &WireCryptPlugin::getKnownTypesSync)); + properties.push_back(InstanceMethod("getKnownTypesAsync", &WireCryptPlugin::getKnownTypesAsync)); + properties.push_back(InstanceMethod("setKeySync", &WireCryptPlugin::setKeySync)); + properties.push_back(InstanceMethod("setKeyAsync", &WireCryptPlugin::setKeyAsync)); + properties.push_back(InstanceMethod("encryptSync", &WireCryptPlugin::encryptSync)); + properties.push_back(InstanceMethod("encryptAsync", &WireCryptPlugin::encryptAsync)); + properties.push_back(InstanceMethod("decryptSync", &WireCryptPlugin::decryptSync)); + properties.push_back(InstanceMethod("decryptAsync", &WireCryptPlugin::decryptAsync)); + properties.push_back(InstanceMethod("getSpecificDataSync", &WireCryptPlugin::getSpecificDataSync)); + properties.push_back(InstanceMethod("getSpecificDataAsync", &WireCryptPlugin::getSpecificDataAsync)); + properties.push_back(InstanceMethod("setSpecificDataSync", &WireCryptPlugin::setSpecificDataSync)); + properties.push_back(InstanceMethod("setSpecificDataAsync", &WireCryptPlugin::setSpecificDataAsync)); } -MethodStart ClientBlock::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart WireCryptPlugin::addRefStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { obj->interface->addRef(); @@ -14141,213 +19844,297 @@ MethodStart ClientBlock::addRefStart(bool async, const Napi::CallbackInfo }; } -Napi::Value ClientBlock::addRefFinish(const Napi::Env env, void* ret) +Napi::Value WireCryptPlugin::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart ClientBlock::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart WireCryptPlugin::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { return obj->interface->release(); }; } -Napi::Value ClientBlock::releaseFinish(const Napi::Env env, int ret) +Napi::Value WireCryptPlugin::releaseFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart ClientBlock::getLoginStart(bool async, const Napi::CallbackInfo& info) +MethodStart WireCryptPlugin::setOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); + + return [obj, r]() { + obj->interface->setOwner((r ? r->interface : nullptr)); + return nullptr; + }; +} + +Napi::Value WireCryptPlugin::setOwnerFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart WireCryptPlugin::getOwnerStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getLogin(); + return obj->interface->getOwner(); }; } -Napi::Value ClientBlock::getLoginFinish(const Napi::Env env, OptString ret) +Napi::Value WireCryptPlugin::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) +{ + return ReferenceCounted::NewInstance(env, ret); +} + +MethodStart WireCryptPlugin::getKnownTypesStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getKnownTypes(&statusWrapper); + }; +} + +Napi::Value WireCryptPlugin::getKnownTypesFinish(const Napi::Env env, OptString ret) { return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart ClientBlock::getPasswordStart(bool async, const Napi::CallbackInfo& info) +MethodStart WireCryptPlugin::setKeyStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* key = CryptKey::CheckedUnwrap(info.Env(), info[1], "key argument", true); - return [obj]() { - return obj->interface->getPassword(); + return [obj, status, key]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setKey(&statusWrapper, (key ? key->interface : nullptr)); + return nullptr; + }; +} + +Napi::Value WireCryptPlugin::setKeyFinish(const Napi::Env env, void* ret) +{ + return env.Undefined(); +} + +MethodStart WireCryptPlugin::encryptStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned length = (unsigned) info[1].ToNumber(); + std::shared_ptr> fromPersistent; + auto* from = getAddress(info.Env(), async, info[2], fromPersistent); + std::shared_ptr> toPersistent; + auto* to = getAddress(info.Env(), async, info[3], toPersistent); + + return [obj, status, length, from, fromPersistent, to, toPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->encrypt(&statusWrapper, length, from, to); + return nullptr; }; } -Napi::Value ClientBlock::getPasswordFinish(const Napi::Env env, OptString ret) +Napi::Value WireCryptPlugin::encryptFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart ClientBlock::getDataStart(bool async, const Napi::CallbackInfo& info) +MethodStart WireCryptPlugin::decryptStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - std::shared_ptr> lengthPersistent; - auto* length = getAddress(info.Env(), async, info[0], lengthPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned length = (unsigned) info[1].ToNumber(); + std::shared_ptr> fromPersistent; + auto* from = getAddress(info.Env(), async, info[2], fromPersistent); + std::shared_ptr> toPersistent; + auto* to = getAddress(info.Env(), async, info[3], toPersistent); - return [obj, length, lengthPersistent]() { - return obj->interface->getData(length); + return [obj, status, length, from, fromPersistent, to, toPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->decrypt(&statusWrapper, length, from, to); + return nullptr; }; } -Napi::Value ClientBlock::getDataFinish(const Napi::Env env, const unsigned char* ret) +Napi::Value WireCryptPlugin::decryptFinish(const Napi::Env env, void* ret) { - return Pointer::NewInstance(env, ret); + return env.Undefined(); } -MethodStart ClientBlock::putDataStart(bool async, const Napi::CallbackInfo& info) +MethodStart WireCryptPlugin::getSpecificDataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned length = (unsigned) info[1].ToNumber(); - std::shared_ptr> dataPersistent; - auto* data = getAddress(info.Env(), async, info[2], dataPersistent); + std::string keyType = info[1].ToString().Utf8Value(); + std::shared_ptr> lengthPersistent; + auto* length = getAddress(info.Env(), async, info[2], lengthPersistent); - return [obj, status, length, data, dataPersistent]() { + return [obj, status, keyType, length, lengthPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->putData(&statusWrapper, length, data); - return nullptr; + return obj->interface->getSpecificData(&statusWrapper, keyType.c_str(), length); }; } -Napi::Value ClientBlock::putDataFinish(const Napi::Env env, void* ret) +Napi::Value WireCryptPlugin::getSpecificDataFinish(const Napi::Env env, const unsigned char* ret) { - return env.Undefined(); + return Pointer::NewInstance(env, ret); } -MethodStart ClientBlock::newKeyStart(bool async, const Napi::CallbackInfo& info) +MethodStart WireCryptPlugin::setSpecificDataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string keyType = info[1].ToString().Utf8Value(); + unsigned length = (unsigned) info[2].ToNumber(); + std::shared_ptr> dataPersistent; + auto* data = getAddress(info.Env(), async, info[3], dataPersistent); - return [obj, status]() { + return [obj, status, keyType, length, data, dataPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->newKey(&statusWrapper); + obj->interface->setSpecificData(&statusWrapper, keyType.c_str(), length, data); + return nullptr; }; } -Napi::Value ClientBlock::newKeyFinish(const Napi::Env env, fb::ICryptKey* ret) +Napi::Value WireCryptPlugin::setSpecificDataFinish(const Napi::Env env, void* ret) { - return CryptKey::NewInstance(env, ret); + return env.Undefined(); } -void Server::InitPrototype(std::vector::PropertyDescriptor>& properties) +void CryptKeyCallback::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("addRefSync", &Server::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &Server::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &Server::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &Server::releaseAsync)); - properties.push_back(InstanceMethod("setOwnerSync", &Server::setOwnerSync)); - properties.push_back(InstanceMethod("setOwnerAsync", &Server::setOwnerAsync)); - properties.push_back(InstanceMethod("getOwnerSync", &Server::getOwnerSync)); - properties.push_back(InstanceMethod("getOwnerAsync", &Server::getOwnerAsync)); - properties.push_back(InstanceMethod("authenticateSync", &Server::authenticateSync)); - properties.push_back(InstanceMethod("authenticateAsync", &Server::authenticateAsync)); + properties.push_back(InstanceMethod("callbackSync", &CryptKeyCallback::callbackSync)); + properties.push_back(InstanceMethod("callbackAsync", &CryptKeyCallback::callbackAsync)); + properties.push_back(InstanceMethod("dummy1Sync", &CryptKeyCallback::dummy1Sync)); + properties.push_back(InstanceMethod("dummy1Async", &CryptKeyCallback::dummy1Async)); + properties.push_back(InstanceMethod("dummy2Sync", &CryptKeyCallback::dummy2Sync)); + properties.push_back(InstanceMethod("dummy2Async", &CryptKeyCallback::dummy2Async)); + properties.push_back(InstanceMethod("getHashLengthSync", &CryptKeyCallback::getHashLengthSync)); + properties.push_back(InstanceMethod("getHashLengthAsync", &CryptKeyCallback::getHashLengthAsync)); + properties.push_back(InstanceMethod("getHashDataSync", &CryptKeyCallback::getHashDataSync)); + properties.push_back(InstanceMethod("getHashDataAsync", &CryptKeyCallback::getHashDataAsync)); } -MethodStart Server::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart CryptKeyCallback::callbackStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + unsigned dataLength = (unsigned) info[0].ToNumber(); + std::shared_ptr> dataPersistent; + auto* data = getAddress(info.Env(), async, info[1], dataPersistent); + unsigned bufferLength = (unsigned) info[2].ToNumber(); + std::shared_ptr> bufferPersistent; + auto* buffer = getAddress(info.Env(), async, info[3], bufferPersistent); - return [obj]() { - obj->interface->addRef(); - return nullptr; + return [obj, dataLength, data, dataPersistent, bufferLength, buffer, bufferPersistent]() { + return obj->interface->callback(dataLength, data, bufferLength, buffer); }; } -Napi::Value Server::addRefFinish(const Napi::Env env, void* ret) +Napi::Value CryptKeyCallback::callbackFinish(const Napi::Env env, unsigned ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart Server::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart CryptKeyCallback::dummy1Start(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->release(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->dummy1(&statusWrapper); + return nullptr; }; } -Napi::Value Server::releaseFinish(const Napi::Env env, int ret) +Napi::Value CryptKeyCallback::dummy1Finish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart Server::setOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart CryptKeyCallback::dummy2Start(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, r]() { - obj->interface->setOwner((r ? r->interface : nullptr)); + return [obj]() { + obj->interface->dummy2(); return nullptr; }; } -Napi::Value Server::setOwnerFinish(const Napi::Env env, void* ret) +Napi::Value CryptKeyCallback::dummy2Finish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Server::getOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart CryptKeyCallback::getHashLengthStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->getOwner(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getHashLength(&statusWrapper); }; } -Napi::Value Server::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) +Napi::Value CryptKeyCallback::getHashLengthFinish(const Napi::Env env, int ret) { - return ReferenceCounted::NewInstance(env, ret); + return Napi::Value::From(env, ret); } -MethodStart Server::authenticateStart(bool async, const Napi::CallbackInfo& info) +MethodStart CryptKeyCallback::getHashDataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* sBlock = ServerBlock::CheckedUnwrap(info.Env(), info[1], "sBlock argument", true); - auto* writerInterface = Writer::CheckedUnwrap(info.Env(), info[2], "writerInterface argument", true); + std::shared_ptr> hashPersistent; + auto* hash = getAddress(info.Env(), async, info[1], hashPersistent); - return [obj, status, sBlock, writerInterface]() { + return [obj, status, hash, hashPersistent]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->authenticate(&statusWrapper, (sBlock ? sBlock->interface : nullptr), (writerInterface ? writerInterface->interface : nullptr)); + obj->interface->getHashData(&statusWrapper, hash); + return nullptr; }; } -Napi::Value Server::authenticateFinish(const Napi::Env env, int ret) +Napi::Value CryptKeyCallback::getHashDataFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -void Client::InitPrototype(std::vector::PropertyDescriptor>& properties) +void KeyHolderPlugin::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("addRefSync", &Client::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &Client::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &Client::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &Client::releaseAsync)); - properties.push_back(InstanceMethod("setOwnerSync", &Client::setOwnerSync)); - properties.push_back(InstanceMethod("setOwnerAsync", &Client::setOwnerAsync)); - properties.push_back(InstanceMethod("getOwnerSync", &Client::getOwnerSync)); - properties.push_back(InstanceMethod("getOwnerAsync", &Client::getOwnerAsync)); - properties.push_back(InstanceMethod("authenticateSync", &Client::authenticateSync)); - properties.push_back(InstanceMethod("authenticateAsync", &Client::authenticateAsync)); + properties.push_back(InstanceMethod("addRefSync", &KeyHolderPlugin::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &KeyHolderPlugin::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &KeyHolderPlugin::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &KeyHolderPlugin::releaseAsync)); + properties.push_back(InstanceMethod("setOwnerSync", &KeyHolderPlugin::setOwnerSync)); + properties.push_back(InstanceMethod("setOwnerAsync", &KeyHolderPlugin::setOwnerAsync)); + properties.push_back(InstanceMethod("getOwnerSync", &KeyHolderPlugin::getOwnerSync)); + properties.push_back(InstanceMethod("getOwnerAsync", &KeyHolderPlugin::getOwnerAsync)); + properties.push_back(InstanceMethod("keyCallbackSync", &KeyHolderPlugin::keyCallbackSync)); + properties.push_back(InstanceMethod("keyCallbackAsync", &KeyHolderPlugin::keyCallbackAsync)); + properties.push_back(InstanceMethod("keyHandleSync", &KeyHolderPlugin::keyHandleSync)); + properties.push_back(InstanceMethod("keyHandleAsync", &KeyHolderPlugin::keyHandleAsync)); + properties.push_back(InstanceMethod("useOnlyOwnKeysSync", &KeyHolderPlugin::useOnlyOwnKeysSync)); + properties.push_back(InstanceMethod("useOnlyOwnKeysAsync", &KeyHolderPlugin::useOnlyOwnKeysAsync)); + properties.push_back(InstanceMethod("chainHandleSync", &KeyHolderPlugin::chainHandleSync)); + properties.push_back(InstanceMethod("chainHandleAsync", &KeyHolderPlugin::chainHandleAsync)); } -MethodStart Client::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart KeyHolderPlugin::addRefStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { obj->interface->addRef(); @@ -14355,28 +20142,28 @@ MethodStart Client::addRefStart(bool async, const Napi::CallbackInfo& inf }; } -Napi::Value Client::addRefFinish(const Napi::Env env, void* ret) +Napi::Value KeyHolderPlugin::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Client::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart KeyHolderPlugin::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { return obj->interface->release(); }; } -Napi::Value Client::releaseFinish(const Napi::Env env, int ret) +Napi::Value KeyHolderPlugin::releaseFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart Client::setOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart KeyHolderPlugin::setOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); return [obj, r]() { @@ -14385,598 +20172,573 @@ MethodStart Client::setOwnerStart(bool async, const Napi::CallbackInfo& i }; } -Napi::Value Client::setOwnerFinish(const Napi::Env env, void* ret) +Napi::Value KeyHolderPlugin::setOwnerFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Client::getOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart KeyHolderPlugin::getOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { return obj->interface->getOwner(); }; } -Napi::Value Client::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) +Napi::Value KeyHolderPlugin::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) { return ReferenceCounted::NewInstance(env, ret); } -MethodStart Client::authenticateStart(bool async, const Napi::CallbackInfo& info) +MethodStart KeyHolderPlugin::keyCallbackStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* cBlock = ClientBlock::CheckedUnwrap(info.Env(), info[1], "cBlock argument", true); + auto* callback = CryptKeyCallback::CheckedUnwrap(info.Env(), info[1], "callback argument", true); - return [obj, status, cBlock]() { + return [obj, status, callback]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->authenticate(&statusWrapper, (cBlock ? cBlock->interface : nullptr)); - }; -} - -Napi::Value Client::authenticateFinish(const Napi::Env env, int ret) -{ - return Napi::Value::From(env, ret); -} - -void UserField::InitPrototype(std::vector::PropertyDescriptor>& properties) -{ - properties.push_back(InstanceMethod("enteredSync", &UserField::enteredSync)); - properties.push_back(InstanceMethod("enteredAsync", &UserField::enteredAsync)); - properties.push_back(InstanceMethod("specifiedSync", &UserField::specifiedSync)); - properties.push_back(InstanceMethod("specifiedAsync", &UserField::specifiedAsync)); - properties.push_back(InstanceMethod("setEnteredSync", &UserField::setEnteredSync)); - properties.push_back(InstanceMethod("setEnteredAsync", &UserField::setEnteredAsync)); -} - -MethodStart UserField::enteredStart(bool async, const Napi::CallbackInfo& info) -{ - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - - return [obj]() { - return obj->interface->entered(); - }; -} - -Napi::Value UserField::enteredFinish(const Napi::Env env, int ret) -{ - return Napi::Value::From(env, ret); -} - -MethodStart UserField::specifiedStart(bool async, const Napi::CallbackInfo& info) -{ - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - - return [obj]() { - return obj->interface->specified(); + return obj->interface->keyCallback(&statusWrapper, (callback ? callback->interface : nullptr)); }; } -Napi::Value UserField::specifiedFinish(const Napi::Env env, int ret) +Napi::Value KeyHolderPlugin::keyCallbackFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart UserField::setEnteredStart(bool async, const Napi::CallbackInfo& info) +MethodStart KeyHolderPlugin::keyHandleStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - int newValue = (int) info[1].ToNumber(); + std::string keyName = info[1].ToString().Utf8Value(); - return [obj, status, newValue]() { + return [obj, status, keyName]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setEntered(&statusWrapper, newValue); - return nullptr; - }; -} - -Napi::Value UserField::setEnteredFinish(const Napi::Env env, void* ret) -{ - return env.Undefined(); -} - -void CharUserField::InitPrototype(std::vector::PropertyDescriptor>& properties) -{ - properties.push_back(InstanceMethod("enteredSync", &CharUserField::enteredSync)); - properties.push_back(InstanceMethod("enteredAsync", &CharUserField::enteredAsync)); - properties.push_back(InstanceMethod("specifiedSync", &CharUserField::specifiedSync)); - properties.push_back(InstanceMethod("specifiedAsync", &CharUserField::specifiedAsync)); - properties.push_back(InstanceMethod("setEnteredSync", &CharUserField::setEnteredSync)); - properties.push_back(InstanceMethod("setEnteredAsync", &CharUserField::setEnteredAsync)); - properties.push_back(InstanceMethod("getSync", &CharUserField::getSync)); - properties.push_back(InstanceMethod("getAsync", &CharUserField::getAsync)); - properties.push_back(InstanceMethod("setSync", &CharUserField::setSync)); - properties.push_back(InstanceMethod("setAsync", &CharUserField::setAsync)); + return obj->interface->keyHandle(&statusWrapper, keyName.c_str()); + }; } -MethodStart CharUserField::enteredStart(bool async, const Napi::CallbackInfo& info) +Napi::Value KeyHolderPlugin::keyHandleFinish(const Napi::Env env, fb::ICryptKeyCallback* ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + return CryptKeyCallback::NewInstance(env, ret); +} - return [obj]() { - return obj->interface->entered(); +MethodStart KeyHolderPlugin::useOnlyOwnKeysStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->useOnlyOwnKeys(&statusWrapper); }; } -Napi::Value CharUserField::enteredFinish(const Napi::Env env, int ret) +Napi::Value KeyHolderPlugin::useOnlyOwnKeysFinish(const Napi::Env env, FB_BOOLEAN ret) { - return Napi::Value::From(env, ret); + return Napi::Value::From(env, (bool) ret); } -MethodStart CharUserField::specifiedStart(bool async, const Napi::CallbackInfo& info) +MethodStart KeyHolderPlugin::chainHandleStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->specified(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->chainHandle(&statusWrapper); }; } -Napi::Value CharUserField::specifiedFinish(const Napi::Env env, int ret) +Napi::Value KeyHolderPlugin::chainHandleFinish(const Napi::Env env, fb::ICryptKeyCallback* ret) { - return Napi::Value::From(env, ret); + return CryptKeyCallback::NewInstance(env, ret); } -MethodStart CharUserField::setEnteredStart(bool async, const Napi::CallbackInfo& info) +void DbCryptInfo::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - int newValue = (int) info[1].ToNumber(); + properties.push_back(InstanceMethod("addRefSync", &DbCryptInfo::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &DbCryptInfo::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &DbCryptInfo::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &DbCryptInfo::releaseAsync)); + properties.push_back(InstanceMethod("getDatabaseFullPathSync", &DbCryptInfo::getDatabaseFullPathSync)); + properties.push_back(InstanceMethod("getDatabaseFullPathAsync", &DbCryptInfo::getDatabaseFullPathAsync)); +} - return [obj, status, newValue]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setEntered(&statusWrapper, newValue); +MethodStart DbCryptInfo::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); return nullptr; }; } -Napi::Value CharUserField::setEnteredFinish(const Napi::Env env, void* ret) +Napi::Value DbCryptInfo::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart CharUserField::getStart(bool async, const Napi::CallbackInfo& info) +MethodStart DbCryptInfo::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->get(); + return obj->interface->release(); }; } -Napi::Value CharUserField::getFinish(const Napi::Env env, OptString ret) +Napi::Value DbCryptInfo::releaseFinish(const Napi::Env env, int ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return Napi::Value::From(env, ret); } -MethodStart CharUserField::setStart(bool async, const Napi::CallbackInfo& info) +MethodStart DbCryptInfo::getDatabaseFullPathStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string newValue = info[1].ToString().Utf8Value(); - return [obj, status, newValue]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->set(&statusWrapper, newValue.c_str()); - return nullptr; + return obj->interface->getDatabaseFullPath(&statusWrapper); }; } -Napi::Value CharUserField::setFinish(const Napi::Env env, void* ret) +Napi::Value DbCryptInfo::getDatabaseFullPathFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -void IntUserField::InitPrototype(std::vector::PropertyDescriptor>& properties) +void DbCryptPlugin::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("enteredSync", &IntUserField::enteredSync)); - properties.push_back(InstanceMethod("enteredAsync", &IntUserField::enteredAsync)); - properties.push_back(InstanceMethod("specifiedSync", &IntUserField::specifiedSync)); - properties.push_back(InstanceMethod("specifiedAsync", &IntUserField::specifiedAsync)); - properties.push_back(InstanceMethod("setEnteredSync", &IntUserField::setEnteredSync)); - properties.push_back(InstanceMethod("setEnteredAsync", &IntUserField::setEnteredAsync)); - properties.push_back(InstanceMethod("getSync", &IntUserField::getSync)); - properties.push_back(InstanceMethod("getAsync", &IntUserField::getAsync)); - properties.push_back(InstanceMethod("setSync", &IntUserField::setSync)); - properties.push_back(InstanceMethod("setAsync", &IntUserField::setAsync)); + properties.push_back(InstanceMethod("addRefSync", &DbCryptPlugin::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &DbCryptPlugin::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &DbCryptPlugin::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &DbCryptPlugin::releaseAsync)); + properties.push_back(InstanceMethod("setOwnerSync", &DbCryptPlugin::setOwnerSync)); + properties.push_back(InstanceMethod("setOwnerAsync", &DbCryptPlugin::setOwnerAsync)); + properties.push_back(InstanceMethod("getOwnerSync", &DbCryptPlugin::getOwnerSync)); + properties.push_back(InstanceMethod("getOwnerAsync", &DbCryptPlugin::getOwnerAsync)); } -MethodStart IntUserField::enteredStart(bool async, const Napi::CallbackInfo& info) +MethodStart DbCryptPlugin::addRefStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->entered(); + obj->interface->addRef(); + return nullptr; }; } -Napi::Value IntUserField::enteredFinish(const Napi::Env env, int ret) +Napi::Value DbCryptPlugin::addRefFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart IntUserField::specifiedStart(bool async, const Napi::CallbackInfo& info) +MethodStart DbCryptPlugin::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->specified(); + return obj->interface->release(); }; } -Napi::Value IntUserField::specifiedFinish(const Napi::Env env, int ret) +Napi::Value DbCryptPlugin::releaseFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart IntUserField::setEnteredStart(bool async, const Napi::CallbackInfo& info) +MethodStart DbCryptPlugin::setOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - int newValue = (int) info[1].ToNumber(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); - return [obj, status, newValue]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setEntered(&statusWrapper, newValue); + return [obj, r]() { + obj->interface->setOwner((r ? r->interface : nullptr)); return nullptr; }; } -Napi::Value IntUserField::setEnteredFinish(const Napi::Env env, void* ret) +Napi::Value DbCryptPlugin::setOwnerFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart IntUserField::getStart(bool async, const Napi::CallbackInfo& info) +MethodStart DbCryptPlugin::getOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->get(); + return obj->interface->getOwner(); }; } -Napi::Value IntUserField::getFinish(const Napi::Env env, int ret) +Napi::Value DbCryptPlugin::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) { - return Napi::Value::From(env, ret); + return ReferenceCounted::NewInstance(env, ret); } -MethodStart IntUserField::setStart(bool async, const Napi::CallbackInfo& info) +void ExternalContext::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - int newValue = (int) info[1].ToNumber(); +} - return [obj, status, newValue]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->set(&statusWrapper, newValue); +void ExternalResultSet::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("disposeSync", &ExternalResultSet::disposeSync)); + properties.push_back(InstanceMethod("disposeAsync", &ExternalResultSet::disposeAsync)); + properties.push_back(InstanceMethod("fetchSync", &ExternalResultSet::fetchSync)); + properties.push_back(InstanceMethod("fetchAsync", &ExternalResultSet::fetchAsync)); +} + +MethodStart ExternalResultSet::disposeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->dispose(); return nullptr; }; } -Napi::Value IntUserField::setFinish(const Napi::Env env, void* ret) +Napi::Value ExternalResultSet::disposeFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -void User::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart ExternalResultSet::fetchStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("operationSync", &User::operationSync)); - properties.push_back(InstanceMethod("operationAsync", &User::operationAsync)); - properties.push_back(InstanceMethod("userNameSync", &User::userNameSync)); - properties.push_back(InstanceMethod("userNameAsync", &User::userNameAsync)); - properties.push_back(InstanceMethod("passwordSync", &User::passwordSync)); - properties.push_back(InstanceMethod("passwordAsync", &User::passwordAsync)); - properties.push_back(InstanceMethod("firstNameSync", &User::firstNameSync)); - properties.push_back(InstanceMethod("firstNameAsync", &User::firstNameAsync)); - properties.push_back(InstanceMethod("lastNameSync", &User::lastNameSync)); - properties.push_back(InstanceMethod("lastNameAsync", &User::lastNameAsync)); - properties.push_back(InstanceMethod("middleNameSync", &User::middleNameSync)); - properties.push_back(InstanceMethod("middleNameAsync", &User::middleNameAsync)); - properties.push_back(InstanceMethod("commentSync", &User::commentSync)); - properties.push_back(InstanceMethod("commentAsync", &User::commentAsync)); - properties.push_back(InstanceMethod("attributesSync", &User::attributesSync)); - properties.push_back(InstanceMethod("attributesAsync", &User::attributesAsync)); - properties.push_back(InstanceMethod("activeSync", &User::activeSync)); - properties.push_back(InstanceMethod("activeAsync", &User::activeAsync)); - properties.push_back(InstanceMethod("adminSync", &User::adminSync)); - properties.push_back(InstanceMethod("adminAsync", &User::adminAsync)); - properties.push_back(InstanceMethod("clearSync", &User::clearSync)); - properties.push_back(InstanceMethod("clearAsync", &User::clearAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->fetch(&statusWrapper); + }; } -MethodStart User::operationStart(bool async, const Napi::CallbackInfo& info) +Napi::Value ExternalResultSet::fetchFinish(const Napi::Env env, FB_BOOLEAN ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - - return [obj]() { - return obj->interface->operation(); - }; + return Napi::Value::From(env, (bool) ret); } -Napi::Value User::operationFinish(const Napi::Env env, unsigned ret) +void ExternalFunction::InitPrototype(std::vector::PropertyDescriptor>& properties) { - return Napi::Value::From(env, ret); + properties.push_back(InstanceMethod("disposeSync", &ExternalFunction::disposeSync)); + properties.push_back(InstanceMethod("disposeAsync", &ExternalFunction::disposeAsync)); } -MethodStart User::userNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart ExternalFunction::disposeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->userName(); + obj->interface->dispose(); + return nullptr; }; } -Napi::Value User::userNameFinish(const Napi::Env env, fb::ICharUserField* ret) +Napi::Value ExternalFunction::disposeFinish(const Napi::Env env, void* ret) { - return CharUserField::NewInstance(env, ret); + return env.Undefined(); } -MethodStart User::passwordStart(bool async, const Napi::CallbackInfo& info) +void ExternalProcedure::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("disposeSync", &ExternalProcedure::disposeSync)); + properties.push_back(InstanceMethod("disposeAsync", &ExternalProcedure::disposeAsync)); +} + +MethodStart ExternalProcedure::disposeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->password(); + obj->interface->dispose(); + return nullptr; }; } -Napi::Value User::passwordFinish(const Napi::Env env, fb::ICharUserField* ret) +Napi::Value ExternalProcedure::disposeFinish(const Napi::Env env, void* ret) { - return CharUserField::NewInstance(env, ret); + return env.Undefined(); } -MethodStart User::firstNameStart(bool async, const Napi::CallbackInfo& info) +void ExternalTrigger::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("disposeSync", &ExternalTrigger::disposeSync)); + properties.push_back(InstanceMethod("disposeAsync", &ExternalTrigger::disposeAsync)); +} + +MethodStart ExternalTrigger::disposeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->firstName(); + obj->interface->dispose(); + return nullptr; }; } -Napi::Value User::firstNameFinish(const Napi::Env env, fb::ICharUserField* ret) +Napi::Value ExternalTrigger::disposeFinish(const Napi::Env env, void* ret) { - return CharUserField::NewInstance(env, ret); + return env.Undefined(); +} + +void RoutineMetadata::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("getPackageSync", &RoutineMetadata::getPackageSync)); + properties.push_back(InstanceMethod("getPackageAsync", &RoutineMetadata::getPackageAsync)); + properties.push_back(InstanceMethod("getNameSync", &RoutineMetadata::getNameSync)); + properties.push_back(InstanceMethod("getNameAsync", &RoutineMetadata::getNameAsync)); + properties.push_back(InstanceMethod("getEntryPointSync", &RoutineMetadata::getEntryPointSync)); + properties.push_back(InstanceMethod("getEntryPointAsync", &RoutineMetadata::getEntryPointAsync)); + properties.push_back(InstanceMethod("getBodySync", &RoutineMetadata::getBodySync)); + properties.push_back(InstanceMethod("getBodyAsync", &RoutineMetadata::getBodyAsync)); + properties.push_back(InstanceMethod("getInputMetadataSync", &RoutineMetadata::getInputMetadataSync)); + properties.push_back(InstanceMethod("getInputMetadataAsync", &RoutineMetadata::getInputMetadataAsync)); + properties.push_back(InstanceMethod("getOutputMetadataSync", &RoutineMetadata::getOutputMetadataSync)); + properties.push_back(InstanceMethod("getOutputMetadataAsync", &RoutineMetadata::getOutputMetadataAsync)); + properties.push_back(InstanceMethod("getTriggerMetadataSync", &RoutineMetadata::getTriggerMetadataSync)); + properties.push_back(InstanceMethod("getTriggerMetadataAsync", &RoutineMetadata::getTriggerMetadataAsync)); + properties.push_back(InstanceMethod("getTriggerTableSync", &RoutineMetadata::getTriggerTableSync)); + properties.push_back(InstanceMethod("getTriggerTableAsync", &RoutineMetadata::getTriggerTableAsync)); + properties.push_back(InstanceMethod("getTriggerTypeSync", &RoutineMetadata::getTriggerTypeSync)); + properties.push_back(InstanceMethod("getTriggerTypeAsync", &RoutineMetadata::getTriggerTypeAsync)); } -MethodStart User::lastNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart RoutineMetadata::getPackageStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->lastName(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getPackage(&statusWrapper); }; } -Napi::Value User::lastNameFinish(const Napi::Env env, fb::ICharUserField* ret) +Napi::Value RoutineMetadata::getPackageFinish(const Napi::Env env, OptString ret) { - return CharUserField::NewInstance(env, ret); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart User::middleNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart RoutineMetadata::getNameStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->middleName(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getName(&statusWrapper); }; } -Napi::Value User::middleNameFinish(const Napi::Env env, fb::ICharUserField* ret) +Napi::Value RoutineMetadata::getNameFinish(const Napi::Env env, OptString ret) { - return CharUserField::NewInstance(env, ret); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart User::commentStart(bool async, const Napi::CallbackInfo& info) +MethodStart RoutineMetadata::getEntryPointStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->comment(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getEntryPoint(&statusWrapper); }; } -Napi::Value User::commentFinish(const Napi::Env env, fb::ICharUserField* ret) +Napi::Value RoutineMetadata::getEntryPointFinish(const Napi::Env env, OptString ret) { - return CharUserField::NewInstance(env, ret); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart User::attributesStart(bool async, const Napi::CallbackInfo& info) +MethodStart RoutineMetadata::getBodyStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->attributes(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getBody(&statusWrapper); }; } -Napi::Value User::attributesFinish(const Napi::Env env, fb::ICharUserField* ret) +Napi::Value RoutineMetadata::getBodyFinish(const Napi::Env env, OptString ret) { - return CharUserField::NewInstance(env, ret); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart User::activeStart(bool async, const Napi::CallbackInfo& info) +MethodStart RoutineMetadata::getInputMetadataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->active(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getInputMetadata(&statusWrapper); }; } -Napi::Value User::activeFinish(const Napi::Env env, fb::IIntUserField* ret) +Napi::Value RoutineMetadata::getInputMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret) { - return IntUserField::NewInstance(env, ret); + return MessageMetadata::NewInstance(env, ret); } -MethodStart User::adminStart(bool async, const Napi::CallbackInfo& info) +MethodStart RoutineMetadata::getOutputMetadataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->admin(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getOutputMetadata(&statusWrapper); }; } -Napi::Value User::adminFinish(const Napi::Env env, fb::IIntUserField* ret) +Napi::Value RoutineMetadata::getOutputMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret) { - return IntUserField::NewInstance(env, ret); + return MessageMetadata::NewInstance(env, ret); } -MethodStart User::clearStart(bool async, const Napi::CallbackInfo& info) +MethodStart RoutineMetadata::getTriggerMetadataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->clear(&statusWrapper); - return nullptr; + return obj->interface->getTriggerMetadata(&statusWrapper); }; } -Napi::Value User::clearFinish(const Napi::Env env, void* ret) -{ - return env.Undefined(); -} - -void ListUsers::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value RoutineMetadata::getTriggerMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret) { - properties.push_back(InstanceMethod("listSync", &ListUsers::listSync)); - properties.push_back(InstanceMethod("listAsync", &ListUsers::listAsync)); + return MessageMetadata::NewInstance(env, ret); } -MethodStart ListUsers::listStart(bool async, const Napi::CallbackInfo& info) +MethodStart RoutineMetadata::getTriggerTableStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* user = User::CheckedUnwrap(info.Env(), info[1], "user argument", true); - return [obj, status, user]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->list(&statusWrapper, (user ? user->interface : nullptr)); - return nullptr; + return obj->interface->getTriggerTable(&statusWrapper); }; } -Napi::Value ListUsers::listFinish(const Napi::Env env, void* ret) +Napi::Value RoutineMetadata::getTriggerTableFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -void LogonInfo::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart RoutineMetadata::getTriggerTypeStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("nameSync", &LogonInfo::nameSync)); - properties.push_back(InstanceMethod("nameAsync", &LogonInfo::nameAsync)); - properties.push_back(InstanceMethod("roleSync", &LogonInfo::roleSync)); - properties.push_back(InstanceMethod("roleAsync", &LogonInfo::roleAsync)); - properties.push_back(InstanceMethod("networkProtocolSync", &LogonInfo::networkProtocolSync)); - properties.push_back(InstanceMethod("networkProtocolAsync", &LogonInfo::networkProtocolAsync)); - properties.push_back(InstanceMethod("remoteAddressSync", &LogonInfo::remoteAddressSync)); - properties.push_back(InstanceMethod("remoteAddressAsync", &LogonInfo::remoteAddressAsync)); - properties.push_back(InstanceMethod("authBlockSync", &LogonInfo::authBlockSync)); - properties.push_back(InstanceMethod("authBlockAsync", &LogonInfo::authBlockAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getTriggerType(&statusWrapper); + }; } -MethodStart LogonInfo::nameStart(bool async, const Napi::CallbackInfo& info) +Napi::Value RoutineMetadata::getTriggerTypeFinish(const Napi::Env env, unsigned ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - - return [obj]() { - return obj->interface->name(); - }; + return Napi::Value::From(env, ret); } -Napi::Value LogonInfo::nameFinish(const Napi::Env env, OptString ret) +void ExternalEngine::InitPrototype(std::vector::PropertyDescriptor>& properties) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + properties.push_back(InstanceMethod("addRefSync", &ExternalEngine::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &ExternalEngine::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &ExternalEngine::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &ExternalEngine::releaseAsync)); + properties.push_back(InstanceMethod("setOwnerSync", &ExternalEngine::setOwnerSync)); + properties.push_back(InstanceMethod("setOwnerAsync", &ExternalEngine::setOwnerAsync)); + properties.push_back(InstanceMethod("getOwnerSync", &ExternalEngine::getOwnerSync)); + properties.push_back(InstanceMethod("getOwnerAsync", &ExternalEngine::getOwnerAsync)); } -MethodStart LogonInfo::roleStart(bool async, const Napi::CallbackInfo& info) +MethodStart ExternalEngine::addRefStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->role(); + obj->interface->addRef(); + return nullptr; }; } -Napi::Value LogonInfo::roleFinish(const Napi::Env env, OptString ret) +Napi::Value ExternalEngine::addRefFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart LogonInfo::networkProtocolStart(bool async, const Napi::CallbackInfo& info) +MethodStart ExternalEngine::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->networkProtocol(); + return obj->interface->release(); }; } -Napi::Value LogonInfo::networkProtocolFinish(const Napi::Env env, OptString ret) +Napi::Value ExternalEngine::releaseFinish(const Napi::Env env, int ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return Napi::Value::From(env, ret); } -MethodStart LogonInfo::remoteAddressStart(bool async, const Napi::CallbackInfo& info) +MethodStart ExternalEngine::setOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); - return [obj]() { - return obj->interface->remoteAddress(); + return [obj, r]() { + obj->interface->setOwner((r ? r->interface : nullptr)); + return nullptr; }; } -Napi::Value LogonInfo::remoteAddressFinish(const Napi::Env env, OptString ret) +Napi::Value ExternalEngine::setOwnerFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart LogonInfo::authBlockStart(bool async, const Napi::CallbackInfo& info) +MethodStart ExternalEngine::getOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - std::shared_ptr> lengthPersistent; - auto* length = getAddress(info.Env(), async, info[0], lengthPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, length, lengthPersistent]() { - return obj->interface->authBlock(length); + return [obj]() { + return obj->interface->getOwner(); }; } -Napi::Value LogonInfo::authBlockFinish(const Napi::Env env, const unsigned char* ret) +Napi::Value ExternalEngine::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) { - return Pointer::NewInstance(env, ret); + return ReferenceCounted::NewInstance(env, ret); } -void Management::InitPrototype(std::vector::PropertyDescriptor>& properties) +void Timer::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("addRefSync", &Management::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &Management::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &Management::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &Management::releaseAsync)); - properties.push_back(InstanceMethod("setOwnerSync", &Management::setOwnerSync)); - properties.push_back(InstanceMethod("setOwnerAsync", &Management::setOwnerAsync)); - properties.push_back(InstanceMethod("getOwnerSync", &Management::getOwnerSync)); - properties.push_back(InstanceMethod("getOwnerAsync", &Management::getOwnerAsync)); - properties.push_back(InstanceMethod("startSync", &Management::startSync)); - properties.push_back(InstanceMethod("startAsync", &Management::startAsync)); - properties.push_back(InstanceMethod("executeSync", &Management::executeSync)); - properties.push_back(InstanceMethod("executeAsync", &Management::executeAsync)); - properties.push_back(InstanceMethod("commitSync", &Management::commitSync)); - properties.push_back(InstanceMethod("commitAsync", &Management::commitAsync)); - properties.push_back(InstanceMethod("rollbackSync", &Management::rollbackSync)); - properties.push_back(InstanceMethod("rollbackAsync", &Management::rollbackAsync)); + properties.push_back(InstanceMethod("addRefSync", &Timer::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &Timer::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &Timer::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &Timer::releaseAsync)); + properties.push_back(InstanceMethod("handlerSync", &Timer::handlerSync)); + properties.push_back(InstanceMethod("handlerAsync", &Timer::handlerAsync)); } -MethodStart Management::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart Timer::addRefStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { obj->interface->addRef(); @@ -14984,2194 +20746,2395 @@ MethodStart Management::addRefStart(bool async, const Napi::CallbackInfo& }; } -Napi::Value Management::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Timer::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Management::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Timer::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { return obj->interface->release(); }; } -Napi::Value Management::releaseFinish(const Napi::Env env, int ret) +Napi::Value Timer::releaseFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart Management::setOwnerStart(bool async, const Napi::CallbackInfo& info) -{ - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); - - return [obj, r]() { - obj->interface->setOwner((r ? r->interface : nullptr)); - return nullptr; - }; -} - -Napi::Value Management::setOwnerFinish(const Napi::Env env, void* ret) -{ - return env.Undefined(); -} - -MethodStart Management::getOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart Timer::handlerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getOwner(); + obj->interface->handler(); + return nullptr; }; } -Napi::Value Management::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) +Napi::Value Timer::handlerFinish(const Napi::Env env, void* ret) { - return ReferenceCounted::NewInstance(env, ret); + return env.Undefined(); } -MethodStart Management::startStart(bool async, const Napi::CallbackInfo& info) +void TimerControl::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("startSync", &TimerControl::startSync)); + properties.push_back(InstanceMethod("startAsync", &TimerControl::startAsync)); + properties.push_back(InstanceMethod("stopSync", &TimerControl::stopSync)); + properties.push_back(InstanceMethod("stopAsync", &TimerControl::stopAsync)); +} + +MethodStart TimerControl::startStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* logonInfo = LogonInfo::CheckedUnwrap(info.Env(), info[1], "logonInfo argument", true); + auto* timer = Timer::CheckedUnwrap(info.Env(), info[1], "timer argument", true); + uint64_t microSeconds = (uint64_t) info[2].ToNumber().Int64Value(); - return [obj, status, logonInfo]() { + return [obj, status, timer, microSeconds]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->start(&statusWrapper, (logonInfo ? logonInfo->interface : nullptr)); + obj->interface->start(&statusWrapper, (timer ? timer->interface : nullptr), microSeconds); return nullptr; }; } -Napi::Value Management::startFinish(const Napi::Env env, void* ret) +Napi::Value TimerControl::startFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Management::executeStart(bool async, const Napi::CallbackInfo& info) +MethodStart TimerControl::stopStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* user = User::CheckedUnwrap(info.Env(), info[1], "user argument", true); - auto* callback = ListUsers::CheckedUnwrap(info.Env(), info[2], "callback argument", true); + auto* timer = Timer::CheckedUnwrap(info.Env(), info[1], "timer argument", true); - return [obj, status, user, callback]() { + return [obj, status, timer]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->execute(&statusWrapper, (user ? user->interface : nullptr), (callback ? callback->interface : nullptr)); + obj->interface->stop(&statusWrapper, (timer ? timer->interface : nullptr)); + return nullptr; }; } -Napi::Value Management::executeFinish(const Napi::Env env, int ret) +Napi::Value TimerControl::stopFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart Management::commitStart(bool async, const Napi::CallbackInfo& info) +void VersionCallback::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("callbackSync", &VersionCallback::callbackSync)); + properties.push_back(InstanceMethod("callbackAsync", &VersionCallback::callbackAsync)); +} + +MethodStart VersionCallback::callbackStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string text = info[1].ToString().Utf8Value(); - return [obj, status]() { + return [obj, status, text]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->commit(&statusWrapper); + obj->interface->callback(&statusWrapper, text.c_str()); return nullptr; }; } -Napi::Value Management::commitFinish(const Napi::Env env, void* ret) +Napi::Value VersionCallback::callbackFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart Management::rollbackStart(bool async, const Napi::CallbackInfo& info) +void Util::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("getFbVersionSync", &Util::getFbVersionSync)); + properties.push_back(InstanceMethod("getFbVersionAsync", &Util::getFbVersionAsync)); + properties.push_back(InstanceMethod("executeCreateDatabaseSync", &Util::executeCreateDatabaseSync)); + properties.push_back(InstanceMethod("executeCreateDatabaseAsync", &Util::executeCreateDatabaseAsync)); + properties.push_back(InstanceMethod("decodeDateSync", &Util::decodeDateSync)); + properties.push_back(InstanceMethod("decodeDateAsync", &Util::decodeDateAsync)); + properties.push_back(InstanceMethod("decodeTimeSync", &Util::decodeTimeSync)); + properties.push_back(InstanceMethod("decodeTimeAsync", &Util::decodeTimeAsync)); + properties.push_back(InstanceMethod("encodeDateSync", &Util::encodeDateSync)); + properties.push_back(InstanceMethod("encodeDateAsync", &Util::encodeDateAsync)); + properties.push_back(InstanceMethod("encodeTimeSync", &Util::encodeTimeSync)); + properties.push_back(InstanceMethod("encodeTimeAsync", &Util::encodeTimeAsync)); + properties.push_back(InstanceMethod("getClientVersionSync", &Util::getClientVersionSync)); + properties.push_back(InstanceMethod("getClientVersionAsync", &Util::getClientVersionAsync)); + properties.push_back(InstanceMethod("getXpbBuilderSync", &Util::getXpbBuilderSync)); + properties.push_back(InstanceMethod("getXpbBuilderAsync", &Util::getXpbBuilderAsync)); + properties.push_back(InstanceMethod("setOffsetsSync", &Util::setOffsetsSync)); + properties.push_back(InstanceMethod("setOffsetsAsync", &Util::setOffsetsAsync)); + properties.push_back(InstanceMethod("getDecFloat16Sync", &Util::getDecFloat16Sync)); + properties.push_back(InstanceMethod("getDecFloat16Async", &Util::getDecFloat16Async)); + properties.push_back(InstanceMethod("getDecFloat34Sync", &Util::getDecFloat34Sync)); + properties.push_back(InstanceMethod("getDecFloat34Async", &Util::getDecFloat34Async)); + properties.push_back(InstanceMethod("encodeTimeTzSync", &Util::encodeTimeTzSync)); + properties.push_back(InstanceMethod("encodeTimeTzAsync", &Util::encodeTimeTzAsync)); + properties.push_back(InstanceMethod("encodeTimeStampTzSync", &Util::encodeTimeStampTzSync)); + properties.push_back(InstanceMethod("encodeTimeStampTzAsync", &Util::encodeTimeStampTzAsync)); + properties.push_back(InstanceMethod("getInt128Sync", &Util::getInt128Sync)); + properties.push_back(InstanceMethod("getInt128Async", &Util::getInt128Async)); +} + +MethodStart Util::getFbVersionStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* att = Attachment::CheckedUnwrap(info.Env(), info[1], "att argument", true); + auto* callback = VersionCallback::CheckedUnwrap(info.Env(), info[2], "callback argument", true); - return [obj, status]() { + return [obj, status, att, callback]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->rollback(&statusWrapper); + obj->interface->getFbVersion(&statusWrapper, (att ? att->interface : nullptr), (callback ? callback->interface : nullptr)); return nullptr; }; } -Napi::Value Management::rollbackFinish(const Napi::Env env, void* ret) +Napi::Value Util::getFbVersionFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -void WireCryptPlugin::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart Util::executeCreateDatabaseStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("addRefSync", &WireCryptPlugin::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &WireCryptPlugin::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &WireCryptPlugin::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &WireCryptPlugin::releaseAsync)); - properties.push_back(InstanceMethod("setOwnerSync", &WireCryptPlugin::setOwnerSync)); - properties.push_back(InstanceMethod("setOwnerAsync", &WireCryptPlugin::setOwnerAsync)); - properties.push_back(InstanceMethod("getOwnerSync", &WireCryptPlugin::getOwnerSync)); - properties.push_back(InstanceMethod("getOwnerAsync", &WireCryptPlugin::getOwnerAsync)); - properties.push_back(InstanceMethod("getKnownTypesSync", &WireCryptPlugin::getKnownTypesSync)); - properties.push_back(InstanceMethod("getKnownTypesAsync", &WireCryptPlugin::getKnownTypesAsync)); - properties.push_back(InstanceMethod("setKeySync", &WireCryptPlugin::setKeySync)); - properties.push_back(InstanceMethod("setKeyAsync", &WireCryptPlugin::setKeyAsync)); - properties.push_back(InstanceMethod("encryptSync", &WireCryptPlugin::encryptSync)); - properties.push_back(InstanceMethod("encryptAsync", &WireCryptPlugin::encryptAsync)); - properties.push_back(InstanceMethod("decryptSync", &WireCryptPlugin::decryptSync)); - properties.push_back(InstanceMethod("decryptAsync", &WireCryptPlugin::decryptAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned stmtLength = (unsigned) info[1].ToNumber(); + std::string creatDBstatement = info[2].ToString().Utf8Value(); + unsigned dialect = (unsigned) info[3].ToNumber(); + std::shared_ptr> stmtIsCreateDbPersistent; + auto* stmtIsCreateDb = getAddress(info.Env(), async, info[4], stmtIsCreateDbPersistent); + + return [obj, status, stmtLength, creatDBstatement, dialect, stmtIsCreateDb, stmtIsCreateDbPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->executeCreateDatabase(&statusWrapper, stmtLength, creatDBstatement.c_str(), dialect, stmtIsCreateDb); + }; } -MethodStart WireCryptPlugin::addRefStart(bool async, const Napi::CallbackInfo& info) +Napi::Value Util::executeCreateDatabaseFinish(const Napi::Env env, fb::IAttachment* ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + return Attachment::NewInstance(env, ret); +} - return [obj]() { - obj->interface->addRef(); +MethodStart Util::decodeDateStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + int date = (int) info[0].ToNumber(); + std::shared_ptr> yearPersistent; + auto* year = getAddress(info.Env(), async, info[1], yearPersistent); + std::shared_ptr> monthPersistent; + auto* month = getAddress(info.Env(), async, info[2], monthPersistent); + std::shared_ptr> dayPersistent; + auto* day = getAddress(info.Env(), async, info[3], dayPersistent); + + return [obj, date, year, yearPersistent, month, monthPersistent, day, dayPersistent]() { + obj->interface->decodeDate(date, year, month, day); return nullptr; }; } -Napi::Value WireCryptPlugin::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Util::decodeDateFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart WireCryptPlugin::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Util::decodeTimeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + int time = (int) info[0].ToNumber(); + std::shared_ptr> hoursPersistent; + auto* hours = getAddress(info.Env(), async, info[1], hoursPersistent); + std::shared_ptr> minutesPersistent; + auto* minutes = getAddress(info.Env(), async, info[2], minutesPersistent); + std::shared_ptr> secondsPersistent; + auto* seconds = getAddress(info.Env(), async, info[3], secondsPersistent); + std::shared_ptr> fractionsPersistent; + auto* fractions = getAddress(info.Env(), async, info[4], fractionsPersistent); - return [obj]() { - return obj->interface->release(); + return [obj, time, hours, hoursPersistent, minutes, minutesPersistent, seconds, secondsPersistent, fractions, fractionsPersistent]() { + obj->interface->decodeTime(time, hours, minutes, seconds, fractions); + return nullptr; }; } -Napi::Value WireCryptPlugin::releaseFinish(const Napi::Env env, int ret) +Napi::Value Util::decodeTimeFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart WireCryptPlugin::setOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart Util::encodeDateStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + unsigned year = (unsigned) info[0].ToNumber(); + unsigned month = (unsigned) info[1].ToNumber(); + unsigned day = (unsigned) info[2].ToNumber(); - return [obj, r]() { - obj->interface->setOwner((r ? r->interface : nullptr)); - return nullptr; + return [obj, year, month, day]() { + return obj->interface->encodeDate(year, month, day); }; } -Napi::Value WireCryptPlugin::setOwnerFinish(const Napi::Env env, void* ret) +Napi::Value Util::encodeDateFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart WireCryptPlugin::getOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart Util::encodeTimeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + unsigned hours = (unsigned) info[0].ToNumber(); + unsigned minutes = (unsigned) info[1].ToNumber(); + unsigned seconds = (unsigned) info[2].ToNumber(); + unsigned fractions = (unsigned) info[3].ToNumber(); - return [obj]() { - return obj->interface->getOwner(); + return [obj, hours, minutes, seconds, fractions]() { + return obj->interface->encodeTime(hours, minutes, seconds, fractions); }; } -Napi::Value WireCryptPlugin::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) +Napi::Value Util::encodeTimeFinish(const Napi::Env env, int ret) { - return ReferenceCounted::NewInstance(env, ret); + return Napi::Value::From(env, ret); } -MethodStart WireCryptPlugin::getKnownTypesStart(bool async, const Napi::CallbackInfo& info) +MethodStart Util::getClientVersionStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getKnownTypes(&statusWrapper); + return [obj]() { + return obj->interface->getClientVersion(); }; } -Napi::Value WireCryptPlugin::getKnownTypesFinish(const Napi::Env env, OptString ret) +Napi::Value Util::getClientVersionFinish(const Napi::Env env, unsigned ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return Napi::Value::From(env, ret); } -MethodStart WireCryptPlugin::setKeyStart(bool async, const Napi::CallbackInfo& info) +MethodStart Util::getXpbBuilderStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* key = CryptKey::CheckedUnwrap(info.Env(), info[1], "key argument", true); + unsigned kind = (unsigned) info[1].ToNumber(); + std::shared_ptr> bufPersistent; + auto* buf = getAddress(info.Env(), async, info[2], bufPersistent); + unsigned len = (unsigned) info[3].ToNumber(); - return [obj, status, key]() { + return [obj, status, kind, buf, bufPersistent, len]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setKey(&statusWrapper, (key ? key->interface : nullptr)); - return nullptr; + return obj->interface->getXpbBuilder(&statusWrapper, kind, buf, len); }; } -Napi::Value WireCryptPlugin::setKeyFinish(const Napi::Env env, void* ret) +Napi::Value Util::getXpbBuilderFinish(const Napi::Env env, fb::IXpbBuilder* ret) { - return env.Undefined(); + return XpbBuilder::NewInstance(env, ret); } -MethodStart WireCryptPlugin::encryptStart(bool async, const Napi::CallbackInfo& info) +MethodStart Util::setOffsetsStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned length = (unsigned) info[1].ToNumber(); - std::shared_ptr> fromPersistent; - auto* from = getAddress(info.Env(), async, info[2], fromPersistent); - std::shared_ptr> toPersistent; - auto* to = getAddress(info.Env(), async, info[3], toPersistent); + auto* metadata = MessageMetadata::CheckedUnwrap(info.Env(), info[1], "metadata argument", true); + auto* callback = OffsetsCallback::CheckedUnwrap(info.Env(), info[2], "callback argument", true); - return [obj, status, length, from, fromPersistent, to, toPersistent]() { + return [obj, status, metadata, callback]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->encrypt(&statusWrapper, length, from, to); - return nullptr; + return obj->interface->setOffsets(&statusWrapper, (metadata ? metadata->interface : nullptr), (callback ? callback->interface : nullptr)); }; } -Napi::Value WireCryptPlugin::encryptFinish(const Napi::Env env, void* ret) +Napi::Value Util::setOffsetsFinish(const Napi::Env env, unsigned ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart WireCryptPlugin::decryptStart(bool async, const Napi::CallbackInfo& info) +MethodStart Util::getDecFloat16Start(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned length = (unsigned) info[1].ToNumber(); - std::shared_ptr> fromPersistent; - auto* from = getAddress(info.Env(), async, info[2], fromPersistent); - std::shared_ptr> toPersistent; - auto* to = getAddress(info.Env(), async, info[3], toPersistent); - return [obj, status, length, from, fromPersistent, to, toPersistent]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->decrypt(&statusWrapper, length, from, to); - return nullptr; + return obj->interface->getDecFloat16(&statusWrapper); }; } -Napi::Value WireCryptPlugin::decryptFinish(const Napi::Env env, void* ret) -{ - return env.Undefined(); -} - -void CryptKeyCallback::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value Util::getDecFloat16Finish(const Napi::Env env, fb::IDecFloat16* ret) { - properties.push_back(InstanceMethod("callbackSync", &CryptKeyCallback::callbackSync)); - properties.push_back(InstanceMethod("callbackAsync", &CryptKeyCallback::callbackAsync)); + return DecFloat16::NewInstance(env, ret); } -MethodStart CryptKeyCallback::callbackStart(bool async, const Napi::CallbackInfo& info) +MethodStart Util::getDecFloat34Start(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - unsigned dataLength = (unsigned) info[0].ToNumber(); - std::shared_ptr> dataPersistent; - auto* data = getAddress(info.Env(), async, info[1], dataPersistent); - unsigned bufferLength = (unsigned) info[2].ToNumber(); - std::shared_ptr> bufferPersistent; - auto* buffer = getAddress(info.Env(), async, info[3], bufferPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj, dataLength, data, dataPersistent, bufferLength, buffer, bufferPersistent]() { - return obj->interface->callback(dataLength, data, bufferLength, buffer); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getDecFloat34(&statusWrapper); }; } -Napi::Value CryptKeyCallback::callbackFinish(const Napi::Env env, unsigned ret) +Napi::Value Util::getDecFloat34Finish(const Napi::Env env, fb::IDecFloat34* ret) { - return Napi::Value::From(env, ret); + return DecFloat34::NewInstance(env, ret); } -void KeyHolderPlugin::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart Util::encodeTimeTzStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("addRefSync", &KeyHolderPlugin::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &KeyHolderPlugin::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &KeyHolderPlugin::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &KeyHolderPlugin::releaseAsync)); - properties.push_back(InstanceMethod("setOwnerSync", &KeyHolderPlugin::setOwnerSync)); - properties.push_back(InstanceMethod("setOwnerAsync", &KeyHolderPlugin::setOwnerAsync)); - properties.push_back(InstanceMethod("getOwnerSync", &KeyHolderPlugin::getOwnerSync)); - properties.push_back(InstanceMethod("getOwnerAsync", &KeyHolderPlugin::getOwnerAsync)); - properties.push_back(InstanceMethod("keyCallbackSync", &KeyHolderPlugin::keyCallbackSync)); - properties.push_back(InstanceMethod("keyCallbackAsync", &KeyHolderPlugin::keyCallbackAsync)); - properties.push_back(InstanceMethod("keyHandleSync", &KeyHolderPlugin::keyHandleSync)); - properties.push_back(InstanceMethod("keyHandleAsync", &KeyHolderPlugin::keyHandleAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::shared_ptr> timeTzPersistent; + auto* timeTz = (ISC_TIME_TZ*) getAddress(info.Env(), async, info[1], timeTzPersistent); + unsigned hours = (unsigned) info[2].ToNumber(); + unsigned minutes = (unsigned) info[3].ToNumber(); + unsigned seconds = (unsigned) info[4].ToNumber(); + unsigned fractions = (unsigned) info[5].ToNumber(); + std::string timeZone = info[6].ToString().Utf8Value(); + + return [obj, status, timeTz, timeTzPersistent, hours, minutes, seconds, fractions, timeZone]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->encodeTimeTz(&statusWrapper, timeTz, hours, minutes, seconds, fractions, timeZone.c_str()); + return nullptr; + }; } -MethodStart KeyHolderPlugin::addRefStart(bool async, const Napi::CallbackInfo& info) +Napi::Value Util::encodeTimeTzFinish(const Napi::Env env, void* ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + return env.Undefined(); +} - return [obj]() { - obj->interface->addRef(); +MethodStart Util::encodeTimeStampTzStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::shared_ptr> timeStampTzPersistent; + auto* timeStampTz = (ISC_TIMESTAMP_TZ*) getAddress(info.Env(), async, info[1], timeStampTzPersistent); + unsigned year = (unsigned) info[2].ToNumber(); + unsigned month = (unsigned) info[3].ToNumber(); + unsigned day = (unsigned) info[4].ToNumber(); + unsigned hours = (unsigned) info[5].ToNumber(); + unsigned minutes = (unsigned) info[6].ToNumber(); + unsigned seconds = (unsigned) info[7].ToNumber(); + unsigned fractions = (unsigned) info[8].ToNumber(); + std::string timeZone = info[9].ToString().Utf8Value(); + + return [obj, status, timeStampTz, timeStampTzPersistent, year, month, day, hours, minutes, seconds, fractions, timeZone]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->encodeTimeStampTz(&statusWrapper, timeStampTz, year, month, day, hours, minutes, seconds, fractions, timeZone.c_str()); return nullptr; }; } -Napi::Value KeyHolderPlugin::addRefFinish(const Napi::Env env, void* ret) +Napi::Value Util::encodeTimeStampTzFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart KeyHolderPlugin::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart Util::getInt128Start(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->release(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->getInt128(&statusWrapper); }; } -Napi::Value KeyHolderPlugin::releaseFinish(const Napi::Env env, int ret) +Napi::Value Util::getInt128Finish(const Napi::Env env, fb::IInt128* ret) { - return Napi::Value::From(env, ret); + return Int128::NewInstance(env, ret); } -MethodStart KeyHolderPlugin::setOwnerStart(bool async, const Napi::CallbackInfo& info) +void OffsetsCallback::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); + properties.push_back(InstanceMethod("setOffsetSync", &OffsetsCallback::setOffsetSync)); + properties.push_back(InstanceMethod("setOffsetAsync", &OffsetsCallback::setOffsetAsync)); +} - return [obj, r]() { - obj->interface->setOwner((r ? r->interface : nullptr)); +MethodStart OffsetsCallback::setOffsetStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned index = (unsigned) info[1].ToNumber(); + unsigned offset = (unsigned) info[2].ToNumber(); + unsigned nullOffset = (unsigned) info[3].ToNumber(); + + return [obj, status, index, offset, nullOffset]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setOffset(&statusWrapper, index, offset, nullOffset); return nullptr; }; } -Napi::Value KeyHolderPlugin::setOwnerFinish(const Napi::Env env, void* ret) +Napi::Value OffsetsCallback::setOffsetFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart KeyHolderPlugin::getOwnerStart(bool async, const Napi::CallbackInfo& info) -{ - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - - return [obj]() { - return obj->interface->getOwner(); - }; -} - -Napi::Value KeyHolderPlugin::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) +void XpbBuilder::InitPrototype(std::vector::PropertyDescriptor>& properties) { - return ReferenceCounted::NewInstance(env, ret); + properties.push_back(InstanceMethod("disposeSync", &XpbBuilder::disposeSync)); + properties.push_back(InstanceMethod("disposeAsync", &XpbBuilder::disposeAsync)); + properties.push_back(InstanceMethod("clearSync", &XpbBuilder::clearSync)); + properties.push_back(InstanceMethod("clearAsync", &XpbBuilder::clearAsync)); + properties.push_back(InstanceMethod("removeCurrentSync", &XpbBuilder::removeCurrentSync)); + properties.push_back(InstanceMethod("removeCurrentAsync", &XpbBuilder::removeCurrentAsync)); + properties.push_back(InstanceMethod("insertIntSync", &XpbBuilder::insertIntSync)); + properties.push_back(InstanceMethod("insertIntAsync", &XpbBuilder::insertIntAsync)); + properties.push_back(InstanceMethod("insertBigIntSync", &XpbBuilder::insertBigIntSync)); + properties.push_back(InstanceMethod("insertBigIntAsync", &XpbBuilder::insertBigIntAsync)); + properties.push_back(InstanceMethod("insertBytesSync", &XpbBuilder::insertBytesSync)); + properties.push_back(InstanceMethod("insertBytesAsync", &XpbBuilder::insertBytesAsync)); + properties.push_back(InstanceMethod("insertStringSync", &XpbBuilder::insertStringSync)); + properties.push_back(InstanceMethod("insertStringAsync", &XpbBuilder::insertStringAsync)); + properties.push_back(InstanceMethod("insertTagSync", &XpbBuilder::insertTagSync)); + properties.push_back(InstanceMethod("insertTagAsync", &XpbBuilder::insertTagAsync)); + properties.push_back(InstanceMethod("isEofSync", &XpbBuilder::isEofSync)); + properties.push_back(InstanceMethod("isEofAsync", &XpbBuilder::isEofAsync)); + properties.push_back(InstanceMethod("moveNextSync", &XpbBuilder::moveNextSync)); + properties.push_back(InstanceMethod("moveNextAsync", &XpbBuilder::moveNextAsync)); + properties.push_back(InstanceMethod("rewindSync", &XpbBuilder::rewindSync)); + properties.push_back(InstanceMethod("rewindAsync", &XpbBuilder::rewindAsync)); + properties.push_back(InstanceMethod("findFirstSync", &XpbBuilder::findFirstSync)); + properties.push_back(InstanceMethod("findFirstAsync", &XpbBuilder::findFirstAsync)); + properties.push_back(InstanceMethod("findNextSync", &XpbBuilder::findNextSync)); + properties.push_back(InstanceMethod("findNextAsync", &XpbBuilder::findNextAsync)); + properties.push_back(InstanceMethod("getTagSync", &XpbBuilder::getTagSync)); + properties.push_back(InstanceMethod("getTagAsync", &XpbBuilder::getTagAsync)); + properties.push_back(InstanceMethod("getLengthSync", &XpbBuilder::getLengthSync)); + properties.push_back(InstanceMethod("getLengthAsync", &XpbBuilder::getLengthAsync)); + properties.push_back(InstanceMethod("getIntSync", &XpbBuilder::getIntSync)); + properties.push_back(InstanceMethod("getIntAsync", &XpbBuilder::getIntAsync)); + properties.push_back(InstanceMethod("getBigIntSync", &XpbBuilder::getBigIntSync)); + properties.push_back(InstanceMethod("getBigIntAsync", &XpbBuilder::getBigIntAsync)); + properties.push_back(InstanceMethod("getStringSync", &XpbBuilder::getStringSync)); + properties.push_back(InstanceMethod("getStringAsync", &XpbBuilder::getStringAsync)); + properties.push_back(InstanceMethod("getBytesSync", &XpbBuilder::getBytesSync)); + properties.push_back(InstanceMethod("getBytesAsync", &XpbBuilder::getBytesAsync)); + properties.push_back(InstanceMethod("getBufferLengthSync", &XpbBuilder::getBufferLengthSync)); + properties.push_back(InstanceMethod("getBufferLengthAsync", &XpbBuilder::getBufferLengthAsync)); + properties.push_back(InstanceMethod("getBufferSync", &XpbBuilder::getBufferSync)); + properties.push_back(InstanceMethod("getBufferAsync", &XpbBuilder::getBufferAsync)); } -MethodStart KeyHolderPlugin::keyCallbackStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::disposeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* callback = CryptKeyCallback::CheckedUnwrap(info.Env(), info[1], "callback argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, callback]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->keyCallback(&statusWrapper, (callback ? callback->interface : nullptr)); + return [obj]() { + obj->interface->dispose(); + return nullptr; }; } -Napi::Value KeyHolderPlugin::keyCallbackFinish(const Napi::Env env, int ret) +Napi::Value XpbBuilder::disposeFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart KeyHolderPlugin::keyHandleStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::clearStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string keyName = info[1].ToString().Utf8Value(); - return [obj, status, keyName]() { + return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->keyHandle(&statusWrapper, keyName.c_str()); + obj->interface->clear(&statusWrapper); + return nullptr; }; } -Napi::Value KeyHolderPlugin::keyHandleFinish(const Napi::Env env, fb::ICryptKeyCallback* ret) -{ - return CryptKeyCallback::NewInstance(env, ret); -} - -void DbCryptPlugin::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value XpbBuilder::clearFinish(const Napi::Env env, void* ret) { - properties.push_back(InstanceMethod("addRefSync", &DbCryptPlugin::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &DbCryptPlugin::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &DbCryptPlugin::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &DbCryptPlugin::releaseAsync)); - properties.push_back(InstanceMethod("setOwnerSync", &DbCryptPlugin::setOwnerSync)); - properties.push_back(InstanceMethod("setOwnerAsync", &DbCryptPlugin::setOwnerAsync)); - properties.push_back(InstanceMethod("getOwnerSync", &DbCryptPlugin::getOwnerSync)); - properties.push_back(InstanceMethod("getOwnerAsync", &DbCryptPlugin::getOwnerAsync)); + return env.Undefined(); } -MethodStart DbCryptPlugin::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::removeCurrentStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - obj->interface->addRef(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->removeCurrent(&statusWrapper); return nullptr; }; } -Napi::Value DbCryptPlugin::addRefFinish(const Napi::Env env, void* ret) +Napi::Value XpbBuilder::removeCurrentFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart DbCryptPlugin::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::insertIntStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned char tag = (unsigned char) info[1].ToNumber().Uint32Value(); + int value = (int) info[2].ToNumber(); - return [obj]() { - return obj->interface->release(); + return [obj, status, tag, value]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->insertInt(&statusWrapper, tag, value); + return nullptr; }; } -Napi::Value DbCryptPlugin::releaseFinish(const Napi::Env env, int ret) +Napi::Value XpbBuilder::insertIntFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart DbCryptPlugin::setOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::insertBigIntStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned char tag = (unsigned char) info[1].ToNumber().Uint32Value(); + int64_t value = (int64_t) info[2].ToNumber(); - return [obj, r]() { - obj->interface->setOwner((r ? r->interface : nullptr)); + return [obj, status, tag, value]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->insertBigInt(&statusWrapper, tag, value); return nullptr; }; } -Napi::Value DbCryptPlugin::setOwnerFinish(const Napi::Env env, void* ret) +Napi::Value XpbBuilder::insertBigIntFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart DbCryptPlugin::getOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::insertBytesStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned char tag = (unsigned char) info[1].ToNumber().Uint32Value(); + std::shared_ptr> bytesPersistent; + auto* bytes = getAddress(info.Env(), async, info[2], bytesPersistent); + unsigned length = (unsigned) info[3].ToNumber(); - return [obj]() { - return obj->interface->getOwner(); + return [obj, status, tag, bytes, bytesPersistent, length]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->insertBytes(&statusWrapper, tag, bytes, length); + return nullptr; }; } -Napi::Value DbCryptPlugin::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) +Napi::Value XpbBuilder::insertBytesFinish(const Napi::Env env, void* ret) { - return ReferenceCounted::NewInstance(env, ret); + return env.Undefined(); } -void ExternalContext::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart XpbBuilder::insertStringStart(bool async, const Napi::CallbackInfo& info) { + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned char tag = (unsigned char) info[1].ToNumber().Uint32Value(); + std::string str = info[2].ToString().Utf8Value(); + + return [obj, status, tag, str]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->insertString(&statusWrapper, tag, str.c_str()); + return nullptr; + }; } -void ExternalResultSet::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value XpbBuilder::insertStringFinish(const Napi::Env env, void* ret) { - properties.push_back(InstanceMethod("disposeSync", &ExternalResultSet::disposeSync)); - properties.push_back(InstanceMethod("disposeAsync", &ExternalResultSet::disposeAsync)); - properties.push_back(InstanceMethod("fetchSync", &ExternalResultSet::fetchSync)); - properties.push_back(InstanceMethod("fetchAsync", &ExternalResultSet::fetchAsync)); + return env.Undefined(); } -MethodStart ExternalResultSet::disposeStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::insertTagStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned char tag = (unsigned char) info[1].ToNumber().Uint32Value(); - return [obj]() { - obj->interface->dispose(); + return [obj, status, tag]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->insertTag(&statusWrapper, tag); return nullptr; }; } -Napi::Value ExternalResultSet::disposeFinish(const Napi::Env env, void* ret) +Napi::Value XpbBuilder::insertTagFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart ExternalResultSet::fetchStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::isEofStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->fetch(&statusWrapper); + return obj->interface->isEof(&statusWrapper); }; } -Napi::Value ExternalResultSet::fetchFinish(const Napi::Env env, FB_BOOLEAN ret) +Napi::Value XpbBuilder::isEofFinish(const Napi::Env env, FB_BOOLEAN ret) { return Napi::Value::From(env, (bool) ret); } -void ExternalFunction::InitPrototype(std::vector::PropertyDescriptor>& properties) -{ - properties.push_back(InstanceMethod("disposeSync", &ExternalFunction::disposeSync)); - properties.push_back(InstanceMethod("disposeAsync", &ExternalFunction::disposeAsync)); -} - -MethodStart ExternalFunction::disposeStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::moveNextStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - obj->interface->dispose(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->moveNext(&statusWrapper); return nullptr; }; } -Napi::Value ExternalFunction::disposeFinish(const Napi::Env env, void* ret) +Napi::Value XpbBuilder::moveNextFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -void ExternalProcedure::InitPrototype(std::vector::PropertyDescriptor>& properties) -{ - properties.push_back(InstanceMethod("disposeSync", &ExternalProcedure::disposeSync)); - properties.push_back(InstanceMethod("disposeAsync", &ExternalProcedure::disposeAsync)); -} - -MethodStart ExternalProcedure::disposeStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::rewindStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - obj->interface->dispose(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->rewind(&statusWrapper); return nullptr; }; } -Napi::Value ExternalProcedure::disposeFinish(const Napi::Env env, void* ret) +Napi::Value XpbBuilder::rewindFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -void ExternalTrigger::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart XpbBuilder::findFirstStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("disposeSync", &ExternalTrigger::disposeSync)); - properties.push_back(InstanceMethod("disposeAsync", &ExternalTrigger::disposeAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned char tag = (unsigned char) info[1].ToNumber().Uint32Value(); + + return [obj, status, tag]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->findFirst(&statusWrapper, tag); + }; } -MethodStart ExternalTrigger::disposeStart(bool async, const Napi::CallbackInfo& info) +Napi::Value XpbBuilder::findFirstFinish(const Napi::Env env, FB_BOOLEAN ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - - return [obj]() { - obj->interface->dispose(); - return nullptr; - }; + return Napi::Value::From(env, (bool) ret); } -Napi::Value ExternalTrigger::disposeFinish(const Napi::Env env, void* ret) +MethodStart XpbBuilder::findNextStart(bool async, const Napi::CallbackInfo& info) { - return env.Undefined(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->findNext(&statusWrapper); + }; } -void RoutineMetadata::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value XpbBuilder::findNextFinish(const Napi::Env env, FB_BOOLEAN ret) { - properties.push_back(InstanceMethod("getPackageSync", &RoutineMetadata::getPackageSync)); - properties.push_back(InstanceMethod("getPackageAsync", &RoutineMetadata::getPackageAsync)); - properties.push_back(InstanceMethod("getNameSync", &RoutineMetadata::getNameSync)); - properties.push_back(InstanceMethod("getNameAsync", &RoutineMetadata::getNameAsync)); - properties.push_back(InstanceMethod("getEntryPointSync", &RoutineMetadata::getEntryPointSync)); - properties.push_back(InstanceMethod("getEntryPointAsync", &RoutineMetadata::getEntryPointAsync)); - properties.push_back(InstanceMethod("getBodySync", &RoutineMetadata::getBodySync)); - properties.push_back(InstanceMethod("getBodyAsync", &RoutineMetadata::getBodyAsync)); - properties.push_back(InstanceMethod("getInputMetadataSync", &RoutineMetadata::getInputMetadataSync)); - properties.push_back(InstanceMethod("getInputMetadataAsync", &RoutineMetadata::getInputMetadataAsync)); - properties.push_back(InstanceMethod("getOutputMetadataSync", &RoutineMetadata::getOutputMetadataSync)); - properties.push_back(InstanceMethod("getOutputMetadataAsync", &RoutineMetadata::getOutputMetadataAsync)); - properties.push_back(InstanceMethod("getTriggerMetadataSync", &RoutineMetadata::getTriggerMetadataSync)); - properties.push_back(InstanceMethod("getTriggerMetadataAsync", &RoutineMetadata::getTriggerMetadataAsync)); - properties.push_back(InstanceMethod("getTriggerTableSync", &RoutineMetadata::getTriggerTableSync)); - properties.push_back(InstanceMethod("getTriggerTableAsync", &RoutineMetadata::getTriggerTableAsync)); - properties.push_back(InstanceMethod("getTriggerTypeSync", &RoutineMetadata::getTriggerTypeSync)); - properties.push_back(InstanceMethod("getTriggerTypeAsync", &RoutineMetadata::getTriggerTypeAsync)); + return Napi::Value::From(env, (bool) ret); } -MethodStart RoutineMetadata::getPackageStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::getTagStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getPackage(&statusWrapper); + return obj->interface->getTag(&statusWrapper); }; } -Napi::Value RoutineMetadata::getPackageFinish(const Napi::Env env, OptString ret) +Napi::Value XpbBuilder::getTagFinish(const Napi::Env env, unsigned char ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return Napi::Value::From(env, ret); } -MethodStart RoutineMetadata::getNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::getLengthStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getName(&statusWrapper); + return obj->interface->getLength(&statusWrapper); }; } -Napi::Value RoutineMetadata::getNameFinish(const Napi::Env env, OptString ret) +Napi::Value XpbBuilder::getLengthFinish(const Napi::Env env, unsigned ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return Napi::Value::From(env, ret); } -MethodStart RoutineMetadata::getEntryPointStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::getIntStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getEntryPoint(&statusWrapper); + return obj->interface->getInt(&statusWrapper); }; } -Napi::Value RoutineMetadata::getEntryPointFinish(const Napi::Env env, OptString ret) +Napi::Value XpbBuilder::getIntFinish(const Napi::Env env, int ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return Napi::Value::From(env, ret); } -MethodStart RoutineMetadata::getBodyStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::getBigIntStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getBody(&statusWrapper); + return obj->interface->getBigInt(&statusWrapper); }; } -Napi::Value RoutineMetadata::getBodyFinish(const Napi::Env env, OptString ret) +Napi::Value XpbBuilder::getBigIntFinish(const Napi::Env env, int64_t ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return Napi::Value::From(env, (double) ret); } -MethodStart RoutineMetadata::getInputMetadataStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::getStringStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getInputMetadata(&statusWrapper); + return obj->interface->getString(&statusWrapper); }; } -Napi::Value RoutineMetadata::getInputMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret) +Napi::Value XpbBuilder::getStringFinish(const Napi::Env env, OptString ret) { - return MessageMetadata::NewInstance(env, ret); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart RoutineMetadata::getOutputMetadataStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::getBytesStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getOutputMetadata(&statusWrapper); + return obj->interface->getBytes(&statusWrapper); }; } -Napi::Value RoutineMetadata::getOutputMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret) +Napi::Value XpbBuilder::getBytesFinish(const Napi::Env env, const unsigned char* ret) { - return MessageMetadata::NewInstance(env, ret); + return Pointer::NewInstance(env, ret); } -MethodStart RoutineMetadata::getTriggerMetadataStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::getBufferLengthStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getTriggerMetadata(&statusWrapper); + return obj->interface->getBufferLength(&statusWrapper); }; } -Napi::Value RoutineMetadata::getTriggerMetadataFinish(const Napi::Env env, fb::IMessageMetadata* ret) +Napi::Value XpbBuilder::getBufferLengthFinish(const Napi::Env env, unsigned ret) { - return MessageMetadata::NewInstance(env, ret); + return Napi::Value::From(env, ret); } -MethodStart RoutineMetadata::getTriggerTableStart(bool async, const Napi::CallbackInfo& info) +MethodStart XpbBuilder::getBufferStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); return [obj, status]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getTriggerTable(&statusWrapper); + return obj->interface->getBuffer(&statusWrapper); }; } -Napi::Value RoutineMetadata::getTriggerTableFinish(const Napi::Env env, OptString ret) +Napi::Value XpbBuilder::getBufferFinish(const Napi::Env env, const unsigned char* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return Pointer::NewInstance(env, ret); } -MethodStart RoutineMetadata::getTriggerTypeStart(bool async, const Napi::CallbackInfo& info) +void TraceConnection::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + properties.push_back(InstanceMethod("getKindSync", &TraceConnection::getKindSync)); + properties.push_back(InstanceMethod("getKindAsync", &TraceConnection::getKindAsync)); + properties.push_back(InstanceMethod("getProcessIDSync", &TraceConnection::getProcessIDSync)); + properties.push_back(InstanceMethod("getProcessIDAsync", &TraceConnection::getProcessIDAsync)); + properties.push_back(InstanceMethod("getUserNameSync", &TraceConnection::getUserNameSync)); + properties.push_back(InstanceMethod("getUserNameAsync", &TraceConnection::getUserNameAsync)); + properties.push_back(InstanceMethod("getRoleNameSync", &TraceConnection::getRoleNameSync)); + properties.push_back(InstanceMethod("getRoleNameAsync", &TraceConnection::getRoleNameAsync)); + properties.push_back(InstanceMethod("getCharSetSync", &TraceConnection::getCharSetSync)); + properties.push_back(InstanceMethod("getCharSetAsync", &TraceConnection::getCharSetAsync)); + properties.push_back(InstanceMethod("getRemoteProtocolSync", &TraceConnection::getRemoteProtocolSync)); + properties.push_back(InstanceMethod("getRemoteProtocolAsync", &TraceConnection::getRemoteProtocolAsync)); + properties.push_back(InstanceMethod("getRemoteAddressSync", &TraceConnection::getRemoteAddressSync)); + properties.push_back(InstanceMethod("getRemoteAddressAsync", &TraceConnection::getRemoteAddressAsync)); + properties.push_back(InstanceMethod("getRemoteProcessIDSync", &TraceConnection::getRemoteProcessIDSync)); + properties.push_back(InstanceMethod("getRemoteProcessIDAsync", &TraceConnection::getRemoteProcessIDAsync)); + properties.push_back(InstanceMethod("getRemoteProcessNameSync", &TraceConnection::getRemoteProcessNameSync)); + properties.push_back(InstanceMethod("getRemoteProcessNameAsync", &TraceConnection::getRemoteProcessNameAsync)); +} - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getTriggerType(&statusWrapper); +MethodStart TraceConnection::getKindStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getKind(); + }; +} + +Napi::Value TraceConnection::getKindFinish(const Napi::Env env, unsigned ret) +{ + return Napi::Value::From(env, ret); +} + +MethodStart TraceConnection::getProcessIDStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getProcessID(); }; } -Napi::Value RoutineMetadata::getTriggerTypeFinish(const Napi::Env env, unsigned ret) +Napi::Value TraceConnection::getProcessIDFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -void ExternalEngine::InitPrototype(std::vector::PropertyDescriptor>& properties) -{ - properties.push_back(InstanceMethod("addRefSync", &ExternalEngine::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &ExternalEngine::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &ExternalEngine::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &ExternalEngine::releaseAsync)); - properties.push_back(InstanceMethod("setOwnerSync", &ExternalEngine::setOwnerSync)); - properties.push_back(InstanceMethod("setOwnerAsync", &ExternalEngine::setOwnerAsync)); - properties.push_back(InstanceMethod("getOwnerSync", &ExternalEngine::getOwnerSync)); - properties.push_back(InstanceMethod("getOwnerAsync", &ExternalEngine::getOwnerAsync)); -} - -MethodStart ExternalEngine::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceConnection::getUserNameStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - obj->interface->addRef(); - return nullptr; + return obj->interface->getUserName(); }; } -Napi::Value ExternalEngine::addRefFinish(const Napi::Env env, void* ret) +Napi::Value TraceConnection::getUserNameFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart ExternalEngine::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceConnection::getRoleNameStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->release(); + return obj->interface->getRoleName(); }; } -Napi::Value ExternalEngine::releaseFinish(const Napi::Env env, int ret) +Napi::Value TraceConnection::getRoleNameFinish(const Napi::Env env, OptString ret) { - return Napi::Value::From(env, ret); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart ExternalEngine::setOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceConnection::getCharSetStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, r]() { - obj->interface->setOwner((r ? r->interface : nullptr)); - return nullptr; + return [obj]() { + return obj->interface->getCharSet(); }; } -Napi::Value ExternalEngine::setOwnerFinish(const Napi::Env env, void* ret) +Napi::Value TraceConnection::getCharSetFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart ExternalEngine::getOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceConnection::getRemoteProtocolStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getOwner(); + return obj->interface->getRemoteProtocol(); }; } -Napi::Value ExternalEngine::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) -{ - return ReferenceCounted::NewInstance(env, ret); -} - -void Timer::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value TraceConnection::getRemoteProtocolFinish(const Napi::Env env, OptString ret) { - properties.push_back(InstanceMethod("addRefSync", &Timer::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &Timer::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &Timer::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &Timer::releaseAsync)); - properties.push_back(InstanceMethod("handlerSync", &Timer::handlerSync)); - properties.push_back(InstanceMethod("handlerAsync", &Timer::handlerAsync)); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart Timer::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceConnection::getRemoteAddressStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - obj->interface->addRef(); - return nullptr; + return obj->interface->getRemoteAddress(); }; } -Napi::Value Timer::addRefFinish(const Napi::Env env, void* ret) +Napi::Value TraceConnection::getRemoteAddressFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart Timer::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceConnection::getRemoteProcessIDStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->release(); + return obj->interface->getRemoteProcessID(); }; } -Napi::Value Timer::releaseFinish(const Napi::Env env, int ret) +Napi::Value TraceConnection::getRemoteProcessIDFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart Timer::handlerStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceConnection::getRemoteProcessNameStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - obj->interface->handler(); - return nullptr; + return obj->interface->getRemoteProcessName(); }; } -Napi::Value Timer::handlerFinish(const Napi::Env env, void* ret) +Napi::Value TraceConnection::getRemoteProcessNameFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -void TimerControl::InitPrototype(std::vector::PropertyDescriptor>& properties) +void TraceDatabaseConnection::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("startSync", &TimerControl::startSync)); - properties.push_back(InstanceMethod("startAsync", &TimerControl::startAsync)); - properties.push_back(InstanceMethod("stopSync", &TimerControl::stopSync)); - properties.push_back(InstanceMethod("stopAsync", &TimerControl::stopAsync)); + properties.push_back(InstanceMethod("getKindSync", &TraceDatabaseConnection::getKindSync)); + properties.push_back(InstanceMethod("getKindAsync", &TraceDatabaseConnection::getKindAsync)); + properties.push_back(InstanceMethod("getProcessIDSync", &TraceDatabaseConnection::getProcessIDSync)); + properties.push_back(InstanceMethod("getProcessIDAsync", &TraceDatabaseConnection::getProcessIDAsync)); + properties.push_back(InstanceMethod("getUserNameSync", &TraceDatabaseConnection::getUserNameSync)); + properties.push_back(InstanceMethod("getUserNameAsync", &TraceDatabaseConnection::getUserNameAsync)); + properties.push_back(InstanceMethod("getRoleNameSync", &TraceDatabaseConnection::getRoleNameSync)); + properties.push_back(InstanceMethod("getRoleNameAsync", &TraceDatabaseConnection::getRoleNameAsync)); + properties.push_back(InstanceMethod("getCharSetSync", &TraceDatabaseConnection::getCharSetSync)); + properties.push_back(InstanceMethod("getCharSetAsync", &TraceDatabaseConnection::getCharSetAsync)); + properties.push_back(InstanceMethod("getRemoteProtocolSync", &TraceDatabaseConnection::getRemoteProtocolSync)); + properties.push_back(InstanceMethod("getRemoteProtocolAsync", &TraceDatabaseConnection::getRemoteProtocolAsync)); + properties.push_back(InstanceMethod("getRemoteAddressSync", &TraceDatabaseConnection::getRemoteAddressSync)); + properties.push_back(InstanceMethod("getRemoteAddressAsync", &TraceDatabaseConnection::getRemoteAddressAsync)); + properties.push_back(InstanceMethod("getRemoteProcessIDSync", &TraceDatabaseConnection::getRemoteProcessIDSync)); + properties.push_back(InstanceMethod("getRemoteProcessIDAsync", &TraceDatabaseConnection::getRemoteProcessIDAsync)); + properties.push_back(InstanceMethod("getRemoteProcessNameSync", &TraceDatabaseConnection::getRemoteProcessNameSync)); + properties.push_back(InstanceMethod("getRemoteProcessNameAsync", &TraceDatabaseConnection::getRemoteProcessNameAsync)); + properties.push_back(InstanceMethod("getConnectionIDSync", &TraceDatabaseConnection::getConnectionIDSync)); + properties.push_back(InstanceMethod("getConnectionIDAsync", &TraceDatabaseConnection::getConnectionIDAsync)); + properties.push_back(InstanceMethod("getDatabaseNameSync", &TraceDatabaseConnection::getDatabaseNameSync)); + properties.push_back(InstanceMethod("getDatabaseNameAsync", &TraceDatabaseConnection::getDatabaseNameAsync)); } -MethodStart TimerControl::startStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceDatabaseConnection::getKindStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* timer = Timer::CheckedUnwrap(info.Env(), info[1], "timer argument", true); - uint64_t microSeconds = (uint64_t) info[2].ToNumber().Int64Value(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, timer, microSeconds]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->start(&statusWrapper, (timer ? timer->interface : nullptr), microSeconds); - return nullptr; + return [obj]() { + return obj->interface->getKind(); }; } -Napi::Value TimerControl::startFinish(const Napi::Env env, void* ret) +Napi::Value TraceDatabaseConnection::getKindFinish(const Napi::Env env, unsigned ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart TimerControl::stopStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceDatabaseConnection::getProcessIDStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* timer = Timer::CheckedUnwrap(info.Env(), info[1], "timer argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, timer]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->stop(&statusWrapper, (timer ? timer->interface : nullptr)); - return nullptr; + return [obj]() { + return obj->interface->getProcessID(); }; } -Napi::Value TimerControl::stopFinish(const Napi::Env env, void* ret) +Napi::Value TraceDatabaseConnection::getProcessIDFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -void VersionCallback::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart TraceDatabaseConnection::getUserNameStart(bool async, const Napi::CallbackInfo& info) { - properties.push_back(InstanceMethod("callbackSync", &VersionCallback::callbackSync)); - properties.push_back(InstanceMethod("callbackAsync", &VersionCallback::callbackAsync)); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getUserName(); + }; } -MethodStart VersionCallback::callbackStart(bool async, const Napi::CallbackInfo& info) +Napi::Value TraceDatabaseConnection::getUserNameFinish(const Napi::Env env, OptString ret) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string text = info[1].ToString().Utf8Value(); - - return [obj, status, text]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->callback(&statusWrapper, text.c_str()); - return nullptr; - }; + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -Napi::Value VersionCallback::callbackFinish(const Napi::Env env, void* ret) +MethodStart TraceDatabaseConnection::getRoleNameStart(bool async, const Napi::CallbackInfo& info) { - return env.Undefined(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getRoleName(); + }; } -void Util::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value TraceDatabaseConnection::getRoleNameFinish(const Napi::Env env, OptString ret) { - properties.push_back(InstanceMethod("getFbVersionSync", &Util::getFbVersionSync)); - properties.push_back(InstanceMethod("getFbVersionAsync", &Util::getFbVersionAsync)); - properties.push_back(InstanceMethod("executeCreateDatabaseSync", &Util::executeCreateDatabaseSync)); - properties.push_back(InstanceMethod("executeCreateDatabaseAsync", &Util::executeCreateDatabaseAsync)); - properties.push_back(InstanceMethod("decodeDateSync", &Util::decodeDateSync)); - properties.push_back(InstanceMethod("decodeDateAsync", &Util::decodeDateAsync)); - properties.push_back(InstanceMethod("decodeTimeSync", &Util::decodeTimeSync)); - properties.push_back(InstanceMethod("decodeTimeAsync", &Util::decodeTimeAsync)); - properties.push_back(InstanceMethod("encodeDateSync", &Util::encodeDateSync)); - properties.push_back(InstanceMethod("encodeDateAsync", &Util::encodeDateAsync)); - properties.push_back(InstanceMethod("encodeTimeSync", &Util::encodeTimeSync)); - properties.push_back(InstanceMethod("encodeTimeAsync", &Util::encodeTimeAsync)); - properties.push_back(InstanceMethod("getClientVersionSync", &Util::getClientVersionSync)); - properties.push_back(InstanceMethod("getClientVersionAsync", &Util::getClientVersionAsync)); - properties.push_back(InstanceMethod("getXpbBuilderSync", &Util::getXpbBuilderSync)); - properties.push_back(InstanceMethod("getXpbBuilderAsync", &Util::getXpbBuilderAsync)); - properties.push_back(InstanceMethod("setOffsetsSync", &Util::setOffsetsSync)); - properties.push_back(InstanceMethod("setOffsetsAsync", &Util::setOffsetsAsync)); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart Util::getFbVersionStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceDatabaseConnection::getCharSetStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* att = Attachment::CheckedUnwrap(info.Env(), info[1], "att argument", true); - auto* callback = VersionCallback::CheckedUnwrap(info.Env(), info[2], "callback argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, att, callback]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->getFbVersion(&statusWrapper, (att ? att->interface : nullptr), (callback ? callback->interface : nullptr)); - return nullptr; + return [obj]() { + return obj->interface->getCharSet(); }; } -Napi::Value Util::getFbVersionFinish(const Napi::Env env, void* ret) +Napi::Value TraceDatabaseConnection::getCharSetFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart Util::executeCreateDatabaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceDatabaseConnection::getRemoteProtocolStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned stmtLength = (unsigned) info[1].ToNumber(); - std::string creatDBstatement = info[2].ToString().Utf8Value(); - unsigned dialect = (unsigned) info[3].ToNumber(); - std::shared_ptr> stmtIsCreateDbPersistent; - auto* stmtIsCreateDb = getAddress(info.Env(), async, info[4], stmtIsCreateDbPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, stmtLength, creatDBstatement, dialect, stmtIsCreateDb, stmtIsCreateDbPersistent]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->executeCreateDatabase(&statusWrapper, stmtLength, creatDBstatement.c_str(), dialect, stmtIsCreateDb); + return [obj]() { + return obj->interface->getRemoteProtocol(); }; } -Napi::Value Util::executeCreateDatabaseFinish(const Napi::Env env, fb::IAttachment* ret) +Napi::Value TraceDatabaseConnection::getRemoteProtocolFinish(const Napi::Env env, OptString ret) { - return Attachment::NewInstance(env, ret); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart Util::decodeDateStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceDatabaseConnection::getRemoteAddressStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - int date = (int) info[0].ToNumber(); - std::shared_ptr> yearPersistent; - auto* year = getAddress(info.Env(), async, info[1], yearPersistent); - std::shared_ptr> monthPersistent; - auto* month = getAddress(info.Env(), async, info[2], monthPersistent); - std::shared_ptr> dayPersistent; - auto* day = getAddress(info.Env(), async, info[3], dayPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, date, year, yearPersistent, month, monthPersistent, day, dayPersistent]() { - obj->interface->decodeDate(date, year, month, day); - return nullptr; + return [obj]() { + return obj->interface->getRemoteAddress(); }; } -Napi::Value Util::decodeDateFinish(const Napi::Env env, void* ret) +Napi::Value TraceDatabaseConnection::getRemoteAddressFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart Util::decodeTimeStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceDatabaseConnection::getRemoteProcessIDStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - int time = (int) info[0].ToNumber(); - std::shared_ptr> hoursPersistent; - auto* hours = getAddress(info.Env(), async, info[1], hoursPersistent); - std::shared_ptr> minutesPersistent; - auto* minutes = getAddress(info.Env(), async, info[2], minutesPersistent); - std::shared_ptr> secondsPersistent; - auto* seconds = getAddress(info.Env(), async, info[3], secondsPersistent); - std::shared_ptr> fractionsPersistent; - auto* fractions = getAddress(info.Env(), async, info[4], fractionsPersistent); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, time, hours, hoursPersistent, minutes, minutesPersistent, seconds, secondsPersistent, fractions, fractionsPersistent]() { - obj->interface->decodeTime(time, hours, minutes, seconds, fractions); - return nullptr; + return [obj]() { + return obj->interface->getRemoteProcessID(); }; } -Napi::Value Util::decodeTimeFinish(const Napi::Env env, void* ret) +Napi::Value TraceDatabaseConnection::getRemoteProcessIDFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart Util::encodeDateStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceDatabaseConnection::getRemoteProcessNameStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - unsigned year = (unsigned) info[0].ToNumber(); - unsigned month = (unsigned) info[1].ToNumber(); - unsigned day = (unsigned) info[2].ToNumber(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, year, month, day]() { - return obj->interface->encodeDate(year, month, day); + return [obj]() { + return obj->interface->getRemoteProcessName(); }; } -Napi::Value Util::encodeDateFinish(const Napi::Env env, int ret) +Napi::Value TraceDatabaseConnection::getRemoteProcessNameFinish(const Napi::Env env, OptString ret) { - return Napi::Value::From(env, ret); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart Util::encodeTimeStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceDatabaseConnection::getConnectionIDStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - unsigned hours = (unsigned) info[0].ToNumber(); - unsigned minutes = (unsigned) info[1].ToNumber(); - unsigned seconds = (unsigned) info[2].ToNumber(); - unsigned fractions = (unsigned) info[3].ToNumber(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, hours, minutes, seconds, fractions]() { - return obj->interface->encodeTime(hours, minutes, seconds, fractions); + return [obj]() { + return obj->interface->getConnectionID(); }; } -Napi::Value Util::encodeTimeFinish(const Napi::Env env, int ret) +Napi::Value TraceDatabaseConnection::getConnectionIDFinish(const Napi::Env env, int64_t ret) { - return Napi::Value::From(env, ret); + return Napi::Value::From(env, (double) ret); } -MethodStart Util::getClientVersionStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceDatabaseConnection::getDatabaseNameStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getClientVersion(); + return obj->interface->getDatabaseName(); }; } -Napi::Value Util::getClientVersionFinish(const Napi::Env env, unsigned ret) +Napi::Value TraceDatabaseConnection::getDatabaseNameFinish(const Napi::Env env, OptString ret) { - return Napi::Value::From(env, ret); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart Util::getXpbBuilderStart(bool async, const Napi::CallbackInfo& info) +void TraceTransaction::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned kind = (unsigned) info[1].ToNumber(); - std::shared_ptr> bufPersistent; - auto* buf = getAddress(info.Env(), async, info[2], bufPersistent); - unsigned len = (unsigned) info[3].ToNumber(); +} - return [obj, status, kind, buf, bufPersistent, len]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getXpbBuilder(&statusWrapper, kind, buf, len); - }; +void TraceParams::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ } -Napi::Value Util::getXpbBuilderFinish(const Napi::Env env, fb::IXpbBuilder* ret) +void TraceStatement::InitPrototype(std::vector::PropertyDescriptor>& properties) { - return XpbBuilder::NewInstance(env, ret); } -MethodStart Util::setOffsetsStart(bool async, const Napi::CallbackInfo& info) +void TraceSQLStatement::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* metadata = MessageMetadata::CheckedUnwrap(info.Env(), info[1], "metadata argument", true); - auto* callback = OffsetsCallback::CheckedUnwrap(info.Env(), info[2], "callback argument", true); +} - return [obj, status, metadata, callback]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->setOffsets(&statusWrapper, (metadata ? metadata->interface : nullptr), (callback ? callback->interface : nullptr)); - }; +void TraceBLRStatement::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ } -Napi::Value Util::setOffsetsFinish(const Napi::Env env, unsigned ret) +void TraceDYNRequest::InitPrototype(std::vector::PropertyDescriptor>& properties) { - return Napi::Value::From(env, ret); } -void OffsetsCallback::InitPrototype(std::vector::PropertyDescriptor>& properties) +void TraceContextVariable::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("setOffsetSync", &OffsetsCallback::setOffsetSync)); - properties.push_back(InstanceMethod("setOffsetAsync", &OffsetsCallback::setOffsetAsync)); } -MethodStart OffsetsCallback::setOffsetStart(bool async, const Napi::CallbackInfo& info) +void TraceProcedure::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned index = (unsigned) info[1].ToNumber(); - unsigned offset = (unsigned) info[2].ToNumber(); - unsigned nullOffset = (unsigned) info[3].ToNumber(); +} - return [obj, status, index, offset, nullOffset]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setOffset(&statusWrapper, index, offset, nullOffset); - return nullptr; - }; +void TraceFunction::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ } -Napi::Value OffsetsCallback::setOffsetFinish(const Napi::Env env, void* ret) +void TraceTrigger::InitPrototype(std::vector::PropertyDescriptor>& properties) { - return env.Undefined(); } -void XpbBuilder::InitPrototype(std::vector::PropertyDescriptor>& properties) +void TraceServiceConnection::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("disposeSync", &XpbBuilder::disposeSync)); - properties.push_back(InstanceMethod("disposeAsync", &XpbBuilder::disposeAsync)); - properties.push_back(InstanceMethod("clearSync", &XpbBuilder::clearSync)); - properties.push_back(InstanceMethod("clearAsync", &XpbBuilder::clearAsync)); - properties.push_back(InstanceMethod("removeCurrentSync", &XpbBuilder::removeCurrentSync)); - properties.push_back(InstanceMethod("removeCurrentAsync", &XpbBuilder::removeCurrentAsync)); - properties.push_back(InstanceMethod("insertIntSync", &XpbBuilder::insertIntSync)); - properties.push_back(InstanceMethod("insertIntAsync", &XpbBuilder::insertIntAsync)); - properties.push_back(InstanceMethod("insertBigIntSync", &XpbBuilder::insertBigIntSync)); - properties.push_back(InstanceMethod("insertBigIntAsync", &XpbBuilder::insertBigIntAsync)); - properties.push_back(InstanceMethod("insertBytesSync", &XpbBuilder::insertBytesSync)); - properties.push_back(InstanceMethod("insertBytesAsync", &XpbBuilder::insertBytesAsync)); - properties.push_back(InstanceMethod("insertStringSync", &XpbBuilder::insertStringSync)); - properties.push_back(InstanceMethod("insertStringAsync", &XpbBuilder::insertStringAsync)); - properties.push_back(InstanceMethod("insertTagSync", &XpbBuilder::insertTagSync)); - properties.push_back(InstanceMethod("insertTagAsync", &XpbBuilder::insertTagAsync)); - properties.push_back(InstanceMethod("isEofSync", &XpbBuilder::isEofSync)); - properties.push_back(InstanceMethod("isEofAsync", &XpbBuilder::isEofAsync)); - properties.push_back(InstanceMethod("moveNextSync", &XpbBuilder::moveNextSync)); - properties.push_back(InstanceMethod("moveNextAsync", &XpbBuilder::moveNextAsync)); - properties.push_back(InstanceMethod("rewindSync", &XpbBuilder::rewindSync)); - properties.push_back(InstanceMethod("rewindAsync", &XpbBuilder::rewindAsync)); - properties.push_back(InstanceMethod("findFirstSync", &XpbBuilder::findFirstSync)); - properties.push_back(InstanceMethod("findFirstAsync", &XpbBuilder::findFirstAsync)); - properties.push_back(InstanceMethod("findNextSync", &XpbBuilder::findNextSync)); - properties.push_back(InstanceMethod("findNextAsync", &XpbBuilder::findNextAsync)); - properties.push_back(InstanceMethod("getTagSync", &XpbBuilder::getTagSync)); - properties.push_back(InstanceMethod("getTagAsync", &XpbBuilder::getTagAsync)); - properties.push_back(InstanceMethod("getLengthSync", &XpbBuilder::getLengthSync)); - properties.push_back(InstanceMethod("getLengthAsync", &XpbBuilder::getLengthAsync)); - properties.push_back(InstanceMethod("getIntSync", &XpbBuilder::getIntSync)); - properties.push_back(InstanceMethod("getIntAsync", &XpbBuilder::getIntAsync)); - properties.push_back(InstanceMethod("getBigIntSync", &XpbBuilder::getBigIntSync)); - properties.push_back(InstanceMethod("getBigIntAsync", &XpbBuilder::getBigIntAsync)); - properties.push_back(InstanceMethod("getStringSync", &XpbBuilder::getStringSync)); - properties.push_back(InstanceMethod("getStringAsync", &XpbBuilder::getStringAsync)); - properties.push_back(InstanceMethod("getBytesSync", &XpbBuilder::getBytesSync)); - properties.push_back(InstanceMethod("getBytesAsync", &XpbBuilder::getBytesAsync)); - properties.push_back(InstanceMethod("getBufferLengthSync", &XpbBuilder::getBufferLengthSync)); - properties.push_back(InstanceMethod("getBufferLengthAsync", &XpbBuilder::getBufferLengthAsync)); - properties.push_back(InstanceMethod("getBufferSync", &XpbBuilder::getBufferSync)); - properties.push_back(InstanceMethod("getBufferAsync", &XpbBuilder::getBufferAsync)); + properties.push_back(InstanceMethod("getKindSync", &TraceServiceConnection::getKindSync)); + properties.push_back(InstanceMethod("getKindAsync", &TraceServiceConnection::getKindAsync)); + properties.push_back(InstanceMethod("getProcessIDSync", &TraceServiceConnection::getProcessIDSync)); + properties.push_back(InstanceMethod("getProcessIDAsync", &TraceServiceConnection::getProcessIDAsync)); + properties.push_back(InstanceMethod("getUserNameSync", &TraceServiceConnection::getUserNameSync)); + properties.push_back(InstanceMethod("getUserNameAsync", &TraceServiceConnection::getUserNameAsync)); + properties.push_back(InstanceMethod("getRoleNameSync", &TraceServiceConnection::getRoleNameSync)); + properties.push_back(InstanceMethod("getRoleNameAsync", &TraceServiceConnection::getRoleNameAsync)); + properties.push_back(InstanceMethod("getCharSetSync", &TraceServiceConnection::getCharSetSync)); + properties.push_back(InstanceMethod("getCharSetAsync", &TraceServiceConnection::getCharSetAsync)); + properties.push_back(InstanceMethod("getRemoteProtocolSync", &TraceServiceConnection::getRemoteProtocolSync)); + properties.push_back(InstanceMethod("getRemoteProtocolAsync", &TraceServiceConnection::getRemoteProtocolAsync)); + properties.push_back(InstanceMethod("getRemoteAddressSync", &TraceServiceConnection::getRemoteAddressSync)); + properties.push_back(InstanceMethod("getRemoteAddressAsync", &TraceServiceConnection::getRemoteAddressAsync)); + properties.push_back(InstanceMethod("getRemoteProcessIDSync", &TraceServiceConnection::getRemoteProcessIDSync)); + properties.push_back(InstanceMethod("getRemoteProcessIDAsync", &TraceServiceConnection::getRemoteProcessIDAsync)); + properties.push_back(InstanceMethod("getRemoteProcessNameSync", &TraceServiceConnection::getRemoteProcessNameSync)); + properties.push_back(InstanceMethod("getRemoteProcessNameAsync", &TraceServiceConnection::getRemoteProcessNameAsync)); } -MethodStart XpbBuilder::disposeStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceServiceConnection::getKindStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - obj->interface->dispose(); - return nullptr; + return obj->interface->getKind(); }; } -Napi::Value XpbBuilder::disposeFinish(const Napi::Env env, void* ret) +Napi::Value TraceServiceConnection::getKindFinish(const Napi::Env env, unsigned ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart XpbBuilder::clearStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceServiceConnection::getProcessIDStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->clear(&statusWrapper); - return nullptr; + return [obj]() { + return obj->interface->getProcessID(); }; } -Napi::Value XpbBuilder::clearFinish(const Napi::Env env, void* ret) +Napi::Value TraceServiceConnection::getProcessIDFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart XpbBuilder::removeCurrentStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceServiceConnection::getUserNameStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->removeCurrent(&statusWrapper); - return nullptr; + return [obj]() { + return obj->interface->getUserName(); }; } -Napi::Value XpbBuilder::removeCurrentFinish(const Napi::Env env, void* ret) +Napi::Value TraceServiceConnection::getUserNameFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart XpbBuilder::insertIntStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceServiceConnection::getRoleNameStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned char tag = (unsigned char) info[1].ToNumber().Uint32Value(); - int value = (int) info[2].ToNumber(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, tag, value]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->insertInt(&statusWrapper, tag, value); - return nullptr; + return [obj]() { + return obj->interface->getRoleName(); + }; +} + +Napi::Value TraceServiceConnection::getRoleNameFinish(const Napi::Env env, OptString ret) +{ + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); +} + +MethodStart TraceServiceConnection::getCharSetStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getCharSet(); }; } -Napi::Value XpbBuilder::insertIntFinish(const Napi::Env env, void* ret) +Napi::Value TraceServiceConnection::getCharSetFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart XpbBuilder::insertBigIntStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceServiceConnection::getRemoteProtocolStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned char tag = (unsigned char) info[1].ToNumber().Uint32Value(); - int64_t value = (int64_t) info[2].ToNumber(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, tag, value]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->insertBigInt(&statusWrapper, tag, value); - return nullptr; + return [obj]() { + return obj->interface->getRemoteProtocol(); }; } -Napi::Value XpbBuilder::insertBigIntFinish(const Napi::Env env, void* ret) +Napi::Value TraceServiceConnection::getRemoteProtocolFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart XpbBuilder::insertBytesStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceServiceConnection::getRemoteAddressStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned char tag = (unsigned char) info[1].ToNumber().Uint32Value(); - std::shared_ptr> bytesPersistent; - auto* bytes = getAddress(info.Env(), async, info[2], bytesPersistent); - unsigned length = (unsigned) info[3].ToNumber(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, tag, bytes, bytesPersistent, length]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->insertBytes(&statusWrapper, tag, bytes, length); - return nullptr; + return [obj]() { + return obj->interface->getRemoteAddress(); }; } -Napi::Value XpbBuilder::insertBytesFinish(const Napi::Env env, void* ret) +Napi::Value TraceServiceConnection::getRemoteAddressFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart XpbBuilder::insertStringStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceServiceConnection::getRemoteProcessIDStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned char tag = (unsigned char) info[1].ToNumber().Uint32Value(); - std::string str = info[2].ToString().Utf8Value(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, tag, str]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->insertString(&statusWrapper, tag, str.c_str()); - return nullptr; + return [obj]() { + return obj->interface->getRemoteProcessID(); }; } -Napi::Value XpbBuilder::insertStringFinish(const Napi::Env env, void* ret) +Napi::Value TraceServiceConnection::getRemoteProcessIDFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart XpbBuilder::insertTagStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceServiceConnection::getRemoteProcessNameStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned char tag = (unsigned char) info[1].ToNumber().Uint32Value(); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, tag]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->insertTag(&statusWrapper, tag); - return nullptr; + return [obj]() { + return obj->interface->getRemoteProcessName(); }; } -Napi::Value XpbBuilder::insertTagFinish(const Napi::Env env, void* ret) +Napi::Value TraceServiceConnection::getRemoteProcessNameFinish(const Napi::Env env, OptString ret) { - return env.Undefined(); + return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart XpbBuilder::isEofStart(bool async, const Napi::CallbackInfo& info) +void TraceStatusVector::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); +} - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->isEof(&statusWrapper); - }; +void TraceSweepInfo::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ } -Napi::Value XpbBuilder::isEofFinish(const Napi::Env env, FB_BOOLEAN ret) +void TraceLogWriter::InitPrototype(std::vector::PropertyDescriptor>& properties) { - return Napi::Value::From(env, (bool) ret); + properties.push_back(InstanceMethod("addRefSync", &TraceLogWriter::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &TraceLogWriter::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &TraceLogWriter::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &TraceLogWriter::releaseAsync)); } -MethodStart XpbBuilder::moveNextStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceLogWriter::addRefStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->moveNext(&statusWrapper); + return [obj]() { + obj->interface->addRef(); return nullptr; }; } -Napi::Value XpbBuilder::moveNextFinish(const Napi::Env env, void* ret) +Napi::Value TraceLogWriter::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart XpbBuilder::rewindStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceLogWriter::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->rewind(&statusWrapper); - return nullptr; + return [obj]() { + return obj->interface->release(); }; } -Napi::Value XpbBuilder::rewindFinish(const Napi::Env env, void* ret) +Napi::Value TraceLogWriter::releaseFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart XpbBuilder::findFirstStart(bool async, const Napi::CallbackInfo& info) +void TraceInitInfo::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - unsigned char tag = (unsigned char) info[1].ToNumber().Uint32Value(); - - return [obj, status, tag]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->findFirst(&statusWrapper, tag); - }; } -Napi::Value XpbBuilder::findFirstFinish(const Napi::Env env, FB_BOOLEAN ret) +void TracePlugin::InitPrototype(std::vector::PropertyDescriptor>& properties) { - return Napi::Value::From(env, (bool) ret); + properties.push_back(InstanceMethod("addRefSync", &TracePlugin::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &TracePlugin::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &TracePlugin::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &TracePlugin::releaseAsync)); } -MethodStart XpbBuilder::findNextStart(bool async, const Napi::CallbackInfo& info) +MethodStart TracePlugin::addRefStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->findNext(&statusWrapper); + return [obj]() { + obj->interface->addRef(); + return nullptr; }; } -Napi::Value XpbBuilder::findNextFinish(const Napi::Env env, FB_BOOLEAN ret) +Napi::Value TracePlugin::addRefFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, (bool) ret); + return env.Undefined(); } -MethodStart XpbBuilder::getTagStart(bool async, const Napi::CallbackInfo& info) +MethodStart TracePlugin::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getTag(&statusWrapper); + return [obj]() { + return obj->interface->release(); }; } -Napi::Value XpbBuilder::getTagFinish(const Napi::Env env, unsigned char ret) +Napi::Value TracePlugin::releaseFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart XpbBuilder::getLengthStart(bool async, const Napi::CallbackInfo& info) +void TraceFactory::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + properties.push_back(InstanceMethod("addRefSync", &TraceFactory::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &TraceFactory::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &TraceFactory::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &TraceFactory::releaseAsync)); + properties.push_back(InstanceMethod("setOwnerSync", &TraceFactory::setOwnerSync)); + properties.push_back(InstanceMethod("setOwnerAsync", &TraceFactory::setOwnerAsync)); + properties.push_back(InstanceMethod("getOwnerSync", &TraceFactory::getOwnerSync)); + properties.push_back(InstanceMethod("getOwnerAsync", &TraceFactory::getOwnerAsync)); +} - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getLength(&statusWrapper); +MethodStart TraceFactory::addRefStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); + return nullptr; }; } -Napi::Value XpbBuilder::getLengthFinish(const Napi::Env env, unsigned ret) +Napi::Value TraceFactory::addRefFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart XpbBuilder::getIntStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceFactory::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getInt(&statusWrapper); + return [obj]() { + return obj->interface->release(); }; } -Napi::Value XpbBuilder::getIntFinish(const Napi::Env env, int ret) +Napi::Value TraceFactory::releaseFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart XpbBuilder::getBigIntStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceFactory::setOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getBigInt(&statusWrapper); + return [obj, r]() { + obj->interface->setOwner((r ? r->interface : nullptr)); + return nullptr; }; } -Napi::Value XpbBuilder::getBigIntFinish(const Napi::Env env, int64_t ret) +Napi::Value TraceFactory::setOwnerFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, (double) ret); + return env.Undefined(); } -MethodStart XpbBuilder::getStringStart(bool async, const Napi::CallbackInfo& info) +MethodStart TraceFactory::getOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getString(&statusWrapper); + return [obj]() { + return obj->interface->getOwner(); }; } -Napi::Value XpbBuilder::getStringFinish(const Napi::Env env, OptString ret) +Napi::Value TraceFactory::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return ReferenceCounted::NewInstance(env, ret); } -MethodStart XpbBuilder::getBytesStart(bool async, const Napi::CallbackInfo& info) +void UdrFunctionFactory::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + properties.push_back(InstanceMethod("disposeSync", &UdrFunctionFactory::disposeSync)); + properties.push_back(InstanceMethod("disposeAsync", &UdrFunctionFactory::disposeAsync)); + properties.push_back(InstanceMethod("setupSync", &UdrFunctionFactory::setupSync)); + properties.push_back(InstanceMethod("setupAsync", &UdrFunctionFactory::setupAsync)); + properties.push_back(InstanceMethod("newItemSync", &UdrFunctionFactory::newItemSync)); + properties.push_back(InstanceMethod("newItemAsync", &UdrFunctionFactory::newItemAsync)); +} - return [obj, status]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getBytes(&statusWrapper); +MethodStart UdrFunctionFactory::disposeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->dispose(); + return nullptr; }; } -Napi::Value XpbBuilder::getBytesFinish(const Napi::Env env, const unsigned char* ret) +Napi::Value UdrFunctionFactory::disposeFinish(const Napi::Env env, void* ret) { - return Pointer::NewInstance(env, ret); + return env.Undefined(); } -MethodStart XpbBuilder::getBufferLengthStart(bool async, const Napi::CallbackInfo& info) +MethodStart UdrFunctionFactory::setupStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* context = ExternalContext::CheckedUnwrap(info.Env(), info[1], "context argument", true); + auto* metadata = RoutineMetadata::CheckedUnwrap(info.Env(), info[2], "metadata argument", true); + auto* inBuilder = MetadataBuilder::CheckedUnwrap(info.Env(), info[3], "inBuilder argument", true); + auto* outBuilder = MetadataBuilder::CheckedUnwrap(info.Env(), info[4], "outBuilder argument", true); - return [obj, status]() { + return [obj, status, context, metadata, inBuilder, outBuilder]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getBufferLength(&statusWrapper); + obj->interface->setup(&statusWrapper, (context ? context->interface : nullptr), (metadata ? metadata->interface : nullptr), (inBuilder ? inBuilder->interface : nullptr), (outBuilder ? outBuilder->interface : nullptr)); + return nullptr; }; } -Napi::Value XpbBuilder::getBufferLengthFinish(const Napi::Env env, unsigned ret) +Napi::Value UdrFunctionFactory::setupFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart XpbBuilder::getBufferStart(bool async, const Napi::CallbackInfo& info) +MethodStart UdrFunctionFactory::newItemStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* context = ExternalContext::CheckedUnwrap(info.Env(), info[1], "context argument", true); + auto* metadata = RoutineMetadata::CheckedUnwrap(info.Env(), info[2], "metadata argument", true); - return [obj, status]() { + return [obj, status, context, metadata]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->getBuffer(&statusWrapper); + return obj->interface->newItem(&statusWrapper, (context ? context->interface : nullptr), (metadata ? metadata->interface : nullptr)); }; } -Napi::Value XpbBuilder::getBufferFinish(const Napi::Env env, const unsigned char* ret) +Napi::Value UdrFunctionFactory::newItemFinish(const Napi::Env env, fb::IExternalFunction* ret) { - return Pointer::NewInstance(env, ret); + return ExternalFunction::NewInstance(env, ret); } -void TraceConnection::InitPrototype(std::vector::PropertyDescriptor>& properties) +void UdrProcedureFactory::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("getKindSync", &TraceConnection::getKindSync)); - properties.push_back(InstanceMethod("getKindAsync", &TraceConnection::getKindAsync)); - properties.push_back(InstanceMethod("getProcessIDSync", &TraceConnection::getProcessIDSync)); - properties.push_back(InstanceMethod("getProcessIDAsync", &TraceConnection::getProcessIDAsync)); - properties.push_back(InstanceMethod("getUserNameSync", &TraceConnection::getUserNameSync)); - properties.push_back(InstanceMethod("getUserNameAsync", &TraceConnection::getUserNameAsync)); - properties.push_back(InstanceMethod("getRoleNameSync", &TraceConnection::getRoleNameSync)); - properties.push_back(InstanceMethod("getRoleNameAsync", &TraceConnection::getRoleNameAsync)); - properties.push_back(InstanceMethod("getCharSetSync", &TraceConnection::getCharSetSync)); - properties.push_back(InstanceMethod("getCharSetAsync", &TraceConnection::getCharSetAsync)); - properties.push_back(InstanceMethod("getRemoteProtocolSync", &TraceConnection::getRemoteProtocolSync)); - properties.push_back(InstanceMethod("getRemoteProtocolAsync", &TraceConnection::getRemoteProtocolAsync)); - properties.push_back(InstanceMethod("getRemoteAddressSync", &TraceConnection::getRemoteAddressSync)); - properties.push_back(InstanceMethod("getRemoteAddressAsync", &TraceConnection::getRemoteAddressAsync)); - properties.push_back(InstanceMethod("getRemoteProcessIDSync", &TraceConnection::getRemoteProcessIDSync)); - properties.push_back(InstanceMethod("getRemoteProcessIDAsync", &TraceConnection::getRemoteProcessIDAsync)); - properties.push_back(InstanceMethod("getRemoteProcessNameSync", &TraceConnection::getRemoteProcessNameSync)); - properties.push_back(InstanceMethod("getRemoteProcessNameAsync", &TraceConnection::getRemoteProcessNameAsync)); + properties.push_back(InstanceMethod("disposeSync", &UdrProcedureFactory::disposeSync)); + properties.push_back(InstanceMethod("disposeAsync", &UdrProcedureFactory::disposeAsync)); + properties.push_back(InstanceMethod("setupSync", &UdrProcedureFactory::setupSync)); + properties.push_back(InstanceMethod("setupAsync", &UdrProcedureFactory::setupAsync)); + properties.push_back(InstanceMethod("newItemSync", &UdrProcedureFactory::newItemSync)); + properties.push_back(InstanceMethod("newItemAsync", &UdrProcedureFactory::newItemAsync)); } -MethodStart TraceConnection::getKindStart(bool async, const Napi::CallbackInfo& info) +MethodStart UdrProcedureFactory::disposeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getKind(); + obj->interface->dispose(); + return nullptr; }; } -Napi::Value TraceConnection::getKindFinish(const Napi::Env env, unsigned ret) +Napi::Value UdrProcedureFactory::disposeFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart TraceConnection::getProcessIDStart(bool async, const Napi::CallbackInfo& info) +MethodStart UdrProcedureFactory::setupStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* context = ExternalContext::CheckedUnwrap(info.Env(), info[1], "context argument", true); + auto* metadata = RoutineMetadata::CheckedUnwrap(info.Env(), info[2], "metadata argument", true); + auto* inBuilder = MetadataBuilder::CheckedUnwrap(info.Env(), info[3], "inBuilder argument", true); + auto* outBuilder = MetadataBuilder::CheckedUnwrap(info.Env(), info[4], "outBuilder argument", true); - return [obj]() { - return obj->interface->getProcessID(); + return [obj, status, context, metadata, inBuilder, outBuilder]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setup(&statusWrapper, (context ? context->interface : nullptr), (metadata ? metadata->interface : nullptr), (inBuilder ? inBuilder->interface : nullptr), (outBuilder ? outBuilder->interface : nullptr)); + return nullptr; }; } -Napi::Value TraceConnection::getProcessIDFinish(const Napi::Env env, int ret) +Napi::Value UdrProcedureFactory::setupFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart TraceConnection::getUserNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart UdrProcedureFactory::newItemStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* context = ExternalContext::CheckedUnwrap(info.Env(), info[1], "context argument", true); + auto* metadata = RoutineMetadata::CheckedUnwrap(info.Env(), info[2], "metadata argument", true); - return [obj]() { - return obj->interface->getUserName(); + return [obj, status, context, metadata]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->newItem(&statusWrapper, (context ? context->interface : nullptr), (metadata ? metadata->interface : nullptr)); }; } -Napi::Value TraceConnection::getUserNameFinish(const Napi::Env env, OptString ret) +Napi::Value UdrProcedureFactory::newItemFinish(const Napi::Env env, fb::IExternalProcedure* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return ExternalProcedure::NewInstance(env, ret); } -MethodStart TraceConnection::getRoleNameStart(bool async, const Napi::CallbackInfo& info) +void UdrTriggerFactory::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("disposeSync", &UdrTriggerFactory::disposeSync)); + properties.push_back(InstanceMethod("disposeAsync", &UdrTriggerFactory::disposeAsync)); + properties.push_back(InstanceMethod("setupSync", &UdrTriggerFactory::setupSync)); + properties.push_back(InstanceMethod("setupAsync", &UdrTriggerFactory::setupAsync)); + properties.push_back(InstanceMethod("newItemSync", &UdrTriggerFactory::newItemSync)); + properties.push_back(InstanceMethod("newItemAsync", &UdrTriggerFactory::newItemAsync)); +} + +MethodStart UdrTriggerFactory::disposeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getRoleName(); + obj->interface->dispose(); + return nullptr; }; } -Napi::Value TraceConnection::getRoleNameFinish(const Napi::Env env, OptString ret) +Napi::Value UdrTriggerFactory::disposeFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart TraceConnection::getCharSetStart(bool async, const Napi::CallbackInfo& info) +MethodStart UdrTriggerFactory::setupStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* context = ExternalContext::CheckedUnwrap(info.Env(), info[1], "context argument", true); + auto* metadata = RoutineMetadata::CheckedUnwrap(info.Env(), info[2], "metadata argument", true); + auto* fieldsBuilder = MetadataBuilder::CheckedUnwrap(info.Env(), info[3], "fieldsBuilder argument", true); - return [obj]() { - return obj->interface->getCharSet(); + return [obj, status, context, metadata, fieldsBuilder]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->setup(&statusWrapper, (context ? context->interface : nullptr), (metadata ? metadata->interface : nullptr), (fieldsBuilder ? fieldsBuilder->interface : nullptr)); + return nullptr; }; } -Napi::Value TraceConnection::getCharSetFinish(const Napi::Env env, OptString ret) +Napi::Value UdrTriggerFactory::setupFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart TraceConnection::getRemoteProtocolStart(bool async, const Napi::CallbackInfo& info) +MethodStart UdrTriggerFactory::newItemStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + auto* context = ExternalContext::CheckedUnwrap(info.Env(), info[1], "context argument", true); + auto* metadata = RoutineMetadata::CheckedUnwrap(info.Env(), info[2], "metadata argument", true); - return [obj]() { - return obj->interface->getRemoteProtocol(); + return [obj, status, context, metadata]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + return obj->interface->newItem(&statusWrapper, (context ? context->interface : nullptr), (metadata ? metadata->interface : nullptr)); }; } -Napi::Value TraceConnection::getRemoteProtocolFinish(const Napi::Env env, OptString ret) +Napi::Value UdrTriggerFactory::newItemFinish(const Napi::Env env, fb::IExternalTrigger* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return ExternalTrigger::NewInstance(env, ret); } -MethodStart TraceConnection::getRemoteAddressStart(bool async, const Napi::CallbackInfo& info) +void UdrPlugin::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("getMasterSync", &UdrPlugin::getMasterSync)); + properties.push_back(InstanceMethod("getMasterAsync", &UdrPlugin::getMasterAsync)); + properties.push_back(InstanceMethod("registerFunctionSync", &UdrPlugin::registerFunctionSync)); + properties.push_back(InstanceMethod("registerFunctionAsync", &UdrPlugin::registerFunctionAsync)); + properties.push_back(InstanceMethod("registerProcedureSync", &UdrPlugin::registerProcedureSync)); + properties.push_back(InstanceMethod("registerProcedureAsync", &UdrPlugin::registerProcedureAsync)); + properties.push_back(InstanceMethod("registerTriggerSync", &UdrPlugin::registerTriggerSync)); + properties.push_back(InstanceMethod("registerTriggerAsync", &UdrPlugin::registerTriggerAsync)); +} + +MethodStart UdrPlugin::getMasterStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getRemoteAddress(); + return obj->interface->getMaster(); }; } -Napi::Value TraceConnection::getRemoteAddressFinish(const Napi::Env env, OptString ret) +Napi::Value UdrPlugin::getMasterFinish(const Napi::Env env, fb::IMaster* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return Master::NewInstance(env, ret); } -MethodStart TraceConnection::getRemoteProcessIDStart(bool async, const Napi::CallbackInfo& info) +MethodStart UdrPlugin::registerFunctionStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string name = info[1].ToString().Utf8Value(); + auto* factory = UdrFunctionFactory::CheckedUnwrap(info.Env(), info[2], "factory argument", true); - return [obj]() { - return obj->interface->getRemoteProcessID(); + return [obj, status, name, factory]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->registerFunction(&statusWrapper, name.c_str(), (factory ? factory->interface : nullptr)); + return nullptr; }; } -Napi::Value TraceConnection::getRemoteProcessIDFinish(const Napi::Env env, int ret) +Napi::Value UdrPlugin::registerFunctionFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart TraceConnection::getRemoteProcessNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart UdrPlugin::registerProcedureStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string name = info[1].ToString().Utf8Value(); + auto* factory = UdrProcedureFactory::CheckedUnwrap(info.Env(), info[2], "factory argument", true); - return [obj]() { - return obj->interface->getRemoteProcessName(); + return [obj, status, name, factory]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->registerProcedure(&statusWrapper, name.c_str(), (factory ? factory->interface : nullptr)); + return nullptr; }; } -Napi::Value TraceConnection::getRemoteProcessNameFinish(const Napi::Env env, OptString ret) -{ - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); -} - -void TraceDatabaseConnection::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value UdrPlugin::registerProcedureFinish(const Napi::Env env, void* ret) { - properties.push_back(InstanceMethod("getKindSync", &TraceDatabaseConnection::getKindSync)); - properties.push_back(InstanceMethod("getKindAsync", &TraceDatabaseConnection::getKindAsync)); - properties.push_back(InstanceMethod("getProcessIDSync", &TraceDatabaseConnection::getProcessIDSync)); - properties.push_back(InstanceMethod("getProcessIDAsync", &TraceDatabaseConnection::getProcessIDAsync)); - properties.push_back(InstanceMethod("getUserNameSync", &TraceDatabaseConnection::getUserNameSync)); - properties.push_back(InstanceMethod("getUserNameAsync", &TraceDatabaseConnection::getUserNameAsync)); - properties.push_back(InstanceMethod("getRoleNameSync", &TraceDatabaseConnection::getRoleNameSync)); - properties.push_back(InstanceMethod("getRoleNameAsync", &TraceDatabaseConnection::getRoleNameAsync)); - properties.push_back(InstanceMethod("getCharSetSync", &TraceDatabaseConnection::getCharSetSync)); - properties.push_back(InstanceMethod("getCharSetAsync", &TraceDatabaseConnection::getCharSetAsync)); - properties.push_back(InstanceMethod("getRemoteProtocolSync", &TraceDatabaseConnection::getRemoteProtocolSync)); - properties.push_back(InstanceMethod("getRemoteProtocolAsync", &TraceDatabaseConnection::getRemoteProtocolAsync)); - properties.push_back(InstanceMethod("getRemoteAddressSync", &TraceDatabaseConnection::getRemoteAddressSync)); - properties.push_back(InstanceMethod("getRemoteAddressAsync", &TraceDatabaseConnection::getRemoteAddressAsync)); - properties.push_back(InstanceMethod("getRemoteProcessIDSync", &TraceDatabaseConnection::getRemoteProcessIDSync)); - properties.push_back(InstanceMethod("getRemoteProcessIDAsync", &TraceDatabaseConnection::getRemoteProcessIDAsync)); - properties.push_back(InstanceMethod("getRemoteProcessNameSync", &TraceDatabaseConnection::getRemoteProcessNameSync)); - properties.push_back(InstanceMethod("getRemoteProcessNameAsync", &TraceDatabaseConnection::getRemoteProcessNameAsync)); - properties.push_back(InstanceMethod("getConnectionIDSync", &TraceDatabaseConnection::getConnectionIDSync)); - properties.push_back(InstanceMethod("getConnectionIDAsync", &TraceDatabaseConnection::getConnectionIDAsync)); - properties.push_back(InstanceMethod("getDatabaseNameSync", &TraceDatabaseConnection::getDatabaseNameSync)); - properties.push_back(InstanceMethod("getDatabaseNameAsync", &TraceDatabaseConnection::getDatabaseNameAsync)); + return env.Undefined(); } -MethodStart TraceDatabaseConnection::getKindStart(bool async, const Napi::CallbackInfo& info) +MethodStart UdrPlugin::registerTriggerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string name = info[1].ToString().Utf8Value(); + auto* factory = UdrTriggerFactory::CheckedUnwrap(info.Env(), info[2], "factory argument", true); - return [obj]() { - return obj->interface->getKind(); + return [obj, status, name, factory]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->registerTrigger(&statusWrapper, name.c_str(), (factory ? factory->interface : nullptr)); + return nullptr; }; } -Napi::Value TraceDatabaseConnection::getKindFinish(const Napi::Env env, unsigned ret) +Napi::Value UdrPlugin::registerTriggerFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart TraceDatabaseConnection::getProcessIDStart(bool async, const Napi::CallbackInfo& info) +void DecFloat16::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("toBcdSync", &DecFloat16::toBcdSync)); + properties.push_back(InstanceMethod("toBcdAsync", &DecFloat16::toBcdAsync)); + properties.push_back(InstanceMethod("fromBcdSync", &DecFloat16::fromBcdSync)); + properties.push_back(InstanceMethod("fromBcdAsync", &DecFloat16::fromBcdAsync)); + properties.push_back(InstanceMethod("fromStringSync", &DecFloat16::fromStringSync)); + properties.push_back(InstanceMethod("fromStringAsync", &DecFloat16::fromStringAsync)); +} - return [obj]() { - return obj->interface->getProcessID(); +MethodStart DecFloat16::toBcdStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + std::shared_ptr> fromPersistent; + auto* from = (const FB_DEC16*) getAddress(info.Env(), async, info[0], fromPersistent); + std::shared_ptr> signPersistent; + auto* sign = getAddress(info.Env(), async, info[1], signPersistent); + std::shared_ptr> bcdPersistent; + auto* bcd = getAddress(info.Env(), async, info[2], bcdPersistent); + std::shared_ptr> expPersistent; + auto* exp = getAddress(info.Env(), async, info[3], expPersistent); + + return [obj, from, fromPersistent, sign, signPersistent, bcd, bcdPersistent, exp, expPersistent]() { + obj->interface->toBcd(from, sign, bcd, exp); + return nullptr; }; } -Napi::Value TraceDatabaseConnection::getProcessIDFinish(const Napi::Env env, int ret) +Napi::Value DecFloat16::toBcdFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart TraceDatabaseConnection::getUserNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart DecFloat16::fromBcdStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + int sign = (int) info[0].ToNumber(); + std::shared_ptr> bcdPersistent; + auto* bcd = getAddress(info.Env(), async, info[1], bcdPersistent); + int exp = (int) info[2].ToNumber(); + std::shared_ptr> toPersistent; + auto* to = (FB_DEC16*) getAddress(info.Env(), async, info[3], toPersistent); - return [obj]() { - return obj->interface->getUserName(); + return [obj, sign, bcd, bcdPersistent, exp, to, toPersistent]() { + obj->interface->fromBcd(sign, bcd, exp, to); + return nullptr; }; } -Napi::Value TraceDatabaseConnection::getUserNameFinish(const Napi::Env env, OptString ret) +Napi::Value DecFloat16::fromBcdFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart TraceDatabaseConnection::getRoleNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart DecFloat16::fromStringStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string from = info[1].ToString().Utf8Value(); + std::shared_ptr> toPersistent; + auto* to = (FB_DEC16*) getAddress(info.Env(), async, info[2], toPersistent); - return [obj]() { - return obj->interface->getRoleName(); + return [obj, status, from, to, toPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->fromString(&statusWrapper, from.c_str(), to); + return nullptr; }; } -Napi::Value TraceDatabaseConnection::getRoleNameFinish(const Napi::Env env, OptString ret) +Napi::Value DecFloat16::fromStringFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart TraceDatabaseConnection::getCharSetStart(bool async, const Napi::CallbackInfo& info) +void DecFloat34::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("toBcdSync", &DecFloat34::toBcdSync)); + properties.push_back(InstanceMethod("toBcdAsync", &DecFloat34::toBcdAsync)); + properties.push_back(InstanceMethod("fromBcdSync", &DecFloat34::fromBcdSync)); + properties.push_back(InstanceMethod("fromBcdAsync", &DecFloat34::fromBcdAsync)); + properties.push_back(InstanceMethod("fromStringSync", &DecFloat34::fromStringSync)); + properties.push_back(InstanceMethod("fromStringAsync", &DecFloat34::fromStringAsync)); +} - return [obj]() { - return obj->interface->getCharSet(); +MethodStart DecFloat34::toBcdStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + std::shared_ptr> fromPersistent; + auto* from = (const FB_DEC34*) getAddress(info.Env(), async, info[0], fromPersistent); + std::shared_ptr> signPersistent; + auto* sign = getAddress(info.Env(), async, info[1], signPersistent); + std::shared_ptr> bcdPersistent; + auto* bcd = getAddress(info.Env(), async, info[2], bcdPersistent); + std::shared_ptr> expPersistent; + auto* exp = getAddress(info.Env(), async, info[3], expPersistent); + + return [obj, from, fromPersistent, sign, signPersistent, bcd, bcdPersistent, exp, expPersistent]() { + obj->interface->toBcd(from, sign, bcd, exp); + return nullptr; }; } -Napi::Value TraceDatabaseConnection::getCharSetFinish(const Napi::Env env, OptString ret) +Napi::Value DecFloat34::toBcdFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart TraceDatabaseConnection::getRemoteProtocolStart(bool async, const Napi::CallbackInfo& info) +MethodStart DecFloat34::fromBcdStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + int sign = (int) info[0].ToNumber(); + std::shared_ptr> bcdPersistent; + auto* bcd = getAddress(info.Env(), async, info[1], bcdPersistent); + int exp = (int) info[2].ToNumber(); + std::shared_ptr> toPersistent; + auto* to = (FB_DEC34*) getAddress(info.Env(), async, info[3], toPersistent); - return [obj]() { - return obj->interface->getRemoteProtocol(); + return [obj, sign, bcd, bcdPersistent, exp, to, toPersistent]() { + obj->interface->fromBcd(sign, bcd, exp, to); + return nullptr; }; } -Napi::Value TraceDatabaseConnection::getRemoteProtocolFinish(const Napi::Env env, OptString ret) +Napi::Value DecFloat34::fromBcdFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart TraceDatabaseConnection::getRemoteAddressStart(bool async, const Napi::CallbackInfo& info) +MethodStart DecFloat34::fromStringStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string from = info[1].ToString().Utf8Value(); + std::shared_ptr> toPersistent; + auto* to = (FB_DEC34*) getAddress(info.Env(), async, info[2], toPersistent); - return [obj]() { - return obj->interface->getRemoteAddress(); + return [obj, status, from, to, toPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->fromString(&statusWrapper, from.c_str(), to); + return nullptr; }; } -Napi::Value TraceDatabaseConnection::getRemoteAddressFinish(const Napi::Env env, OptString ret) +Napi::Value DecFloat34::fromStringFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart TraceDatabaseConnection::getRemoteProcessIDStart(bool async, const Napi::CallbackInfo& info) +void Int128::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("fromStringSync", &Int128::fromStringSync)); + properties.push_back(InstanceMethod("fromStringAsync", &Int128::fromStringAsync)); +} - return [obj]() { - return obj->interface->getRemoteProcessID(); +MethodStart Int128::fromStringStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + int scale = (int) info[1].ToNumber(); + std::string from = info[2].ToString().Utf8Value(); + std::shared_ptr> toPersistent; + auto* to = (FB_I128*) getAddress(info.Env(), async, info[3], toPersistent); + + return [obj, status, scale, from, to, toPersistent]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->fromString(&statusWrapper, scale, from.c_str(), to); + return nullptr; }; } -Napi::Value TraceDatabaseConnection::getRemoteProcessIDFinish(const Napi::Env env, int ret) +Napi::Value Int128::fromStringFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart TraceDatabaseConnection::getRemoteProcessNameStart(bool async, const Napi::CallbackInfo& info) +void ReplicatedField::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + properties.push_back(InstanceMethod("getNameSync", &ReplicatedField::getNameSync)); + properties.push_back(InstanceMethod("getNameAsync", &ReplicatedField::getNameAsync)); + properties.push_back(InstanceMethod("getTypeSync", &ReplicatedField::getTypeSync)); + properties.push_back(InstanceMethod("getTypeAsync", &ReplicatedField::getTypeAsync)); + properties.push_back(InstanceMethod("getSubTypeSync", &ReplicatedField::getSubTypeSync)); + properties.push_back(InstanceMethod("getSubTypeAsync", &ReplicatedField::getSubTypeAsync)); + properties.push_back(InstanceMethod("getScaleSync", &ReplicatedField::getScaleSync)); + properties.push_back(InstanceMethod("getScaleAsync", &ReplicatedField::getScaleAsync)); + properties.push_back(InstanceMethod("getLengthSync", &ReplicatedField::getLengthSync)); + properties.push_back(InstanceMethod("getLengthAsync", &ReplicatedField::getLengthAsync)); + properties.push_back(InstanceMethod("getCharSetSync", &ReplicatedField::getCharSetSync)); + properties.push_back(InstanceMethod("getCharSetAsync", &ReplicatedField::getCharSetAsync)); +} + +MethodStart ReplicatedField::getNameStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getRemoteProcessName(); + return obj->interface->getName(); }; } -Napi::Value TraceDatabaseConnection::getRemoteProcessNameFinish(const Napi::Env env, OptString ret) +Napi::Value ReplicatedField::getNameFinish(const Napi::Env env, OptString ret) { return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); } -MethodStart TraceDatabaseConnection::getConnectionIDStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedField::getTypeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getConnectionID(); + return obj->interface->getType(); }; } -Napi::Value TraceDatabaseConnection::getConnectionIDFinish(const Napi::Env env, int64_t ret) +Napi::Value ReplicatedField::getTypeFinish(const Napi::Env env, unsigned ret) { - return Napi::Value::From(env, (double) ret); + return Napi::Value::From(env, ret); } -MethodStart TraceDatabaseConnection::getDatabaseNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedField::getSubTypeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getDatabaseName(); + return obj->interface->getSubType(); }; } -Napi::Value TraceDatabaseConnection::getDatabaseNameFinish(const Napi::Env env, OptString ret) +Napi::Value ReplicatedField::getSubTypeFinish(const Napi::Env env, int ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return Napi::Value::From(env, ret); } -void TraceTransaction::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart ReplicatedField::getScaleStart(bool async, const Napi::CallbackInfo& info) { -} + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); -void TraceParams::InitPrototype(std::vector::PropertyDescriptor>& properties) -{ + return [obj]() { + return obj->interface->getScale(); + }; } -void TraceStatement::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value ReplicatedField::getScaleFinish(const Napi::Env env, int ret) { + return Napi::Value::From(env, ret); } -void TraceSQLStatement::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart ReplicatedField::getLengthStart(bool async, const Napi::CallbackInfo& info) { -} + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); -void TraceBLRStatement::InitPrototype(std::vector::PropertyDescriptor>& properties) -{ + return [obj]() { + return obj->interface->getLength(); + }; } -void TraceDYNRequest::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value ReplicatedField::getLengthFinish(const Napi::Env env, unsigned ret) { + return Napi::Value::From(env, ret); } -void TraceContextVariable::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart ReplicatedField::getCharSetStart(bool async, const Napi::CallbackInfo& info) { + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getCharSet(); + }; } -void TraceProcedure::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value ReplicatedField::getCharSetFinish(const Napi::Env env, unsigned ret) { + return Napi::Value::From(env, ret); } -void TraceFunction::InitPrototype(std::vector::PropertyDescriptor>& properties) +void ReplicatedRecord::InitPrototype(std::vector::PropertyDescriptor>& properties) { + properties.push_back(InstanceMethod("getCountSync", &ReplicatedRecord::getCountSync)); + properties.push_back(InstanceMethod("getCountAsync", &ReplicatedRecord::getCountAsync)); + properties.push_back(InstanceMethod("getFieldSync", &ReplicatedRecord::getFieldSync)); + properties.push_back(InstanceMethod("getFieldAsync", &ReplicatedRecord::getFieldAsync)); + properties.push_back(InstanceMethod("getRawLengthSync", &ReplicatedRecord::getRawLengthSync)); + properties.push_back(InstanceMethod("getRawLengthAsync", &ReplicatedRecord::getRawLengthAsync)); + properties.push_back(InstanceMethod("getRawDataSync", &ReplicatedRecord::getRawDataSync)); + properties.push_back(InstanceMethod("getRawDataAsync", &ReplicatedRecord::getRawDataAsync)); } -void TraceTrigger::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart ReplicatedRecord::getCountStart(bool async, const Napi::CallbackInfo& info) { + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + return obj->interface->getCount(); + }; } -void TraceServiceConnection::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value ReplicatedRecord::getCountFinish(const Napi::Env env, unsigned ret) { - properties.push_back(InstanceMethod("getKindSync", &TraceServiceConnection::getKindSync)); - properties.push_back(InstanceMethod("getKindAsync", &TraceServiceConnection::getKindAsync)); - properties.push_back(InstanceMethod("getProcessIDSync", &TraceServiceConnection::getProcessIDSync)); - properties.push_back(InstanceMethod("getProcessIDAsync", &TraceServiceConnection::getProcessIDAsync)); - properties.push_back(InstanceMethod("getUserNameSync", &TraceServiceConnection::getUserNameSync)); - properties.push_back(InstanceMethod("getUserNameAsync", &TraceServiceConnection::getUserNameAsync)); - properties.push_back(InstanceMethod("getRoleNameSync", &TraceServiceConnection::getRoleNameSync)); - properties.push_back(InstanceMethod("getRoleNameAsync", &TraceServiceConnection::getRoleNameAsync)); - properties.push_back(InstanceMethod("getCharSetSync", &TraceServiceConnection::getCharSetSync)); - properties.push_back(InstanceMethod("getCharSetAsync", &TraceServiceConnection::getCharSetAsync)); - properties.push_back(InstanceMethod("getRemoteProtocolSync", &TraceServiceConnection::getRemoteProtocolSync)); - properties.push_back(InstanceMethod("getRemoteProtocolAsync", &TraceServiceConnection::getRemoteProtocolAsync)); - properties.push_back(InstanceMethod("getRemoteAddressSync", &TraceServiceConnection::getRemoteAddressSync)); - properties.push_back(InstanceMethod("getRemoteAddressAsync", &TraceServiceConnection::getRemoteAddressAsync)); - properties.push_back(InstanceMethod("getRemoteProcessIDSync", &TraceServiceConnection::getRemoteProcessIDSync)); - properties.push_back(InstanceMethod("getRemoteProcessIDAsync", &TraceServiceConnection::getRemoteProcessIDAsync)); - properties.push_back(InstanceMethod("getRemoteProcessNameSync", &TraceServiceConnection::getRemoteProcessNameSync)); - properties.push_back(InstanceMethod("getRemoteProcessNameAsync", &TraceServiceConnection::getRemoteProcessNameAsync)); + return Napi::Value::From(env, ret); } -MethodStart TraceServiceConnection::getKindStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedRecord::getFieldStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + unsigned index = (unsigned) info[0].ToNumber(); - return [obj]() { - return obj->interface->getKind(); + return [obj, index]() { + return obj->interface->getField(index); }; } -Napi::Value TraceServiceConnection::getKindFinish(const Napi::Env env, unsigned ret) +Napi::Value ReplicatedRecord::getFieldFinish(const Napi::Env env, fb::IReplicatedField* ret) { - return Napi::Value::From(env, ret); + return ReplicatedField::NewInstance(env, ret); } -MethodStart TraceServiceConnection::getProcessIDStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedRecord::getRawLengthStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getProcessID(); + return obj->interface->getRawLength(); }; } -Napi::Value TraceServiceConnection::getProcessIDFinish(const Napi::Env env, int ret) +Napi::Value ReplicatedRecord::getRawLengthFinish(const Napi::Env env, unsigned ret) { return Napi::Value::From(env, ret); } -MethodStart TraceServiceConnection::getUserNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedRecord::getRawDataStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getUserName(); + return obj->interface->getRawData(); }; } -Napi::Value TraceServiceConnection::getUserNameFinish(const Napi::Env env, OptString ret) +Napi::Value ReplicatedRecord::getRawDataFinish(const Napi::Env env, const unsigned char* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return Pointer::NewInstance(env, ret); } -MethodStart TraceServiceConnection::getRoleNameStart(bool async, const Napi::CallbackInfo& info) -{ - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); +void ReplicatedTransaction::InitPrototype(std::vector::PropertyDescriptor>& properties) +{ + properties.push_back(InstanceMethod("disposeSync", &ReplicatedTransaction::disposeSync)); + properties.push_back(InstanceMethod("disposeAsync", &ReplicatedTransaction::disposeAsync)); + properties.push_back(InstanceMethod("prepareSync", &ReplicatedTransaction::prepareSync)); + properties.push_back(InstanceMethod("prepareAsync", &ReplicatedTransaction::prepareAsync)); + properties.push_back(InstanceMethod("commitSync", &ReplicatedTransaction::commitSync)); + properties.push_back(InstanceMethod("commitAsync", &ReplicatedTransaction::commitAsync)); + properties.push_back(InstanceMethod("rollbackSync", &ReplicatedTransaction::rollbackSync)); + properties.push_back(InstanceMethod("rollbackAsync", &ReplicatedTransaction::rollbackAsync)); + properties.push_back(InstanceMethod("startSavepointSync", &ReplicatedTransaction::startSavepointSync)); + properties.push_back(InstanceMethod("startSavepointAsync", &ReplicatedTransaction::startSavepointAsync)); + properties.push_back(InstanceMethod("releaseSavepointSync", &ReplicatedTransaction::releaseSavepointSync)); + properties.push_back(InstanceMethod("releaseSavepointAsync", &ReplicatedTransaction::releaseSavepointAsync)); + properties.push_back(InstanceMethod("rollbackSavepointSync", &ReplicatedTransaction::rollbackSavepointSync)); + properties.push_back(InstanceMethod("rollbackSavepointAsync", &ReplicatedTransaction::rollbackSavepointAsync)); + properties.push_back(InstanceMethod("insertRecordSync", &ReplicatedTransaction::insertRecordSync)); + properties.push_back(InstanceMethod("insertRecordAsync", &ReplicatedTransaction::insertRecordAsync)); + properties.push_back(InstanceMethod("updateRecordSync", &ReplicatedTransaction::updateRecordSync)); + properties.push_back(InstanceMethod("updateRecordAsync", &ReplicatedTransaction::updateRecordAsync)); + properties.push_back(InstanceMethod("deleteRecordSync", &ReplicatedTransaction::deleteRecordSync)); + properties.push_back(InstanceMethod("deleteRecordAsync", &ReplicatedTransaction::deleteRecordAsync)); + properties.push_back(InstanceMethod("executeSqlSync", &ReplicatedTransaction::executeSqlSync)); + properties.push_back(InstanceMethod("executeSqlAsync", &ReplicatedTransaction::executeSqlAsync)); + properties.push_back(InstanceMethod("executeSqlIntlSync", &ReplicatedTransaction::executeSqlIntlSync)); + properties.push_back(InstanceMethod("executeSqlIntlAsync", &ReplicatedTransaction::executeSqlIntlAsync)); +} + +MethodStart ReplicatedTransaction::disposeStart(bool async, const Napi::CallbackInfo& info) +{ + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getRoleName(); + obj->interface->dispose(); + return nullptr; }; } -Napi::Value TraceServiceConnection::getRoleNameFinish(const Napi::Env env, OptString ret) +Napi::Value ReplicatedTransaction::disposeFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart TraceServiceConnection::getCharSetStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedTransaction::prepareStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->getCharSet(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->prepare(&statusWrapper); + return nullptr; }; } -Napi::Value TraceServiceConnection::getCharSetFinish(const Napi::Env env, OptString ret) +Napi::Value ReplicatedTransaction::prepareFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart TraceServiceConnection::getRemoteProtocolStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedTransaction::commitStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->getRemoteProtocol(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->commit(&statusWrapper); + return nullptr; }; } -Napi::Value TraceServiceConnection::getRemoteProtocolFinish(const Napi::Env env, OptString ret) +Napi::Value ReplicatedTransaction::commitFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart TraceServiceConnection::getRemoteAddressStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedTransaction::rollbackStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->getRemoteAddress(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->rollback(&statusWrapper); + return nullptr; }; } -Napi::Value TraceServiceConnection::getRemoteAddressFinish(const Napi::Env env, OptString ret) +Napi::Value ReplicatedTransaction::rollbackFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -MethodStart TraceServiceConnection::getRemoteProcessIDStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedTransaction::startSavepointStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->getRemoteProcessID(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->startSavepoint(&statusWrapper); + return nullptr; }; } -Napi::Value TraceServiceConnection::getRemoteProcessIDFinish(const Napi::Env env, int ret) +Napi::Value ReplicatedTransaction::startSavepointFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -MethodStart TraceServiceConnection::getRemoteProcessNameStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedTransaction::releaseSavepointStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - return [obj]() { - return obj->interface->getRemoteProcessName(); + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->releaseSavepoint(&statusWrapper); + return nullptr; }; } -Napi::Value TraceServiceConnection::getRemoteProcessNameFinish(const Napi::Env env, OptString ret) +Napi::Value ReplicatedTransaction::releaseSavepointFinish(const Napi::Env env, void* ret) { - return ret.isNull() ? env.Null() : Napi::Value::From(env, ret.string()); + return env.Undefined(); } -void TraceStatusVector::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart ReplicatedTransaction::rollbackSavepointStart(bool async, const Napi::CallbackInfo& info) { -} + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); -void TraceSweepInfo::InitPrototype(std::vector::PropertyDescriptor>& properties) -{ + return [obj, status]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->rollbackSavepoint(&statusWrapper); + return nullptr; + }; } -void TraceLogWriter::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value ReplicatedTransaction::rollbackSavepointFinish(const Napi::Env env, void* ret) { - properties.push_back(InstanceMethod("addRefSync", &TraceLogWriter::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &TraceLogWriter::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &TraceLogWriter::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &TraceLogWriter::releaseAsync)); + return env.Undefined(); } -MethodStart TraceLogWriter::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedTransaction::insertRecordStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string name = info[1].ToString().Utf8Value(); + auto* record = ReplicatedRecord::CheckedUnwrap(info.Env(), info[2], "record argument", true); - return [obj]() { - obj->interface->addRef(); + return [obj, status, name, record]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->insertRecord(&statusWrapper, name.c_str(), (record ? record->interface : nullptr)); return nullptr; }; } -Napi::Value TraceLogWriter::addRefFinish(const Napi::Env env, void* ret) +Napi::Value ReplicatedTransaction::insertRecordFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart TraceLogWriter::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedTransaction::updateRecordStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string name = info[1].ToString().Utf8Value(); + auto* orgRecord = ReplicatedRecord::CheckedUnwrap(info.Env(), info[2], "orgRecord argument", true); + auto* newRecord = ReplicatedRecord::CheckedUnwrap(info.Env(), info[3], "newRecord argument", true); - return [obj]() { - return obj->interface->release(); + return [obj, status, name, orgRecord, newRecord]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->updateRecord(&statusWrapper, name.c_str(), (orgRecord ? orgRecord->interface : nullptr), (newRecord ? newRecord->interface : nullptr)); + return nullptr; }; } -Napi::Value TraceLogWriter::releaseFinish(const Napi::Env env, int ret) +Napi::Value ReplicatedTransaction::updateRecordFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -void TraceInitInfo::InitPrototype(std::vector::PropertyDescriptor>& properties) +MethodStart ReplicatedTransaction::deleteRecordStart(bool async, const Napi::CallbackInfo& info) { + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string name = info[1].ToString().Utf8Value(); + auto* record = ReplicatedRecord::CheckedUnwrap(info.Env(), info[2], "record argument", true); + + return [obj, status, name, record]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->deleteRecord(&statusWrapper, name.c_str(), (record ? record->interface : nullptr)); + return nullptr; + }; } -void TracePlugin::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value ReplicatedTransaction::deleteRecordFinish(const Napi::Env env, void* ret) { - properties.push_back(InstanceMethod("addRefSync", &TracePlugin::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &TracePlugin::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &TracePlugin::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &TracePlugin::releaseAsync)); + return env.Undefined(); } -MethodStart TracePlugin::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedTransaction::executeSqlStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + std::string sql = info[1].ToString().Utf8Value(); - return [obj]() { - obj->interface->addRef(); + return [obj, status, sql]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->executeSql(&statusWrapper, sql.c_str()); return nullptr; }; } -Napi::Value TracePlugin::addRefFinish(const Napi::Env env, void* ret) +Napi::Value ReplicatedTransaction::executeSqlFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart TracePlugin::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedTransaction::executeSqlIntlStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + unsigned charset = (unsigned) info[1].ToNumber(); + std::string sql = info[2].ToString().Utf8Value(); - return [obj]() { - return obj->interface->release(); + return [obj, status, charset, sql]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->executeSqlIntl(&statusWrapper, charset, sql.c_str()); + return nullptr; }; } -Napi::Value TracePlugin::releaseFinish(const Napi::Env env, int ret) +Napi::Value ReplicatedTransaction::executeSqlIntlFinish(const Napi::Env env, void* ret) { - return Napi::Value::From(env, ret); + return env.Undefined(); } -void TraceFactory::InitPrototype(std::vector::PropertyDescriptor>& properties) +void ReplicatedSession::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("addRefSync", &TraceFactory::addRefSync)); - properties.push_back(InstanceMethod("addRefAsync", &TraceFactory::addRefAsync)); - properties.push_back(InstanceMethod("releaseSync", &TraceFactory::releaseSync)); - properties.push_back(InstanceMethod("releaseAsync", &TraceFactory::releaseAsync)); - properties.push_back(InstanceMethod("setOwnerSync", &TraceFactory::setOwnerSync)); - properties.push_back(InstanceMethod("setOwnerAsync", &TraceFactory::setOwnerAsync)); - properties.push_back(InstanceMethod("getOwnerSync", &TraceFactory::getOwnerSync)); - properties.push_back(InstanceMethod("getOwnerAsync", &TraceFactory::getOwnerAsync)); + properties.push_back(InstanceMethod("addRefSync", &ReplicatedSession::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &ReplicatedSession::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &ReplicatedSession::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &ReplicatedSession::releaseAsync)); + properties.push_back(InstanceMethod("setOwnerSync", &ReplicatedSession::setOwnerSync)); + properties.push_back(InstanceMethod("setOwnerAsync", &ReplicatedSession::setOwnerAsync)); + properties.push_back(InstanceMethod("getOwnerSync", &ReplicatedSession::getOwnerSync)); + properties.push_back(InstanceMethod("getOwnerAsync", &ReplicatedSession::getOwnerAsync)); + properties.push_back(InstanceMethod("initSync", &ReplicatedSession::initSync)); + properties.push_back(InstanceMethod("initAsync", &ReplicatedSession::initAsync)); + properties.push_back(InstanceMethod("startTransactionSync", &ReplicatedSession::startTransactionSync)); + properties.push_back(InstanceMethod("startTransactionAsync", &ReplicatedSession::startTransactionAsync)); + properties.push_back(InstanceMethod("cleanupTransactionSync", &ReplicatedSession::cleanupTransactionSync)); + properties.push_back(InstanceMethod("cleanupTransactionAsync", &ReplicatedSession::cleanupTransactionAsync)); + properties.push_back(InstanceMethod("setSequenceSync", &ReplicatedSession::setSequenceSync)); + properties.push_back(InstanceMethod("setSequenceAsync", &ReplicatedSession::setSequenceAsync)); } -MethodStart TraceFactory::addRefStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedSession::addRefStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { obj->interface->addRef(); @@ -17179,28 +23142,28 @@ MethodStart TraceFactory::addRefStart(bool async, const Napi::CallbackInf }; } -Napi::Value TraceFactory::addRefFinish(const Napi::Env env, void* ret) +Napi::Value ReplicatedSession::addRefFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart TraceFactory::releaseStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedSession::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { return obj->interface->release(); }; } -Napi::Value TraceFactory::releaseFinish(const Napi::Env env, int ret) +Napi::Value ReplicatedSession::releaseFinish(const Napi::Env env, int ret) { return Napi::Value::From(env, ret); } -MethodStart TraceFactory::setOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedSession::setOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); return [obj, r]() { @@ -17209,297 +23172,207 @@ MethodStart TraceFactory::setOwnerStart(bool async, const Napi::CallbackI }; } -Napi::Value TraceFactory::setOwnerFinish(const Napi::Env env, void* ret) +Napi::Value ReplicatedSession::setOwnerFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart TraceFactory::getOwnerStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedSession::getOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { return obj->interface->getOwner(); }; } -Napi::Value TraceFactory::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) +Napi::Value ReplicatedSession::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) { return ReferenceCounted::NewInstance(env, ret); } -void UdrFunctionFactory::InitPrototype(std::vector::PropertyDescriptor>& properties) -{ - properties.push_back(InstanceMethod("disposeSync", &UdrFunctionFactory::disposeSync)); - properties.push_back(InstanceMethod("disposeAsync", &UdrFunctionFactory::disposeAsync)); - properties.push_back(InstanceMethod("setupSync", &UdrFunctionFactory::setupSync)); - properties.push_back(InstanceMethod("setupAsync", &UdrFunctionFactory::setupAsync)); - properties.push_back(InstanceMethod("newItemSync", &UdrFunctionFactory::newItemSync)); - properties.push_back(InstanceMethod("newItemAsync", &UdrFunctionFactory::newItemAsync)); -} - -MethodStart UdrFunctionFactory::disposeStart(bool async, const Napi::CallbackInfo& info) -{ - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - - return [obj]() { - obj->interface->dispose(); - return nullptr; - }; -} - -Napi::Value UdrFunctionFactory::disposeFinish(const Napi::Env env, void* ret) -{ - return env.Undefined(); -} - -MethodStart UdrFunctionFactory::setupStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedSession::initStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* context = ExternalContext::CheckedUnwrap(info.Env(), info[1], "context argument", true); - auto* metadata = RoutineMetadata::CheckedUnwrap(info.Env(), info[2], "metadata argument", true); - auto* inBuilder = MetadataBuilder::CheckedUnwrap(info.Env(), info[3], "inBuilder argument", true); - auto* outBuilder = MetadataBuilder::CheckedUnwrap(info.Env(), info[4], "outBuilder argument", true); + auto* attachment = Attachment::CheckedUnwrap(info.Env(), info[1], "attachment argument", true); - return [obj, status, context, metadata, inBuilder, outBuilder]() { + return [obj, status, attachment]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setup(&statusWrapper, (context ? context->interface : nullptr), (metadata ? metadata->interface : nullptr), (inBuilder ? inBuilder->interface : nullptr), (outBuilder ? outBuilder->interface : nullptr)); - return nullptr; + return obj->interface->init(&statusWrapper, (attachment ? attachment->interface : nullptr)); }; } -Napi::Value UdrFunctionFactory::setupFinish(const Napi::Env env, void* ret) +Napi::Value ReplicatedSession::initFinish(const Napi::Env env, FB_BOOLEAN ret) { - return env.Undefined(); + return Napi::Value::From(env, (bool) ret); } -MethodStart UdrFunctionFactory::newItemStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedSession::startTransactionStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* context = ExternalContext::CheckedUnwrap(info.Env(), info[1], "context argument", true); - auto* metadata = RoutineMetadata::CheckedUnwrap(info.Env(), info[2], "metadata argument", true); + auto* transaction = Transaction::CheckedUnwrap(info.Env(), info[1], "transaction argument", true); + int64_t number = (int64_t) info[2].ToNumber(); - return [obj, status, context, metadata]() { + return [obj, status, transaction, number]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->newItem(&statusWrapper, (context ? context->interface : nullptr), (metadata ? metadata->interface : nullptr)); + return obj->interface->startTransaction(&statusWrapper, (transaction ? transaction->interface : nullptr), number); }; } -Napi::Value UdrFunctionFactory::newItemFinish(const Napi::Env env, fb::IExternalFunction* ret) -{ - return ExternalFunction::NewInstance(env, ret); -} - -void UdrProcedureFactory::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value ReplicatedSession::startTransactionFinish(const Napi::Env env, fb::IReplicatedTransaction* ret) { - properties.push_back(InstanceMethod("disposeSync", &UdrProcedureFactory::disposeSync)); - properties.push_back(InstanceMethod("disposeAsync", &UdrProcedureFactory::disposeAsync)); - properties.push_back(InstanceMethod("setupSync", &UdrProcedureFactory::setupSync)); - properties.push_back(InstanceMethod("setupAsync", &UdrProcedureFactory::setupAsync)); - properties.push_back(InstanceMethod("newItemSync", &UdrProcedureFactory::newItemSync)); - properties.push_back(InstanceMethod("newItemAsync", &UdrProcedureFactory::newItemAsync)); + return ReplicatedTransaction::NewInstance(env, ret); } -MethodStart UdrProcedureFactory::disposeStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedSession::cleanupTransactionStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); + int64_t number = (int64_t) info[1].ToNumber(); - return [obj]() { - obj->interface->dispose(); + return [obj, status, number]() { + fb::ThrowStatusWrapper statusWrapper(status->interface); + obj->interface->cleanupTransaction(&statusWrapper, number); return nullptr; }; } -Napi::Value UdrProcedureFactory::disposeFinish(const Napi::Env env, void* ret) +Napi::Value ReplicatedSession::cleanupTransactionFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart UdrProcedureFactory::setupStart(bool async, const Napi::CallbackInfo& info) +MethodStart ReplicatedSession::setSequenceStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* context = ExternalContext::CheckedUnwrap(info.Env(), info[1], "context argument", true); - auto* metadata = RoutineMetadata::CheckedUnwrap(info.Env(), info[2], "metadata argument", true); - auto* inBuilder = MetadataBuilder::CheckedUnwrap(info.Env(), info[3], "inBuilder argument", true); - auto* outBuilder = MetadataBuilder::CheckedUnwrap(info.Env(), info[4], "outBuilder argument", true); + std::string name = info[1].ToString().Utf8Value(); + int64_t value = (int64_t) info[2].ToNumber(); - return [obj, status, context, metadata, inBuilder, outBuilder]() { + return [obj, status, name, value]() { fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setup(&statusWrapper, (context ? context->interface : nullptr), (metadata ? metadata->interface : nullptr), (inBuilder ? inBuilder->interface : nullptr), (outBuilder ? outBuilder->interface : nullptr)); + obj->interface->setSequence(&statusWrapper, name.c_str(), value); return nullptr; }; } -Napi::Value UdrProcedureFactory::setupFinish(const Napi::Env env, void* ret) +Napi::Value ReplicatedSession::setSequenceFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart UdrProcedureFactory::newItemStart(bool async, const Napi::CallbackInfo& info) +void ProfilerPlugin::InitPrototype(std::vector::PropertyDescriptor>& properties) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* context = ExternalContext::CheckedUnwrap(info.Env(), info[1], "context argument", true); - auto* metadata = RoutineMetadata::CheckedUnwrap(info.Env(), info[2], "metadata argument", true); - - return [obj, status, context, metadata]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->newItem(&statusWrapper, (context ? context->interface : nullptr), (metadata ? metadata->interface : nullptr)); - }; + properties.push_back(InstanceMethod("addRefSync", &ProfilerPlugin::addRefSync)); + properties.push_back(InstanceMethod("addRefAsync", &ProfilerPlugin::addRefAsync)); + properties.push_back(InstanceMethod("releaseSync", &ProfilerPlugin::releaseSync)); + properties.push_back(InstanceMethod("releaseAsync", &ProfilerPlugin::releaseAsync)); + properties.push_back(InstanceMethod("setOwnerSync", &ProfilerPlugin::setOwnerSync)); + properties.push_back(InstanceMethod("setOwnerAsync", &ProfilerPlugin::setOwnerAsync)); + properties.push_back(InstanceMethod("getOwnerSync", &ProfilerPlugin::getOwnerSync)); + properties.push_back(InstanceMethod("getOwnerAsync", &ProfilerPlugin::getOwnerAsync)); } -Napi::Value UdrProcedureFactory::newItemFinish(const Napi::Env env, fb::IExternalProcedure* ret) +MethodStart ProfilerPlugin::addRefStart(bool async, const Napi::CallbackInfo& info) { - return ExternalProcedure::NewInstance(env, ret); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + + return [obj]() { + obj->interface->addRef(); + return nullptr; + }; } -void UdrTriggerFactory::InitPrototype(std::vector::PropertyDescriptor>& properties) +Napi::Value ProfilerPlugin::addRefFinish(const Napi::Env env, void* ret) { - properties.push_back(InstanceMethod("disposeSync", &UdrTriggerFactory::disposeSync)); - properties.push_back(InstanceMethod("disposeAsync", &UdrTriggerFactory::disposeAsync)); - properties.push_back(InstanceMethod("setupSync", &UdrTriggerFactory::setupSync)); - properties.push_back(InstanceMethod("setupAsync", &UdrTriggerFactory::setupAsync)); - properties.push_back(InstanceMethod("newItemSync", &UdrTriggerFactory::newItemSync)); - properties.push_back(InstanceMethod("newItemAsync", &UdrTriggerFactory::newItemAsync)); + return env.Undefined(); } -MethodStart UdrTriggerFactory::disposeStart(bool async, const Napi::CallbackInfo& info) +MethodStart ProfilerPlugin::releaseStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - obj->interface->dispose(); - return nullptr; + return obj->interface->release(); }; } -Napi::Value UdrTriggerFactory::disposeFinish(const Napi::Env env, void* ret) +Napi::Value ProfilerPlugin::releaseFinish(const Napi::Env env, int ret) { - return env.Undefined(); + return Napi::Value::From(env, ret); } -MethodStart UdrTriggerFactory::setupStart(bool async, const Napi::CallbackInfo& info) +MethodStart ProfilerPlugin::setOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* context = ExternalContext::CheckedUnwrap(info.Env(), info[1], "context argument", true); - auto* metadata = RoutineMetadata::CheckedUnwrap(info.Env(), info[2], "metadata argument", true); - auto* fieldsBuilder = MetadataBuilder::CheckedUnwrap(info.Env(), info[3], "fieldsBuilder argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* r = ReferenceCounted::CheckedUnwrap(info.Env(), info[0], "r argument", true); - return [obj, status, context, metadata, fieldsBuilder]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->setup(&statusWrapper, (context ? context->interface : nullptr), (metadata ? metadata->interface : nullptr), (fieldsBuilder ? fieldsBuilder->interface : nullptr)); + return [obj, r]() { + obj->interface->setOwner((r ? r->interface : nullptr)); return nullptr; }; } -Napi::Value UdrTriggerFactory::setupFinish(const Napi::Env env, void* ret) +Napi::Value ProfilerPlugin::setOwnerFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart UdrTriggerFactory::newItemStart(bool async, const Napi::CallbackInfo& info) +MethodStart ProfilerPlugin::getOwnerStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - auto* context = ExternalContext::CheckedUnwrap(info.Env(), info[1], "context argument", true); - auto* metadata = RoutineMetadata::CheckedUnwrap(info.Env(), info[2], "metadata argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, context, metadata]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - return obj->interface->newItem(&statusWrapper, (context ? context->interface : nullptr), (metadata ? metadata->interface : nullptr)); + return [obj]() { + return obj->interface->getOwner(); }; } -Napi::Value UdrTriggerFactory::newItemFinish(const Napi::Env env, fb::IExternalTrigger* ret) +Napi::Value ProfilerPlugin::getOwnerFinish(const Napi::Env env, fb::IReferenceCounted* ret) { - return ExternalTrigger::NewInstance(env, ret); + return ReferenceCounted::NewInstance(env, ret); } -void UdrPlugin::InitPrototype(std::vector::PropertyDescriptor>& properties) +void ProfilerSession::InitPrototype(std::vector::PropertyDescriptor>& properties) { - properties.push_back(InstanceMethod("getMasterSync", &UdrPlugin::getMasterSync)); - properties.push_back(InstanceMethod("getMasterAsync", &UdrPlugin::getMasterAsync)); - properties.push_back(InstanceMethod("registerFunctionSync", &UdrPlugin::registerFunctionSync)); - properties.push_back(InstanceMethod("registerFunctionAsync", &UdrPlugin::registerFunctionAsync)); - properties.push_back(InstanceMethod("registerProcedureSync", &UdrPlugin::registerProcedureSync)); - properties.push_back(InstanceMethod("registerProcedureAsync", &UdrPlugin::registerProcedureAsync)); - properties.push_back(InstanceMethod("registerTriggerSync", &UdrPlugin::registerTriggerSync)); - properties.push_back(InstanceMethod("registerTriggerAsync", &UdrPlugin::registerTriggerAsync)); + properties.push_back(InstanceMethod("disposeSync", &ProfilerSession::disposeSync)); + properties.push_back(InstanceMethod("disposeAsync", &ProfilerSession::disposeAsync)); } -MethodStart UdrPlugin::getMasterStart(bool async, const Napi::CallbackInfo& info) +MethodStart ProfilerSession::disposeStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); return [obj]() { - return obj->interface->getMaster(); - }; -} - -Napi::Value UdrPlugin::getMasterFinish(const Napi::Env env, fb::IMaster* ret) -{ - return Master::NewInstance(env, ret); -} - -MethodStart UdrPlugin::registerFunctionStart(bool async, const Napi::CallbackInfo& info) -{ - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string name = info[1].ToString().Utf8Value(); - auto* factory = UdrFunctionFactory::CheckedUnwrap(info.Env(), info[2], "factory argument", true); - - return [obj, status, name, factory]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->registerFunction(&statusWrapper, name.c_str(), (factory ? factory->interface : nullptr)); + obj->interface->dispose(); return nullptr; }; } -Napi::Value UdrPlugin::registerFunctionFinish(const Napi::Env env, void* ret) +Napi::Value ProfilerSession::disposeFinish(const Napi::Env env, void* ret) { return env.Undefined(); } -MethodStart UdrPlugin::registerProcedureStart(bool async, const Napi::CallbackInfo& info) -{ - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string name = info[1].ToString().Utf8Value(); - auto* factory = UdrProcedureFactory::CheckedUnwrap(info.Env(), info[2], "factory argument", true); - - return [obj, status, name, factory]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->registerProcedure(&statusWrapper, name.c_str(), (factory ? factory->interface : nullptr)); - return nullptr; - }; -} - -Napi::Value UdrPlugin::registerProcedureFinish(const Napi::Env env, void* ret) +void ProfilerStats::InitPrototype(std::vector::PropertyDescriptor>& properties) { - return env.Undefined(); + properties.push_back(InstanceMethod("getElapsedTicksSync", &ProfilerStats::getElapsedTicksSync)); + properties.push_back(InstanceMethod("getElapsedTicksAsync", &ProfilerStats::getElapsedTicksAsync)); } -MethodStart UdrPlugin::registerTriggerStart(bool async, const Napi::CallbackInfo& info) +MethodStart ProfilerStats::getElapsedTicksStart(bool async, const Napi::CallbackInfo& info) { - auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - auto* status = Status::CheckedUnwrap(info.Env(), info[0], "status argument", true); - std::string name = info[1].ToString().Utf8Value(); - auto* factory = UdrTriggerFactory::CheckedUnwrap(info.Env(), info[2], "factory argument", true); + auto* obj = ObjectWrap::Unwrap(info.This().ToObject()); - return [obj, status, name, factory]() { - fb::ThrowStatusWrapper statusWrapper(status->interface); - obj->interface->registerTrigger(&statusWrapper, name.c_str(), (factory ? factory->interface : nullptr)); - return nullptr; + return [obj]() { + return obj->interface->getElapsedTicks(); }; } -Napi::Value UdrPlugin::registerTriggerFinish(const Napi::Env env, void* ret) +Napi::Value ProfilerStats::getElapsedTicksFinish(const Napi::Env env, uint64_t ret) { - return env.Undefined(); + return Napi::Value::From(env, (double) ret); } static void initClasses(Napi::Env env, Napi::Object& exports) @@ -17527,6 +23400,9 @@ static void initClasses(Napi::Env env, Napi::Object& exports) MetadataBuilder::Init(env, exports, "MetadataBuilder"); ResultSet::Init(env, exports, "ResultSet"); Statement::Init(env, exports, "Statement"); + Batch::Init(env, exports, "Batch"); + BatchCompletionState::Init(env, exports, "BatchCompletionState"); + Replicator::Init(env, exports, "Replicator"); Request::Init(env, exports, "Request"); Events::Init(env, exports, "Events"); Attachment::Init(env, exports, "Attachment"); @@ -17547,9 +23423,11 @@ static void initClasses(Napi::Env env, Napi::Object& exports) ListUsers::Init(env, exports, "ListUsers"); LogonInfo::Init(env, exports, "LogonInfo"); Management::Init(env, exports, "Management"); + AuthBlock::Init(env, exports, "AuthBlock"); WireCryptPlugin::Init(env, exports, "WireCryptPlugin"); CryptKeyCallback::Init(env, exports, "CryptKeyCallback"); KeyHolderPlugin::Init(env, exports, "KeyHolderPlugin"); + DbCryptInfo::Init(env, exports, "DbCryptInfo"); DbCryptPlugin::Init(env, exports, "DbCryptPlugin"); ExternalContext::Init(env, exports, "ExternalContext"); ExternalResultSet::Init(env, exports, "ExternalResultSet"); @@ -17587,4 +23465,14 @@ static void initClasses(Napi::Env env, Napi::Object& exports) UdrProcedureFactory::Init(env, exports, "UdrProcedureFactory"); UdrTriggerFactory::Init(env, exports, "UdrTriggerFactory"); UdrPlugin::Init(env, exports, "UdrPlugin"); + DecFloat16::Init(env, exports, "DecFloat16"); + DecFloat34::Init(env, exports, "DecFloat34"); + Int128::Init(env, exports, "Int128"); + ReplicatedField::Init(env, exports, "ReplicatedField"); + ReplicatedRecord::Init(env, exports, "ReplicatedRecord"); + ReplicatedTransaction::Init(env, exports, "ReplicatedTransaction"); + ReplicatedSession::Init(env, exports, "ReplicatedSession"); + ProfilerPlugin::Init(env, exports, "ProfilerPlugin"); + ProfilerSession::Init(env, exports, "ProfilerSession"); + ProfilerStats::Init(env, exports, "ProfilerStats"); } diff --git a/packages/node-firebird-native-api/src/native/include/firebird/IdlFbInterfaces.h b/packages/node-firebird-native-api/src/native/include/firebird/IdlFbInterfaces.h index 752829d..e2955e6 100644 --- a/packages/node-firebird-native-api/src/native/include/firebird/IdlFbInterfaces.h +++ b/packages/node-firebird-native-api/src/native/include/firebird/IdlFbInterfaces.h @@ -7,6 +7,23 @@ #define CLOOP_CARG #endif +#ifndef CLOOP_NOEXCEPT +#if __cplusplus >= 201103L +#define CLOOP_NOEXCEPT noexcept +#else +#define CLOOP_NOEXCEPT throw() +#endif +#endif + + +#ifndef CLOOP_CONSTEXPR +#if __cplusplus >= 201103L +#define CLOOP_CONSTEXPR constexpr +#else +#define CLOOP_CONSTEXPR const +#endif +#endif + namespace Firebird { @@ -49,6 +66,9 @@ namespace Firebird class IMetadataBuilder; class IResultSet; class IStatement; + class IBatch; + class IBatchCompletionState; + class IReplicator; class IRequest; class IEvents; class IAttachment; @@ -69,6 +89,7 @@ namespace Firebird class IListUsers; class ILogonInfo; class IManagement; + class IAuthBlock; class IWireCryptPlugin; class ICryptKeyCallback; class IKeyHolderPlugin; @@ -110,9 +131,21 @@ namespace Firebird class IUdrProcedureFactory; class IUdrTriggerFactory; class IUdrPlugin; + class IDecFloat16; + class IDecFloat34; + class IInt128; + class IReplicatedField; + class IReplicatedRecord; + class IReplicatedTransaction; + class IReplicatedSession; + class IProfilerPlugin; + class IProfilerSession; + class IProfilerStats; // Interfaces declarations +#define FIREBIRD_IVERSIONED_VERSION 1u + class IVersioned { public: @@ -135,16 +168,18 @@ namespace Firebird } public: - static const unsigned VERSION = 1; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IVERSIONED_VERSION; }; +#define FIREBIRD_IREFERENCE_COUNTED_VERSION 2u + class IReferenceCounted : public IVersioned { public: struct VTable : public IVersioned::VTable { - void (CLOOP_CARG *addRef)(IReferenceCounted* self) throw(); - int (CLOOP_CARG *release)(IReferenceCounted* self) throw(); + void (CLOOP_CARG *addRef)(IReferenceCounted* self) CLOOP_NOEXCEPT; + int (CLOOP_CARG *release)(IReferenceCounted* self) CLOOP_NOEXCEPT; }; protected: @@ -158,7 +193,7 @@ namespace Firebird } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IREFERENCE_COUNTED_VERSION; void addRef() { @@ -172,12 +207,14 @@ namespace Firebird } }; +#define FIREBIRD_IDISPOSABLE_VERSION 2u + class IDisposable : public IVersioned { public: struct VTable : public IVersioned::VTable { - void (CLOOP_CARG *dispose)(IDisposable* self) throw(); + void (CLOOP_CARG *dispose)(IDisposable* self) CLOOP_NOEXCEPT; }; protected: @@ -191,7 +228,7 @@ namespace Firebird } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IDISPOSABLE_VERSION; void dispose() { @@ -199,20 +236,22 @@ namespace Firebird } }; +#define FIREBIRD_ISTATUS_VERSION 3u + class IStatus : public IDisposable { public: struct VTable : public IDisposable::VTable { - void (CLOOP_CARG *init)(IStatus* self) throw(); - unsigned (CLOOP_CARG *getState)(const IStatus* self) throw(); - void (CLOOP_CARG *setErrors2)(IStatus* self, unsigned length, const intptr_t* value) throw(); - void (CLOOP_CARG *setWarnings2)(IStatus* self, unsigned length, const intptr_t* value) throw(); - void (CLOOP_CARG *setErrors)(IStatus* self, const intptr_t* value) throw(); - void (CLOOP_CARG *setWarnings)(IStatus* self, const intptr_t* value) throw(); - const intptr_t* (CLOOP_CARG *getErrors)(const IStatus* self) throw(); - const intptr_t* (CLOOP_CARG *getWarnings)(const IStatus* self) throw(); - IStatus* (CLOOP_CARG *clone)(const IStatus* self) throw(); + void (CLOOP_CARG *init)(IStatus* self) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getState)(const IStatus* self) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setErrors2)(IStatus* self, unsigned length, const intptr_t* value) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setWarnings2)(IStatus* self, unsigned length, const intptr_t* value) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setErrors)(IStatus* self, const intptr_t* value) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setWarnings)(IStatus* self, const intptr_t* value) CLOOP_NOEXCEPT; + const intptr_t* (CLOOP_CARG *getErrors)(const IStatus* self) CLOOP_NOEXCEPT; + const intptr_t* (CLOOP_CARG *getWarnings)(const IStatus* self) CLOOP_NOEXCEPT; + IStatus* (CLOOP_CARG *clone)(const IStatus* self) CLOOP_NOEXCEPT; }; protected: @@ -226,14 +265,14 @@ namespace Firebird } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ISTATUS_VERSION; - static const unsigned STATE_WARNINGS = 1; - static const unsigned STATE_ERRORS = 2; - static const int RESULT_ERROR = -1; - static const int RESULT_OK = 0; - static const int RESULT_NO_DATA = 1; - static const int RESULT_SEGMENT = 2; + static CLOOP_CONSTEXPR unsigned STATE_WARNINGS = 0x1; + static CLOOP_CONSTEXPR unsigned STATE_ERRORS = 0x2; + static CLOOP_CONSTEXPR int RESULT_ERROR = -1; + static CLOOP_CONSTEXPR int RESULT_OK = 0; + static CLOOP_CONSTEXPR int RESULT_NO_DATA = 1; + static CLOOP_CONSTEXPR int RESULT_SEGMENT = 2; void init() { @@ -285,23 +324,25 @@ namespace Firebird } }; +#define FIREBIRD_IMASTER_VERSION 2u + class IMaster : public IVersioned { public: struct VTable : public IVersioned::VTable { - IStatus* (CLOOP_CARG *getStatus)(IMaster* self) throw(); - IProvider* (CLOOP_CARG *getDispatcher)(IMaster* self) throw(); - IPluginManager* (CLOOP_CARG *getPluginManager)(IMaster* self) throw(); - ITimerControl* (CLOOP_CARG *getTimerControl)(IMaster* self) throw(); - IDtc* (CLOOP_CARG *getDtc)(IMaster* self) throw(); - IAttachment* (CLOOP_CARG *registerAttachment)(IMaster* self, IProvider* provider, IAttachment* attachment) throw(); - ITransaction* (CLOOP_CARG *registerTransaction)(IMaster* self, IAttachment* attachment, ITransaction* transaction) throw(); - IMetadataBuilder* (CLOOP_CARG *getMetadataBuilder)(IMaster* self, IStatus* status, unsigned fieldCount) throw(); - int (CLOOP_CARG *serverMode)(IMaster* self, int mode) throw(); - IUtil* (CLOOP_CARG *getUtilInterface)(IMaster* self) throw(); - IConfigManager* (CLOOP_CARG *getConfigManager)(IMaster* self) throw(); - FB_BOOLEAN (CLOOP_CARG *getProcessExiting)(IMaster* self) throw(); + IStatus* (CLOOP_CARG *getStatus)(IMaster* self) CLOOP_NOEXCEPT; + IProvider* (CLOOP_CARG *getDispatcher)(IMaster* self) CLOOP_NOEXCEPT; + IPluginManager* (CLOOP_CARG *getPluginManager)(IMaster* self) CLOOP_NOEXCEPT; + ITimerControl* (CLOOP_CARG *getTimerControl)(IMaster* self) CLOOP_NOEXCEPT; + IDtc* (CLOOP_CARG *getDtc)(IMaster* self) CLOOP_NOEXCEPT; + IAttachment* (CLOOP_CARG *registerAttachment)(IMaster* self, IProvider* provider, IAttachment* attachment) CLOOP_NOEXCEPT; + ITransaction* (CLOOP_CARG *registerTransaction)(IMaster* self, IAttachment* attachment, ITransaction* transaction) CLOOP_NOEXCEPT; + IMetadataBuilder* (CLOOP_CARG *getMetadataBuilder)(IMaster* self, IStatus* status, unsigned fieldCount) CLOOP_NOEXCEPT; + int (CLOOP_CARG *serverMode)(IMaster* self, int mode) CLOOP_NOEXCEPT; + IUtil* (CLOOP_CARG *getUtilInterface)(IMaster* self) CLOOP_NOEXCEPT; + IConfigManager* (CLOOP_CARG *getConfigManager)(IMaster* self) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *getProcessExiting)(IMaster* self) CLOOP_NOEXCEPT; }; protected: @@ -315,7 +356,7 @@ namespace Firebird } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IMASTER_VERSION; IStatus* getStatus() { @@ -392,13 +433,15 @@ namespace Firebird } }; +#define FIREBIRD_IPLUGIN_BASE_VERSION 3u + class IPluginBase : public IReferenceCounted { public: struct VTable : public IReferenceCounted::VTable { - void (CLOOP_CARG *setOwner)(IPluginBase* self, IReferenceCounted* r) throw(); - IReferenceCounted* (CLOOP_CARG *getOwner)(IPluginBase* self) throw(); + void (CLOOP_CARG *setOwner)(IPluginBase* self, IReferenceCounted* r) CLOOP_NOEXCEPT; + IReferenceCounted* (CLOOP_CARG *getOwner)(IPluginBase* self) CLOOP_NOEXCEPT; }; protected: @@ -412,7 +455,7 @@ namespace Firebird } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IPLUGIN_BASE_VERSION; void setOwner(IReferenceCounted* r) { @@ -426,16 +469,18 @@ namespace Firebird } }; +#define FIREBIRD_IPLUGIN_SET_VERSION 3u + class IPluginSet : public IReferenceCounted { public: struct VTable : public IReferenceCounted::VTable { - const char* (CLOOP_CARG *getName)(const IPluginSet* self) throw(); - const char* (CLOOP_CARG *getModuleName)(const IPluginSet* self) throw(); - IPluginBase* (CLOOP_CARG *getPlugin)(IPluginSet* self, IStatus* status) throw(); - void (CLOOP_CARG *next)(IPluginSet* self, IStatus* status) throw(); - void (CLOOP_CARG *set)(IPluginSet* self, IStatus* status, const char* s) throw(); + const char* (CLOOP_CARG *getName)(const IPluginSet* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getModuleName)(const IPluginSet* self) CLOOP_NOEXCEPT; + IPluginBase* (CLOOP_CARG *getPlugin)(IPluginSet* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *next)(IPluginSet* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *set)(IPluginSet* self, IStatus* status, const char* s) CLOOP_NOEXCEPT; }; protected: @@ -449,7 +494,7 @@ namespace Firebird } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IPLUGIN_SET_VERSION; const char* getName() const { @@ -486,16 +531,18 @@ namespace Firebird } }; +#define FIREBIRD_ICONFIG_ENTRY_VERSION 3u + class IConfigEntry : public IReferenceCounted { public: struct VTable : public IReferenceCounted::VTable { - const char* (CLOOP_CARG *getName)(IConfigEntry* self) throw(); - const char* (CLOOP_CARG *getValue)(IConfigEntry* self) throw(); - ISC_INT64 (CLOOP_CARG *getIntValue)(IConfigEntry* self) throw(); - FB_BOOLEAN (CLOOP_CARG *getBoolValue)(IConfigEntry* self) throw(); - IConfig* (CLOOP_CARG *getSubConfig)(IConfigEntry* self, IStatus* status) throw(); + const char* (CLOOP_CARG *getName)(IConfigEntry* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getValue)(IConfigEntry* self) CLOOP_NOEXCEPT; + ISC_INT64 (CLOOP_CARG *getIntValue)(IConfigEntry* self) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *getBoolValue)(IConfigEntry* self) CLOOP_NOEXCEPT; + IConfig* (CLOOP_CARG *getSubConfig)(IConfigEntry* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: @@ -509,7 +556,7 @@ namespace Firebird } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ICONFIG_ENTRY_VERSION; const char* getName() { @@ -544,14 +591,16 @@ namespace Firebird } }; +#define FIREBIRD_ICONFIG_VERSION 3u + class IConfig : public IReferenceCounted { public: struct VTable : public IReferenceCounted::VTable { - IConfigEntry* (CLOOP_CARG *find)(IConfig* self, IStatus* status, const char* name) throw(); - IConfigEntry* (CLOOP_CARG *findValue)(IConfig* self, IStatus* status, const char* name, const char* value) throw(); - IConfigEntry* (CLOOP_CARG *findPos)(IConfig* self, IStatus* status, const char* name, unsigned pos) throw(); + IConfigEntry* (CLOOP_CARG *find)(IConfig* self, IStatus* status, const char* name) CLOOP_NOEXCEPT; + IConfigEntry* (CLOOP_CARG *findValue)(IConfig* self, IStatus* status, const char* name, const char* value) CLOOP_NOEXCEPT; + IConfigEntry* (CLOOP_CARG *findPos)(IConfig* self, IStatus* status, const char* name, unsigned pos) CLOOP_NOEXCEPT; }; protected: @@ -565,7 +614,7 @@ namespace Firebird } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ICONFIG_VERSION; template IConfigEntry* find(StatusType* status, const char* name) { @@ -592,15 +641,18 @@ namespace Firebird } }; +#define FIREBIRD_IFIREBIRD_CONF_VERSION 4u + class IFirebirdConf : public IReferenceCounted { public: struct VTable : public IReferenceCounted::VTable { - unsigned (CLOOP_CARG *getKey)(IFirebirdConf* self, const char* name) throw(); - ISC_INT64 (CLOOP_CARG *asInteger)(IFirebirdConf* self, unsigned key) throw(); - const char* (CLOOP_CARG *asString)(IFirebirdConf* self, unsigned key) throw(); - FB_BOOLEAN (CLOOP_CARG *asBoolean)(IFirebirdConf* self, unsigned key) throw(); + unsigned (CLOOP_CARG *getKey)(IFirebirdConf* self, const char* name) CLOOP_NOEXCEPT; + ISC_INT64 (CLOOP_CARG *asInteger)(IFirebirdConf* self, unsigned key) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *asString)(IFirebirdConf* self, unsigned key) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *asBoolean)(IFirebirdConf* self, unsigned key) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getVersion)(IFirebirdConf* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: @@ -614,7 +666,7 @@ namespace Firebird } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IFIREBIRD_CONF_VERSION; unsigned getKey(const char* name) { @@ -639,17 +691,33 @@ namespace Firebird FB_BOOLEAN ret = static_cast(this->cloopVTable)->asBoolean(this, key); return ret; } + + template unsigned getVersion(StatusType* status) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IFirebirdConf", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getVersion(this, status); + StatusType::checkException(status); + return ret; + } }; +#define FIREBIRD_IPLUGIN_CONFIG_VERSION 3u + class IPluginConfig : public IReferenceCounted { public: struct VTable : public IReferenceCounted::VTable { - const char* (CLOOP_CARG *getConfigFileName)(IPluginConfig* self) throw(); - IConfig* (CLOOP_CARG *getDefaultConfig)(IPluginConfig* self, IStatus* status) throw(); - IFirebirdConf* (CLOOP_CARG *getFirebirdConf)(IPluginConfig* self, IStatus* status) throw(); - void (CLOOP_CARG *setReleaseDelay)(IPluginConfig* self, IStatus* status, ISC_UINT64 microSeconds) throw(); + const char* (CLOOP_CARG *getConfigFileName)(IPluginConfig* self) CLOOP_NOEXCEPT; + IConfig* (CLOOP_CARG *getDefaultConfig)(IPluginConfig* self, IStatus* status) CLOOP_NOEXCEPT; + IFirebirdConf* (CLOOP_CARG *getFirebirdConf)(IPluginConfig* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setReleaseDelay)(IPluginConfig* self, IStatus* status, ISC_UINT64 microSeconds) CLOOP_NOEXCEPT; }; protected: @@ -663,7 +731,7 @@ namespace Firebird } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IPLUGIN_CONFIG_VERSION; const char* getConfigFileName() { @@ -695,12 +763,14 @@ namespace Firebird } }; +#define FIREBIRD_IPLUGIN_FACTORY_VERSION 2u + class IPluginFactory : public IVersioned { public: struct VTable : public IVersioned::VTable { - IPluginBase* (CLOOP_CARG *createPlugin)(IPluginFactory* self, IStatus* status, IPluginConfig* factoryParameter) throw(); + IPluginBase* (CLOOP_CARG *createPlugin)(IPluginFactory* self, IStatus* status, IPluginConfig* factoryParameter) CLOOP_NOEXCEPT; }; protected: @@ -714,7 +784,7 @@ namespace Firebird } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IPLUGIN_FACTORY_VERSION; template IPluginBase* createPlugin(StatusType* status, IPluginConfig* factoryParameter) { @@ -725,12 +795,15 @@ namespace Firebird } }; +#define FIREBIRD_IPLUGIN_MODULE_VERSION 3u + class IPluginModule : public IVersioned { public: struct VTable : public IVersioned::VTable { - void (CLOOP_CARG *doClean)(IPluginModule* self) throw(); + void (CLOOP_CARG *doClean)(IPluginModule* self) CLOOP_NOEXCEPT; + void (CLOOP_CARG *threadDetach)(IPluginModule* self) CLOOP_NOEXCEPT; }; protected: @@ -744,25 +817,36 @@ namespace Firebird } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IPLUGIN_MODULE_VERSION; void doClean() { static_cast(this->cloopVTable)->doClean(this); } + + void threadDetach() + { + if (cloopVTable->version < 3) + { + return; + } + static_cast(this->cloopVTable)->threadDetach(this); + } }; +#define FIREBIRD_IPLUGIN_MANAGER_VERSION 2u + class IPluginManager : public IVersioned { public: struct VTable : public IVersioned::VTable { - void (CLOOP_CARG *registerPluginFactory)(IPluginManager* self, unsigned pluginType, const char* defaultName, IPluginFactory* factory) throw(); - void (CLOOP_CARG *registerModule)(IPluginManager* self, IPluginModule* cleanup) throw(); - void (CLOOP_CARG *unregisterModule)(IPluginManager* self, IPluginModule* cleanup) throw(); - IPluginSet* (CLOOP_CARG *getPlugins)(IPluginManager* self, IStatus* status, unsigned pluginType, const char* namesList, IFirebirdConf* firebirdConf) throw(); - IConfig* (CLOOP_CARG *getConfig)(IPluginManager* self, IStatus* status, const char* filename) throw(); - void (CLOOP_CARG *releasePlugin)(IPluginManager* self, IPluginBase* plugin) throw(); + void (CLOOP_CARG *registerPluginFactory)(IPluginManager* self, unsigned pluginType, const char* defaultName, IPluginFactory* factory) CLOOP_NOEXCEPT; + void (CLOOP_CARG *registerModule)(IPluginManager* self, IPluginModule* cleanup) CLOOP_NOEXCEPT; + void (CLOOP_CARG *unregisterModule)(IPluginManager* self, IPluginModule* cleanup) CLOOP_NOEXCEPT; + IPluginSet* (CLOOP_CARG *getPlugins)(IPluginManager* self, IStatus* status, unsigned pluginType, const char* namesList, IFirebirdConf* firebirdConf) CLOOP_NOEXCEPT; + IConfig* (CLOOP_CARG *getConfig)(IPluginManager* self, IStatus* status, const char* filename) CLOOP_NOEXCEPT; + void (CLOOP_CARG *releasePlugin)(IPluginManager* self, IPluginBase* plugin) CLOOP_NOEXCEPT; }; protected: @@ -776,19 +860,21 @@ namespace Firebird } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IPLUGIN_MANAGER_VERSION; - static const unsigned TYPE_PROVIDER = 1; - static const unsigned TYPE_FIRST_NON_LIB = 2; - static const unsigned TYPE_AUTH_SERVER = 3; - static const unsigned TYPE_AUTH_CLIENT = 4; - static const unsigned TYPE_AUTH_USER_MANAGEMENT = 5; - static const unsigned TYPE_EXTERNAL_ENGINE = 6; - static const unsigned TYPE_TRACE = 7; - static const unsigned TYPE_WIRE_CRYPT = 8; - static const unsigned TYPE_DB_CRYPT = 9; - static const unsigned TYPE_KEY_HOLDER = 10; - static const unsigned TYPE_COUNT = 11; + static CLOOP_CONSTEXPR unsigned TYPE_PROVIDER = 1; + static CLOOP_CONSTEXPR unsigned TYPE_FIRST_NON_LIB = 2; + static CLOOP_CONSTEXPR unsigned TYPE_AUTH_SERVER = 3; + static CLOOP_CONSTEXPR unsigned TYPE_AUTH_CLIENT = 4; + static CLOOP_CONSTEXPR unsigned TYPE_AUTH_USER_MANAGEMENT = 5; + static CLOOP_CONSTEXPR unsigned TYPE_EXTERNAL_ENGINE = 6; + static CLOOP_CONSTEXPR unsigned TYPE_TRACE = 7; + static CLOOP_CONSTEXPR unsigned TYPE_WIRE_CRYPT = 8; + static CLOOP_CONSTEXPR unsigned TYPE_DB_CRYPT = 9; + static CLOOP_CONSTEXPR unsigned TYPE_KEY_HOLDER = 10; + static CLOOP_CONSTEXPR unsigned TYPE_REPLICATOR = 11; + static CLOOP_CONSTEXPR unsigned TYPE_PROFILER = 12; + static CLOOP_CONSTEXPR unsigned TYPE_COUNT = 13; void registerPluginFactory(unsigned pluginType, const char* defaultName, IPluginFactory* factory) { @@ -827,15 +913,17 @@ namespace Firebird } }; +#define FIREBIRD_ICRYPT_KEY_VERSION 2u + class ICryptKey : public IVersioned { public: struct VTable : public IVersioned::VTable { - void (CLOOP_CARG *setSymmetric)(ICryptKey* self, IStatus* status, const char* type, unsigned keyLength, const void* key) throw(); - void (CLOOP_CARG *setAsymmetric)(ICryptKey* self, IStatus* status, const char* type, unsigned encryptKeyLength, const void* encryptKey, unsigned decryptKeyLength, const void* decryptKey) throw(); - const void* (CLOOP_CARG *getEncryptKey)(ICryptKey* self, unsigned* length) throw(); - const void* (CLOOP_CARG *getDecryptKey)(ICryptKey* self, unsigned* length) throw(); + void (CLOOP_CARG *setSymmetric)(ICryptKey* self, IStatus* status, const char* type, unsigned keyLength, const void* key) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setAsymmetric)(ICryptKey* self, IStatus* status, const char* type, unsigned encryptKeyLength, const void* encryptKey, unsigned decryptKeyLength, const void* decryptKey) CLOOP_NOEXCEPT; + const void* (CLOOP_CARG *getEncryptKey)(ICryptKey* self, unsigned* length) CLOOP_NOEXCEPT; + const void* (CLOOP_CARG *getDecryptKey)(ICryptKey* self, unsigned* length) CLOOP_NOEXCEPT; }; protected: @@ -849,7 +937,7 @@ namespace Firebird } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ICRYPT_KEY_VERSION; template void setSymmetric(StatusType* status, const char* type, unsigned keyLength, const void* key) { @@ -878,17 +966,20 @@ namespace Firebird } }; +#define FIREBIRD_ICONFIG_MANAGER_VERSION 3u + class IConfigManager : public IVersioned { public: struct VTable : public IVersioned::VTable { - const char* (CLOOP_CARG *getDirectory)(IConfigManager* self, unsigned code) throw(); - IFirebirdConf* (CLOOP_CARG *getFirebirdConf)(IConfigManager* self) throw(); - IFirebirdConf* (CLOOP_CARG *getDatabaseConf)(IConfigManager* self, const char* dbName) throw(); - IConfig* (CLOOP_CARG *getPluginConfig)(IConfigManager* self, const char* configuredPlugin) throw(); - const char* (CLOOP_CARG *getInstallDirectory)(IConfigManager* self) throw(); - const char* (CLOOP_CARG *getRootDirectory)(IConfigManager* self) throw(); + const char* (CLOOP_CARG *getDirectory)(IConfigManager* self, unsigned code) CLOOP_NOEXCEPT; + IFirebirdConf* (CLOOP_CARG *getFirebirdConf)(IConfigManager* self) CLOOP_NOEXCEPT; + IFirebirdConf* (CLOOP_CARG *getDatabaseConf)(IConfigManager* self, const char* dbName) CLOOP_NOEXCEPT; + IConfig* (CLOOP_CARG *getPluginConfig)(IConfigManager* self, const char* configuredPlugin) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getInstallDirectory)(IConfigManager* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getRootDirectory)(IConfigManager* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getDefaultSecurityDb)(IConfigManager* self) CLOOP_NOEXCEPT; }; protected: @@ -902,26 +993,27 @@ namespace Firebird } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ICONFIG_MANAGER_VERSION; - static const unsigned DIR_BIN = 0; - static const unsigned DIR_SBIN = 1; - static const unsigned DIR_CONF = 2; - static const unsigned DIR_LIB = 3; - static const unsigned DIR_INC = 4; - static const unsigned DIR_DOC = 5; - static const unsigned DIR_UDF = 6; - static const unsigned DIR_SAMPLE = 7; - static const unsigned DIR_SAMPLEDB = 8; - static const unsigned DIR_HELP = 9; - static const unsigned DIR_INTL = 10; - static const unsigned DIR_MISC = 11; - static const unsigned DIR_SECDB = 12; - static const unsigned DIR_MSG = 13; - static const unsigned DIR_LOG = 14; - static const unsigned DIR_GUARD = 15; - static const unsigned DIR_PLUGINS = 16; - static const unsigned DIR_COUNT = 17; + static CLOOP_CONSTEXPR unsigned DIR_BIN = 0; + static CLOOP_CONSTEXPR unsigned DIR_SBIN = 1; + static CLOOP_CONSTEXPR unsigned DIR_CONF = 2; + static CLOOP_CONSTEXPR unsigned DIR_LIB = 3; + static CLOOP_CONSTEXPR unsigned DIR_INC = 4; + static CLOOP_CONSTEXPR unsigned DIR_DOC = 5; + static CLOOP_CONSTEXPR unsigned DIR_UDF = 6; + static CLOOP_CONSTEXPR unsigned DIR_SAMPLE = 7; + static CLOOP_CONSTEXPR unsigned DIR_SAMPLEDB = 8; + static CLOOP_CONSTEXPR unsigned DIR_HELP = 9; + static CLOOP_CONSTEXPR unsigned DIR_INTL = 10; + static CLOOP_CONSTEXPR unsigned DIR_MISC = 11; + static CLOOP_CONSTEXPR unsigned DIR_SECDB = 12; + static CLOOP_CONSTEXPR unsigned DIR_MSG = 13; + static CLOOP_CONSTEXPR unsigned DIR_LOG = 14; + static CLOOP_CONSTEXPR unsigned DIR_GUARD = 15; + static CLOOP_CONSTEXPR unsigned DIR_PLUGINS = 16; + static CLOOP_CONSTEXPR unsigned DIR_TZDATA = 17; + static CLOOP_CONSTEXPR unsigned DIR_COUNT = 18; const char* getDirectory(unsigned code) { @@ -958,14 +1050,26 @@ namespace Firebird const char* ret = static_cast(this->cloopVTable)->getRootDirectory(this); return ret; } + + const char* getDefaultSecurityDb() + { + if (cloopVTable->version < 3) + { + return 0; + } + const char* ret = static_cast(this->cloopVTable)->getDefaultSecurityDb(this); + return ret; + } }; +#define FIREBIRD_IEVENT_CALLBACK_VERSION 3u + class IEventCallback : public IReferenceCounted { public: struct VTable : public IReferenceCounted::VTable { - void (CLOOP_CARG *eventCallbackFunction)(IEventCallback* self, unsigned length, const unsigned char* events) throw(); + void (CLOOP_CARG *eventCallbackFunction)(IEventCallback* self, unsigned length, const unsigned char* events) CLOOP_NOEXCEPT; }; protected: @@ -979,7 +1083,7 @@ namespace Firebird } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IEVENT_CALLBACK_VERSION; void eventCallbackFunction(unsigned length, const unsigned char* events) { @@ -987,17 +1091,21 @@ namespace Firebird } }; +#define FIREBIRD_IBLOB_VERSION 4u + class IBlob : public IReferenceCounted { public: struct VTable : public IReferenceCounted::VTable { - void (CLOOP_CARG *getInfo)(IBlob* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw(); - int (CLOOP_CARG *getSegment)(IBlob* self, IStatus* status, unsigned bufferLength, void* buffer, unsigned* segmentLength) throw(); - void (CLOOP_CARG *putSegment)(IBlob* self, IStatus* status, unsigned length, const void* buffer) throw(); - void (CLOOP_CARG *cancel)(IBlob* self, IStatus* status) throw(); - void (CLOOP_CARG *close)(IBlob* self, IStatus* status) throw(); - int (CLOOP_CARG *seek)(IBlob* self, IStatus* status, int mode, int offset) throw(); + void (CLOOP_CARG *getInfo)(IBlob* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT; + int (CLOOP_CARG *getSegment)(IBlob* self, IStatus* status, unsigned bufferLength, void* buffer, unsigned* segmentLength) CLOOP_NOEXCEPT; + void (CLOOP_CARG *putSegment)(IBlob* self, IStatus* status, unsigned length, const void* buffer) CLOOP_NOEXCEPT; + void (CLOOP_CARG *deprecatedCancel)(IBlob* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *deprecatedClose)(IBlob* self, IStatus* status) CLOOP_NOEXCEPT; + int (CLOOP_CARG *seek)(IBlob* self, IStatus* status, int mode, int offset) CLOOP_NOEXCEPT; + void (CLOOP_CARG *cancel)(IBlob* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *close)(IBlob* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: @@ -1011,7 +1119,7 @@ namespace Firebird } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IBLOB_VERSION; template void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) { @@ -1035,17 +1143,17 @@ namespace Firebird StatusType::checkException(status); } - template void cancel(StatusType* status) + template void deprecatedCancel(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->cancel(this, status); + static_cast(this->cloopVTable)->deprecatedCancel(this, status); StatusType::checkException(status); } - template void close(StatusType* status) + template void deprecatedClose(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->close(this, status); + static_cast(this->cloopVTable)->deprecatedClose(this, status); StatusType::checkException(status); } @@ -1056,23 +1164,64 @@ namespace Firebird StatusType::checkException(status); return ret; } + + template void cancel(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IBlob", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedCancel(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->cancel(this, status); + StatusType::checkException(status); + } + + template void close(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IBlob", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedClose(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->close(this, status); + StatusType::checkException(status); + } }; +#define FIREBIRD_ITRANSACTION_VERSION 4u + class ITransaction : public IReferenceCounted { public: struct VTable : public IReferenceCounted::VTable { - void (CLOOP_CARG *getInfo)(ITransaction* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw(); - void (CLOOP_CARG *prepare)(ITransaction* self, IStatus* status, unsigned msgLength, const unsigned char* message) throw(); - void (CLOOP_CARG *commit)(ITransaction* self, IStatus* status) throw(); - void (CLOOP_CARG *commitRetaining)(ITransaction* self, IStatus* status) throw(); - void (CLOOP_CARG *rollback)(ITransaction* self, IStatus* status) throw(); - void (CLOOP_CARG *rollbackRetaining)(ITransaction* self, IStatus* status) throw(); - void (CLOOP_CARG *disconnect)(ITransaction* self, IStatus* status) throw(); - ITransaction* (CLOOP_CARG *join)(ITransaction* self, IStatus* status, ITransaction* transaction) throw(); - ITransaction* (CLOOP_CARG *validate)(ITransaction* self, IStatus* status, IAttachment* attachment) throw(); - ITransaction* (CLOOP_CARG *enterDtc)(ITransaction* self, IStatus* status) throw(); + void (CLOOP_CARG *getInfo)(ITransaction* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT; + void (CLOOP_CARG *prepare)(ITransaction* self, IStatus* status, unsigned msgLength, const unsigned char* message) CLOOP_NOEXCEPT; + void (CLOOP_CARG *deprecatedCommit)(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *commitRetaining)(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *deprecatedRollback)(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *rollbackRetaining)(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *deprecatedDisconnect)(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT; + ITransaction* (CLOOP_CARG *join)(ITransaction* self, IStatus* status, ITransaction* transaction) CLOOP_NOEXCEPT; + ITransaction* (CLOOP_CARG *validate)(ITransaction* self, IStatus* status, IAttachment* attachment) CLOOP_NOEXCEPT; + ITransaction* (CLOOP_CARG *enterDtc)(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *commit)(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *rollback)(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *disconnect)(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: @@ -1086,7 +1235,7 @@ namespace Firebird } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRANSACTION_VERSION; template void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) { @@ -1102,10 +1251,10 @@ namespace Firebird StatusType::checkException(status); } - template void commit(StatusType* status) + template void deprecatedCommit(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->commit(this, status); + static_cast(this->cloopVTable)->deprecatedCommit(this, status); StatusType::checkException(status); } @@ -1116,10 +1265,10 @@ namespace Firebird StatusType::checkException(status); } - template void rollback(StatusType* status) + template void deprecatedRollback(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->rollback(this, status); + static_cast(this->cloopVTable)->deprecatedRollback(this, status); StatusType::checkException(status); } @@ -1130,10 +1279,10 @@ namespace Firebird StatusType::checkException(status); } - template void disconnect(StatusType* status) + template void deprecatedDisconnect(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->disconnect(this, status); + static_cast(this->cloopVTable)->deprecatedDisconnect(this, status); StatusType::checkException(status); } @@ -1160,28 +1309,86 @@ namespace Firebird StatusType::checkException(status); return ret; } + + template void commit(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "ITransaction", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedCommit(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->commit(this, status); + StatusType::checkException(status); + } + + template void rollback(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "ITransaction", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedRollback(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->rollback(this, status); + StatusType::checkException(status); + } + + template void disconnect(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "ITransaction", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedDisconnect(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->disconnect(this, status); + StatusType::checkException(status); + } }; +#define FIREBIRD_IMESSAGE_METADATA_VERSION 4u + class IMessageMetadata : public IReferenceCounted { public: struct VTable : public IReferenceCounted::VTable { - unsigned (CLOOP_CARG *getCount)(IMessageMetadata* self, IStatus* status) throw(); - const char* (CLOOP_CARG *getField)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); - const char* (CLOOP_CARG *getRelation)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); - const char* (CLOOP_CARG *getOwner)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); - const char* (CLOOP_CARG *getAlias)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); - unsigned (CLOOP_CARG *getType)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); - FB_BOOLEAN (CLOOP_CARG *isNullable)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); - int (CLOOP_CARG *getSubType)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); - unsigned (CLOOP_CARG *getLength)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); - int (CLOOP_CARG *getScale)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); - unsigned (CLOOP_CARG *getCharSet)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); - unsigned (CLOOP_CARG *getOffset)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); - unsigned (CLOOP_CARG *getNullOffset)(IMessageMetadata* self, IStatus* status, unsigned index) throw(); - IMetadataBuilder* (CLOOP_CARG *getBuilder)(IMessageMetadata* self, IStatus* status) throw(); - unsigned (CLOOP_CARG *getMessageLength)(IMessageMetadata* self, IStatus* status) throw(); + unsigned (CLOOP_CARG *getCount)(IMessageMetadata* self, IStatus* status) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getField)(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getRelation)(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getOwner)(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getAlias)(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getType)(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *isNullable)(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT; + int (CLOOP_CARG *getSubType)(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getLength)(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT; + int (CLOOP_CARG *getScale)(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getCharSet)(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getOffset)(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getNullOffset)(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT; + IMetadataBuilder* (CLOOP_CARG *getBuilder)(IMessageMetadata* self, IStatus* status) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getMessageLength)(IMessageMetadata* self, IStatus* status) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getAlignment)(IMessageMetadata* self, IStatus* status) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getAlignedLength)(IMessageMetadata* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: @@ -1195,7 +1402,7 @@ namespace Firebird } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IMESSAGE_METADATA_VERSION; template unsigned getCount(StatusType* status) { @@ -1316,23 +1523,57 @@ namespace Firebird StatusType::checkException(status); return ret; } + + template unsigned getAlignment(StatusType* status) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IMessageMetadata", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getAlignment(this, status); + StatusType::checkException(status); + return ret; + } + + template unsigned getAlignedLength(StatusType* status) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IMessageMetadata", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getAlignedLength(this, status); + StatusType::checkException(status); + return ret; + } }; +#define FIREBIRD_IMETADATA_BUILDER_VERSION 4u + class IMetadataBuilder : public IReferenceCounted { public: struct VTable : public IReferenceCounted::VTable { - void (CLOOP_CARG *setType)(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned type) throw(); - void (CLOOP_CARG *setSubType)(IMetadataBuilder* self, IStatus* status, unsigned index, int subType) throw(); - void (CLOOP_CARG *setLength)(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned length) throw(); - void (CLOOP_CARG *setCharSet)(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned charSet) throw(); - void (CLOOP_CARG *setScale)(IMetadataBuilder* self, IStatus* status, unsigned index, int scale) throw(); - void (CLOOP_CARG *truncate)(IMetadataBuilder* self, IStatus* status, unsigned count) throw(); - void (CLOOP_CARG *moveNameToIndex)(IMetadataBuilder* self, IStatus* status, const char* name, unsigned index) throw(); - void (CLOOP_CARG *remove)(IMetadataBuilder* self, IStatus* status, unsigned index) throw(); - unsigned (CLOOP_CARG *addField)(IMetadataBuilder* self, IStatus* status) throw(); - IMessageMetadata* (CLOOP_CARG *getMetadata)(IMetadataBuilder* self, IStatus* status) throw(); + void (CLOOP_CARG *setType)(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned type) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setSubType)(IMetadataBuilder* self, IStatus* status, unsigned index, int subType) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setLength)(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned length) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setCharSet)(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned charSet) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setScale)(IMetadataBuilder* self, IStatus* status, unsigned index, int scale) CLOOP_NOEXCEPT; + void (CLOOP_CARG *truncate)(IMetadataBuilder* self, IStatus* status, unsigned count) CLOOP_NOEXCEPT; + void (CLOOP_CARG *moveNameToIndex)(IMetadataBuilder* self, IStatus* status, const char* name, unsigned index) CLOOP_NOEXCEPT; + void (CLOOP_CARG *remove)(IMetadataBuilder* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *addField)(IMetadataBuilder* self, IStatus* status) CLOOP_NOEXCEPT; + IMessageMetadata* (CLOOP_CARG *getMetadata)(IMetadataBuilder* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setField)(IMetadataBuilder* self, IStatus* status, unsigned index, const char* field) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setRelation)(IMetadataBuilder* self, IStatus* status, unsigned index, const char* relation) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setOwner)(IMetadataBuilder* self, IStatus* status, unsigned index, const char* owner) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setAlias)(IMetadataBuilder* self, IStatus* status, unsigned index, const char* alias) CLOOP_NOEXCEPT; }; protected: @@ -1346,7 +1587,7 @@ namespace Firebird } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IMETADATA_BUILDER_VERSION; template void setType(StatusType* status, unsigned index, unsigned type) { @@ -1419,24 +1660,80 @@ namespace Firebird StatusType::checkException(status); return ret; } + + template void setField(StatusType* status, unsigned index, const char* field) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IMetadataBuilder", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setField(this, status, index, field); + StatusType::checkException(status); + } + + template void setRelation(StatusType* status, unsigned index, const char* relation) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IMetadataBuilder", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setRelation(this, status, index, relation); + StatusType::checkException(status); + } + + template void setOwner(StatusType* status, unsigned index, const char* owner) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IMetadataBuilder", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setOwner(this, status, index, owner); + StatusType::checkException(status); + } + + template void setAlias(StatusType* status, unsigned index, const char* alias) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IMetadataBuilder", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setAlias(this, status, index, alias); + StatusType::checkException(status); + } }; +#define FIREBIRD_IRESULT_SET_VERSION 5u + class IResultSet : public IReferenceCounted { public: struct VTable : public IReferenceCounted::VTable { - int (CLOOP_CARG *fetchNext)(IResultSet* self, IStatus* status, void* message) throw(); - int (CLOOP_CARG *fetchPrior)(IResultSet* self, IStatus* status, void* message) throw(); - int (CLOOP_CARG *fetchFirst)(IResultSet* self, IStatus* status, void* message) throw(); - int (CLOOP_CARG *fetchLast)(IResultSet* self, IStatus* status, void* message) throw(); - int (CLOOP_CARG *fetchAbsolute)(IResultSet* self, IStatus* status, int position, void* message) throw(); - int (CLOOP_CARG *fetchRelative)(IResultSet* self, IStatus* status, int offset, void* message) throw(); - FB_BOOLEAN (CLOOP_CARG *isEof)(IResultSet* self, IStatus* status) throw(); - FB_BOOLEAN (CLOOP_CARG *isBof)(IResultSet* self, IStatus* status) throw(); - IMessageMetadata* (CLOOP_CARG *getMetadata)(IResultSet* self, IStatus* status) throw(); - void (CLOOP_CARG *close)(IResultSet* self, IStatus* status) throw(); - void (CLOOP_CARG *setDelayedOutputFormat)(IResultSet* self, IStatus* status, IMessageMetadata* format) throw(); + int (CLOOP_CARG *fetchNext)(IResultSet* self, IStatus* status, void* message) CLOOP_NOEXCEPT; + int (CLOOP_CARG *fetchPrior)(IResultSet* self, IStatus* status, void* message) CLOOP_NOEXCEPT; + int (CLOOP_CARG *fetchFirst)(IResultSet* self, IStatus* status, void* message) CLOOP_NOEXCEPT; + int (CLOOP_CARG *fetchLast)(IResultSet* self, IStatus* status, void* message) CLOOP_NOEXCEPT; + int (CLOOP_CARG *fetchAbsolute)(IResultSet* self, IStatus* status, int position, void* message) CLOOP_NOEXCEPT; + int (CLOOP_CARG *fetchRelative)(IResultSet* self, IStatus* status, int offset, void* message) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *isEof)(IResultSet* self, IStatus* status) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *isBof)(IResultSet* self, IStatus* status) CLOOP_NOEXCEPT; + IMessageMetadata* (CLOOP_CARG *getMetadata)(IResultSet* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *deprecatedClose)(IResultSet* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setDelayedOutputFormat)(IResultSet* self, IStatus* status, IMessageMetadata* format) CLOOP_NOEXCEPT; + void (CLOOP_CARG *close)(IResultSet* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *getInfo)(IResultSet* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT; }; protected: @@ -1450,7 +1747,9 @@ namespace Firebird } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IRESULT_SET_VERSION; + + static CLOOP_CONSTEXPR unsigned char INF_RECORD_COUNT = 10; template int fetchNext(StatusType* status, void* message) { @@ -1524,10 +1823,10 @@ namespace Firebird return ret; } - template void close(StatusType* status) + template void deprecatedClose(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->close(this, status); + static_cast(this->cloopVTable)->deprecatedClose(this, status); StatusType::checkException(status); } @@ -1537,24 +1836,63 @@ namespace Firebird static_cast(this->cloopVTable)->setDelayedOutputFormat(this, status, format); StatusType::checkException(status); } + + template void close(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IResultSet", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedClose(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->close(this, status); + StatusType::checkException(status); + } + + template void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) + { + if (cloopVTable->version < 5) + { + StatusType::setVersionError(status, "IResultSet", cloopVTable->version, 5); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->getInfo(this, status, itemsLength, items, bufferLength, buffer); + StatusType::checkException(status); + } }; +#define FIREBIRD_ISTATEMENT_VERSION 6u + class IStatement : public IReferenceCounted { public: struct VTable : public IReferenceCounted::VTable { - void (CLOOP_CARG *getInfo)(IStatement* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw(); - unsigned (CLOOP_CARG *getType)(IStatement* self, IStatus* status) throw(); - const char* (CLOOP_CARG *getPlan)(IStatement* self, IStatus* status, FB_BOOLEAN detailed) throw(); - ISC_UINT64 (CLOOP_CARG *getAffectedRecords)(IStatement* self, IStatus* status) throw(); - IMessageMetadata* (CLOOP_CARG *getInputMetadata)(IStatement* self, IStatus* status) throw(); - IMessageMetadata* (CLOOP_CARG *getOutputMetadata)(IStatement* self, IStatus* status) throw(); - ITransaction* (CLOOP_CARG *execute)(IStatement* self, IStatus* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) throw(); - IResultSet* (CLOOP_CARG *openCursor)(IStatement* self, IStatus* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, unsigned flags) throw(); - void (CLOOP_CARG *setCursorName)(IStatement* self, IStatus* status, const char* name) throw(); - void (CLOOP_CARG *free)(IStatement* self, IStatus* status) throw(); - unsigned (CLOOP_CARG *getFlags)(IStatement* self, IStatus* status) throw(); + void (CLOOP_CARG *getInfo)(IStatement* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getType)(IStatement* self, IStatus* status) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getPlan)(IStatement* self, IStatus* status, FB_BOOLEAN detailed) CLOOP_NOEXCEPT; + ISC_UINT64 (CLOOP_CARG *getAffectedRecords)(IStatement* self, IStatus* status) CLOOP_NOEXCEPT; + IMessageMetadata* (CLOOP_CARG *getInputMetadata)(IStatement* self, IStatus* status) CLOOP_NOEXCEPT; + IMessageMetadata* (CLOOP_CARG *getOutputMetadata)(IStatement* self, IStatus* status) CLOOP_NOEXCEPT; + ITransaction* (CLOOP_CARG *execute)(IStatement* self, IStatus* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) CLOOP_NOEXCEPT; + IResultSet* (CLOOP_CARG *openCursor)(IStatement* self, IStatus* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, unsigned flags) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setCursorName)(IStatement* self, IStatus* status, const char* name) CLOOP_NOEXCEPT; + void (CLOOP_CARG *deprecatedFree)(IStatement* self, IStatus* status) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getFlags)(IStatement* self, IStatus* status) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getTimeout)(IStatement* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setTimeout)(IStatement* self, IStatus* status, unsigned timeOut) CLOOP_NOEXCEPT; + IBatch* (CLOOP_CARG *createBatch)(IStatement* self, IStatus* status, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) CLOOP_NOEXCEPT; + void (CLOOP_CARG *free)(IStatement* self, IStatus* status) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getMaxInlineBlobSize)(IStatement* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setMaxInlineBlobSize)(IStatement* self, IStatus* status, unsigned size) CLOOP_NOEXCEPT; }; protected: @@ -1568,21 +1906,21 @@ namespace Firebird } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ISTATEMENT_VERSION; - static const unsigned PREPARE_PREFETCH_NONE = 0; - static const unsigned PREPARE_PREFETCH_TYPE = 1; - static const unsigned PREPARE_PREFETCH_INPUT_PARAMETERS = 2; - static const unsigned PREPARE_PREFETCH_OUTPUT_PARAMETERS = 4; - static const unsigned PREPARE_PREFETCH_LEGACY_PLAN = 8; - static const unsigned PREPARE_PREFETCH_DETAILED_PLAN = 16; - static const unsigned PREPARE_PREFETCH_AFFECTED_RECORDS = 32; - static const unsigned PREPARE_PREFETCH_FLAGS = 64; - static const unsigned PREPARE_PREFETCH_METADATA = IStatement::PREPARE_PREFETCH_TYPE | IStatement::PREPARE_PREFETCH_FLAGS | IStatement::PREPARE_PREFETCH_INPUT_PARAMETERS | IStatement::PREPARE_PREFETCH_OUTPUT_PARAMETERS; - static const unsigned PREPARE_PREFETCH_ALL = IStatement::PREPARE_PREFETCH_METADATA | IStatement::PREPARE_PREFETCH_LEGACY_PLAN | IStatement::PREPARE_PREFETCH_DETAILED_PLAN | IStatement::PREPARE_PREFETCH_AFFECTED_RECORDS; - static const unsigned FLAG_HAS_CURSOR = 1; - static const unsigned FLAG_REPEAT_EXECUTE = 2; - static const unsigned CURSOR_TYPE_SCROLLABLE = 1; + static CLOOP_CONSTEXPR unsigned PREPARE_PREFETCH_NONE = 0x0; + static CLOOP_CONSTEXPR unsigned PREPARE_PREFETCH_TYPE = 0x1; + static CLOOP_CONSTEXPR unsigned PREPARE_PREFETCH_INPUT_PARAMETERS = 0x2; + static CLOOP_CONSTEXPR unsigned PREPARE_PREFETCH_OUTPUT_PARAMETERS = 0x4; + static CLOOP_CONSTEXPR unsigned PREPARE_PREFETCH_LEGACY_PLAN = 0x8; + static CLOOP_CONSTEXPR unsigned PREPARE_PREFETCH_DETAILED_PLAN = 0x10; + static CLOOP_CONSTEXPR unsigned PREPARE_PREFETCH_AFFECTED_RECORDS = 0x20; + static CLOOP_CONSTEXPR unsigned PREPARE_PREFETCH_FLAGS = 0x40; + static CLOOP_CONSTEXPR unsigned PREPARE_PREFETCH_METADATA = IStatement::PREPARE_PREFETCH_TYPE | IStatement::PREPARE_PREFETCH_FLAGS | IStatement::PREPARE_PREFETCH_INPUT_PARAMETERS | IStatement::PREPARE_PREFETCH_OUTPUT_PARAMETERS; + static CLOOP_CONSTEXPR unsigned PREPARE_PREFETCH_ALL = IStatement::PREPARE_PREFETCH_METADATA | IStatement::PREPARE_PREFETCH_LEGACY_PLAN | IStatement::PREPARE_PREFETCH_DETAILED_PLAN | IStatement::PREPARE_PREFETCH_AFFECTED_RECORDS; + static CLOOP_CONSTEXPR unsigned FLAG_HAS_CURSOR = 0x1; + static CLOOP_CONSTEXPR unsigned FLAG_REPEAT_EXECUTE = 0x2; + static CLOOP_CONSTEXPR unsigned CURSOR_TYPE_SCROLLABLE = 0x1; template void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) { @@ -1654,10 +1992,10 @@ namespace Firebird StatusType::checkException(status); } - template void free(StatusType* status) + template void deprecatedFree(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->free(this, status); + static_cast(this->cloopVTable)->deprecatedFree(this, status); StatusType::checkException(status); } @@ -1668,3486 +2006,8613 @@ namespace Firebird StatusType::checkException(status); return ret; } - }; - - class IRequest : public IReferenceCounted - { - public: - struct VTable : public IReferenceCounted::VTable - { - void (CLOOP_CARG *receive)(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, unsigned char* message) throw(); - void (CLOOP_CARG *send)(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, const unsigned char* message) throw(); - void (CLOOP_CARG *getInfo)(IRequest* self, IStatus* status, int level, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw(); - void (CLOOP_CARG *start)(IRequest* self, IStatus* status, ITransaction* tra, int level) throw(); - void (CLOOP_CARG *startAndSend)(IRequest* self, IStatus* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const unsigned char* message) throw(); - void (CLOOP_CARG *unwind)(IRequest* self, IStatus* status, int level) throw(); - void (CLOOP_CARG *free)(IRequest* self, IStatus* status) throw(); - }; - - protected: - IRequest(DoNotInherit) - : IReferenceCounted(DoNotInherit()) - { - } - - ~IRequest() - { - } - - public: - static const unsigned VERSION = 3; - template void receive(StatusType* status, int level, unsigned msgType, unsigned length, unsigned char* message) + template unsigned getTimeout(StatusType* status) { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IStatement", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } StatusType::clearException(status); - static_cast(this->cloopVTable)->receive(this, status, level, msgType, length, message); + unsigned ret = static_cast(this->cloopVTable)->getTimeout(this, status); StatusType::checkException(status); + return ret; } - template void send(StatusType* status, int level, unsigned msgType, unsigned length, const unsigned char* message) + template void setTimeout(StatusType* status, unsigned timeOut) { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IStatement", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } StatusType::clearException(status); - static_cast(this->cloopVTable)->send(this, status, level, msgType, length, message); + static_cast(this->cloopVTable)->setTimeout(this, status, timeOut); StatusType::checkException(status); } - template void getInfo(StatusType* status, int level, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) + template IBatch* createBatch(StatusType* status, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IStatement", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } StatusType::clearException(status); - static_cast(this->cloopVTable)->getInfo(this, status, level, itemsLength, items, bufferLength, buffer); + IBatch* ret = static_cast(this->cloopVTable)->createBatch(this, status, inMetadata, parLength, par); StatusType::checkException(status); + return ret; } - template void start(StatusType* status, ITransaction* tra, int level) + template void free(StatusType* status) { + if (cloopVTable->version < 5) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IStatement", cloopVTable->version, 5); + StatusType::checkException(status); + } + else { + deprecatedFree(status); + } + return; + } StatusType::clearException(status); - static_cast(this->cloopVTable)->start(this, status, tra, level); + static_cast(this->cloopVTable)->free(this, status); StatusType::checkException(status); } - template void startAndSend(StatusType* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const unsigned char* message) - { - StatusType::clearException(status); - static_cast(this->cloopVTable)->startAndSend(this, status, tra, level, msgType, length, message); - StatusType::checkException(status); - } - - template void unwind(StatusType* status, int level) + template unsigned getMaxInlineBlobSize(StatusType* status) { + if (cloopVTable->version < 6) + { + StatusType::setVersionError(status, "IStatement", cloopVTable->version, 6); + StatusType::checkException(status); + return 0; + } StatusType::clearException(status); - static_cast(this->cloopVTable)->unwind(this, status, level); + unsigned ret = static_cast(this->cloopVTable)->getMaxInlineBlobSize(this, status); StatusType::checkException(status); + return ret; } - template void free(StatusType* status) + template void setMaxInlineBlobSize(StatusType* status, unsigned size) { + if (cloopVTable->version < 6) + { + StatusType::setVersionError(status, "IStatement", cloopVTable->version, 6); + StatusType::checkException(status); + return; + } StatusType::clearException(status); - static_cast(this->cloopVTable)->free(this, status); + static_cast(this->cloopVTable)->setMaxInlineBlobSize(this, status, size); StatusType::checkException(status); } }; - class IEvents : public IReferenceCounted +#define FIREBIRD_IBATCH_VERSION 4u + + class IBatch : public IReferenceCounted { public: struct VTable : public IReferenceCounted::VTable { - void (CLOOP_CARG *cancel)(IEvents* self, IStatus* status) throw(); + void (CLOOP_CARG *add)(IBatch* self, IStatus* status, unsigned count, const void* inBuffer) CLOOP_NOEXCEPT; + void (CLOOP_CARG *addBlob)(IBatch* self, IStatus* status, unsigned length, const void* inBuffer, ISC_QUAD* blobId, unsigned parLength, const unsigned char* par) CLOOP_NOEXCEPT; + void (CLOOP_CARG *appendBlobData)(IBatch* self, IStatus* status, unsigned length, const void* inBuffer) CLOOP_NOEXCEPT; + void (CLOOP_CARG *addBlobStream)(IBatch* self, IStatus* status, unsigned length, const void* inBuffer) CLOOP_NOEXCEPT; + void (CLOOP_CARG *registerBlob)(IBatch* self, IStatus* status, const ISC_QUAD* existingBlob, ISC_QUAD* blobId) CLOOP_NOEXCEPT; + IBatchCompletionState* (CLOOP_CARG *execute)(IBatch* self, IStatus* status, ITransaction* transaction) CLOOP_NOEXCEPT; + void (CLOOP_CARG *cancel)(IBatch* self, IStatus* status) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getBlobAlignment)(IBatch* self, IStatus* status) CLOOP_NOEXCEPT; + IMessageMetadata* (CLOOP_CARG *getMetadata)(IBatch* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setDefaultBpb)(IBatch* self, IStatus* status, unsigned parLength, const unsigned char* par) CLOOP_NOEXCEPT; + void (CLOOP_CARG *deprecatedClose)(IBatch* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *close)(IBatch* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *getInfo)(IBatch* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT; }; protected: - IEvents(DoNotInherit) + IBatch(DoNotInherit) : IReferenceCounted(DoNotInherit()) { } - ~IEvents() + ~IBatch() { } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IBATCH_VERSION; - template void cancel(StatusType* status) + static CLOOP_CONSTEXPR unsigned char VERSION1 = 1; + static CLOOP_CONSTEXPR unsigned char CURRENT_VERSION = IBatch::VERSION1; + static CLOOP_CONSTEXPR unsigned char TAG_MULTIERROR = 1; + static CLOOP_CONSTEXPR unsigned char TAG_RECORD_COUNTS = 2; + static CLOOP_CONSTEXPR unsigned char TAG_BUFFER_BYTES_SIZE = 3; + static CLOOP_CONSTEXPR unsigned char TAG_BLOB_POLICY = 4; + static CLOOP_CONSTEXPR unsigned char TAG_DETAILED_ERRORS = 5; + static CLOOP_CONSTEXPR unsigned char INF_BUFFER_BYTES_SIZE = 10; + static CLOOP_CONSTEXPR unsigned char INF_DATA_BYTES_SIZE = 11; + static CLOOP_CONSTEXPR unsigned char INF_BLOBS_BYTES_SIZE = 12; + static CLOOP_CONSTEXPR unsigned char INF_BLOB_ALIGNMENT = 13; + static CLOOP_CONSTEXPR unsigned char INF_BLOB_HEADER = 14; + static CLOOP_CONSTEXPR unsigned char BLOB_NONE = 0; + static CLOOP_CONSTEXPR unsigned char BLOB_ID_ENGINE = 1; + static CLOOP_CONSTEXPR unsigned char BLOB_ID_USER = 2; + static CLOOP_CONSTEXPR unsigned char BLOB_STREAM = 3; + static CLOOP_CONSTEXPR unsigned BLOB_SEGHDR_ALIGN = 2; + + template void add(StatusType* status, unsigned count, const void* inBuffer) { StatusType::clearException(status); - static_cast(this->cloopVTable)->cancel(this, status); + static_cast(this->cloopVTable)->add(this, status, count, inBuffer); StatusType::checkException(status); } - }; - - class IAttachment : public IReferenceCounted - { - public: - struct VTable : public IReferenceCounted::VTable - { - void (CLOOP_CARG *getInfo)(IAttachment* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw(); - ITransaction* (CLOOP_CARG *startTransaction)(IAttachment* self, IStatus* status, unsigned tpbLength, const unsigned char* tpb) throw(); - ITransaction* (CLOOP_CARG *reconnectTransaction)(IAttachment* self, IStatus* status, unsigned length, const unsigned char* id) throw(); - IRequest* (CLOOP_CARG *compileRequest)(IAttachment* self, IStatus* status, unsigned blrLength, const unsigned char* blr) throw(); - void (CLOOP_CARG *transactRequest)(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned blrLength, const unsigned char* blr, unsigned inMsgLength, const unsigned char* inMsg, unsigned outMsgLength, unsigned char* outMsg) throw(); - IBlob* (CLOOP_CARG *createBlob)(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) throw(); - IBlob* (CLOOP_CARG *openBlob)(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) throw(); - int (CLOOP_CARG *getSlice)(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) throw(); - void (CLOOP_CARG *putSlice)(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) throw(); - void (CLOOP_CARG *executeDyn)(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned length, const unsigned char* dyn) throw(); - IStatement* (CLOOP_CARG *prepare)(IAttachment* self, IStatus* status, ITransaction* tra, unsigned stmtLength, const char* sqlStmt, unsigned dialect, unsigned flags) throw(); - ITransaction* (CLOOP_CARG *execute)(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) throw(); - IResultSet* (CLOOP_CARG *openCursor)(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, const char* cursorName, unsigned cursorFlags) throw(); - IEvents* (CLOOP_CARG *queEvents)(IAttachment* self, IStatus* status, IEventCallback* callback, unsigned length, const unsigned char* events) throw(); - void (CLOOP_CARG *cancelOperation)(IAttachment* self, IStatus* status, int option) throw(); - void (CLOOP_CARG *ping)(IAttachment* self, IStatus* status) throw(); - void (CLOOP_CARG *detach)(IAttachment* self, IStatus* status) throw(); - void (CLOOP_CARG *dropDatabase)(IAttachment* self, IStatus* status) throw(); - }; - - protected: - IAttachment(DoNotInherit) - : IReferenceCounted(DoNotInherit()) - { - } - ~IAttachment() + template void addBlob(StatusType* status, unsigned length, const void* inBuffer, ISC_QUAD* blobId, unsigned parLength, const unsigned char* par) { + StatusType::clearException(status); + static_cast(this->cloopVTable)->addBlob(this, status, length, inBuffer, blobId, parLength, par); + StatusType::checkException(status); } - public: - static const unsigned VERSION = 3; - - template void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) + template void appendBlobData(StatusType* status, unsigned length, const void* inBuffer) { StatusType::clearException(status); - static_cast(this->cloopVTable)->getInfo(this, status, itemsLength, items, bufferLength, buffer); + static_cast(this->cloopVTable)->appendBlobData(this, status, length, inBuffer); StatusType::checkException(status); } - template ITransaction* startTransaction(StatusType* status, unsigned tpbLength, const unsigned char* tpb) + template void addBlobStream(StatusType* status, unsigned length, const void* inBuffer) { StatusType::clearException(status); - ITransaction* ret = static_cast(this->cloopVTable)->startTransaction(this, status, tpbLength, tpb); + static_cast(this->cloopVTable)->addBlobStream(this, status, length, inBuffer); StatusType::checkException(status); - return ret; } - template ITransaction* reconnectTransaction(StatusType* status, unsigned length, const unsigned char* id) + template void registerBlob(StatusType* status, const ISC_QUAD* existingBlob, ISC_QUAD* blobId) { StatusType::clearException(status); - ITransaction* ret = static_cast(this->cloopVTable)->reconnectTransaction(this, status, length, id); + static_cast(this->cloopVTable)->registerBlob(this, status, existingBlob, blobId); StatusType::checkException(status); - return ret; } - template IRequest* compileRequest(StatusType* status, unsigned blrLength, const unsigned char* blr) + template IBatchCompletionState* execute(StatusType* status, ITransaction* transaction) { StatusType::clearException(status); - IRequest* ret = static_cast(this->cloopVTable)->compileRequest(this, status, blrLength, blr); + IBatchCompletionState* ret = static_cast(this->cloopVTable)->execute(this, status, transaction); StatusType::checkException(status); return ret; } - template void transactRequest(StatusType* status, ITransaction* transaction, unsigned blrLength, const unsigned char* blr, unsigned inMsgLength, const unsigned char* inMsg, unsigned outMsgLength, unsigned char* outMsg) + template void cancel(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->transactRequest(this, status, transaction, blrLength, blr, inMsgLength, inMsg, outMsgLength, outMsg); + static_cast(this->cloopVTable)->cancel(this, status); StatusType::checkException(status); } - template IBlob* createBlob(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) + template unsigned getBlobAlignment(StatusType* status) { StatusType::clearException(status); - IBlob* ret = static_cast(this->cloopVTable)->createBlob(this, status, transaction, id, bpbLength, bpb); + unsigned ret = static_cast(this->cloopVTable)->getBlobAlignment(this, status); StatusType::checkException(status); return ret; } - template IBlob* openBlob(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) + template IMessageMetadata* getMetadata(StatusType* status) { StatusType::clearException(status); - IBlob* ret = static_cast(this->cloopVTable)->openBlob(this, status, transaction, id, bpbLength, bpb); + IMessageMetadata* ret = static_cast(this->cloopVTable)->getMetadata(this, status); StatusType::checkException(status); return ret; } - template int getSlice(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) + template void setDefaultBpb(StatusType* status, unsigned parLength, const unsigned char* par) { StatusType::clearException(status); - int ret = static_cast(this->cloopVTable)->getSlice(this, status, transaction, id, sdlLength, sdl, paramLength, param, sliceLength, slice); + static_cast(this->cloopVTable)->setDefaultBpb(this, status, parLength, par); StatusType::checkException(status); - return ret; } - template void putSlice(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) + template void deprecatedClose(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->putSlice(this, status, transaction, id, sdlLength, sdl, paramLength, param, sliceLength, slice); + static_cast(this->cloopVTable)->deprecatedClose(this, status); StatusType::checkException(status); } - template void executeDyn(StatusType* status, ITransaction* transaction, unsigned length, const unsigned char* dyn) + template void close(StatusType* status) { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IBatch", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedClose(status); + } + return; + } StatusType::clearException(status); - static_cast(this->cloopVTable)->executeDyn(this, status, transaction, length, dyn); + static_cast(this->cloopVTable)->close(this, status); StatusType::checkException(status); } - template IStatement* prepare(StatusType* status, ITransaction* tra, unsigned stmtLength, const char* sqlStmt, unsigned dialect, unsigned flags) + template void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IBatch", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } StatusType::clearException(status); - IStatement* ret = static_cast(this->cloopVTable)->prepare(this, status, tra, stmtLength, sqlStmt, dialect, flags); + static_cast(this->cloopVTable)->getInfo(this, status, itemsLength, items, bufferLength, buffer); StatusType::checkException(status); - return ret; } + }; - template ITransaction* execute(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) +#define FIREBIRD_IBATCH_COMPLETION_STATE_VERSION 3u + + class IBatchCompletionState : public IDisposable + { + public: + struct VTable : public IDisposable::VTable { - StatusType::clearException(status); - ITransaction* ret = static_cast(this->cloopVTable)->execute(this, status, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, outMetadata, outBuffer); - StatusType::checkException(status); - return ret; - } + unsigned (CLOOP_CARG *getSize)(IBatchCompletionState* self, IStatus* status) CLOOP_NOEXCEPT; + int (CLOOP_CARG *getState)(IBatchCompletionState* self, IStatus* status, unsigned pos) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *findError)(IBatchCompletionState* self, IStatus* status, unsigned pos) CLOOP_NOEXCEPT; + void (CLOOP_CARG *getStatus)(IBatchCompletionState* self, IStatus* status, IStatus* to, unsigned pos) CLOOP_NOEXCEPT; + }; - template IResultSet* openCursor(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, const char* cursorName, unsigned cursorFlags) + protected: + IBatchCompletionState(DoNotInherit) + : IDisposable(DoNotInherit()) { - StatusType::clearException(status); - IResultSet* ret = static_cast(this->cloopVTable)->openCursor(this, status, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, outMetadata, cursorName, cursorFlags); - StatusType::checkException(status); - return ret; } - template IEvents* queEvents(StatusType* status, IEventCallback* callback, unsigned length, const unsigned char* events) + ~IBatchCompletionState() { - StatusType::clearException(status); - IEvents* ret = static_cast(this->cloopVTable)->queEvents(this, status, callback, length, events); - StatusType::checkException(status); - return ret; } - template void cancelOperation(StatusType* status, int option) + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IBATCH_COMPLETION_STATE_VERSION; + + static CLOOP_CONSTEXPR int EXECUTE_FAILED = -1; + static CLOOP_CONSTEXPR int SUCCESS_NO_INFO = -2; + static CLOOP_CONSTEXPR unsigned NO_MORE_ERRORS = 0xffffffff; + + template unsigned getSize(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->cancelOperation(this, status, option); + unsigned ret = static_cast(this->cloopVTable)->getSize(this, status); StatusType::checkException(status); + return ret; } - template void ping(StatusType* status) + template int getState(StatusType* status, unsigned pos) { StatusType::clearException(status); - static_cast(this->cloopVTable)->ping(this, status); + int ret = static_cast(this->cloopVTable)->getState(this, status, pos); StatusType::checkException(status); + return ret; } - template void detach(StatusType* status) + template unsigned findError(StatusType* status, unsigned pos) { StatusType::clearException(status); - static_cast(this->cloopVTable)->detach(this, status); + unsigned ret = static_cast(this->cloopVTable)->findError(this, status, pos); StatusType::checkException(status); + return ret; } - template void dropDatabase(StatusType* status) + template void getStatus(StatusType* status, IStatus* to, unsigned pos) { StatusType::clearException(status); - static_cast(this->cloopVTable)->dropDatabase(this, status); + static_cast(this->cloopVTable)->getStatus(this, status, to, pos); StatusType::checkException(status); } }; - class IService : public IReferenceCounted +#define FIREBIRD_IREPLICATOR_VERSION 4u + + class IReplicator : public IReferenceCounted { public: struct VTable : public IReferenceCounted::VTable { - void (CLOOP_CARG *detach)(IService* self, IStatus* status) throw(); - void (CLOOP_CARG *query)(IService* self, IStatus* status, unsigned sendLength, const unsigned char* sendItems, unsigned receiveLength, const unsigned char* receiveItems, unsigned bufferLength, unsigned char* buffer) throw(); - void (CLOOP_CARG *start)(IService* self, IStatus* status, unsigned spbLength, const unsigned char* spb) throw(); + void (CLOOP_CARG *process)(IReplicator* self, IStatus* status, unsigned length, const unsigned char* data) CLOOP_NOEXCEPT; + void (CLOOP_CARG *deprecatedClose)(IReplicator* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *close)(IReplicator* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: - IService(DoNotInherit) + IReplicator(DoNotInherit) : IReferenceCounted(DoNotInherit()) { } - ~IService() + ~IReplicator() { } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IREPLICATOR_VERSION; - template void detach(StatusType* status) + template void process(StatusType* status, unsigned length, const unsigned char* data) { StatusType::clearException(status); - static_cast(this->cloopVTable)->detach(this, status); + static_cast(this->cloopVTable)->process(this, status, length, data); StatusType::checkException(status); } - template void query(StatusType* status, unsigned sendLength, const unsigned char* sendItems, unsigned receiveLength, const unsigned char* receiveItems, unsigned bufferLength, unsigned char* buffer) + template void deprecatedClose(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->query(this, status, sendLength, sendItems, receiveLength, receiveItems, bufferLength, buffer); + static_cast(this->cloopVTable)->deprecatedClose(this, status); StatusType::checkException(status); } - template void start(StatusType* status, unsigned spbLength, const unsigned char* spb) + template void close(StatusType* status) { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IReplicator", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedClose(status); + } + return; + } StatusType::clearException(status); - static_cast(this->cloopVTable)->start(this, status, spbLength, spb); + static_cast(this->cloopVTable)->close(this, status); StatusType::checkException(status); } }; - class IProvider : public IPluginBase +#define FIREBIRD_IREQUEST_VERSION 4u + + class IRequest : public IReferenceCounted { public: - struct VTable : public IPluginBase::VTable + struct VTable : public IReferenceCounted::VTable { - IAttachment* (CLOOP_CARG *attachDatabase)(IProvider* self, IStatus* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) throw(); - IAttachment* (CLOOP_CARG *createDatabase)(IProvider* self, IStatus* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) throw(); - IService* (CLOOP_CARG *attachServiceManager)(IProvider* self, IStatus* status, const char* service, unsigned spbLength, const unsigned char* spb) throw(); - void (CLOOP_CARG *shutdown)(IProvider* self, IStatus* status, unsigned timeout, const int reason) throw(); - void (CLOOP_CARG *setDbCryptCallback)(IProvider* self, IStatus* status, ICryptKeyCallback* cryptCallback) throw(); + void (CLOOP_CARG *receive)(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, void* message) CLOOP_NOEXCEPT; + void (CLOOP_CARG *send)(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, const void* message) CLOOP_NOEXCEPT; + void (CLOOP_CARG *getInfo)(IRequest* self, IStatus* status, int level, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT; + void (CLOOP_CARG *start)(IRequest* self, IStatus* status, ITransaction* tra, int level) CLOOP_NOEXCEPT; + void (CLOOP_CARG *startAndSend)(IRequest* self, IStatus* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const void* message) CLOOP_NOEXCEPT; + void (CLOOP_CARG *unwind)(IRequest* self, IStatus* status, int level) CLOOP_NOEXCEPT; + void (CLOOP_CARG *deprecatedFree)(IRequest* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *free)(IRequest* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: - IProvider(DoNotInherit) - : IPluginBase(DoNotInherit()) + IRequest(DoNotInherit) + : IReferenceCounted(DoNotInherit()) { } - ~IProvider() + ~IRequest() { } public: - static const unsigned VERSION = 4; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IREQUEST_VERSION; - template IAttachment* attachDatabase(StatusType* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) + template void receive(StatusType* status, int level, unsigned msgType, unsigned length, void* message) { StatusType::clearException(status); - IAttachment* ret = static_cast(this->cloopVTable)->attachDatabase(this, status, fileName, dpbLength, dpb); + static_cast(this->cloopVTable)->receive(this, status, level, msgType, length, message); StatusType::checkException(status); - return ret; } - template IAttachment* createDatabase(StatusType* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) + template void send(StatusType* status, int level, unsigned msgType, unsigned length, const void* message) { StatusType::clearException(status); - IAttachment* ret = static_cast(this->cloopVTable)->createDatabase(this, status, fileName, dpbLength, dpb); + static_cast(this->cloopVTable)->send(this, status, level, msgType, length, message); StatusType::checkException(status); - return ret; } - template IService* attachServiceManager(StatusType* status, const char* service, unsigned spbLength, const unsigned char* spb) + template void getInfo(StatusType* status, int level, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) { StatusType::clearException(status); - IService* ret = static_cast(this->cloopVTable)->attachServiceManager(this, status, service, spbLength, spb); + static_cast(this->cloopVTable)->getInfo(this, status, level, itemsLength, items, bufferLength, buffer); StatusType::checkException(status); - return ret; } - template void shutdown(StatusType* status, unsigned timeout, const int reason) + template void start(StatusType* status, ITransaction* tra, int level) { StatusType::clearException(status); - static_cast(this->cloopVTable)->shutdown(this, status, timeout, reason); + static_cast(this->cloopVTable)->start(this, status, tra, level); StatusType::checkException(status); } - template void setDbCryptCallback(StatusType* status, ICryptKeyCallback* cryptCallback) + template void startAndSend(StatusType* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const void* message) { StatusType::clearException(status); - static_cast(this->cloopVTable)->setDbCryptCallback(this, status, cryptCallback); + static_cast(this->cloopVTable)->startAndSend(this, status, tra, level, msgType, length, message); StatusType::checkException(status); } - }; - - class IDtcStart : public IDisposable - { - public: - struct VTable : public IDisposable::VTable - { - void (CLOOP_CARG *addAttachment)(IDtcStart* self, IStatus* status, IAttachment* att) throw(); - void (CLOOP_CARG *addWithTpb)(IDtcStart* self, IStatus* status, IAttachment* att, unsigned length, const unsigned char* tpb) throw(); - ITransaction* (CLOOP_CARG *start)(IDtcStart* self, IStatus* status) throw(); - }; - - protected: - IDtcStart(DoNotInherit) - : IDisposable(DoNotInherit()) - { - } - - ~IDtcStart() - { - } - - public: - static const unsigned VERSION = 3; - template void addAttachment(StatusType* status, IAttachment* att) + template void unwind(StatusType* status, int level) { StatusType::clearException(status); - static_cast(this->cloopVTable)->addAttachment(this, status, att); + static_cast(this->cloopVTable)->unwind(this, status, level); StatusType::checkException(status); } - template void addWithTpb(StatusType* status, IAttachment* att, unsigned length, const unsigned char* tpb) + template void deprecatedFree(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->addWithTpb(this, status, att, length, tpb); + static_cast(this->cloopVTable)->deprecatedFree(this, status); StatusType::checkException(status); } - template ITransaction* start(StatusType* status) + template void free(StatusType* status) { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IRequest", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedFree(status); + } + return; + } StatusType::clearException(status); - ITransaction* ret = static_cast(this->cloopVTable)->start(this, status); + static_cast(this->cloopVTable)->free(this, status); StatusType::checkException(status); - return ret; } }; - class IDtc : public IVersioned +#define FIREBIRD_IEVENTS_VERSION 4u + + class IEvents : public IReferenceCounted { public: - struct VTable : public IVersioned::VTable + struct VTable : public IReferenceCounted::VTable { - ITransaction* (CLOOP_CARG *join)(IDtc* self, IStatus* status, ITransaction* one, ITransaction* two) throw(); - IDtcStart* (CLOOP_CARG *startBuilder)(IDtc* self, IStatus* status) throw(); + void (CLOOP_CARG *deprecatedCancel)(IEvents* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *cancel)(IEvents* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: - IDtc(DoNotInherit) - : IVersioned(DoNotInherit()) + IEvents(DoNotInherit) + : IReferenceCounted(DoNotInherit()) { } - ~IDtc() + ~IEvents() { } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IEVENTS_VERSION; - template ITransaction* join(StatusType* status, ITransaction* one, ITransaction* two) + template void deprecatedCancel(StatusType* status) { StatusType::clearException(status); - ITransaction* ret = static_cast(this->cloopVTable)->join(this, status, one, two); + static_cast(this->cloopVTable)->deprecatedCancel(this, status); StatusType::checkException(status); - return ret; } - template IDtcStart* startBuilder(StatusType* status) + template void cancel(StatusType* status) { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IEvents", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedCancel(status); + } + return; + } StatusType::clearException(status); - IDtcStart* ret = static_cast(this->cloopVTable)->startBuilder(this, status); + static_cast(this->cloopVTable)->cancel(this, status); StatusType::checkException(status); - return ret; } }; - class IAuth : public IPluginBase +#define FIREBIRD_IATTACHMENT_VERSION 6u + + class IAttachment : public IReferenceCounted { public: - struct VTable : public IPluginBase::VTable + struct VTable : public IReferenceCounted::VTable { + void (CLOOP_CARG *getInfo)(IAttachment* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT; + ITransaction* (CLOOP_CARG *startTransaction)(IAttachment* self, IStatus* status, unsigned tpbLength, const unsigned char* tpb) CLOOP_NOEXCEPT; + ITransaction* (CLOOP_CARG *reconnectTransaction)(IAttachment* self, IStatus* status, unsigned length, const unsigned char* id) CLOOP_NOEXCEPT; + IRequest* (CLOOP_CARG *compileRequest)(IAttachment* self, IStatus* status, unsigned blrLength, const unsigned char* blr) CLOOP_NOEXCEPT; + void (CLOOP_CARG *transactRequest)(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned blrLength, const unsigned char* blr, unsigned inMsgLength, const unsigned char* inMsg, unsigned outMsgLength, unsigned char* outMsg) CLOOP_NOEXCEPT; + IBlob* (CLOOP_CARG *createBlob)(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) CLOOP_NOEXCEPT; + IBlob* (CLOOP_CARG *openBlob)(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) CLOOP_NOEXCEPT; + int (CLOOP_CARG *getSlice)(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) CLOOP_NOEXCEPT; + void (CLOOP_CARG *putSlice)(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) CLOOP_NOEXCEPT; + void (CLOOP_CARG *executeDyn)(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned length, const unsigned char* dyn) CLOOP_NOEXCEPT; + IStatement* (CLOOP_CARG *prepare)(IAttachment* self, IStatus* status, ITransaction* tra, unsigned stmtLength, const char* sqlStmt, unsigned dialect, unsigned flags) CLOOP_NOEXCEPT; + ITransaction* (CLOOP_CARG *execute)(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) CLOOP_NOEXCEPT; + IResultSet* (CLOOP_CARG *openCursor)(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, const char* cursorName, unsigned cursorFlags) CLOOP_NOEXCEPT; + IEvents* (CLOOP_CARG *queEvents)(IAttachment* self, IStatus* status, IEventCallback* callback, unsigned length, const unsigned char* events) CLOOP_NOEXCEPT; + void (CLOOP_CARG *cancelOperation)(IAttachment* self, IStatus* status, int option) CLOOP_NOEXCEPT; + void (CLOOP_CARG *ping)(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *deprecatedDetach)(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *deprecatedDropDatabase)(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getIdleTimeout)(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setIdleTimeout)(IAttachment* self, IStatus* status, unsigned timeOut) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getStatementTimeout)(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setStatementTimeout)(IAttachment* self, IStatus* status, unsigned timeOut) CLOOP_NOEXCEPT; + IBatch* (CLOOP_CARG *createBatch)(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) CLOOP_NOEXCEPT; + IReplicator* (CLOOP_CARG *createReplicator)(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *detach)(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *dropDatabase)(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getMaxBlobCacheSize)(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setMaxBlobCacheSize)(IAttachment* self, IStatus* status, unsigned size) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getMaxInlineBlobSize)(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setMaxInlineBlobSize)(IAttachment* self, IStatus* status, unsigned size) CLOOP_NOEXCEPT; }; protected: - IAuth(DoNotInherit) - : IPluginBase(DoNotInherit()) + IAttachment(DoNotInherit) + : IReferenceCounted(DoNotInherit()) { } - ~IAuth() + ~IAttachment() { } public: - static const unsigned VERSION = 4; - - static const int AUTH_FAILED = -1; - static const int AUTH_SUCCESS = 0; - static const int AUTH_MORE_DATA = 1; - static const int AUTH_CONTINUE = 2; - }; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IATTACHMENT_VERSION; - class IWriter : public IVersioned - { - public: - struct VTable : public IVersioned::VTable - { - void (CLOOP_CARG *reset)(IWriter* self) throw(); - void (CLOOP_CARG *add)(IWriter* self, IStatus* status, const char* name) throw(); - void (CLOOP_CARG *setType)(IWriter* self, IStatus* status, const char* value) throw(); - void (CLOOP_CARG *setDb)(IWriter* self, IStatus* status, const char* value) throw(); - }; - - protected: - IWriter(DoNotInherit) - : IVersioned(DoNotInherit()) + template void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) { + StatusType::clearException(status); + static_cast(this->cloopVTable)->getInfo(this, status, itemsLength, items, bufferLength, buffer); + StatusType::checkException(status); } - ~IWriter() + template ITransaction* startTransaction(StatusType* status, unsigned tpbLength, const unsigned char* tpb) { + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->startTransaction(this, status, tpbLength, tpb); + StatusType::checkException(status); + return ret; } - public: - static const unsigned VERSION = 2; - - void reset() + template ITransaction* reconnectTransaction(StatusType* status, unsigned length, const unsigned char* id) { - static_cast(this->cloopVTable)->reset(this); + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->reconnectTransaction(this, status, length, id); + StatusType::checkException(status); + return ret; } - template void add(StatusType* status, const char* name) + template IRequest* compileRequest(StatusType* status, unsigned blrLength, const unsigned char* blr) { StatusType::clearException(status); - static_cast(this->cloopVTable)->add(this, status, name); + IRequest* ret = static_cast(this->cloopVTable)->compileRequest(this, status, blrLength, blr); StatusType::checkException(status); + return ret; } - template void setType(StatusType* status, const char* value) + template void transactRequest(StatusType* status, ITransaction* transaction, unsigned blrLength, const unsigned char* blr, unsigned inMsgLength, const unsigned char* inMsg, unsigned outMsgLength, unsigned char* outMsg) { StatusType::clearException(status); - static_cast(this->cloopVTable)->setType(this, status, value); + static_cast(this->cloopVTable)->transactRequest(this, status, transaction, blrLength, blr, inMsgLength, inMsg, outMsgLength, outMsg); StatusType::checkException(status); } - template void setDb(StatusType* status, const char* value) + template IBlob* createBlob(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) { StatusType::clearException(status); - static_cast(this->cloopVTable)->setDb(this, status, value); + IBlob* ret = static_cast(this->cloopVTable)->createBlob(this, status, transaction, id, bpbLength, bpb); StatusType::checkException(status); + return ret; } - }; - class IServerBlock : public IVersioned - { - public: - struct VTable : public IVersioned::VTable + template IBlob* openBlob(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) { - const char* (CLOOP_CARG *getLogin)(IServerBlock* self) throw(); - const unsigned char* (CLOOP_CARG *getData)(IServerBlock* self, unsigned* length) throw(); - void (CLOOP_CARG *putData)(IServerBlock* self, IStatus* status, unsigned length, const void* data) throw(); - ICryptKey* (CLOOP_CARG *newKey)(IServerBlock* self, IStatus* status) throw(); - }; + StatusType::clearException(status); + IBlob* ret = static_cast(this->cloopVTable)->openBlob(this, status, transaction, id, bpbLength, bpb); + StatusType::checkException(status); + return ret; + } - protected: - IServerBlock(DoNotInherit) - : IVersioned(DoNotInherit()) + template int getSlice(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) { + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->getSlice(this, status, transaction, id, sdlLength, sdl, paramLength, param, sliceLength, slice); + StatusType::checkException(status); + return ret; } - ~IServerBlock() + template void putSlice(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) { + StatusType::clearException(status); + static_cast(this->cloopVTable)->putSlice(this, status, transaction, id, sdlLength, sdl, paramLength, param, sliceLength, slice); + StatusType::checkException(status); } - public: - static const unsigned VERSION = 2; + template void executeDyn(StatusType* status, ITransaction* transaction, unsigned length, const unsigned char* dyn) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->executeDyn(this, status, transaction, length, dyn); + StatusType::checkException(status); + } - const char* getLogin() + template IStatement* prepare(StatusType* status, ITransaction* tra, unsigned stmtLength, const char* sqlStmt, unsigned dialect, unsigned flags) { - const char* ret = static_cast(this->cloopVTable)->getLogin(this); + StatusType::clearException(status); + IStatement* ret = static_cast(this->cloopVTable)->prepare(this, status, tra, stmtLength, sqlStmt, dialect, flags); + StatusType::checkException(status); return ret; } - const unsigned char* getData(unsigned* length) + template ITransaction* execute(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) { - const unsigned char* ret = static_cast(this->cloopVTable)->getData(this, length); + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->execute(this, status, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, outMetadata, outBuffer); + StatusType::checkException(status); return ret; } - template void putData(StatusType* status, unsigned length, const void* data) + template IResultSet* openCursor(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, const char* cursorName, unsigned cursorFlags) { StatusType::clearException(status); - static_cast(this->cloopVTable)->putData(this, status, length, data); + IResultSet* ret = static_cast(this->cloopVTable)->openCursor(this, status, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, outMetadata, cursorName, cursorFlags); StatusType::checkException(status); + return ret; } - template ICryptKey* newKey(StatusType* status) + template IEvents* queEvents(StatusType* status, IEventCallback* callback, unsigned length, const unsigned char* events) { StatusType::clearException(status); - ICryptKey* ret = static_cast(this->cloopVTable)->newKey(this, status); + IEvents* ret = static_cast(this->cloopVTable)->queEvents(this, status, callback, length, events); StatusType::checkException(status); return ret; } - }; - class IClientBlock : public IReferenceCounted - { - public: - struct VTable : public IReferenceCounted::VTable + template void cancelOperation(StatusType* status, int option) { - const char* (CLOOP_CARG *getLogin)(IClientBlock* self) throw(); - const char* (CLOOP_CARG *getPassword)(IClientBlock* self) throw(); - const unsigned char* (CLOOP_CARG *getData)(IClientBlock* self, unsigned* length) throw(); - void (CLOOP_CARG *putData)(IClientBlock* self, IStatus* status, unsigned length, const void* data) throw(); - ICryptKey* (CLOOP_CARG *newKey)(IClientBlock* self, IStatus* status) throw(); - }; + StatusType::clearException(status); + static_cast(this->cloopVTable)->cancelOperation(this, status, option); + StatusType::checkException(status); + } - protected: - IClientBlock(DoNotInherit) - : IReferenceCounted(DoNotInherit()) + template void ping(StatusType* status) { + StatusType::clearException(status); + static_cast(this->cloopVTable)->ping(this, status); + StatusType::checkException(status); } - ~IClientBlock() + template void deprecatedDetach(StatusType* status) { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedDetach(this, status); + StatusType::checkException(status); } - public: - static const unsigned VERSION = 3; + template void deprecatedDropDatabase(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedDropDatabase(this, status); + StatusType::checkException(status); + } - const char* getLogin() + template unsigned getIdleTimeout(StatusType* status) { - const char* ret = static_cast(this->cloopVTable)->getLogin(this); + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getIdleTimeout(this, status); + StatusType::checkException(status); return ret; } - const char* getPassword() + template void setIdleTimeout(StatusType* status, unsigned timeOut) { - const char* ret = static_cast(this->cloopVTable)->getPassword(this); - return ret; + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setIdleTimeout(this, status, timeOut); + StatusType::checkException(status); } - const unsigned char* getData(unsigned* length) + template unsigned getStatementTimeout(StatusType* status) { - const unsigned char* ret = static_cast(this->cloopVTable)->getData(this, length); + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getStatementTimeout(this, status); + StatusType::checkException(status); return ret; } - template void putData(StatusType* status, unsigned length, const void* data) + template void setStatementTimeout(StatusType* status, unsigned timeOut) { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } StatusType::clearException(status); - static_cast(this->cloopVTable)->putData(this, status, length, data); + static_cast(this->cloopVTable)->setStatementTimeout(this, status, timeOut); StatusType::checkException(status); } - template ICryptKey* newKey(StatusType* status) + template IBatch* createBatch(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } StatusType::clearException(status); - ICryptKey* ret = static_cast(this->cloopVTable)->newKey(this, status); + IBatch* ret = static_cast(this->cloopVTable)->createBatch(this, status, transaction, stmtLength, sqlStmt, dialect, inMetadata, parLength, par); StatusType::checkException(status); return ret; } - }; - class IServer : public IAuth - { - public: - struct VTable : public IAuth::VTable + template IReplicator* createReplicator(StatusType* status) { - int (CLOOP_CARG *authenticate)(IServer* self, IStatus* status, IServerBlock* sBlock, IWriter* writerInterface) throw(); - void (CLOOP_CARG *setDbCryptCallback)(IServer* self, IStatus* status, ICryptKeyCallback* cryptCallback) throw(); - }; + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + IReplicator* ret = static_cast(this->cloopVTable)->createReplicator(this, status); + StatusType::checkException(status); + return ret; + } - protected: - IServer(DoNotInherit) - : IAuth(DoNotInherit()) + template void detach(StatusType* status) { + if (cloopVTable->version < 5) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 5); + StatusType::checkException(status); + } + else { + deprecatedDetach(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->detach(this, status); + StatusType::checkException(status); } - ~IServer() + template void dropDatabase(StatusType* status) { + if (cloopVTable->version < 5) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 5); + StatusType::checkException(status); + } + else { + deprecatedDropDatabase(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->dropDatabase(this, status); + StatusType::checkException(status); } - public: - static const unsigned VERSION = 6; - - template int authenticate(StatusType* status, IServerBlock* sBlock, IWriter* writerInterface) + template unsigned getMaxBlobCacheSize(StatusType* status) { + if (cloopVTable->version < 6) + { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 6); + StatusType::checkException(status); + return 0; + } StatusType::clearException(status); - int ret = static_cast(this->cloopVTable)->authenticate(this, status, sBlock, writerInterface); + unsigned ret = static_cast(this->cloopVTable)->getMaxBlobCacheSize(this, status); StatusType::checkException(status); return ret; } - template void setDbCryptCallback(StatusType* status, ICryptKeyCallback* cryptCallback) + template void setMaxBlobCacheSize(StatusType* status, unsigned size) { if (cloopVTable->version < 6) { - StatusType::setVersionError(status, "IServer", cloopVTable->version, 6); + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 6); StatusType::checkException(status); return; } StatusType::clearException(status); - static_cast(this->cloopVTable)->setDbCryptCallback(this, status, cryptCallback); + static_cast(this->cloopVTable)->setMaxBlobCacheSize(this, status, size); StatusType::checkException(status); } - }; - - class IClient : public IAuth - { - public: - struct VTable : public IAuth::VTable - { - int (CLOOP_CARG *authenticate)(IClient* self, IStatus* status, IClientBlock* cBlock) throw(); - }; - - protected: - IClient(DoNotInherit) - : IAuth(DoNotInherit()) - { - } - ~IClient() + template unsigned getMaxInlineBlobSize(StatusType* status) { + if (cloopVTable->version < 6) + { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 6); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getMaxInlineBlobSize(this, status); + StatusType::checkException(status); + return ret; } - public: - static const unsigned VERSION = 5; - - template int authenticate(StatusType* status, IClientBlock* cBlock) + template void setMaxInlineBlobSize(StatusType* status, unsigned size) { + if (cloopVTable->version < 6) + { + StatusType::setVersionError(status, "IAttachment", cloopVTable->version, 6); + StatusType::checkException(status); + return; + } StatusType::clearException(status); - int ret = static_cast(this->cloopVTable)->authenticate(this, status, cBlock); + static_cast(this->cloopVTable)->setMaxInlineBlobSize(this, status, size); StatusType::checkException(status); - return ret; } }; - class IUserField : public IVersioned +#define FIREBIRD_ISERVICE_VERSION 5u + + class IService : public IReferenceCounted { public: - struct VTable : public IVersioned::VTable + struct VTable : public IReferenceCounted::VTable { - int (CLOOP_CARG *entered)(IUserField* self) throw(); - int (CLOOP_CARG *specified)(IUserField* self) throw(); - void (CLOOP_CARG *setEntered)(IUserField* self, IStatus* status, int newValue) throw(); + void (CLOOP_CARG *deprecatedDetach)(IService* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *query)(IService* self, IStatus* status, unsigned sendLength, const unsigned char* sendItems, unsigned receiveLength, const unsigned char* receiveItems, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT; + void (CLOOP_CARG *start)(IService* self, IStatus* status, unsigned spbLength, const unsigned char* spb) CLOOP_NOEXCEPT; + void (CLOOP_CARG *detach)(IService* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *cancel)(IService* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: - IUserField(DoNotInherit) - : IVersioned(DoNotInherit()) + IService(DoNotInherit) + : IReferenceCounted(DoNotInherit()) { } - ~IUserField() + ~IService() { } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ISERVICE_VERSION; - int entered() + template void deprecatedDetach(StatusType* status) { - int ret = static_cast(this->cloopVTable)->entered(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->deprecatedDetach(this, status); + StatusType::checkException(status); } - int specified() + template void query(StatusType* status, unsigned sendLength, const unsigned char* sendItems, unsigned receiveLength, const unsigned char* receiveItems, unsigned bufferLength, unsigned char* buffer) { - int ret = static_cast(this->cloopVTable)->specified(this); - return ret; - } + StatusType::clearException(status); + static_cast(this->cloopVTable)->query(this, status, sendLength, sendItems, receiveLength, receiveItems, bufferLength, buffer); + StatusType::checkException(status); + } - template void setEntered(StatusType* status, int newValue) + template void start(StatusType* status, unsigned spbLength, const unsigned char* spb) { StatusType::clearException(status); - static_cast(this->cloopVTable)->setEntered(this, status, newValue); + static_cast(this->cloopVTable)->start(this, status, spbLength, spb); + StatusType::checkException(status); + } + + template void detach(StatusType* status) + { + if (cloopVTable->version < 4) + { + if (FB_UsedInYValve) { + StatusType::setVersionError(status, "IService", cloopVTable->version, 4); + StatusType::checkException(status); + } + else { + deprecatedDetach(status); + } + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->detach(this, status); + StatusType::checkException(status); + } + + template void cancel(StatusType* status) + { + if (cloopVTable->version < 5) + { + StatusType::setVersionError(status, "IService", cloopVTable->version, 5); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->cancel(this, status); StatusType::checkException(status); } }; - class ICharUserField : public IUserField +#define FIREBIRD_IPROVIDER_VERSION 4u + + class IProvider : public IPluginBase { public: - struct VTable : public IUserField::VTable + struct VTable : public IPluginBase::VTable { - const char* (CLOOP_CARG *get)(ICharUserField* self) throw(); - void (CLOOP_CARG *set)(ICharUserField* self, IStatus* status, const char* newValue) throw(); + IAttachment* (CLOOP_CARG *attachDatabase)(IProvider* self, IStatus* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) CLOOP_NOEXCEPT; + IAttachment* (CLOOP_CARG *createDatabase)(IProvider* self, IStatus* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) CLOOP_NOEXCEPT; + IService* (CLOOP_CARG *attachServiceManager)(IProvider* self, IStatus* status, const char* service, unsigned spbLength, const unsigned char* spb) CLOOP_NOEXCEPT; + void (CLOOP_CARG *shutdown)(IProvider* self, IStatus* status, unsigned timeout, const int reason) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setDbCryptCallback)(IProvider* self, IStatus* status, ICryptKeyCallback* cryptCallback) CLOOP_NOEXCEPT; }; protected: - ICharUserField(DoNotInherit) - : IUserField(DoNotInherit()) + IProvider(DoNotInherit) + : IPluginBase(DoNotInherit()) { } - ~ICharUserField() + ~IProvider() { } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IPROVIDER_VERSION; - const char* get() + template IAttachment* attachDatabase(StatusType* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) { - const char* ret = static_cast(this->cloopVTable)->get(this); + StatusType::clearException(status); + IAttachment* ret = static_cast(this->cloopVTable)->attachDatabase(this, status, fileName, dpbLength, dpb); + StatusType::checkException(status); return ret; } - template void set(StatusType* status, const char* newValue) + template IAttachment* createDatabase(StatusType* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) { StatusType::clearException(status); - static_cast(this->cloopVTable)->set(this, status, newValue); + IAttachment* ret = static_cast(this->cloopVTable)->createDatabase(this, status, fileName, dpbLength, dpb); StatusType::checkException(status); - } - }; - - class IIntUserField : public IUserField - { - public: - struct VTable : public IUserField::VTable - { - int (CLOOP_CARG *get)(IIntUserField* self) throw(); - void (CLOOP_CARG *set)(IIntUserField* self, IStatus* status, int newValue) throw(); - }; - - protected: - IIntUserField(DoNotInherit) - : IUserField(DoNotInherit()) - { + return ret; } - ~IIntUserField() + template IService* attachServiceManager(StatusType* status, const char* service, unsigned spbLength, const unsigned char* spb) { + StatusType::clearException(status); + IService* ret = static_cast(this->cloopVTable)->attachServiceManager(this, status, service, spbLength, spb); + StatusType::checkException(status); + return ret; } - public: - static const unsigned VERSION = 3; - - int get() + template void shutdown(StatusType* status, unsigned timeout, const int reason) { - int ret = static_cast(this->cloopVTable)->get(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->shutdown(this, status, timeout, reason); + StatusType::checkException(status); } - template void set(StatusType* status, int newValue) + template void setDbCryptCallback(StatusType* status, ICryptKeyCallback* cryptCallback) { StatusType::clearException(status); - static_cast(this->cloopVTable)->set(this, status, newValue); + static_cast(this->cloopVTable)->setDbCryptCallback(this, status, cryptCallback); StatusType::checkException(status); } }; - class IUser : public IVersioned +#define FIREBIRD_IDTC_START_VERSION 3u + + class IDtcStart : public IDisposable { public: - struct VTable : public IVersioned::VTable + struct VTable : public IDisposable::VTable { - unsigned (CLOOP_CARG *operation)(IUser* self) throw(); - ICharUserField* (CLOOP_CARG *userName)(IUser* self) throw(); - ICharUserField* (CLOOP_CARG *password)(IUser* self) throw(); - ICharUserField* (CLOOP_CARG *firstName)(IUser* self) throw(); - ICharUserField* (CLOOP_CARG *lastName)(IUser* self) throw(); - ICharUserField* (CLOOP_CARG *middleName)(IUser* self) throw(); - ICharUserField* (CLOOP_CARG *comment)(IUser* self) throw(); - ICharUserField* (CLOOP_CARG *attributes)(IUser* self) throw(); - IIntUserField* (CLOOP_CARG *active)(IUser* self) throw(); - IIntUserField* (CLOOP_CARG *admin)(IUser* self) throw(); - void (CLOOP_CARG *clear)(IUser* self, IStatus* status) throw(); + void (CLOOP_CARG *addAttachment)(IDtcStart* self, IStatus* status, IAttachment* att) CLOOP_NOEXCEPT; + void (CLOOP_CARG *addWithTpb)(IDtcStart* self, IStatus* status, IAttachment* att, unsigned length, const unsigned char* tpb) CLOOP_NOEXCEPT; + ITransaction* (CLOOP_CARG *start)(IDtcStart* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: - IUser(DoNotInherit) - : IVersioned(DoNotInherit()) + IDtcStart(DoNotInherit) + : IDisposable(DoNotInherit()) { } - ~IUser() + ~IDtcStart() { } public: - static const unsigned VERSION = 2; - - static const unsigned OP_USER_ADD = 1; - static const unsigned OP_USER_MODIFY = 2; - static const unsigned OP_USER_DELETE = 3; - static const unsigned OP_USER_DISPLAY = 4; - static const unsigned OP_USER_SET_MAP = 5; - static const unsigned OP_USER_DROP_MAP = 6; - - unsigned operation() - { - unsigned ret = static_cast(this->cloopVTable)->operation(this); - return ret; - } + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IDTC_START_VERSION; - ICharUserField* userName() + template void addAttachment(StatusType* status, IAttachment* att) { - ICharUserField* ret = static_cast(this->cloopVTable)->userName(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->addAttachment(this, status, att); + StatusType::checkException(status); } - ICharUserField* password() + template void addWithTpb(StatusType* status, IAttachment* att, unsigned length, const unsigned char* tpb) { - ICharUserField* ret = static_cast(this->cloopVTable)->password(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->addWithTpb(this, status, att, length, tpb); + StatusType::checkException(status); } - ICharUserField* firstName() + template ITransaction* start(StatusType* status) { - ICharUserField* ret = static_cast(this->cloopVTable)->firstName(this); + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->start(this, status); + StatusType::checkException(status); return ret; } + }; - ICharUserField* lastName() - { - ICharUserField* ret = static_cast(this->cloopVTable)->lastName(this); - return ret; - } +#define FIREBIRD_IDTC_VERSION 2u - ICharUserField* middleName() + class IDtc : public IVersioned + { + public: + struct VTable : public IVersioned::VTable { - ICharUserField* ret = static_cast(this->cloopVTable)->middleName(this); - return ret; - } + ITransaction* (CLOOP_CARG *join)(IDtc* self, IStatus* status, ITransaction* one, ITransaction* two) CLOOP_NOEXCEPT; + IDtcStart* (CLOOP_CARG *startBuilder)(IDtc* self, IStatus* status) CLOOP_NOEXCEPT; + }; - ICharUserField* comment() + protected: + IDtc(DoNotInherit) + : IVersioned(DoNotInherit()) { - ICharUserField* ret = static_cast(this->cloopVTable)->comment(this); - return ret; } - ICharUserField* attributes() + ~IDtc() { - ICharUserField* ret = static_cast(this->cloopVTable)->attributes(this); - return ret; } - IIntUserField* active() - { - IIntUserField* ret = static_cast(this->cloopVTable)->active(this); - return ret; - } + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IDTC_VERSION; - IIntUserField* admin() + template ITransaction* join(StatusType* status, ITransaction* one, ITransaction* two) { - IIntUserField* ret = static_cast(this->cloopVTable)->admin(this); + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->join(this, status, one, two); + StatusType::checkException(status); return ret; } - template void clear(StatusType* status) + template IDtcStart* startBuilder(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->clear(this, status); + IDtcStart* ret = static_cast(this->cloopVTable)->startBuilder(this, status); StatusType::checkException(status); + return ret; } }; - class IListUsers : public IVersioned +#define FIREBIRD_IAUTH_VERSION 4u + + class IAuth : public IPluginBase { public: - struct VTable : public IVersioned::VTable + struct VTable : public IPluginBase::VTable { - void (CLOOP_CARG *list)(IListUsers* self, IStatus* status, IUser* user) throw(); }; protected: - IListUsers(DoNotInherit) - : IVersioned(DoNotInherit()) + IAuth(DoNotInherit) + : IPluginBase(DoNotInherit()) { } - ~IListUsers() + ~IAuth() { } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IAUTH_VERSION; - template void list(StatusType* status, IUser* user) - { - StatusType::clearException(status); - static_cast(this->cloopVTable)->list(this, status, user); - StatusType::checkException(status); - } + static CLOOP_CONSTEXPR int AUTH_FAILED = -1; + static CLOOP_CONSTEXPR int AUTH_SUCCESS = 0; + static CLOOP_CONSTEXPR int AUTH_MORE_DATA = 1; + static CLOOP_CONSTEXPR int AUTH_CONTINUE = 2; + static CLOOP_CONSTEXPR int AUTH_SUCCESS_WITH_DATA = 3; }; - class ILogonInfo : public IVersioned +#define FIREBIRD_IWRITER_VERSION 2u + + class IWriter : public IVersioned { public: struct VTable : public IVersioned::VTable { - const char* (CLOOP_CARG *name)(ILogonInfo* self) throw(); - const char* (CLOOP_CARG *role)(ILogonInfo* self) throw(); - const char* (CLOOP_CARG *networkProtocol)(ILogonInfo* self) throw(); - const char* (CLOOP_CARG *remoteAddress)(ILogonInfo* self) throw(); - const unsigned char* (CLOOP_CARG *authBlock)(ILogonInfo* self, unsigned* length) throw(); + void (CLOOP_CARG *reset)(IWriter* self) CLOOP_NOEXCEPT; + void (CLOOP_CARG *add)(IWriter* self, IStatus* status, const char* name) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setType)(IWriter* self, IStatus* status, const char* value) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setDb)(IWriter* self, IStatus* status, const char* value) CLOOP_NOEXCEPT; }; protected: - ILogonInfo(DoNotInherit) + IWriter(DoNotInherit) : IVersioned(DoNotInherit()) { } - ~ILogonInfo() + ~IWriter() { } public: - static const unsigned VERSION = 2; - - const char* name() - { - const char* ret = static_cast(this->cloopVTable)->name(this); - return ret; - } + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IWRITER_VERSION; - const char* role() + void reset() { - const char* ret = static_cast(this->cloopVTable)->role(this); - return ret; + static_cast(this->cloopVTable)->reset(this); } - const char* networkProtocol() + template void add(StatusType* status, const char* name) { - const char* ret = static_cast(this->cloopVTable)->networkProtocol(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->add(this, status, name); + StatusType::checkException(status); } - const char* remoteAddress() + template void setType(StatusType* status, const char* value) { - const char* ret = static_cast(this->cloopVTable)->remoteAddress(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->setType(this, status, value); + StatusType::checkException(status); } - const unsigned char* authBlock(unsigned* length) + template void setDb(StatusType* status, const char* value) { - const unsigned char* ret = static_cast(this->cloopVTable)->authBlock(this, length); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->setDb(this, status, value); + StatusType::checkException(status); } }; - class IManagement : public IPluginBase +#define FIREBIRD_ISERVER_BLOCK_VERSION 2u + + class IServerBlock : public IVersioned { public: - struct VTable : public IPluginBase::VTable + struct VTable : public IVersioned::VTable { - void (CLOOP_CARG *start)(IManagement* self, IStatus* status, ILogonInfo* logonInfo) throw(); - int (CLOOP_CARG *execute)(IManagement* self, IStatus* status, IUser* user, IListUsers* callback) throw(); - void (CLOOP_CARG *commit)(IManagement* self, IStatus* status) throw(); - void (CLOOP_CARG *rollback)(IManagement* self, IStatus* status) throw(); + const char* (CLOOP_CARG *getLogin)(IServerBlock* self) CLOOP_NOEXCEPT; + const unsigned char* (CLOOP_CARG *getData)(IServerBlock* self, unsigned* length) CLOOP_NOEXCEPT; + void (CLOOP_CARG *putData)(IServerBlock* self, IStatus* status, unsigned length, const void* data) CLOOP_NOEXCEPT; + ICryptKey* (CLOOP_CARG *newKey)(IServerBlock* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: - IManagement(DoNotInherit) - : IPluginBase(DoNotInherit()) + IServerBlock(DoNotInherit) + : IVersioned(DoNotInherit()) { } - ~IManagement() + ~IServerBlock() { } public: - static const unsigned VERSION = 4; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ISERVER_BLOCK_VERSION; - template void start(StatusType* status, ILogonInfo* logonInfo) + const char* getLogin() { - StatusType::clearException(status); - static_cast(this->cloopVTable)->start(this, status, logonInfo); - StatusType::checkException(status); + const char* ret = static_cast(this->cloopVTable)->getLogin(this); + return ret; } - template int execute(StatusType* status, IUser* user, IListUsers* callback) + const unsigned char* getData(unsigned* length) { - StatusType::clearException(status); - int ret = static_cast(this->cloopVTable)->execute(this, status, user, callback); - StatusType::checkException(status); + const unsigned char* ret = static_cast(this->cloopVTable)->getData(this, length); return ret; } - template void commit(StatusType* status) + template void putData(StatusType* status, unsigned length, const void* data) { StatusType::clearException(status); - static_cast(this->cloopVTable)->commit(this, status); + static_cast(this->cloopVTable)->putData(this, status, length, data); StatusType::checkException(status); } - template void rollback(StatusType* status) + template ICryptKey* newKey(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->rollback(this, status); + ICryptKey* ret = static_cast(this->cloopVTable)->newKey(this, status); StatusType::checkException(status); + return ret; } }; - class IWireCryptPlugin : public IPluginBase +#define FIREBIRD_ICLIENT_BLOCK_VERSION 4u + + class IClientBlock : public IReferenceCounted { public: - struct VTable : public IPluginBase::VTable + struct VTable : public IReferenceCounted::VTable { - const char* (CLOOP_CARG *getKnownTypes)(IWireCryptPlugin* self, IStatus* status) throw(); - void (CLOOP_CARG *setKey)(IWireCryptPlugin* self, IStatus* status, ICryptKey* key) throw(); - void (CLOOP_CARG *encrypt)(IWireCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw(); - void (CLOOP_CARG *decrypt)(IWireCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw(); + const char* (CLOOP_CARG *getLogin)(IClientBlock* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getPassword)(IClientBlock* self) CLOOP_NOEXCEPT; + const unsigned char* (CLOOP_CARG *getData)(IClientBlock* self, unsigned* length) CLOOP_NOEXCEPT; + void (CLOOP_CARG *putData)(IClientBlock* self, IStatus* status, unsigned length, const void* data) CLOOP_NOEXCEPT; + ICryptKey* (CLOOP_CARG *newKey)(IClientBlock* self, IStatus* status) CLOOP_NOEXCEPT; + IAuthBlock* (CLOOP_CARG *getAuthBlock)(IClientBlock* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: - IWireCryptPlugin(DoNotInherit) - : IPluginBase(DoNotInherit()) + IClientBlock(DoNotInherit) + : IReferenceCounted(DoNotInherit()) { } - ~IWireCryptPlugin() + ~IClientBlock() { } public: - static const unsigned VERSION = 4; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ICLIENT_BLOCK_VERSION; - template const char* getKnownTypes(StatusType* status) + const char* getLogin() { - StatusType::clearException(status); - const char* ret = static_cast(this->cloopVTable)->getKnownTypes(this, status); - StatusType::checkException(status); + const char* ret = static_cast(this->cloopVTable)->getLogin(this); return ret; } - template void setKey(StatusType* status, ICryptKey* key) + const char* getPassword() + { + const char* ret = static_cast(this->cloopVTable)->getPassword(this); + return ret; + } + + const unsigned char* getData(unsigned* length) + { + const unsigned char* ret = static_cast(this->cloopVTable)->getData(this, length); + return ret; + } + + template void putData(StatusType* status, unsigned length, const void* data) { StatusType::clearException(status); - static_cast(this->cloopVTable)->setKey(this, status, key); + static_cast(this->cloopVTable)->putData(this, status, length, data); StatusType::checkException(status); } - template void encrypt(StatusType* status, unsigned length, const void* from, void* to) + template ICryptKey* newKey(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->encrypt(this, status, length, from, to); + ICryptKey* ret = static_cast(this->cloopVTable)->newKey(this, status); StatusType::checkException(status); + return ret; } - template void decrypt(StatusType* status, unsigned length, const void* from, void* to) + template IAuthBlock* getAuthBlock(StatusType* status) { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IClientBlock", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } StatusType::clearException(status); - static_cast(this->cloopVTable)->decrypt(this, status, length, from, to); + IAuthBlock* ret = static_cast(this->cloopVTable)->getAuthBlock(this, status); StatusType::checkException(status); + return ret; } }; - class ICryptKeyCallback : public IVersioned +#define FIREBIRD_ISERVER_VERSION 6u + + class IServer : public IAuth { public: - struct VTable : public IVersioned::VTable + struct VTable : public IAuth::VTable { - unsigned (CLOOP_CARG *callback)(ICryptKeyCallback* self, unsigned dataLength, const void* data, unsigned bufferLength, void* buffer) throw(); + int (CLOOP_CARG *authenticate)(IServer* self, IStatus* status, IServerBlock* sBlock, IWriter* writerInterface) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setDbCryptCallback)(IServer* self, IStatus* status, ICryptKeyCallback* cryptCallback) CLOOP_NOEXCEPT; }; protected: - ICryptKeyCallback(DoNotInherit) - : IVersioned(DoNotInherit()) + IServer(DoNotInherit) + : IAuth(DoNotInherit()) { } - ~ICryptKeyCallback() + ~IServer() { } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ISERVER_VERSION; - unsigned callback(unsigned dataLength, const void* data, unsigned bufferLength, void* buffer) + template int authenticate(StatusType* status, IServerBlock* sBlock, IWriter* writerInterface) { - unsigned ret = static_cast(this->cloopVTable)->callback(this, dataLength, data, bufferLength, buffer); + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->authenticate(this, status, sBlock, writerInterface); + StatusType::checkException(status); return ret; } + + template void setDbCryptCallback(StatusType* status, ICryptKeyCallback* cryptCallback) + { + if (cloopVTable->version < 6) + { + StatusType::setVersionError(status, "IServer", cloopVTable->version, 6); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->setDbCryptCallback(this, status, cryptCallback); + StatusType::checkException(status); + } }; - class IKeyHolderPlugin : public IPluginBase +#define FIREBIRD_ICLIENT_VERSION 5u + + class IClient : public IAuth { public: - struct VTable : public IPluginBase::VTable + struct VTable : public IAuth::VTable { - int (CLOOP_CARG *keyCallback)(IKeyHolderPlugin* self, IStatus* status, ICryptKeyCallback* callback) throw(); - ICryptKeyCallback* (CLOOP_CARG *keyHandle)(IKeyHolderPlugin* self, IStatus* status, const char* keyName) throw(); - FB_BOOLEAN (CLOOP_CARG *useOnlyOwnKeys)(IKeyHolderPlugin* self, IStatus* status) throw(); - ICryptKeyCallback* (CLOOP_CARG *chainHandle)(IKeyHolderPlugin* self, IStatus* status) throw(); + int (CLOOP_CARG *authenticate)(IClient* self, IStatus* status, IClientBlock* cBlock) CLOOP_NOEXCEPT; }; protected: - IKeyHolderPlugin(DoNotInherit) - : IPluginBase(DoNotInherit()) + IClient(DoNotInherit) + : IAuth(DoNotInherit()) { } - ~IKeyHolderPlugin() + ~IClient() { } public: - static const unsigned VERSION = 5; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ICLIENT_VERSION; - template int keyCallback(StatusType* status, ICryptKeyCallback* callback) + template int authenticate(StatusType* status, IClientBlock* cBlock) { StatusType::clearException(status); - int ret = static_cast(this->cloopVTable)->keyCallback(this, status, callback); + int ret = static_cast(this->cloopVTable)->authenticate(this, status, cBlock); StatusType::checkException(status); return ret; } + }; - template ICryptKeyCallback* keyHandle(StatusType* status, const char* keyName) +#define FIREBIRD_IUSER_FIELD_VERSION 2u + + class IUserField : public IVersioned + { + public: + struct VTable : public IVersioned::VTable { - StatusType::clearException(status); - ICryptKeyCallback* ret = static_cast(this->cloopVTable)->keyHandle(this, status, keyName); - StatusType::checkException(status); + int (CLOOP_CARG *entered)(IUserField* self) CLOOP_NOEXCEPT; + int (CLOOP_CARG *specified)(IUserField* self) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setEntered)(IUserField* self, IStatus* status, int newValue) CLOOP_NOEXCEPT; + }; + + protected: + IUserField(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IUserField() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IUSER_FIELD_VERSION; + + int entered() + { + int ret = static_cast(this->cloopVTable)->entered(this); return ret; } - template FB_BOOLEAN useOnlyOwnKeys(StatusType* status) + int specified() { - if (cloopVTable->version < 5) - { - StatusType::setVersionError(status, "IKeyHolderPlugin", cloopVTable->version, 5); - StatusType::checkException(status); - return 0; - } - StatusType::clearException(status); - FB_BOOLEAN ret = static_cast(this->cloopVTable)->useOnlyOwnKeys(this, status); - StatusType::checkException(status); + int ret = static_cast(this->cloopVTable)->specified(this); return ret; } - template ICryptKeyCallback* chainHandle(StatusType* status) + template void setEntered(StatusType* status, int newValue) { - if (cloopVTable->version < 5) - { - StatusType::setVersionError(status, "IKeyHolderPlugin", cloopVTable->version, 5); - StatusType::checkException(status); - return 0; - } StatusType::clearException(status); - ICryptKeyCallback* ret = static_cast(this->cloopVTable)->chainHandle(this, status); + static_cast(this->cloopVTable)->setEntered(this, status, newValue); StatusType::checkException(status); - return ret; } }; - class IDbCryptInfo : public IReferenceCounted +#define FIREBIRD_ICHAR_USER_FIELD_VERSION 3u + + class ICharUserField : public IUserField { public: - struct VTable : public IReferenceCounted::VTable + struct VTable : public IUserField::VTable { - const char* (CLOOP_CARG *getDatabaseFullPath)(IDbCryptInfo* self, IStatus* status) throw(); + const char* (CLOOP_CARG *get)(ICharUserField* self) CLOOP_NOEXCEPT; + void (CLOOP_CARG *set)(ICharUserField* self, IStatus* status, const char* newValue) CLOOP_NOEXCEPT; }; protected: - IDbCryptInfo(DoNotInherit) - : IReferenceCounted(DoNotInherit()) + ICharUserField(DoNotInherit) + : IUserField(DoNotInherit()) { } - ~IDbCryptInfo() + ~ICharUserField() { } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ICHAR_USER_FIELD_VERSION; - template const char* getDatabaseFullPath(StatusType* status) + const char* get() + { + const char* ret = static_cast(this->cloopVTable)->get(this); + return ret; + } + + template void set(StatusType* status, const char* newValue) { StatusType::clearException(status); - const char* ret = static_cast(this->cloopVTable)->getDatabaseFullPath(this, status); + static_cast(this->cloopVTable)->set(this, status, newValue); StatusType::checkException(status); - return ret; } }; - class IDbCryptPlugin : public IPluginBase +#define FIREBIRD_IINT_USER_FIELD_VERSION 3u + + class IIntUserField : public IUserField { public: - struct VTable : public IPluginBase::VTable + struct VTable : public IUserField::VTable { - void (CLOOP_CARG *setKey)(IDbCryptPlugin* self, IStatus* status, unsigned length, IKeyHolderPlugin** sources, const char* keyName) throw(); - void (CLOOP_CARG *encrypt)(IDbCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw(); - void (CLOOP_CARG *decrypt)(IDbCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw(); - void (CLOOP_CARG *setInfo)(IDbCryptPlugin* self, IStatus* status, IDbCryptInfo* info) throw(); + int (CLOOP_CARG *get)(IIntUserField* self) CLOOP_NOEXCEPT; + void (CLOOP_CARG *set)(IIntUserField* self, IStatus* status, int newValue) CLOOP_NOEXCEPT; }; protected: - IDbCryptPlugin(DoNotInherit) - : IPluginBase(DoNotInherit()) + IIntUserField(DoNotInherit) + : IUserField(DoNotInherit()) { } - ~IDbCryptPlugin() + ~IIntUserField() { } public: - static const unsigned VERSION = 5; - - template void setKey(StatusType* status, unsigned length, IKeyHolderPlugin** sources, const char* keyName) - { - StatusType::clearException(status); - static_cast(this->cloopVTable)->setKey(this, status, length, sources, keyName); - StatusType::checkException(status); - } - - template void encrypt(StatusType* status, unsigned length, const void* from, void* to) - { - StatusType::clearException(status); - static_cast(this->cloopVTable)->encrypt(this, status, length, from, to); - StatusType::checkException(status); - } + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IINT_USER_FIELD_VERSION; - template void decrypt(StatusType* status, unsigned length, const void* from, void* to) + int get() { - StatusType::clearException(status); - static_cast(this->cloopVTable)->decrypt(this, status, length, from, to); - StatusType::checkException(status); + int ret = static_cast(this->cloopVTable)->get(this); + return ret; } - template void setInfo(StatusType* status, IDbCryptInfo* info) + template void set(StatusType* status, int newValue) { - if (cloopVTable->version < 5) - { - StatusType::setVersionError(status, "IDbCryptPlugin", cloopVTable->version, 5); - StatusType::checkException(status); - return; - } StatusType::clearException(status); - static_cast(this->cloopVTable)->setInfo(this, status, info); + static_cast(this->cloopVTable)->set(this, status, newValue); StatusType::checkException(status); } }; - class IExternalContext : public IVersioned +#define FIREBIRD_IUSER_VERSION 2u + + class IUser : public IVersioned { public: struct VTable : public IVersioned::VTable { - IMaster* (CLOOP_CARG *getMaster)(IExternalContext* self) throw(); - IExternalEngine* (CLOOP_CARG *getEngine)(IExternalContext* self, IStatus* status) throw(); - IAttachment* (CLOOP_CARG *getAttachment)(IExternalContext* self, IStatus* status) throw(); - ITransaction* (CLOOP_CARG *getTransaction)(IExternalContext* self, IStatus* status) throw(); - const char* (CLOOP_CARG *getUserName)(IExternalContext* self) throw(); - const char* (CLOOP_CARG *getDatabaseName)(IExternalContext* self) throw(); - const char* (CLOOP_CARG *getClientCharSet)(IExternalContext* self) throw(); - int (CLOOP_CARG *obtainInfoCode)(IExternalContext* self) throw(); - void* (CLOOP_CARG *getInfo)(IExternalContext* self, int code) throw(); - void* (CLOOP_CARG *setInfo)(IExternalContext* self, int code, void* value) throw(); + unsigned (CLOOP_CARG *operation)(IUser* self) CLOOP_NOEXCEPT; + ICharUserField* (CLOOP_CARG *userName)(IUser* self) CLOOP_NOEXCEPT; + ICharUserField* (CLOOP_CARG *password)(IUser* self) CLOOP_NOEXCEPT; + ICharUserField* (CLOOP_CARG *firstName)(IUser* self) CLOOP_NOEXCEPT; + ICharUserField* (CLOOP_CARG *lastName)(IUser* self) CLOOP_NOEXCEPT; + ICharUserField* (CLOOP_CARG *middleName)(IUser* self) CLOOP_NOEXCEPT; + ICharUserField* (CLOOP_CARG *comment)(IUser* self) CLOOP_NOEXCEPT; + ICharUserField* (CLOOP_CARG *attributes)(IUser* self) CLOOP_NOEXCEPT; + IIntUserField* (CLOOP_CARG *active)(IUser* self) CLOOP_NOEXCEPT; + IIntUserField* (CLOOP_CARG *admin)(IUser* self) CLOOP_NOEXCEPT; + void (CLOOP_CARG *clear)(IUser* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: - IExternalContext(DoNotInherit) + IUser(DoNotInherit) : IVersioned(DoNotInherit()) { } - ~IExternalContext() + ~IUser() { } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IUSER_VERSION; - IMaster* getMaster() + static CLOOP_CONSTEXPR unsigned OP_USER_ADD = 1; + static CLOOP_CONSTEXPR unsigned OP_USER_MODIFY = 2; + static CLOOP_CONSTEXPR unsigned OP_USER_DELETE = 3; + static CLOOP_CONSTEXPR unsigned OP_USER_DISPLAY = 4; + static CLOOP_CONSTEXPR unsigned OP_USER_SET_MAP = 5; + static CLOOP_CONSTEXPR unsigned OP_USER_DROP_MAP = 6; + + unsigned operation() { - IMaster* ret = static_cast(this->cloopVTable)->getMaster(this); + unsigned ret = static_cast(this->cloopVTable)->operation(this); return ret; } - template IExternalEngine* getEngine(StatusType* status) + ICharUserField* userName() { - StatusType::clearException(status); - IExternalEngine* ret = static_cast(this->cloopVTable)->getEngine(this, status); - StatusType::checkException(status); + ICharUserField* ret = static_cast(this->cloopVTable)->userName(this); return ret; } - template IAttachment* getAttachment(StatusType* status) + ICharUserField* password() { - StatusType::clearException(status); - IAttachment* ret = static_cast(this->cloopVTable)->getAttachment(this, status); - StatusType::checkException(status); + ICharUserField* ret = static_cast(this->cloopVTable)->password(this); return ret; } - template ITransaction* getTransaction(StatusType* status) + ICharUserField* firstName() { - StatusType::clearException(status); - ITransaction* ret = static_cast(this->cloopVTable)->getTransaction(this, status); - StatusType::checkException(status); + ICharUserField* ret = static_cast(this->cloopVTable)->firstName(this); return ret; } - const char* getUserName() + ICharUserField* lastName() { - const char* ret = static_cast(this->cloopVTable)->getUserName(this); + ICharUserField* ret = static_cast(this->cloopVTable)->lastName(this); return ret; } - const char* getDatabaseName() + ICharUserField* middleName() { - const char* ret = static_cast(this->cloopVTable)->getDatabaseName(this); + ICharUserField* ret = static_cast(this->cloopVTable)->middleName(this); return ret; } - const char* getClientCharSet() + ICharUserField* comment() { - const char* ret = static_cast(this->cloopVTable)->getClientCharSet(this); + ICharUserField* ret = static_cast(this->cloopVTable)->comment(this); return ret; } - int obtainInfoCode() + ICharUserField* attributes() { - int ret = static_cast(this->cloopVTable)->obtainInfoCode(this); + ICharUserField* ret = static_cast(this->cloopVTable)->attributes(this); return ret; } - void* getInfo(int code) + IIntUserField* active() { - void* ret = static_cast(this->cloopVTable)->getInfo(this, code); + IIntUserField* ret = static_cast(this->cloopVTable)->active(this); return ret; } - void* setInfo(int code, void* value) + IIntUserField* admin() { - void* ret = static_cast(this->cloopVTable)->setInfo(this, code, value); + IIntUserField* ret = static_cast(this->cloopVTable)->admin(this); return ret; } + + template void clear(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->clear(this, status); + StatusType::checkException(status); + } }; - class IExternalResultSet : public IDisposable +#define FIREBIRD_ILIST_USERS_VERSION 2u + + class IListUsers : public IVersioned { public: - struct VTable : public IDisposable::VTable + struct VTable : public IVersioned::VTable { - FB_BOOLEAN (CLOOP_CARG *fetch)(IExternalResultSet* self, IStatus* status) throw(); + void (CLOOP_CARG *list)(IListUsers* self, IStatus* status, IUser* user) CLOOP_NOEXCEPT; }; protected: - IExternalResultSet(DoNotInherit) - : IDisposable(DoNotInherit()) + IListUsers(DoNotInherit) + : IVersioned(DoNotInherit()) { } - ~IExternalResultSet() + ~IListUsers() { } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ILIST_USERS_VERSION; - template FB_BOOLEAN fetch(StatusType* status) + template void list(StatusType* status, IUser* user) { StatusType::clearException(status); - FB_BOOLEAN ret = static_cast(this->cloopVTable)->fetch(this, status); + static_cast(this->cloopVTable)->list(this, status, user); StatusType::checkException(status); - return ret; } }; - class IExternalFunction : public IDisposable +#define FIREBIRD_ILOGON_INFO_VERSION 3u + + class ILogonInfo : public IVersioned { public: - struct VTable : public IDisposable::VTable + struct VTable : public IVersioned::VTable { - void (CLOOP_CARG *getCharSet)(IExternalFunction* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) throw(); - void (CLOOP_CARG *execute)(IExternalFunction* self, IStatus* status, IExternalContext* context, void* inMsg, void* outMsg) throw(); + const char* (CLOOP_CARG *name)(ILogonInfo* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *role)(ILogonInfo* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *networkProtocol)(ILogonInfo* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *remoteAddress)(ILogonInfo* self) CLOOP_NOEXCEPT; + const unsigned char* (CLOOP_CARG *authBlock)(ILogonInfo* self, unsigned* length) CLOOP_NOEXCEPT; + IAttachment* (CLOOP_CARG *attachment)(ILogonInfo* self, IStatus* status) CLOOP_NOEXCEPT; + ITransaction* (CLOOP_CARG *transaction)(ILogonInfo* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: - IExternalFunction(DoNotInherit) - : IDisposable(DoNotInherit()) + ILogonInfo(DoNotInherit) + : IVersioned(DoNotInherit()) { } - ~IExternalFunction() + ~ILogonInfo() { } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ILOGON_INFO_VERSION; - template void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) + const char* name() { - StatusType::clearException(status); - static_cast(this->cloopVTable)->getCharSet(this, status, context, name, nameSize); - StatusType::checkException(status); + const char* ret = static_cast(this->cloopVTable)->name(this); + return ret; } - template void execute(StatusType* status, IExternalContext* context, void* inMsg, void* outMsg) + const char* role() { - StatusType::clearException(status); - static_cast(this->cloopVTable)->execute(this, status, context, inMsg, outMsg); - StatusType::checkException(status); + const char* ret = static_cast(this->cloopVTable)->role(this); + return ret; } - }; - class IExternalProcedure : public IDisposable - { - public: - struct VTable : public IDisposable::VTable + const char* networkProtocol() { - void (CLOOP_CARG *getCharSet)(IExternalProcedure* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) throw(); - IExternalResultSet* (CLOOP_CARG *open)(IExternalProcedure* self, IStatus* status, IExternalContext* context, void* inMsg, void* outMsg) throw(); - }; + const char* ret = static_cast(this->cloopVTable)->networkProtocol(this); + return ret; + } - protected: - IExternalProcedure(DoNotInherit) - : IDisposable(DoNotInherit()) + const char* remoteAddress() { + const char* ret = static_cast(this->cloopVTable)->remoteAddress(this); + return ret; } - ~IExternalProcedure() + const unsigned char* authBlock(unsigned* length) { + const unsigned char* ret = static_cast(this->cloopVTable)->authBlock(this, length); + return ret; } - public: - static const unsigned VERSION = 3; - - template void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) + template IAttachment* attachment(StatusType* status) { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "ILogonInfo", cloopVTable->version, 3); + StatusType::checkException(status); + return 0; + } StatusType::clearException(status); - static_cast(this->cloopVTable)->getCharSet(this, status, context, name, nameSize); + IAttachment* ret = static_cast(this->cloopVTable)->attachment(this, status); StatusType::checkException(status); + return ret; } - template IExternalResultSet* open(StatusType* status, IExternalContext* context, void* inMsg, void* outMsg) + template ITransaction* transaction(StatusType* status) { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "ILogonInfo", cloopVTable->version, 3); + StatusType::checkException(status); + return 0; + } StatusType::clearException(status); - IExternalResultSet* ret = static_cast(this->cloopVTable)->open(this, status, context, inMsg, outMsg); + ITransaction* ret = static_cast(this->cloopVTable)->transaction(this, status); StatusType::checkException(status); return ret; } }; - class IExternalTrigger : public IDisposable +#define FIREBIRD_IMANAGEMENT_VERSION 4u + + class IManagement : public IPluginBase { public: - struct VTable : public IDisposable::VTable + struct VTable : public IPluginBase::VTable { - void (CLOOP_CARG *getCharSet)(IExternalTrigger* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) throw(); - void (CLOOP_CARG *execute)(IExternalTrigger* self, IStatus* status, IExternalContext* context, unsigned action, void* oldMsg, void* newMsg) throw(); + void (CLOOP_CARG *start)(IManagement* self, IStatus* status, ILogonInfo* logonInfo) CLOOP_NOEXCEPT; + int (CLOOP_CARG *execute)(IManagement* self, IStatus* status, IUser* user, IListUsers* callback) CLOOP_NOEXCEPT; + void (CLOOP_CARG *commit)(IManagement* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *rollback)(IManagement* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: - IExternalTrigger(DoNotInherit) - : IDisposable(DoNotInherit()) + IManagement(DoNotInherit) + : IPluginBase(DoNotInherit()) { } - ~IExternalTrigger() + ~IManagement() { } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IMANAGEMENT_VERSION; - static const unsigned TYPE_BEFORE = 1; - static const unsigned TYPE_AFTER = 2; - static const unsigned TYPE_DATABASE = 3; - static const unsigned ACTION_INSERT = 1; - static const unsigned ACTION_UPDATE = 2; - static const unsigned ACTION_DELETE = 3; - static const unsigned ACTION_CONNECT = 4; - static const unsigned ACTION_DISCONNECT = 5; - static const unsigned ACTION_TRANS_START = 6; - static const unsigned ACTION_TRANS_COMMIT = 7; - static const unsigned ACTION_TRANS_ROLLBACK = 8; - static const unsigned ACTION_DDL = 9; + template void start(StatusType* status, ILogonInfo* logonInfo) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->start(this, status, logonInfo); + StatusType::checkException(status); + } - template void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) + template int execute(StatusType* status, IUser* user, IListUsers* callback) { StatusType::clearException(status); - static_cast(this->cloopVTable)->getCharSet(this, status, context, name, nameSize); + int ret = static_cast(this->cloopVTable)->execute(this, status, user, callback); StatusType::checkException(status); + return ret; } - template void execute(StatusType* status, IExternalContext* context, unsigned action, void* oldMsg, void* newMsg) + template void commit(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->execute(this, status, context, action, oldMsg, newMsg); + static_cast(this->cloopVTable)->commit(this, status); + StatusType::checkException(status); + } + + template void rollback(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->rollback(this, status); StatusType::checkException(status); } }; - class IRoutineMetadata : public IVersioned +#define FIREBIRD_IAUTH_BLOCK_VERSION 2u + + class IAuthBlock : public IVersioned { public: struct VTable : public IVersioned::VTable { - const char* (CLOOP_CARG *getPackage)(const IRoutineMetadata* self, IStatus* status) throw(); - const char* (CLOOP_CARG *getName)(const IRoutineMetadata* self, IStatus* status) throw(); - const char* (CLOOP_CARG *getEntryPoint)(const IRoutineMetadata* self, IStatus* status) throw(); - const char* (CLOOP_CARG *getBody)(const IRoutineMetadata* self, IStatus* status) throw(); - IMessageMetadata* (CLOOP_CARG *getInputMetadata)(const IRoutineMetadata* self, IStatus* status) throw(); - IMessageMetadata* (CLOOP_CARG *getOutputMetadata)(const IRoutineMetadata* self, IStatus* status) throw(); - IMessageMetadata* (CLOOP_CARG *getTriggerMetadata)(const IRoutineMetadata* self, IStatus* status) throw(); - const char* (CLOOP_CARG *getTriggerTable)(const IRoutineMetadata* self, IStatus* status) throw(); - unsigned (CLOOP_CARG *getTriggerType)(const IRoutineMetadata* self, IStatus* status) throw(); + const char* (CLOOP_CARG *getType)(IAuthBlock* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getName)(IAuthBlock* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getPlugin)(IAuthBlock* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getSecurityDb)(IAuthBlock* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getOriginalPlugin)(IAuthBlock* self) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *next)(IAuthBlock* self, IStatus* status) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *first)(IAuthBlock* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: - IRoutineMetadata(DoNotInherit) + IAuthBlock(DoNotInherit) : IVersioned(DoNotInherit()) { } - ~IRoutineMetadata() + ~IAuthBlock() { } public: - static const unsigned VERSION = 2; - - template const char* getPackage(StatusType* status) const - { - StatusType::clearException(status); - const char* ret = static_cast(this->cloopVTable)->getPackage(this, status); - StatusType::checkException(status); - return ret; - } - - template const char* getName(StatusType* status) const - { - StatusType::clearException(status); - const char* ret = static_cast(this->cloopVTable)->getName(this, status); - StatusType::checkException(status); - return ret; - } + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IAUTH_BLOCK_VERSION; - template const char* getEntryPoint(StatusType* status) const + const char* getType() { - StatusType::clearException(status); - const char* ret = static_cast(this->cloopVTable)->getEntryPoint(this, status); - StatusType::checkException(status); + const char* ret = static_cast(this->cloopVTable)->getType(this); return ret; } - template const char* getBody(StatusType* status) const + const char* getName() { - StatusType::clearException(status); - const char* ret = static_cast(this->cloopVTable)->getBody(this, status); - StatusType::checkException(status); + const char* ret = static_cast(this->cloopVTable)->getName(this); return ret; } - template IMessageMetadata* getInputMetadata(StatusType* status) const + const char* getPlugin() { - StatusType::clearException(status); - IMessageMetadata* ret = static_cast(this->cloopVTable)->getInputMetadata(this, status); - StatusType::checkException(status); + const char* ret = static_cast(this->cloopVTable)->getPlugin(this); return ret; } - template IMessageMetadata* getOutputMetadata(StatusType* status) const + const char* getSecurityDb() { - StatusType::clearException(status); - IMessageMetadata* ret = static_cast(this->cloopVTable)->getOutputMetadata(this, status); - StatusType::checkException(status); + const char* ret = static_cast(this->cloopVTable)->getSecurityDb(this); return ret; } - template IMessageMetadata* getTriggerMetadata(StatusType* status) const + const char* getOriginalPlugin() { - StatusType::clearException(status); - IMessageMetadata* ret = static_cast(this->cloopVTable)->getTriggerMetadata(this, status); - StatusType::checkException(status); + const char* ret = static_cast(this->cloopVTable)->getOriginalPlugin(this); return ret; } - template const char* getTriggerTable(StatusType* status) const + template FB_BOOLEAN next(StatusType* status) { StatusType::clearException(status); - const char* ret = static_cast(this->cloopVTable)->getTriggerTable(this, status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->next(this, status); StatusType::checkException(status); return ret; } - template unsigned getTriggerType(StatusType* status) const + template FB_BOOLEAN first(StatusType* status) { StatusType::clearException(status); - unsigned ret = static_cast(this->cloopVTable)->getTriggerType(this, status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->first(this, status); StatusType::checkException(status); return ret; } }; - class IExternalEngine : public IPluginBase +#define FIREBIRD_IWIRE_CRYPT_PLUGIN_VERSION 5u + + class IWireCryptPlugin : public IPluginBase { public: struct VTable : public IPluginBase::VTable { - void (CLOOP_CARG *open)(IExternalEngine* self, IStatus* status, IExternalContext* context, char* charSet, unsigned charSetSize) throw(); - void (CLOOP_CARG *openAttachment)(IExternalEngine* self, IStatus* status, IExternalContext* context) throw(); - void (CLOOP_CARG *closeAttachment)(IExternalEngine* self, IStatus* status, IExternalContext* context) throw(); - IExternalFunction* (CLOOP_CARG *makeFunction)(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw(); - IExternalProcedure* (CLOOP_CARG *makeProcedure)(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw(); - IExternalTrigger* (CLOOP_CARG *makeTrigger)(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) throw(); + const char* (CLOOP_CARG *getKnownTypes)(IWireCryptPlugin* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setKey)(IWireCryptPlugin* self, IStatus* status, ICryptKey* key) CLOOP_NOEXCEPT; + void (CLOOP_CARG *encrypt)(IWireCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) CLOOP_NOEXCEPT; + void (CLOOP_CARG *decrypt)(IWireCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) CLOOP_NOEXCEPT; + const unsigned char* (CLOOP_CARG *getSpecificData)(IWireCryptPlugin* self, IStatus* status, const char* keyType, unsigned* length) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setSpecificData)(IWireCryptPlugin* self, IStatus* status, const char* keyType, unsigned length, const unsigned char* data) CLOOP_NOEXCEPT; }; protected: - IExternalEngine(DoNotInherit) + IWireCryptPlugin(DoNotInherit) : IPluginBase(DoNotInherit()) { } - ~IExternalEngine() + ~IWireCryptPlugin() { } public: - static const unsigned VERSION = 4; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IWIRE_CRYPT_PLUGIN_VERSION; - template void open(StatusType* status, IExternalContext* context, char* charSet, unsigned charSetSize) + template const char* getKnownTypes(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->open(this, status, context, charSet, charSetSize); + const char* ret = static_cast(this->cloopVTable)->getKnownTypes(this, status); StatusType::checkException(status); + return ret; } - template void openAttachment(StatusType* status, IExternalContext* context) + template void setKey(StatusType* status, ICryptKey* key) { StatusType::clearException(status); - static_cast(this->cloopVTable)->openAttachment(this, status, context); + static_cast(this->cloopVTable)->setKey(this, status, key); StatusType::checkException(status); } - template void closeAttachment(StatusType* status, IExternalContext* context) + template void encrypt(StatusType* status, unsigned length, const void* from, void* to) { StatusType::clearException(status); - static_cast(this->cloopVTable)->closeAttachment(this, status, context); + static_cast(this->cloopVTable)->encrypt(this, status, length, from, to); StatusType::checkException(status); } - template IExternalFunction* makeFunction(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) + template void decrypt(StatusType* status, unsigned length, const void* from, void* to) { StatusType::clearException(status); - IExternalFunction* ret = static_cast(this->cloopVTable)->makeFunction(this, status, context, metadata, inBuilder, outBuilder); + static_cast(this->cloopVTable)->decrypt(this, status, length, from, to); StatusType::checkException(status); - return ret; } - template IExternalProcedure* makeProcedure(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) + template const unsigned char* getSpecificData(StatusType* status, const char* keyType, unsigned* length) { + if (cloopVTable->version < 5) + { + StatusType::setVersionError(status, "IWireCryptPlugin", cloopVTable->version, 5); + StatusType::checkException(status); + return 0; + } StatusType::clearException(status); - IExternalProcedure* ret = static_cast(this->cloopVTable)->makeProcedure(this, status, context, metadata, inBuilder, outBuilder); + const unsigned char* ret = static_cast(this->cloopVTable)->getSpecificData(this, status, keyType, length); StatusType::checkException(status); return ret; } - template IExternalTrigger* makeTrigger(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) + template void setSpecificData(StatusType* status, const char* keyType, unsigned length, const unsigned char* data) { + if (cloopVTable->version < 5) + { + StatusType::setVersionError(status, "IWireCryptPlugin", cloopVTable->version, 5); + StatusType::checkException(status); + return; + } StatusType::clearException(status); - IExternalTrigger* ret = static_cast(this->cloopVTable)->makeTrigger(this, status, context, metadata, fieldsBuilder); + static_cast(this->cloopVTable)->setSpecificData(this, status, keyType, length, data); StatusType::checkException(status); - return ret; } }; - class ITimer : public IReferenceCounted +#define FIREBIRD_ICRYPT_KEY_CALLBACK_VERSION 3u + + class ICryptKeyCallback : public IVersioned { public: - struct VTable : public IReferenceCounted::VTable + struct VTable : public IVersioned::VTable { - void (CLOOP_CARG *handler)(ITimer* self) throw(); + unsigned (CLOOP_CARG *callback)(ICryptKeyCallback* self, unsigned dataLength, const void* data, unsigned bufferLength, void* buffer) CLOOP_NOEXCEPT; + void (CLOOP_CARG *dummy1)(ICryptKeyCallback* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *dummy2)(ICryptKeyCallback* self) CLOOP_NOEXCEPT; + int (CLOOP_CARG *getHashLength)(ICryptKeyCallback* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *getHashData)(ICryptKeyCallback* self, IStatus* status, void* hash) CLOOP_NOEXCEPT; }; protected: - ITimer(DoNotInherit) - : IReferenceCounted(DoNotInherit()) + ICryptKeyCallback(DoNotInherit) + : IVersioned(DoNotInherit()) { } - ~ITimer() + ~ICryptKeyCallback() { } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ICRYPT_KEY_CALLBACK_VERSION; - void handler() + unsigned callback(unsigned dataLength, const void* data, unsigned bufferLength, void* buffer) { - static_cast(this->cloopVTable)->handler(this); + unsigned ret = static_cast(this->cloopVTable)->callback(this, dataLength, data, bufferLength, buffer); + return ret; } - }; - - class ITimerControl : public IVersioned - { - public: - struct VTable : public IVersioned::VTable - { - void (CLOOP_CARG *start)(ITimerControl* self, IStatus* status, ITimer* timer, ISC_UINT64 microSeconds) throw(); - void (CLOOP_CARG *stop)(ITimerControl* self, IStatus* status, ITimer* timer) throw(); - }; - protected: - ITimerControl(DoNotInherit) - : IVersioned(DoNotInherit()) + template void dummy1(StatusType* status) { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "ICryptKeyCallback", cloopVTable->version, 3); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->dummy1(this, status); + StatusType::checkException(status); } - ~ITimerControl() + void dummy2() { + if (cloopVTable->version < 3) + { + return; + } + static_cast(this->cloopVTable)->dummy2(this); } - public: - static const unsigned VERSION = 2; - - template void start(StatusType* status, ITimer* timer, ISC_UINT64 microSeconds) + template int getHashLength(StatusType* status) { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "ICryptKeyCallback", cloopVTable->version, 3); + StatusType::checkException(status); + return -1; + } StatusType::clearException(status); - static_cast(this->cloopVTable)->start(this, status, timer, microSeconds); + int ret = static_cast(this->cloopVTable)->getHashLength(this, status); StatusType::checkException(status); + return ret; } - template void stop(StatusType* status, ITimer* timer) + template void getHashData(StatusType* status, void* hash) { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "ICryptKeyCallback", cloopVTable->version, 3); + StatusType::checkException(status); + return; + } StatusType::clearException(status); - static_cast(this->cloopVTable)->stop(this, status, timer); + static_cast(this->cloopVTable)->getHashData(this, status, hash); StatusType::checkException(status); } }; - class IVersionCallback : public IVersioned +#define FIREBIRD_IKEY_HOLDER_PLUGIN_VERSION 5u + + class IKeyHolderPlugin : public IPluginBase { public: - struct VTable : public IVersioned::VTable + struct VTable : public IPluginBase::VTable { - void (CLOOP_CARG *callback)(IVersionCallback* self, IStatus* status, const char* text) throw(); + int (CLOOP_CARG *keyCallback)(IKeyHolderPlugin* self, IStatus* status, ICryptKeyCallback* callback) CLOOP_NOEXCEPT; + ICryptKeyCallback* (CLOOP_CARG *keyHandle)(IKeyHolderPlugin* self, IStatus* status, const char* keyName) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *useOnlyOwnKeys)(IKeyHolderPlugin* self, IStatus* status) CLOOP_NOEXCEPT; + ICryptKeyCallback* (CLOOP_CARG *chainHandle)(IKeyHolderPlugin* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: - IVersionCallback(DoNotInherit) - : IVersioned(DoNotInherit()) + IKeyHolderPlugin(DoNotInherit) + : IPluginBase(DoNotInherit()) { } - ~IVersionCallback() + ~IKeyHolderPlugin() { } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IKEY_HOLDER_PLUGIN_VERSION; - template void callback(StatusType* status, const char* text) + template int keyCallback(StatusType* status, ICryptKeyCallback* callback) { StatusType::clearException(status); - static_cast(this->cloopVTable)->callback(this, status, text); + int ret = static_cast(this->cloopVTable)->keyCallback(this, status, callback); + StatusType::checkException(status); + return ret; + } + + template ICryptKeyCallback* keyHandle(StatusType* status, const char* keyName) + { + StatusType::clearException(status); + ICryptKeyCallback* ret = static_cast(this->cloopVTable)->keyHandle(this, status, keyName); + StatusType::checkException(status); + return ret; + } + + template FB_BOOLEAN useOnlyOwnKeys(StatusType* status) + { + if (cloopVTable->version < 5) + { + StatusType::setVersionError(status, "IKeyHolderPlugin", cloopVTable->version, 5); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->useOnlyOwnKeys(this, status); + StatusType::checkException(status); + return ret; + } + + template ICryptKeyCallback* chainHandle(StatusType* status) + { + if (cloopVTable->version < 5) + { + StatusType::setVersionError(status, "IKeyHolderPlugin", cloopVTable->version, 5); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + ICryptKeyCallback* ret = static_cast(this->cloopVTable)->chainHandle(this, status); StatusType::checkException(status); + return ret; } }; - class IUtil : public IVersioned +#define FIREBIRD_IDB_CRYPT_INFO_VERSION 3u + + class IDbCryptInfo : public IReferenceCounted { public: - struct VTable : public IVersioned::VTable + struct VTable : public IReferenceCounted::VTable { - void (CLOOP_CARG *getFbVersion)(IUtil* self, IStatus* status, IAttachment* att, IVersionCallback* callback) throw(); - void (CLOOP_CARG *loadBlob)(IUtil* self, IStatus* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) throw(); - void (CLOOP_CARG *dumpBlob)(IUtil* self, IStatus* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) throw(); - void (CLOOP_CARG *getPerfCounters)(IUtil* self, IStatus* status, IAttachment* att, const char* countersSet, ISC_INT64* counters) throw(); - IAttachment* (CLOOP_CARG *executeCreateDatabase)(IUtil* self, IStatus* status, unsigned stmtLength, const char* creatDBstatement, unsigned dialect, FB_BOOLEAN* stmtIsCreateDb) throw(); - void (CLOOP_CARG *decodeDate)(IUtil* self, ISC_DATE date, unsigned* year, unsigned* month, unsigned* day) throw(); - void (CLOOP_CARG *decodeTime)(IUtil* self, ISC_TIME time, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions) throw(); - ISC_DATE (CLOOP_CARG *encodeDate)(IUtil* self, unsigned year, unsigned month, unsigned day) throw(); - ISC_TIME (CLOOP_CARG *encodeTime)(IUtil* self, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions) throw(); - unsigned (CLOOP_CARG *formatStatus)(IUtil* self, char* buffer, unsigned bufferSize, IStatus* status) throw(); - unsigned (CLOOP_CARG *getClientVersion)(IUtil* self) throw(); - IXpbBuilder* (CLOOP_CARG *getXpbBuilder)(IUtil* self, IStatus* status, unsigned kind, const unsigned char* buf, unsigned len) throw(); - unsigned (CLOOP_CARG *setOffsets)(IUtil* self, IStatus* status, IMessageMetadata* metadata, IOffsetsCallback* callback) throw(); + const char* (CLOOP_CARG *getDatabaseFullPath)(IDbCryptInfo* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: - IUtil(DoNotInherit) - : IVersioned(DoNotInherit()) + IDbCryptInfo(DoNotInherit) + : IReferenceCounted(DoNotInherit()) { } - ~IUtil() + ~IDbCryptInfo() { } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IDB_CRYPT_INFO_VERSION; - template void getFbVersion(StatusType* status, IAttachment* att, IVersionCallback* callback) + template const char* getDatabaseFullPath(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->getFbVersion(this, status, att, callback); + const char* ret = static_cast(this->cloopVTable)->getDatabaseFullPath(this, status); StatusType::checkException(status); + return ret; } + }; - template void loadBlob(StatusType* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) +#define FIREBIRD_IDB_CRYPT_PLUGIN_VERSION 5u + + class IDbCryptPlugin : public IPluginBase + { + public: + struct VTable : public IPluginBase::VTable + { + void (CLOOP_CARG *setKey)(IDbCryptPlugin* self, IStatus* status, unsigned length, IKeyHolderPlugin** sources, const char* keyName) CLOOP_NOEXCEPT; + void (CLOOP_CARG *encrypt)(IDbCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) CLOOP_NOEXCEPT; + void (CLOOP_CARG *decrypt)(IDbCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setInfo)(IDbCryptPlugin* self, IStatus* status, IDbCryptInfo* info) CLOOP_NOEXCEPT; + }; + + protected: + IDbCryptPlugin(DoNotInherit) + : IPluginBase(DoNotInherit()) + { + } + + ~IDbCryptPlugin() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IDB_CRYPT_PLUGIN_VERSION; + + template void setKey(StatusType* status, unsigned length, IKeyHolderPlugin** sources, const char* keyName) { StatusType::clearException(status); - static_cast(this->cloopVTable)->loadBlob(this, status, blobId, att, tra, file, txt); + static_cast(this->cloopVTable)->setKey(this, status, length, sources, keyName); StatusType::checkException(status); } - template void dumpBlob(StatusType* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) + template void encrypt(StatusType* status, unsigned length, const void* from, void* to) { StatusType::clearException(status); - static_cast(this->cloopVTable)->dumpBlob(this, status, blobId, att, tra, file, txt); + static_cast(this->cloopVTable)->encrypt(this, status, length, from, to); StatusType::checkException(status); } - template void getPerfCounters(StatusType* status, IAttachment* att, const char* countersSet, ISC_INT64* counters) + template void decrypt(StatusType* status, unsigned length, const void* from, void* to) { StatusType::clearException(status); - static_cast(this->cloopVTable)->getPerfCounters(this, status, att, countersSet, counters); + static_cast(this->cloopVTable)->decrypt(this, status, length, from, to); StatusType::checkException(status); } - template IAttachment* executeCreateDatabase(StatusType* status, unsigned stmtLength, const char* creatDBstatement, unsigned dialect, FB_BOOLEAN* stmtIsCreateDb) + template void setInfo(StatusType* status, IDbCryptInfo* info) { + if (cloopVTable->version < 5) + { + StatusType::setVersionError(status, "IDbCryptPlugin", cloopVTable->version, 5); + StatusType::checkException(status); + return; + } StatusType::clearException(status); - IAttachment* ret = static_cast(this->cloopVTable)->executeCreateDatabase(this, status, stmtLength, creatDBstatement, dialect, stmtIsCreateDb); + static_cast(this->cloopVTable)->setInfo(this, status, info); + StatusType::checkException(status); + } + }; + +#define FIREBIRD_IEXTERNAL_CONTEXT_VERSION 2u + + class IExternalContext : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + IMaster* (CLOOP_CARG *getMaster)(IExternalContext* self) CLOOP_NOEXCEPT; + IExternalEngine* (CLOOP_CARG *getEngine)(IExternalContext* self, IStatus* status) CLOOP_NOEXCEPT; + IAttachment* (CLOOP_CARG *getAttachment)(IExternalContext* self, IStatus* status) CLOOP_NOEXCEPT; + ITransaction* (CLOOP_CARG *getTransaction)(IExternalContext* self, IStatus* status) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getUserName)(IExternalContext* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getDatabaseName)(IExternalContext* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getClientCharSet)(IExternalContext* self) CLOOP_NOEXCEPT; + int (CLOOP_CARG *obtainInfoCode)(IExternalContext* self) CLOOP_NOEXCEPT; + void* (CLOOP_CARG *getInfo)(IExternalContext* self, int code) CLOOP_NOEXCEPT; + void* (CLOOP_CARG *setInfo)(IExternalContext* self, int code, void* value) CLOOP_NOEXCEPT; + }; + + protected: + IExternalContext(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IExternalContext() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IEXTERNAL_CONTEXT_VERSION; + + IMaster* getMaster() + { + IMaster* ret = static_cast(this->cloopVTable)->getMaster(this); + return ret; + } + + template IExternalEngine* getEngine(StatusType* status) + { + StatusType::clearException(status); + IExternalEngine* ret = static_cast(this->cloopVTable)->getEngine(this, status); StatusType::checkException(status); return ret; } - void decodeDate(ISC_DATE date, unsigned* year, unsigned* month, unsigned* day) + template IAttachment* getAttachment(StatusType* status) { - static_cast(this->cloopVTable)->decodeDate(this, date, year, month, day); + StatusType::clearException(status); + IAttachment* ret = static_cast(this->cloopVTable)->getAttachment(this, status); + StatusType::checkException(status); + return ret; } - void decodeTime(ISC_TIME time, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions) + template ITransaction* getTransaction(StatusType* status) { - static_cast(this->cloopVTable)->decodeTime(this, time, hours, minutes, seconds, fractions); + StatusType::clearException(status); + ITransaction* ret = static_cast(this->cloopVTable)->getTransaction(this, status); + StatusType::checkException(status); + return ret; } - ISC_DATE encodeDate(unsigned year, unsigned month, unsigned day) + const char* getUserName() { - ISC_DATE ret = static_cast(this->cloopVTable)->encodeDate(this, year, month, day); + const char* ret = static_cast(this->cloopVTable)->getUserName(this); return ret; } - ISC_TIME encodeTime(unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions) + const char* getDatabaseName() { - ISC_TIME ret = static_cast(this->cloopVTable)->encodeTime(this, hours, minutes, seconds, fractions); + const char* ret = static_cast(this->cloopVTable)->getDatabaseName(this); return ret; } - unsigned formatStatus(char* buffer, unsigned bufferSize, IStatus* status) + const char* getClientCharSet() { - unsigned ret = static_cast(this->cloopVTable)->formatStatus(this, buffer, bufferSize, status); + const char* ret = static_cast(this->cloopVTable)->getClientCharSet(this); return ret; } - unsigned getClientVersion() + int obtainInfoCode() { - unsigned ret = static_cast(this->cloopVTable)->getClientVersion(this); + int ret = static_cast(this->cloopVTable)->obtainInfoCode(this); return ret; } - template IXpbBuilder* getXpbBuilder(StatusType* status, unsigned kind, const unsigned char* buf, unsigned len) + void* getInfo(int code) { - StatusType::clearException(status); - IXpbBuilder* ret = static_cast(this->cloopVTable)->getXpbBuilder(this, status, kind, buf, len); - StatusType::checkException(status); + void* ret = static_cast(this->cloopVTable)->getInfo(this, code); return ret; } - template unsigned setOffsets(StatusType* status, IMessageMetadata* metadata, IOffsetsCallback* callback) + void* setInfo(int code, void* value) { - StatusType::clearException(status); - unsigned ret = static_cast(this->cloopVTable)->setOffsets(this, status, metadata, callback); - StatusType::checkException(status); + void* ret = static_cast(this->cloopVTable)->setInfo(this, code, value); return ret; } }; - class IOffsetsCallback : public IVersioned +#define FIREBIRD_IEXTERNAL_RESULT_SET_VERSION 3u + + class IExternalResultSet : public IDisposable { public: - struct VTable : public IVersioned::VTable + struct VTable : public IDisposable::VTable { - void (CLOOP_CARG *setOffset)(IOffsetsCallback* self, IStatus* status, unsigned index, unsigned offset, unsigned nullOffset) throw(); + FB_BOOLEAN (CLOOP_CARG *fetch)(IExternalResultSet* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: - IOffsetsCallback(DoNotInherit) - : IVersioned(DoNotInherit()) + IExternalResultSet(DoNotInherit) + : IDisposable(DoNotInherit()) { } - ~IOffsetsCallback() + ~IExternalResultSet() { } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IEXTERNAL_RESULT_SET_VERSION; - template void setOffset(StatusType* status, unsigned index, unsigned offset, unsigned nullOffset) + template FB_BOOLEAN fetch(StatusType* status) { StatusType::clearException(status); - static_cast(this->cloopVTable)->setOffset(this, status, index, offset, nullOffset); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->fetch(this, status); StatusType::checkException(status); + return ret; } }; - class IXpbBuilder : public IDisposable +#define FIREBIRD_IEXTERNAL_FUNCTION_VERSION 3u + + class IExternalFunction : public IDisposable { public: struct VTable : public IDisposable::VTable { - void (CLOOP_CARG *clear)(IXpbBuilder* self, IStatus* status) throw(); - void (CLOOP_CARG *removeCurrent)(IXpbBuilder* self, IStatus* status) throw(); - void (CLOOP_CARG *insertInt)(IXpbBuilder* self, IStatus* status, unsigned char tag, int value) throw(); - void (CLOOP_CARG *insertBigInt)(IXpbBuilder* self, IStatus* status, unsigned char tag, ISC_INT64 value) throw(); - void (CLOOP_CARG *insertBytes)(IXpbBuilder* self, IStatus* status, unsigned char tag, const void* bytes, unsigned length) throw(); - void (CLOOP_CARG *insertString)(IXpbBuilder* self, IStatus* status, unsigned char tag, const char* str) throw(); - void (CLOOP_CARG *insertTag)(IXpbBuilder* self, IStatus* status, unsigned char tag) throw(); - FB_BOOLEAN (CLOOP_CARG *isEof)(IXpbBuilder* self, IStatus* status) throw(); - void (CLOOP_CARG *moveNext)(IXpbBuilder* self, IStatus* status) throw(); - void (CLOOP_CARG *rewind)(IXpbBuilder* self, IStatus* status) throw(); - FB_BOOLEAN (CLOOP_CARG *findFirst)(IXpbBuilder* self, IStatus* status, unsigned char tag) throw(); - FB_BOOLEAN (CLOOP_CARG *findNext)(IXpbBuilder* self, IStatus* status) throw(); - unsigned char (CLOOP_CARG *getTag)(IXpbBuilder* self, IStatus* status) throw(); - unsigned (CLOOP_CARG *getLength)(IXpbBuilder* self, IStatus* status) throw(); - int (CLOOP_CARG *getInt)(IXpbBuilder* self, IStatus* status) throw(); - ISC_INT64 (CLOOP_CARG *getBigInt)(IXpbBuilder* self, IStatus* status) throw(); - const char* (CLOOP_CARG *getString)(IXpbBuilder* self, IStatus* status) throw(); - const unsigned char* (CLOOP_CARG *getBytes)(IXpbBuilder* self, IStatus* status) throw(); - unsigned (CLOOP_CARG *getBufferLength)(IXpbBuilder* self, IStatus* status) throw(); - const unsigned char* (CLOOP_CARG *getBuffer)(IXpbBuilder* self, IStatus* status) throw(); + void (CLOOP_CARG *getCharSet)(IExternalFunction* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) CLOOP_NOEXCEPT; + void (CLOOP_CARG *execute)(IExternalFunction* self, IStatus* status, IExternalContext* context, void* inMsg, void* outMsg) CLOOP_NOEXCEPT; }; protected: - IXpbBuilder(DoNotInherit) + IExternalFunction(DoNotInherit) : IDisposable(DoNotInherit()) { } - ~IXpbBuilder() + ~IExternalFunction() { } public: - static const unsigned VERSION = 3; - - static const unsigned DPB = 1; - static const unsigned SPB_ATTACH = 2; - static const unsigned SPB_START = 3; - static const unsigned TPB = 4; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IEXTERNAL_FUNCTION_VERSION; - template void clear(StatusType* status) + template void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) { StatusType::clearException(status); - static_cast(this->cloopVTable)->clear(this, status); + static_cast(this->cloopVTable)->getCharSet(this, status, context, name, nameSize); StatusType::checkException(status); } - template void removeCurrent(StatusType* status) + template void execute(StatusType* status, IExternalContext* context, void* inMsg, void* outMsg) { StatusType::clearException(status); - static_cast(this->cloopVTable)->removeCurrent(this, status); + static_cast(this->cloopVTable)->execute(this, status, context, inMsg, outMsg); StatusType::checkException(status); } + }; - template void insertInt(StatusType* status, unsigned char tag, int value) +#define FIREBIRD_IEXTERNAL_PROCEDURE_VERSION 3u + + class IExternalProcedure : public IDisposable + { + public: + struct VTable : public IDisposable::VTable { - StatusType::clearException(status); - static_cast(this->cloopVTable)->insertInt(this, status, tag, value); - StatusType::checkException(status); - } + void (CLOOP_CARG *getCharSet)(IExternalProcedure* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) CLOOP_NOEXCEPT; + IExternalResultSet* (CLOOP_CARG *open)(IExternalProcedure* self, IStatus* status, IExternalContext* context, void* inMsg, void* outMsg) CLOOP_NOEXCEPT; + }; - template void insertBigInt(StatusType* status, unsigned char tag, ISC_INT64 value) + protected: + IExternalProcedure(DoNotInherit) + : IDisposable(DoNotInherit()) { - StatusType::clearException(status); - static_cast(this->cloopVTable)->insertBigInt(this, status, tag, value); - StatusType::checkException(status); } - template void insertBytes(StatusType* status, unsigned char tag, const void* bytes, unsigned length) + ~IExternalProcedure() { - StatusType::clearException(status); - static_cast(this->cloopVTable)->insertBytes(this, status, tag, bytes, length); - StatusType::checkException(status); } - template void insertString(StatusType* status, unsigned char tag, const char* str) + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IEXTERNAL_PROCEDURE_VERSION; + + template void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) { StatusType::clearException(status); - static_cast(this->cloopVTable)->insertString(this, status, tag, str); + static_cast(this->cloopVTable)->getCharSet(this, status, context, name, nameSize); StatusType::checkException(status); } - template void insertTag(StatusType* status, unsigned char tag) + template IExternalResultSet* open(StatusType* status, IExternalContext* context, void* inMsg, void* outMsg) { StatusType::clearException(status); - static_cast(this->cloopVTable)->insertTag(this, status, tag); + IExternalResultSet* ret = static_cast(this->cloopVTable)->open(this, status, context, inMsg, outMsg); StatusType::checkException(status); + return ret; } + }; - template FB_BOOLEAN isEof(StatusType* status) - { - StatusType::clearException(status); - FB_BOOLEAN ret = static_cast(this->cloopVTable)->isEof(this, status); - StatusType::checkException(status); - return ret; +#define FIREBIRD_IEXTERNAL_TRIGGER_VERSION 3u + + class IExternalTrigger : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + void (CLOOP_CARG *getCharSet)(IExternalTrigger* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) CLOOP_NOEXCEPT; + void (CLOOP_CARG *execute)(IExternalTrigger* self, IStatus* status, IExternalContext* context, unsigned action, void* oldMsg, void* newMsg) CLOOP_NOEXCEPT; + }; + + protected: + IExternalTrigger(DoNotInherit) + : IDisposable(DoNotInherit()) + { } - template void moveNext(StatusType* status) + ~IExternalTrigger() { - StatusType::clearException(status); - static_cast(this->cloopVTable)->moveNext(this, status); - StatusType::checkException(status); } - template void rewind(StatusType* status) + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IEXTERNAL_TRIGGER_VERSION; + + static CLOOP_CONSTEXPR unsigned TYPE_BEFORE = 1; + static CLOOP_CONSTEXPR unsigned TYPE_AFTER = 2; + static CLOOP_CONSTEXPR unsigned TYPE_DATABASE = 3; + static CLOOP_CONSTEXPR unsigned ACTION_INSERT = 1; + static CLOOP_CONSTEXPR unsigned ACTION_UPDATE = 2; + static CLOOP_CONSTEXPR unsigned ACTION_DELETE = 3; + static CLOOP_CONSTEXPR unsigned ACTION_CONNECT = 4; + static CLOOP_CONSTEXPR unsigned ACTION_DISCONNECT = 5; + static CLOOP_CONSTEXPR unsigned ACTION_TRANS_START = 6; + static CLOOP_CONSTEXPR unsigned ACTION_TRANS_COMMIT = 7; + static CLOOP_CONSTEXPR unsigned ACTION_TRANS_ROLLBACK = 8; + static CLOOP_CONSTEXPR unsigned ACTION_DDL = 9; + + template void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) { StatusType::clearException(status); - static_cast(this->cloopVTable)->rewind(this, status); + static_cast(this->cloopVTable)->getCharSet(this, status, context, name, nameSize); StatusType::checkException(status); } - template FB_BOOLEAN findFirst(StatusType* status, unsigned char tag) + template void execute(StatusType* status, IExternalContext* context, unsigned action, void* oldMsg, void* newMsg) { StatusType::clearException(status); - FB_BOOLEAN ret = static_cast(this->cloopVTable)->findFirst(this, status, tag); + static_cast(this->cloopVTable)->execute(this, status, context, action, oldMsg, newMsg); StatusType::checkException(status); - return ret; } + }; - template FB_BOOLEAN findNext(StatusType* status) +#define FIREBIRD_IROUTINE_METADATA_VERSION 2u + + class IRoutineMetadata : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const char* (CLOOP_CARG *getPackage)(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getName)(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getEntryPoint)(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getBody)(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT; + IMessageMetadata* (CLOOP_CARG *getInputMetadata)(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT; + IMessageMetadata* (CLOOP_CARG *getOutputMetadata)(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT; + IMessageMetadata* (CLOOP_CARG *getTriggerMetadata)(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getTriggerTable)(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getTriggerType)(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT; + }; + + protected: + IRoutineMetadata(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IRoutineMetadata() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IROUTINE_METADATA_VERSION; + + template const char* getPackage(StatusType* status) const { StatusType::clearException(status); - FB_BOOLEAN ret = static_cast(this->cloopVTable)->findNext(this, status); + const char* ret = static_cast(this->cloopVTable)->getPackage(this, status); StatusType::checkException(status); return ret; } - template unsigned char getTag(StatusType* status) + template const char* getName(StatusType* status) const { StatusType::clearException(status); - unsigned char ret = static_cast(this->cloopVTable)->getTag(this, status); + const char* ret = static_cast(this->cloopVTable)->getName(this, status); StatusType::checkException(status); return ret; } - template unsigned getLength(StatusType* status) + template const char* getEntryPoint(StatusType* status) const { StatusType::clearException(status); - unsigned ret = static_cast(this->cloopVTable)->getLength(this, status); + const char* ret = static_cast(this->cloopVTable)->getEntryPoint(this, status); StatusType::checkException(status); return ret; } - template int getInt(StatusType* status) + template const char* getBody(StatusType* status) const { StatusType::clearException(status); - int ret = static_cast(this->cloopVTable)->getInt(this, status); + const char* ret = static_cast(this->cloopVTable)->getBody(this, status); StatusType::checkException(status); return ret; } - template ISC_INT64 getBigInt(StatusType* status) + template IMessageMetadata* getInputMetadata(StatusType* status) const { StatusType::clearException(status); - ISC_INT64 ret = static_cast(this->cloopVTable)->getBigInt(this, status); + IMessageMetadata* ret = static_cast(this->cloopVTable)->getInputMetadata(this, status); StatusType::checkException(status); return ret; } - template const char* getString(StatusType* status) + template IMessageMetadata* getOutputMetadata(StatusType* status) const { StatusType::clearException(status); - const char* ret = static_cast(this->cloopVTable)->getString(this, status); + IMessageMetadata* ret = static_cast(this->cloopVTable)->getOutputMetadata(this, status); StatusType::checkException(status); return ret; } - template const unsigned char* getBytes(StatusType* status) + template IMessageMetadata* getTriggerMetadata(StatusType* status) const { StatusType::clearException(status); - const unsigned char* ret = static_cast(this->cloopVTable)->getBytes(this, status); + IMessageMetadata* ret = static_cast(this->cloopVTable)->getTriggerMetadata(this, status); StatusType::checkException(status); return ret; } - template unsigned getBufferLength(StatusType* status) + template const char* getTriggerTable(StatusType* status) const { StatusType::clearException(status); - unsigned ret = static_cast(this->cloopVTable)->getBufferLength(this, status); + const char* ret = static_cast(this->cloopVTable)->getTriggerTable(this, status); StatusType::checkException(status); return ret; } - template const unsigned char* getBuffer(StatusType* status) + template unsigned getTriggerType(StatusType* status) const { StatusType::clearException(status); - const unsigned char* ret = static_cast(this->cloopVTable)->getBuffer(this, status); + unsigned ret = static_cast(this->cloopVTable)->getTriggerType(this, status); StatusType::checkException(status); return ret; } }; - class ITraceConnection : public IVersioned +#define FIREBIRD_IEXTERNAL_ENGINE_VERSION 4u + + class IExternalEngine : public IPluginBase { public: - struct VTable : public IVersioned::VTable + struct VTable : public IPluginBase::VTable { - unsigned (CLOOP_CARG *getKind)(ITraceConnection* self) throw(); - int (CLOOP_CARG *getProcessID)(ITraceConnection* self) throw(); - const char* (CLOOP_CARG *getUserName)(ITraceConnection* self) throw(); - const char* (CLOOP_CARG *getRoleName)(ITraceConnection* self) throw(); - const char* (CLOOP_CARG *getCharSet)(ITraceConnection* self) throw(); - const char* (CLOOP_CARG *getRemoteProtocol)(ITraceConnection* self) throw(); - const char* (CLOOP_CARG *getRemoteAddress)(ITraceConnection* self) throw(); - int (CLOOP_CARG *getRemoteProcessID)(ITraceConnection* self) throw(); - const char* (CLOOP_CARG *getRemoteProcessName)(ITraceConnection* self) throw(); + void (CLOOP_CARG *open)(IExternalEngine* self, IStatus* status, IExternalContext* context, char* charSet, unsigned charSetSize) CLOOP_NOEXCEPT; + void (CLOOP_CARG *openAttachment)(IExternalEngine* self, IStatus* status, IExternalContext* context) CLOOP_NOEXCEPT; + void (CLOOP_CARG *closeAttachment)(IExternalEngine* self, IStatus* status, IExternalContext* context) CLOOP_NOEXCEPT; + IExternalFunction* (CLOOP_CARG *makeFunction)(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) CLOOP_NOEXCEPT; + IExternalProcedure* (CLOOP_CARG *makeProcedure)(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) CLOOP_NOEXCEPT; + IExternalTrigger* (CLOOP_CARG *makeTrigger)(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) CLOOP_NOEXCEPT; }; protected: - ITraceConnection(DoNotInherit) - : IVersioned(DoNotInherit()) + IExternalEngine(DoNotInherit) + : IPluginBase(DoNotInherit()) { } - ~ITraceConnection() + ~IExternalEngine() { } public: - static const unsigned VERSION = 2; - - static const unsigned KIND_DATABASE = 1; - static const unsigned KIND_SERVICE = 2; - - unsigned getKind() - { - unsigned ret = static_cast(this->cloopVTable)->getKind(this); - return ret; - } - - int getProcessID() - { - int ret = static_cast(this->cloopVTable)->getProcessID(this); - return ret; - } - - const char* getUserName() - { - const char* ret = static_cast(this->cloopVTable)->getUserName(this); - return ret; - } + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IEXTERNAL_ENGINE_VERSION; - const char* getRoleName() + template void open(StatusType* status, IExternalContext* context, char* charSet, unsigned charSetSize) { - const char* ret = static_cast(this->cloopVTable)->getRoleName(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->open(this, status, context, charSet, charSetSize); + StatusType::checkException(status); } - const char* getCharSet() + template void openAttachment(StatusType* status, IExternalContext* context) { - const char* ret = static_cast(this->cloopVTable)->getCharSet(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->openAttachment(this, status, context); + StatusType::checkException(status); } - const char* getRemoteProtocol() + template void closeAttachment(StatusType* status, IExternalContext* context) { - const char* ret = static_cast(this->cloopVTable)->getRemoteProtocol(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->closeAttachment(this, status, context); + StatusType::checkException(status); } - const char* getRemoteAddress() + template IExternalFunction* makeFunction(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) { - const char* ret = static_cast(this->cloopVTable)->getRemoteAddress(this); + StatusType::clearException(status); + IExternalFunction* ret = static_cast(this->cloopVTable)->makeFunction(this, status, context, metadata, inBuilder, outBuilder); + StatusType::checkException(status); return ret; } - int getRemoteProcessID() + template IExternalProcedure* makeProcedure(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) { - int ret = static_cast(this->cloopVTable)->getRemoteProcessID(this); + StatusType::clearException(status); + IExternalProcedure* ret = static_cast(this->cloopVTable)->makeProcedure(this, status, context, metadata, inBuilder, outBuilder); + StatusType::checkException(status); return ret; } - const char* getRemoteProcessName() + template IExternalTrigger* makeTrigger(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) { - const char* ret = static_cast(this->cloopVTable)->getRemoteProcessName(this); + StatusType::clearException(status); + IExternalTrigger* ret = static_cast(this->cloopVTable)->makeTrigger(this, status, context, metadata, fieldsBuilder); + StatusType::checkException(status); return ret; } }; - class ITraceDatabaseConnection : public ITraceConnection +#define FIREBIRD_ITIMER_VERSION 3u + + class ITimer : public IReferenceCounted { public: - struct VTable : public ITraceConnection::VTable + struct VTable : public IReferenceCounted::VTable { - ISC_INT64 (CLOOP_CARG *getConnectionID)(ITraceDatabaseConnection* self) throw(); - const char* (CLOOP_CARG *getDatabaseName)(ITraceDatabaseConnection* self) throw(); + void (CLOOP_CARG *handler)(ITimer* self) CLOOP_NOEXCEPT; }; protected: - ITraceDatabaseConnection(DoNotInherit) - : ITraceConnection(DoNotInherit()) + ITimer(DoNotInherit) + : IReferenceCounted(DoNotInherit()) { } - ~ITraceDatabaseConnection() + ~ITimer() { } public: - static const unsigned VERSION = 3; - - ISC_INT64 getConnectionID() - { - ISC_INT64 ret = static_cast(this->cloopVTable)->getConnectionID(this); - return ret; - } + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITIMER_VERSION; - const char* getDatabaseName() + void handler() { - const char* ret = static_cast(this->cloopVTable)->getDatabaseName(this); - return ret; + static_cast(this->cloopVTable)->handler(this); } }; - class ITraceTransaction : public IVersioned +#define FIREBIRD_ITIMER_CONTROL_VERSION 2u + + class ITimerControl : public IVersioned { public: struct VTable : public IVersioned::VTable { - ISC_INT64 (CLOOP_CARG *getTransactionID)(ITraceTransaction* self) throw(); - FB_BOOLEAN (CLOOP_CARG *getReadOnly)(ITraceTransaction* self) throw(); - int (CLOOP_CARG *getWait)(ITraceTransaction* self) throw(); - unsigned (CLOOP_CARG *getIsolation)(ITraceTransaction* self) throw(); - PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceTransaction* self) throw(); + void (CLOOP_CARG *start)(ITimerControl* self, IStatus* status, ITimer* timer, ISC_UINT64 microSeconds) CLOOP_NOEXCEPT; + void (CLOOP_CARG *stop)(ITimerControl* self, IStatus* status, ITimer* timer) CLOOP_NOEXCEPT; }; protected: - ITraceTransaction(DoNotInherit) + ITimerControl(DoNotInherit) : IVersioned(DoNotInherit()) { } - ~ITraceTransaction() + ~ITimerControl() { } public: - static const unsigned VERSION = 2; - - static const unsigned ISOLATION_CONSISTENCY = 1; - static const unsigned ISOLATION_CONCURRENCY = 2; - static const unsigned ISOLATION_READ_COMMITTED_RECVER = 3; - static const unsigned ISOLATION_READ_COMMITTED_NORECVER = 4; - - ISC_INT64 getTransactionID() - { - ISC_INT64 ret = static_cast(this->cloopVTable)->getTransactionID(this); - return ret; - } - - FB_BOOLEAN getReadOnly() - { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->getReadOnly(this); - return ret; - } - - int getWait() - { - int ret = static_cast(this->cloopVTable)->getWait(this); - return ret; - } + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITIMER_CONTROL_VERSION; - unsigned getIsolation() + template void start(StatusType* status, ITimer* timer, ISC_UINT64 microSeconds) { - unsigned ret = static_cast(this->cloopVTable)->getIsolation(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->start(this, status, timer, microSeconds); + StatusType::checkException(status); } - PerformanceInfo* getPerf() + template void stop(StatusType* status, ITimer* timer) { - PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->stop(this, status, timer); + StatusType::checkException(status); } }; - class ITraceParams : public IVersioned +#define FIREBIRD_IVERSION_CALLBACK_VERSION 2u + + class IVersionCallback : public IVersioned { public: struct VTable : public IVersioned::VTable { - unsigned (CLOOP_CARG *getCount)(ITraceParams* self) throw(); - const dsc* (CLOOP_CARG *getParam)(ITraceParams* self, unsigned idx) throw(); + void (CLOOP_CARG *callback)(IVersionCallback* self, IStatus* status, const char* text) CLOOP_NOEXCEPT; }; protected: - ITraceParams(DoNotInherit) + IVersionCallback(DoNotInherit) : IVersioned(DoNotInherit()) { } - ~ITraceParams() + ~IVersionCallback() { } public: - static const unsigned VERSION = 2; - - unsigned getCount() - { - unsigned ret = static_cast(this->cloopVTable)->getCount(this); - return ret; - } + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IVERSION_CALLBACK_VERSION; - const dsc* getParam(unsigned idx) + template void callback(StatusType* status, const char* text) { - const dsc* ret = static_cast(this->cloopVTable)->getParam(this, idx); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->callback(this, status, text); + StatusType::checkException(status); } }; - class ITraceStatement : public IVersioned +#define FIREBIRD_IUTIL_VERSION 4u + + class IUtil : public IVersioned { public: struct VTable : public IVersioned::VTable { - ISC_INT64 (CLOOP_CARG *getStmtID)(ITraceStatement* self) throw(); - PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceStatement* self) throw(); + void (CLOOP_CARG *getFbVersion)(IUtil* self, IStatus* status, IAttachment* att, IVersionCallback* callback) CLOOP_NOEXCEPT; + void (CLOOP_CARG *loadBlob)(IUtil* self, IStatus* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) CLOOP_NOEXCEPT; + void (CLOOP_CARG *dumpBlob)(IUtil* self, IStatus* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) CLOOP_NOEXCEPT; + void (CLOOP_CARG *getPerfCounters)(IUtil* self, IStatus* status, IAttachment* att, const char* countersSet, ISC_INT64* counters) CLOOP_NOEXCEPT; + IAttachment* (CLOOP_CARG *executeCreateDatabase)(IUtil* self, IStatus* status, unsigned stmtLength, const char* creatDBstatement, unsigned dialect, FB_BOOLEAN* stmtIsCreateDb) CLOOP_NOEXCEPT; + void (CLOOP_CARG *decodeDate)(IUtil* self, ISC_DATE date, unsigned* year, unsigned* month, unsigned* day) CLOOP_NOEXCEPT; + void (CLOOP_CARG *decodeTime)(IUtil* self, ISC_TIME time, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions) CLOOP_NOEXCEPT; + ISC_DATE (CLOOP_CARG *encodeDate)(IUtil* self, unsigned year, unsigned month, unsigned day) CLOOP_NOEXCEPT; + ISC_TIME (CLOOP_CARG *encodeTime)(IUtil* self, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *formatStatus)(IUtil* self, char* buffer, unsigned bufferSize, IStatus* status) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getClientVersion)(IUtil* self) CLOOP_NOEXCEPT; + IXpbBuilder* (CLOOP_CARG *getXpbBuilder)(IUtil* self, IStatus* status, unsigned kind, const unsigned char* buf, unsigned len) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *setOffsets)(IUtil* self, IStatus* status, IMessageMetadata* metadata, IOffsetsCallback* callback) CLOOP_NOEXCEPT; + IDecFloat16* (CLOOP_CARG *getDecFloat16)(IUtil* self, IStatus* status) CLOOP_NOEXCEPT; + IDecFloat34* (CLOOP_CARG *getDecFloat34)(IUtil* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *decodeTimeTz)(IUtil* self, IStatus* status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) CLOOP_NOEXCEPT; + void (CLOOP_CARG *decodeTimeStampTz)(IUtil* self, IStatus* status, const ISC_TIMESTAMP_TZ* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) CLOOP_NOEXCEPT; + void (CLOOP_CARG *encodeTimeTz)(IUtil* self, IStatus* status, ISC_TIME_TZ* timeTz, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) CLOOP_NOEXCEPT; + void (CLOOP_CARG *encodeTimeStampTz)(IUtil* self, IStatus* status, ISC_TIMESTAMP_TZ* timeStampTz, unsigned year, unsigned month, unsigned day, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) CLOOP_NOEXCEPT; + IInt128* (CLOOP_CARG *getInt128)(IUtil* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *decodeTimeTzEx)(IUtil* self, IStatus* status, const ISC_TIME_TZ_EX* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) CLOOP_NOEXCEPT; + void (CLOOP_CARG *decodeTimeStampTzEx)(IUtil* self, IStatus* status, const ISC_TIMESTAMP_TZ_EX* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) CLOOP_NOEXCEPT; }; protected: - ITraceStatement(DoNotInherit) + IUtil(DoNotInherit) : IVersioned(DoNotInherit()) { } - ~ITraceStatement() + ~IUtil() { } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IUTIL_VERSION; - ISC_INT64 getStmtID() + template void getFbVersion(StatusType* status, IAttachment* att, IVersionCallback* callback) { - ISC_INT64 ret = static_cast(this->cloopVTable)->getStmtID(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->getFbVersion(this, status, att, callback); + StatusType::checkException(status); } - PerformanceInfo* getPerf() + template void loadBlob(StatusType* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) { - PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->loadBlob(this, status, blobId, att, tra, file, txt); + StatusType::checkException(status); } - }; - - class ITraceSQLStatement : public ITraceStatement - { - public: - struct VTable : public ITraceStatement::VTable - { - const char* (CLOOP_CARG *getText)(ITraceSQLStatement* self) throw(); - const char* (CLOOP_CARG *getPlan)(ITraceSQLStatement* self) throw(); - ITraceParams* (CLOOP_CARG *getInputs)(ITraceSQLStatement* self) throw(); - const char* (CLOOP_CARG *getTextUTF8)(ITraceSQLStatement* self) throw(); - const char* (CLOOP_CARG *getExplainedPlan)(ITraceSQLStatement* self) throw(); - }; - protected: - ITraceSQLStatement(DoNotInherit) - : ITraceStatement(DoNotInherit()) + template void dumpBlob(StatusType* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) { + StatusType::clearException(status); + static_cast(this->cloopVTable)->dumpBlob(this, status, blobId, att, tra, file, txt); + StatusType::checkException(status); } - ~ITraceSQLStatement() + template void getPerfCounters(StatusType* status, IAttachment* att, const char* countersSet, ISC_INT64* counters) { + StatusType::clearException(status); + static_cast(this->cloopVTable)->getPerfCounters(this, status, att, countersSet, counters); + StatusType::checkException(status); } - public: - static const unsigned VERSION = 3; - - const char* getText() + template IAttachment* executeCreateDatabase(StatusType* status, unsigned stmtLength, const char* creatDBstatement, unsigned dialect, FB_BOOLEAN* stmtIsCreateDb) { - const char* ret = static_cast(this->cloopVTable)->getText(this); + StatusType::clearException(status); + IAttachment* ret = static_cast(this->cloopVTable)->executeCreateDatabase(this, status, stmtLength, creatDBstatement, dialect, stmtIsCreateDb); + StatusType::checkException(status); return ret; } - const char* getPlan() + void decodeDate(ISC_DATE date, unsigned* year, unsigned* month, unsigned* day) { - const char* ret = static_cast(this->cloopVTable)->getPlan(this); - return ret; + static_cast(this->cloopVTable)->decodeDate(this, date, year, month, day); } - ITraceParams* getInputs() + void decodeTime(ISC_TIME time, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions) { - ITraceParams* ret = static_cast(this->cloopVTable)->getInputs(this); - return ret; + static_cast(this->cloopVTable)->decodeTime(this, time, hours, minutes, seconds, fractions); } - const char* getTextUTF8() + ISC_DATE encodeDate(unsigned year, unsigned month, unsigned day) { - const char* ret = static_cast(this->cloopVTable)->getTextUTF8(this); + ISC_DATE ret = static_cast(this->cloopVTable)->encodeDate(this, year, month, day); return ret; } - const char* getExplainedPlan() + ISC_TIME encodeTime(unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions) { - const char* ret = static_cast(this->cloopVTable)->getExplainedPlan(this); + ISC_TIME ret = static_cast(this->cloopVTable)->encodeTime(this, hours, minutes, seconds, fractions); return ret; } - }; - class ITraceBLRStatement : public ITraceStatement - { - public: - struct VTable : public ITraceStatement::VTable + unsigned formatStatus(char* buffer, unsigned bufferSize, IStatus* status) { - const unsigned char* (CLOOP_CARG *getData)(ITraceBLRStatement* self) throw(); - unsigned (CLOOP_CARG *getDataLength)(ITraceBLRStatement* self) throw(); - const char* (CLOOP_CARG *getText)(ITraceBLRStatement* self) throw(); - }; + unsigned ret = static_cast(this->cloopVTable)->formatStatus(this, buffer, bufferSize, status); + return ret; + } - protected: - ITraceBLRStatement(DoNotInherit) - : ITraceStatement(DoNotInherit()) + unsigned getClientVersion() { + unsigned ret = static_cast(this->cloopVTable)->getClientVersion(this); + return ret; } - ~ITraceBLRStatement() + template IXpbBuilder* getXpbBuilder(StatusType* status, unsigned kind, const unsigned char* buf, unsigned len) { + StatusType::clearException(status); + IXpbBuilder* ret = static_cast(this->cloopVTable)->getXpbBuilder(this, status, kind, buf, len); + StatusType::checkException(status); + return ret; } - public: - static const unsigned VERSION = 3; - - const unsigned char* getData() + template unsigned setOffsets(StatusType* status, IMessageMetadata* metadata, IOffsetsCallback* callback) { - const unsigned char* ret = static_cast(this->cloopVTable)->getData(this); + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->setOffsets(this, status, metadata, callback); + StatusType::checkException(status); return ret; } - unsigned getDataLength() + template IDecFloat16* getDecFloat16(StatusType* status) { - unsigned ret = static_cast(this->cloopVTable)->getDataLength(this); + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 3); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + IDecFloat16* ret = static_cast(this->cloopVTable)->getDecFloat16(this, status); + StatusType::checkException(status); return ret; } - const char* getText() + template IDecFloat34* getDecFloat34(StatusType* status) { - const char* ret = static_cast(this->cloopVTable)->getText(this); + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 3); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + IDecFloat34* ret = static_cast(this->cloopVTable)->getDecFloat34(this, status); + StatusType::checkException(status); return ret; } - }; - class ITraceDYNRequest : public IVersioned - { - public: - struct VTable : public IVersioned::VTable + template void decodeTimeTz(StatusType* status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) { - const unsigned char* (CLOOP_CARG *getData)(ITraceDYNRequest* self) throw(); - unsigned (CLOOP_CARG *getDataLength)(ITraceDYNRequest* self) throw(); - const char* (CLOOP_CARG *getText)(ITraceDYNRequest* self) throw(); - }; + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 3); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->decodeTimeTz(this, status, timeTz, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); + StatusType::checkException(status); + } - protected: - ITraceDYNRequest(DoNotInherit) - : IVersioned(DoNotInherit()) + template void decodeTimeStampTz(StatusType* status, const ISC_TIMESTAMP_TZ* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 3); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->decodeTimeStampTz(this, status, timeStampTz, year, month, day, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); + StatusType::checkException(status); } - ~ITraceDYNRequest() + template void encodeTimeTz(StatusType* status, ISC_TIME_TZ* timeTz, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 3); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->encodeTimeTz(this, status, timeTz, hours, minutes, seconds, fractions, timeZone); + StatusType::checkException(status); } - public: - static const unsigned VERSION = 2; + template void encodeTimeStampTz(StatusType* status, ISC_TIMESTAMP_TZ* timeStampTz, unsigned year, unsigned month, unsigned day, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) + { + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 3); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->encodeTimeStampTz(this, status, timeStampTz, year, month, day, hours, minutes, seconds, fractions, timeZone); + StatusType::checkException(status); + } - const unsigned char* getData() + template IInt128* getInt128(StatusType* status) { - const unsigned char* ret = static_cast(this->cloopVTable)->getData(this); + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + IInt128* ret = static_cast(this->cloopVTable)->getInt128(this, status); + StatusType::checkException(status); return ret; } - unsigned getDataLength() + template void decodeTimeTzEx(StatusType* status, const ISC_TIME_TZ_EX* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) { - unsigned ret = static_cast(this->cloopVTable)->getDataLength(this); - return ret; + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->decodeTimeTzEx(this, status, timeTz, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); + StatusType::checkException(status); } - const char* getText() + template void decodeTimeStampTzEx(StatusType* status, const ISC_TIMESTAMP_TZ_EX* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) { - const char* ret = static_cast(this->cloopVTable)->getText(this); - return ret; + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "IUtil", cloopVTable->version, 4); + StatusType::checkException(status); + return; + } + StatusType::clearException(status); + static_cast(this->cloopVTable)->decodeTimeStampTzEx(this, status, timeStampTz, year, month, day, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); + StatusType::checkException(status); } }; - class ITraceContextVariable : public IVersioned +#define FIREBIRD_IOFFSETS_CALLBACK_VERSION 2u + + class IOffsetsCallback : public IVersioned { public: struct VTable : public IVersioned::VTable { - const char* (CLOOP_CARG *getNameSpace)(ITraceContextVariable* self) throw(); - const char* (CLOOP_CARG *getVarName)(ITraceContextVariable* self) throw(); - const char* (CLOOP_CARG *getVarValue)(ITraceContextVariable* self) throw(); + void (CLOOP_CARG *setOffset)(IOffsetsCallback* self, IStatus* status, unsigned index, unsigned offset, unsigned nullOffset) CLOOP_NOEXCEPT; }; protected: - ITraceContextVariable(DoNotInherit) + IOffsetsCallback(DoNotInherit) : IVersioned(DoNotInherit()) { } - ~ITraceContextVariable() + ~IOffsetsCallback() { } public: - static const unsigned VERSION = 2; - - const char* getNameSpace() - { - const char* ret = static_cast(this->cloopVTable)->getNameSpace(this); - return ret; - } - - const char* getVarName() - { - const char* ret = static_cast(this->cloopVTable)->getVarName(this); - return ret; - } + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IOFFSETS_CALLBACK_VERSION; - const char* getVarValue() + template void setOffset(StatusType* status, unsigned index, unsigned offset, unsigned nullOffset) { - const char* ret = static_cast(this->cloopVTable)->getVarValue(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->setOffset(this, status, index, offset, nullOffset); + StatusType::checkException(status); } }; - class ITraceProcedure : public IVersioned +#define FIREBIRD_IXPB_BUILDER_VERSION 3u + + class IXpbBuilder : public IDisposable { public: - struct VTable : public IVersioned::VTable + struct VTable : public IDisposable::VTable { - const char* (CLOOP_CARG *getProcName)(ITraceProcedure* self) throw(); - ITraceParams* (CLOOP_CARG *getInputs)(ITraceProcedure* self) throw(); - PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceProcedure* self) throw(); + void (CLOOP_CARG *clear)(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *removeCurrent)(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *insertInt)(IXpbBuilder* self, IStatus* status, unsigned char tag, int value) CLOOP_NOEXCEPT; + void (CLOOP_CARG *insertBigInt)(IXpbBuilder* self, IStatus* status, unsigned char tag, ISC_INT64 value) CLOOP_NOEXCEPT; + void (CLOOP_CARG *insertBytes)(IXpbBuilder* self, IStatus* status, unsigned char tag, const void* bytes, unsigned length) CLOOP_NOEXCEPT; + void (CLOOP_CARG *insertString)(IXpbBuilder* self, IStatus* status, unsigned char tag, const char* str) CLOOP_NOEXCEPT; + void (CLOOP_CARG *insertTag)(IXpbBuilder* self, IStatus* status, unsigned char tag) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *isEof)(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *moveNext)(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *rewind)(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *findFirst)(IXpbBuilder* self, IStatus* status, unsigned char tag) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *findNext)(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT; + unsigned char (CLOOP_CARG *getTag)(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getLength)(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT; + int (CLOOP_CARG *getInt)(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT; + ISC_INT64 (CLOOP_CARG *getBigInt)(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getString)(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT; + const unsigned char* (CLOOP_CARG *getBytes)(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getBufferLength)(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT; + const unsigned char* (CLOOP_CARG *getBuffer)(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT; }; protected: - ITraceProcedure(DoNotInherit) - : IVersioned(DoNotInherit()) + IXpbBuilder(DoNotInherit) + : IDisposable(DoNotInherit()) { } - ~ITraceProcedure() + ~IXpbBuilder() { } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IXPB_BUILDER_VERSION; - const char* getProcName() + static CLOOP_CONSTEXPR unsigned DPB = 1; + static CLOOP_CONSTEXPR unsigned SPB_ATTACH = 2; + static CLOOP_CONSTEXPR unsigned SPB_START = 3; + static CLOOP_CONSTEXPR unsigned TPB = 4; + static CLOOP_CONSTEXPR unsigned BATCH = 5; + static CLOOP_CONSTEXPR unsigned BPB = 6; + static CLOOP_CONSTEXPR unsigned SPB_SEND = 7; + static CLOOP_CONSTEXPR unsigned SPB_RECEIVE = 8; + static CLOOP_CONSTEXPR unsigned SPB_RESPONSE = 9; + static CLOOP_CONSTEXPR unsigned INFO_SEND = 10; + static CLOOP_CONSTEXPR unsigned INFO_RESPONSE = 11; + + template void clear(StatusType* status) { - const char* ret = static_cast(this->cloopVTable)->getProcName(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->clear(this, status); + StatusType::checkException(status); } - ITraceParams* getInputs() + template void removeCurrent(StatusType* status) { - ITraceParams* ret = static_cast(this->cloopVTable)->getInputs(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->removeCurrent(this, status); + StatusType::checkException(status); } - PerformanceInfo* getPerf() + template void insertInt(StatusType* status, unsigned char tag, int value) { - PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->insertInt(this, status, tag, value); + StatusType::checkException(status); } - }; - class ITraceFunction : public IVersioned - { - public: - struct VTable : public IVersioned::VTable + template void insertBigInt(StatusType* status, unsigned char tag, ISC_INT64 value) { - const char* (CLOOP_CARG *getFuncName)(ITraceFunction* self) throw(); - ITraceParams* (CLOOP_CARG *getInputs)(ITraceFunction* self) throw(); - ITraceParams* (CLOOP_CARG *getResult)(ITraceFunction* self) throw(); - PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceFunction* self) throw(); - }; + StatusType::clearException(status); + static_cast(this->cloopVTable)->insertBigInt(this, status, tag, value); + StatusType::checkException(status); + } - protected: - ITraceFunction(DoNotInherit) - : IVersioned(DoNotInherit()) + template void insertBytes(StatusType* status, unsigned char tag, const void* bytes, unsigned length) { + StatusType::clearException(status); + static_cast(this->cloopVTable)->insertBytes(this, status, tag, bytes, length); + StatusType::checkException(status); } - ~ITraceFunction() + template void insertString(StatusType* status, unsigned char tag, const char* str) { + StatusType::clearException(status); + static_cast(this->cloopVTable)->insertString(this, status, tag, str); + StatusType::checkException(status); } - public: - static const unsigned VERSION = 2; - - const char* getFuncName() + template void insertTag(StatusType* status, unsigned char tag) { - const char* ret = static_cast(this->cloopVTable)->getFuncName(this); - return ret; + StatusType::clearException(status); + static_cast(this->cloopVTable)->insertTag(this, status, tag); + StatusType::checkException(status); } - ITraceParams* getInputs() + template FB_BOOLEAN isEof(StatusType* status) { - ITraceParams* ret = static_cast(this->cloopVTable)->getInputs(this); - return ret; - } - - ITraceParams* getResult() - { - ITraceParams* ret = static_cast(this->cloopVTable)->getResult(this); - return ret; - } - - PerformanceInfo* getPerf() - { - PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->isEof(this, status); + StatusType::checkException(status); return ret; } - }; - class ITraceTrigger : public IVersioned - { - public: - struct VTable : public IVersioned::VTable - { - const char* (CLOOP_CARG *getTriggerName)(ITraceTrigger* self) throw(); - const char* (CLOOP_CARG *getRelationName)(ITraceTrigger* self) throw(); - int (CLOOP_CARG *getAction)(ITraceTrigger* self) throw(); - int (CLOOP_CARG *getWhich)(ITraceTrigger* self) throw(); - PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceTrigger* self) throw(); - }; - - protected: - ITraceTrigger(DoNotInherit) - : IVersioned(DoNotInherit()) + template void moveNext(StatusType* status) { + StatusType::clearException(status); + static_cast(this->cloopVTable)->moveNext(this, status); + StatusType::checkException(status); } - ~ITraceTrigger() + template void rewind(StatusType* status) { + StatusType::clearException(status); + static_cast(this->cloopVTable)->rewind(this, status); + StatusType::checkException(status); } - public: - static const unsigned VERSION = 2; - - static const unsigned TYPE_ALL = 0; - static const unsigned TYPE_BEFORE = 1; - static const unsigned TYPE_AFTER = 2; - - const char* getTriggerName() + template FB_BOOLEAN findFirst(StatusType* status, unsigned char tag) { - const char* ret = static_cast(this->cloopVTable)->getTriggerName(this); + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->findFirst(this, status, tag); + StatusType::checkException(status); return ret; } - const char* getRelationName() + template FB_BOOLEAN findNext(StatusType* status) { - const char* ret = static_cast(this->cloopVTable)->getRelationName(this); + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->findNext(this, status); + StatusType::checkException(status); return ret; } - int getAction() + template unsigned char getTag(StatusType* status) { - int ret = static_cast(this->cloopVTable)->getAction(this); + StatusType::clearException(status); + unsigned char ret = static_cast(this->cloopVTable)->getTag(this, status); + StatusType::checkException(status); return ret; } - int getWhich() + template unsigned getLength(StatusType* status) { - int ret = static_cast(this->cloopVTable)->getWhich(this); + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getLength(this, status); + StatusType::checkException(status); return ret; } - PerformanceInfo* getPerf() + template int getInt(StatusType* status) { - PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); + StatusType::clearException(status); + int ret = static_cast(this->cloopVTable)->getInt(this, status); + StatusType::checkException(status); return ret; } - }; - - class ITraceServiceConnection : public ITraceConnection - { - public: - struct VTable : public ITraceConnection::VTable - { - void* (CLOOP_CARG *getServiceID)(ITraceServiceConnection* self) throw(); - const char* (CLOOP_CARG *getServiceMgr)(ITraceServiceConnection* self) throw(); - const char* (CLOOP_CARG *getServiceName)(ITraceServiceConnection* self) throw(); - }; - protected: - ITraceServiceConnection(DoNotInherit) - : ITraceConnection(DoNotInherit()) + template ISC_INT64 getBigInt(StatusType* status) { + StatusType::clearException(status); + ISC_INT64 ret = static_cast(this->cloopVTable)->getBigInt(this, status); + StatusType::checkException(status); + return ret; } - ~ITraceServiceConnection() + template const char* getString(StatusType* status) { + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getString(this, status); + StatusType::checkException(status); + return ret; } - public: - static const unsigned VERSION = 3; - - void* getServiceID() + template const unsigned char* getBytes(StatusType* status) { - void* ret = static_cast(this->cloopVTable)->getServiceID(this); + StatusType::clearException(status); + const unsigned char* ret = static_cast(this->cloopVTable)->getBytes(this, status); + StatusType::checkException(status); return ret; } - const char* getServiceMgr() + template unsigned getBufferLength(StatusType* status) { - const char* ret = static_cast(this->cloopVTable)->getServiceMgr(this); + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->getBufferLength(this, status); + StatusType::checkException(status); return ret; } - const char* getServiceName() + template const unsigned char* getBuffer(StatusType* status) { - const char* ret = static_cast(this->cloopVTable)->getServiceName(this); + StatusType::clearException(status); + const unsigned char* ret = static_cast(this->cloopVTable)->getBuffer(this, status); + StatusType::checkException(status); return ret; } }; - class ITraceStatusVector : public IVersioned +#define FIREBIRD_ITRACE_CONNECTION_VERSION 2u + + class ITraceConnection : public IVersioned { public: struct VTable : public IVersioned::VTable { - FB_BOOLEAN (CLOOP_CARG *hasError)(ITraceStatusVector* self) throw(); - FB_BOOLEAN (CLOOP_CARG *hasWarning)(ITraceStatusVector* self) throw(); - IStatus* (CLOOP_CARG *getStatus)(ITraceStatusVector* self) throw(); - const char* (CLOOP_CARG *getText)(ITraceStatusVector* self) throw(); + unsigned (CLOOP_CARG *getKind)(ITraceConnection* self) CLOOP_NOEXCEPT; + int (CLOOP_CARG *getProcessID)(ITraceConnection* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getUserName)(ITraceConnection* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getRoleName)(ITraceConnection* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getCharSet)(ITraceConnection* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getRemoteProtocol)(ITraceConnection* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getRemoteAddress)(ITraceConnection* self) CLOOP_NOEXCEPT; + int (CLOOP_CARG *getRemoteProcessID)(ITraceConnection* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getRemoteProcessName)(ITraceConnection* self) CLOOP_NOEXCEPT; }; protected: - ITraceStatusVector(DoNotInherit) + ITraceConnection(DoNotInherit) : IVersioned(DoNotInherit()) { } - ~ITraceStatusVector() + ~ITraceConnection() { } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_CONNECTION_VERSION; - FB_BOOLEAN hasError() - { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->hasError(this); - return ret; - } + static CLOOP_CONSTEXPR unsigned KIND_DATABASE = 1; + static CLOOP_CONSTEXPR unsigned KIND_SERVICE = 2; - FB_BOOLEAN hasWarning() + unsigned getKind() { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->hasWarning(this); + unsigned ret = static_cast(this->cloopVTable)->getKind(this); return ret; } - IStatus* getStatus() + int getProcessID() { - IStatus* ret = static_cast(this->cloopVTable)->getStatus(this); + int ret = static_cast(this->cloopVTable)->getProcessID(this); return ret; } - const char* getText() + const char* getUserName() { - const char* ret = static_cast(this->cloopVTable)->getText(this); + const char* ret = static_cast(this->cloopVTable)->getUserName(this); return ret; } - }; - - class ITraceSweepInfo : public IVersioned - { - public: - struct VTable : public IVersioned::VTable - { - ISC_INT64 (CLOOP_CARG *getOIT)(ITraceSweepInfo* self) throw(); - ISC_INT64 (CLOOP_CARG *getOST)(ITraceSweepInfo* self) throw(); - ISC_INT64 (CLOOP_CARG *getOAT)(ITraceSweepInfo* self) throw(); - ISC_INT64 (CLOOP_CARG *getNext)(ITraceSweepInfo* self) throw(); - PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceSweepInfo* self) throw(); - }; - - protected: - ITraceSweepInfo(DoNotInherit) - : IVersioned(DoNotInherit()) - { - } - ~ITraceSweepInfo() + const char* getRoleName() { + const char* ret = static_cast(this->cloopVTable)->getRoleName(this); + return ret; } - public: - static const unsigned VERSION = 2; - - ISC_INT64 getOIT() + const char* getCharSet() { - ISC_INT64 ret = static_cast(this->cloopVTable)->getOIT(this); + const char* ret = static_cast(this->cloopVTable)->getCharSet(this); return ret; } - ISC_INT64 getOST() + const char* getRemoteProtocol() { - ISC_INT64 ret = static_cast(this->cloopVTable)->getOST(this); + const char* ret = static_cast(this->cloopVTable)->getRemoteProtocol(this); return ret; } - ISC_INT64 getOAT() + const char* getRemoteAddress() { - ISC_INT64 ret = static_cast(this->cloopVTable)->getOAT(this); + const char* ret = static_cast(this->cloopVTable)->getRemoteAddress(this); return ret; } - ISC_INT64 getNext() + int getRemoteProcessID() { - ISC_INT64 ret = static_cast(this->cloopVTable)->getNext(this); + int ret = static_cast(this->cloopVTable)->getRemoteProcessID(this); return ret; } - PerformanceInfo* getPerf() + const char* getRemoteProcessName() { - PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); + const char* ret = static_cast(this->cloopVTable)->getRemoteProcessName(this); return ret; } }; - class ITraceLogWriter : public IReferenceCounted +#define FIREBIRD_ITRACE_DATABASE_CONNECTION_VERSION 3u + + class ITraceDatabaseConnection : public ITraceConnection { public: - struct VTable : public IReferenceCounted::VTable + struct VTable : public ITraceConnection::VTable { - unsigned (CLOOP_CARG *write)(ITraceLogWriter* self, const void* buf, unsigned size) throw(); + ISC_INT64 (CLOOP_CARG *getConnectionID)(ITraceDatabaseConnection* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getDatabaseName)(ITraceDatabaseConnection* self) CLOOP_NOEXCEPT; }; protected: - ITraceLogWriter(DoNotInherit) - : IReferenceCounted(DoNotInherit()) + ITraceDatabaseConnection(DoNotInherit) + : ITraceConnection(DoNotInherit()) { } - ~ITraceLogWriter() + ~ITraceDatabaseConnection() { } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_DATABASE_CONNECTION_VERSION; - unsigned write(const void* buf, unsigned size) + ISC_INT64 getConnectionID() { - unsigned ret = static_cast(this->cloopVTable)->write(this, buf, size); + ISC_INT64 ret = static_cast(this->cloopVTable)->getConnectionID(this); + return ret; + } + + const char* getDatabaseName() + { + const char* ret = static_cast(this->cloopVTable)->getDatabaseName(this); return ret; } }; - class ITraceInitInfo : public IVersioned +#define FIREBIRD_ITRACE_TRANSACTION_VERSION 3u + + class ITraceTransaction : public IVersioned { public: struct VTable : public IVersioned::VTable { - const char* (CLOOP_CARG *getConfigText)(ITraceInitInfo* self) throw(); - int (CLOOP_CARG *getTraceSessionID)(ITraceInitInfo* self) throw(); - const char* (CLOOP_CARG *getTraceSessionName)(ITraceInitInfo* self) throw(); - const char* (CLOOP_CARG *getFirebirdRootDirectory)(ITraceInitInfo* self) throw(); - const char* (CLOOP_CARG *getDatabaseName)(ITraceInitInfo* self) throw(); - ITraceDatabaseConnection* (CLOOP_CARG *getConnection)(ITraceInitInfo* self) throw(); - ITraceLogWriter* (CLOOP_CARG *getLogWriter)(ITraceInitInfo* self) throw(); + ISC_INT64 (CLOOP_CARG *getTransactionID)(ITraceTransaction* self) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *getReadOnly)(ITraceTransaction* self) CLOOP_NOEXCEPT; + int (CLOOP_CARG *getWait)(ITraceTransaction* self) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getIsolation)(ITraceTransaction* self) CLOOP_NOEXCEPT; + PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceTransaction* self) CLOOP_NOEXCEPT; + ISC_INT64 (CLOOP_CARG *getInitialID)(ITraceTransaction* self) CLOOP_NOEXCEPT; + ISC_INT64 (CLOOP_CARG *getPreviousID)(ITraceTransaction* self) CLOOP_NOEXCEPT; }; protected: - ITraceInitInfo(DoNotInherit) + ITraceTransaction(DoNotInherit) : IVersioned(DoNotInherit()) { } - ~ITraceInitInfo() + ~ITraceTransaction() { } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_TRANSACTION_VERSION; - const char* getConfigText() + static CLOOP_CONSTEXPR unsigned ISOLATION_CONSISTENCY = 1; + static CLOOP_CONSTEXPR unsigned ISOLATION_CONCURRENCY = 2; + static CLOOP_CONSTEXPR unsigned ISOLATION_READ_COMMITTED_RECVER = 3; + static CLOOP_CONSTEXPR unsigned ISOLATION_READ_COMMITTED_NORECVER = 4; + static CLOOP_CONSTEXPR unsigned ISOLATION_READ_COMMITTED_READ_CONSISTENCY = 5; + + ISC_INT64 getTransactionID() { - const char* ret = static_cast(this->cloopVTable)->getConfigText(this); + ISC_INT64 ret = static_cast(this->cloopVTable)->getTransactionID(this); return ret; } - int getTraceSessionID() + FB_BOOLEAN getReadOnly() { - int ret = static_cast(this->cloopVTable)->getTraceSessionID(this); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->getReadOnly(this); return ret; } - const char* getTraceSessionName() + int getWait() { - const char* ret = static_cast(this->cloopVTable)->getTraceSessionName(this); + int ret = static_cast(this->cloopVTable)->getWait(this); return ret; } - const char* getFirebirdRootDirectory() + unsigned getIsolation() { - const char* ret = static_cast(this->cloopVTable)->getFirebirdRootDirectory(this); + unsigned ret = static_cast(this->cloopVTable)->getIsolation(this); return ret; } - const char* getDatabaseName() + PerformanceInfo* getPerf() { - const char* ret = static_cast(this->cloopVTable)->getDatabaseName(this); + PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); return ret; } - ITraceDatabaseConnection* getConnection() + ISC_INT64 getInitialID() { - ITraceDatabaseConnection* ret = static_cast(this->cloopVTable)->getConnection(this); + if (cloopVTable->version < 3) + { + return 0; + } + ISC_INT64 ret = static_cast(this->cloopVTable)->getInitialID(this); return ret; } - ITraceLogWriter* getLogWriter() + ISC_INT64 getPreviousID() { - ITraceLogWriter* ret = static_cast(this->cloopVTable)->getLogWriter(this); + if (cloopVTable->version < 3) + { + return 0; + } + ISC_INT64 ret = static_cast(this->cloopVTable)->getPreviousID(this); return ret; } }; - class ITracePlugin : public IReferenceCounted +#define FIREBIRD_ITRACE_PARAMS_VERSION 3u + + class ITraceParams : public IVersioned { public: - struct VTable : public IReferenceCounted::VTable + struct VTable : public IVersioned::VTable { - const char* (CLOOP_CARG *trace_get_error)(ITracePlugin* self) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_attach)(ITracePlugin* self, ITraceDatabaseConnection* connection, FB_BOOLEAN create_db, unsigned att_result) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_detach)(ITracePlugin* self, ITraceDatabaseConnection* connection, FB_BOOLEAN drop_db) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_transaction_start)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, unsigned tpb_length, const unsigned char* tpb, unsigned tra_result) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_transaction_end)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, FB_BOOLEAN commit, FB_BOOLEAN retain_context, unsigned tra_result) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_proc_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceProcedure* procedure, FB_BOOLEAN started, unsigned proc_result) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_trigger_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceTrigger* trigger, FB_BOOLEAN started, unsigned trig_result) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_set_context)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceContextVariable* variable) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_dsql_prepare)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, ISC_INT64 time_millis, unsigned req_result) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_dsql_free)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceSQLStatement* statement, unsigned option) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_dsql_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, FB_BOOLEAN started, unsigned req_result) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_blr_compile)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, ISC_INT64 time_millis, unsigned req_result) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_blr_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, unsigned req_result) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_dyn_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceDYNRequest* request, ISC_INT64 time_millis, unsigned req_result) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_service_attach)(ITracePlugin* self, ITraceServiceConnection* service, unsigned att_result) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_service_start)(ITracePlugin* self, ITraceServiceConnection* service, unsigned switches_length, const char* switches, unsigned start_result) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_service_query)(ITracePlugin* self, ITraceServiceConnection* service, unsigned send_item_length, const unsigned char* send_items, unsigned recv_item_length, const unsigned char* recv_items, unsigned query_result) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_service_detach)(ITracePlugin* self, ITraceServiceConnection* service, unsigned detach_result) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_event_error)(ITracePlugin* self, ITraceConnection* connection, ITraceStatusVector* status, const char* function) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_event_sweep)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceSweepInfo* sweep, unsigned sweep_state) throw(); - FB_BOOLEAN (CLOOP_CARG *trace_func_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceFunction* function, FB_BOOLEAN started, unsigned func_result) throw(); + unsigned (CLOOP_CARG *getCount)(ITraceParams* self) CLOOP_NOEXCEPT; + const dsc* (CLOOP_CARG *getParam)(ITraceParams* self, unsigned idx) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getTextUTF8)(ITraceParams* self, IStatus* status, unsigned idx) CLOOP_NOEXCEPT; }; protected: - ITracePlugin(DoNotInherit) - : IReferenceCounted(DoNotInherit()) + ITraceParams(DoNotInherit) + : IVersioned(DoNotInherit()) { } - ~ITracePlugin() + ~ITraceParams() { } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_PARAMS_VERSION; - static const unsigned RESULT_SUCCESS = 0; - static const unsigned RESULT_FAILED = 1; - static const unsigned RESULT_UNAUTHORIZED = 2; - static const unsigned SWEEP_STATE_STARTED = 1; - static const unsigned SWEEP_STATE_FINISHED = 2; - static const unsigned SWEEP_STATE_FAILED = 3; - static const unsigned SWEEP_STATE_PROGRESS = 4; - - const char* trace_get_error() + unsigned getCount() { - const char* ret = static_cast(this->cloopVTable)->trace_get_error(this); + unsigned ret = static_cast(this->cloopVTable)->getCount(this); return ret; } - FB_BOOLEAN trace_attach(ITraceDatabaseConnection* connection, FB_BOOLEAN create_db, unsigned att_result) + const dsc* getParam(unsigned idx) { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_attach(this, connection, create_db, att_result); + const dsc* ret = static_cast(this->cloopVTable)->getParam(this, idx); return ret; } - FB_BOOLEAN trace_detach(ITraceDatabaseConnection* connection, FB_BOOLEAN drop_db) + template const char* getTextUTF8(StatusType* status, unsigned idx) { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_detach(this, connection, drop_db); - return ret; + if (cloopVTable->version < 3) + { + StatusType::setVersionError(status, "ITraceParams", cloopVTable->version, 3); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + const char* ret = static_cast(this->cloopVTable)->getTextUTF8(this, status, idx); + StatusType::checkException(status); + return ret; } + }; - FB_BOOLEAN trace_transaction_start(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, unsigned tpb_length, const unsigned char* tpb, unsigned tra_result) +#define FIREBIRD_ITRACE_STATEMENT_VERSION 2u + + class ITraceStatement : public IVersioned + { + public: + struct VTable : public IVersioned::VTable { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_transaction_start(this, connection, transaction, tpb_length, tpb, tra_result); - return ret; - } + ISC_INT64 (CLOOP_CARG *getStmtID)(ITraceStatement* self) CLOOP_NOEXCEPT; + PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceStatement* self) CLOOP_NOEXCEPT; + }; - FB_BOOLEAN trace_transaction_end(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, FB_BOOLEAN commit, FB_BOOLEAN retain_context, unsigned tra_result) + protected: + ITraceStatement(DoNotInherit) + : IVersioned(DoNotInherit()) { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_transaction_end(this, connection, transaction, commit, retain_context, tra_result); - return ret; } - FB_BOOLEAN trace_proc_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceProcedure* procedure, FB_BOOLEAN started, unsigned proc_result) + ~ITraceStatement() { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_proc_execute(this, connection, transaction, procedure, started, proc_result); - return ret; } - FB_BOOLEAN trace_trigger_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceTrigger* trigger, FB_BOOLEAN started, unsigned trig_result) + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_STATEMENT_VERSION; + + ISC_INT64 getStmtID() { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_trigger_execute(this, connection, transaction, trigger, started, trig_result); + ISC_INT64 ret = static_cast(this->cloopVTable)->getStmtID(this); return ret; } - FB_BOOLEAN trace_set_context(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceContextVariable* variable) + PerformanceInfo* getPerf() { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_set_context(this, connection, transaction, variable); + PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); return ret; } + }; - FB_BOOLEAN trace_dsql_prepare(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, ISC_INT64 time_millis, unsigned req_result) +#define FIREBIRD_ITRACE_SQLSTATEMENT_VERSION 3u + + class ITraceSQLStatement : public ITraceStatement + { + public: + struct VTable : public ITraceStatement::VTable { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_dsql_prepare(this, connection, transaction, statement, time_millis, req_result); - return ret; - } + const char* (CLOOP_CARG *getText)(ITraceSQLStatement* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getPlan)(ITraceSQLStatement* self) CLOOP_NOEXCEPT; + ITraceParams* (CLOOP_CARG *getInputs)(ITraceSQLStatement* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getTextUTF8)(ITraceSQLStatement* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getExplainedPlan)(ITraceSQLStatement* self) CLOOP_NOEXCEPT; + }; - FB_BOOLEAN trace_dsql_free(ITraceDatabaseConnection* connection, ITraceSQLStatement* statement, unsigned option) + protected: + ITraceSQLStatement(DoNotInherit) + : ITraceStatement(DoNotInherit()) { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_dsql_free(this, connection, statement, option); - return ret; } - FB_BOOLEAN trace_dsql_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, FB_BOOLEAN started, unsigned req_result) + ~ITraceSQLStatement() { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_dsql_execute(this, connection, transaction, statement, started, req_result); - return ret; } - FB_BOOLEAN trace_blr_compile(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, ISC_INT64 time_millis, unsigned req_result) + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_SQLSTATEMENT_VERSION; + + const char* getText() { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_blr_compile(this, connection, transaction, statement, time_millis, req_result); + const char* ret = static_cast(this->cloopVTable)->getText(this); return ret; } - FB_BOOLEAN trace_blr_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, unsigned req_result) + const char* getPlan() { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_blr_execute(this, connection, transaction, statement, req_result); + const char* ret = static_cast(this->cloopVTable)->getPlan(this); return ret; } - FB_BOOLEAN trace_dyn_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceDYNRequest* request, ISC_INT64 time_millis, unsigned req_result) + ITraceParams* getInputs() { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_dyn_execute(this, connection, transaction, request, time_millis, req_result); + ITraceParams* ret = static_cast(this->cloopVTable)->getInputs(this); return ret; } - FB_BOOLEAN trace_service_attach(ITraceServiceConnection* service, unsigned att_result) + const char* getTextUTF8() { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_service_attach(this, service, att_result); + const char* ret = static_cast(this->cloopVTable)->getTextUTF8(this); return ret; } - FB_BOOLEAN trace_service_start(ITraceServiceConnection* service, unsigned switches_length, const char* switches, unsigned start_result) + const char* getExplainedPlan() { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_service_start(this, service, switches_length, switches, start_result); + const char* ret = static_cast(this->cloopVTable)->getExplainedPlan(this); return ret; } + }; - FB_BOOLEAN trace_service_query(ITraceServiceConnection* service, unsigned send_item_length, const unsigned char* send_items, unsigned recv_item_length, const unsigned char* recv_items, unsigned query_result) +#define FIREBIRD_ITRACE_BLRSTATEMENT_VERSION 3u + + class ITraceBLRStatement : public ITraceStatement + { + public: + struct VTable : public ITraceStatement::VTable + { + const unsigned char* (CLOOP_CARG *getData)(ITraceBLRStatement* self) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getDataLength)(ITraceBLRStatement* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getText)(ITraceBLRStatement* self) CLOOP_NOEXCEPT; + }; + + protected: + ITraceBLRStatement(DoNotInherit) + : ITraceStatement(DoNotInherit()) { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_service_query(this, service, send_item_length, send_items, recv_item_length, recv_items, query_result); - return ret; } - FB_BOOLEAN trace_service_detach(ITraceServiceConnection* service, unsigned detach_result) + ~ITraceBLRStatement() { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_service_detach(this, service, detach_result); - return ret; } - FB_BOOLEAN trace_event_error(ITraceConnection* connection, ITraceStatusVector* status, const char* function) + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_BLRSTATEMENT_VERSION; + + const unsigned char* getData() { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_event_error(this, connection, status, function); + const unsigned char* ret = static_cast(this->cloopVTable)->getData(this); return ret; } - FB_BOOLEAN trace_event_sweep(ITraceDatabaseConnection* connection, ITraceSweepInfo* sweep, unsigned sweep_state) + unsigned getDataLength() { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_event_sweep(this, connection, sweep, sweep_state); + unsigned ret = static_cast(this->cloopVTable)->getDataLength(this); return ret; } - FB_BOOLEAN trace_func_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceFunction* function, FB_BOOLEAN started, unsigned func_result) + const char* getText() { - FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_func_execute(this, connection, transaction, function, started, func_result); + const char* ret = static_cast(this->cloopVTable)->getText(this); return ret; } }; - class ITraceFactory : public IPluginBase +#define FIREBIRD_ITRACE_DYNREQUEST_VERSION 2u + + class ITraceDYNRequest : public IVersioned { public: - struct VTable : public IPluginBase::VTable + struct VTable : public IVersioned::VTable { - ISC_UINT64 (CLOOP_CARG *trace_needs)(ITraceFactory* self) throw(); - ITracePlugin* (CLOOP_CARG *trace_create)(ITraceFactory* self, IStatus* status, ITraceInitInfo* init_info) throw(); + const unsigned char* (CLOOP_CARG *getData)(ITraceDYNRequest* self) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getDataLength)(ITraceDYNRequest* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getText)(ITraceDYNRequest* self) CLOOP_NOEXCEPT; }; protected: - ITraceFactory(DoNotInherit) - : IPluginBase(DoNotInherit()) + ITraceDYNRequest(DoNotInherit) + : IVersioned(DoNotInherit()) { } - ~ITraceFactory() + ~ITraceDYNRequest() { } public: - static const unsigned VERSION = 4; - - static const unsigned TRACE_EVENT_ATTACH = 0; - static const unsigned TRACE_EVENT_DETACH = 1; - static const unsigned TRACE_EVENT_TRANSACTION_START = 2; - static const unsigned TRACE_EVENT_TRANSACTION_END = 3; - static const unsigned TRACE_EVENT_SET_CONTEXT = 4; - static const unsigned TRACE_EVENT_PROC_EXECUTE = 5; - static const unsigned TRACE_EVENT_TRIGGER_EXECUTE = 6; - static const unsigned TRACE_EVENT_DSQL_PREPARE = 7; - static const unsigned TRACE_EVENT_DSQL_FREE = 8; - static const unsigned TRACE_EVENT_DSQL_EXECUTE = 9; - static const unsigned TRACE_EVENT_BLR_COMPILE = 10; - static const unsigned TRACE_EVENT_BLR_EXECUTE = 11; - static const unsigned TRACE_EVENT_DYN_EXECUTE = 12; - static const unsigned TRACE_EVENT_SERVICE_ATTACH = 13; - static const unsigned TRACE_EVENT_SERVICE_START = 14; - static const unsigned TRACE_EVENT_SERVICE_QUERY = 15; - static const unsigned TRACE_EVENT_SERVICE_DETACH = 16; - static const unsigned TRACE_EVENT_ERROR = 17; - static const unsigned TRACE_EVENT_SWEEP = 18; - static const unsigned TRACE_EVENT_FUNC_EXECUTE = 19; - static const unsigned TRACE_EVENT_MAX = 20; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_DYNREQUEST_VERSION; - ISC_UINT64 trace_needs() + const unsigned char* getData() { - ISC_UINT64 ret = static_cast(this->cloopVTable)->trace_needs(this); + const unsigned char* ret = static_cast(this->cloopVTable)->getData(this); return ret; } - template ITracePlugin* trace_create(StatusType* status, ITraceInitInfo* init_info) + unsigned getDataLength() { - StatusType::clearException(status); - ITracePlugin* ret = static_cast(this->cloopVTable)->trace_create(this, status, init_info); - StatusType::checkException(status); + unsigned ret = static_cast(this->cloopVTable)->getDataLength(this); + return ret; + } + + const char* getText() + { + const char* ret = static_cast(this->cloopVTable)->getText(this); return ret; } }; - class IUdrFunctionFactory : public IDisposable +#define FIREBIRD_ITRACE_CONTEXT_VARIABLE_VERSION 2u + + class ITraceContextVariable : public IVersioned { public: - struct VTable : public IDisposable::VTable + struct VTable : public IVersioned::VTable { - void (CLOOP_CARG *setup)(IUdrFunctionFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw(); - IExternalFunction* (CLOOP_CARG *newItem)(IUdrFunctionFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) throw(); + const char* (CLOOP_CARG *getNameSpace)(ITraceContextVariable* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getVarName)(ITraceContextVariable* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getVarValue)(ITraceContextVariable* self) CLOOP_NOEXCEPT; }; protected: - IUdrFunctionFactory(DoNotInherit) - : IDisposable(DoNotInherit()) + ITraceContextVariable(DoNotInherit) + : IVersioned(DoNotInherit()) { } - ~IUdrFunctionFactory() + ~ITraceContextVariable() { } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_CONTEXT_VARIABLE_VERSION; - template void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) + const char* getNameSpace() { - StatusType::clearException(status); - static_cast(this->cloopVTable)->setup(this, status, context, metadata, inBuilder, outBuilder); - StatusType::checkException(status); + const char* ret = static_cast(this->cloopVTable)->getNameSpace(this); + return ret; } - template IExternalFunction* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) + const char* getVarName() { - StatusType::clearException(status); - IExternalFunction* ret = static_cast(this->cloopVTable)->newItem(this, status, context, metadata); - StatusType::checkException(status); + const char* ret = static_cast(this->cloopVTable)->getVarName(this); + return ret; + } + + const char* getVarValue() + { + const char* ret = static_cast(this->cloopVTable)->getVarValue(this); return ret; } }; - class IUdrProcedureFactory : public IDisposable +#define FIREBIRD_ITRACE_PROCEDURE_VERSION 3u + + class ITraceProcedure : public IVersioned { public: - struct VTable : public IDisposable::VTable + struct VTable : public IVersioned::VTable { - void (CLOOP_CARG *setup)(IUdrProcedureFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw(); - IExternalProcedure* (CLOOP_CARG *newItem)(IUdrProcedureFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) throw(); + const char* (CLOOP_CARG *getProcName)(ITraceProcedure* self) CLOOP_NOEXCEPT; + ITraceParams* (CLOOP_CARG *getInputs)(ITraceProcedure* self) CLOOP_NOEXCEPT; + PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceProcedure* self) CLOOP_NOEXCEPT; + ISC_INT64 (CLOOP_CARG *getStmtID)(ITraceProcedure* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getPlan)(ITraceProcedure* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getExplainedPlan)(ITraceProcedure* self) CLOOP_NOEXCEPT; }; protected: - IUdrProcedureFactory(DoNotInherit) - : IDisposable(DoNotInherit()) + ITraceProcedure(DoNotInherit) + : IVersioned(DoNotInherit()) { } - ~IUdrProcedureFactory() + ~ITraceProcedure() { } public: - static const unsigned VERSION = 3; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_PROCEDURE_VERSION; - template void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) + const char* getProcName() { - StatusType::clearException(status); - static_cast(this->cloopVTable)->setup(this, status, context, metadata, inBuilder, outBuilder); - StatusType::checkException(status); + const char* ret = static_cast(this->cloopVTable)->getProcName(this); + return ret; } - template IExternalProcedure* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) + ITraceParams* getInputs() { - StatusType::clearException(status); - IExternalProcedure* ret = static_cast(this->cloopVTable)->newItem(this, status, context, metadata); - StatusType::checkException(status); + ITraceParams* ret = static_cast(this->cloopVTable)->getInputs(this); return ret; } - }; - - class IUdrTriggerFactory : public IDisposable - { - public: - struct VTable : public IDisposable::VTable - { - void (CLOOP_CARG *setup)(IUdrTriggerFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) throw(); - IExternalTrigger* (CLOOP_CARG *newItem)(IUdrTriggerFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) throw(); - }; - protected: - IUdrTriggerFactory(DoNotInherit) - : IDisposable(DoNotInherit()) + PerformanceInfo* getPerf() { + PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); + return ret; } - ~IUdrTriggerFactory() + ISC_INT64 getStmtID() { + if (cloopVTable->version < 3) + { + return 0; + } + ISC_INT64 ret = static_cast(this->cloopVTable)->getStmtID(this); + return ret; } - public: - static const unsigned VERSION = 3; - - template void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) + const char* getPlan() { - StatusType::clearException(status); - static_cast(this->cloopVTable)->setup(this, status, context, metadata, fieldsBuilder); - StatusType::checkException(status); + if (cloopVTable->version < 3) + { + return 0; + } + const char* ret = static_cast(this->cloopVTable)->getPlan(this); + return ret; } - template IExternalTrigger* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) + const char* getExplainedPlan() { - StatusType::clearException(status); - IExternalTrigger* ret = static_cast(this->cloopVTable)->newItem(this, status, context, metadata); - StatusType::checkException(status); + if (cloopVTable->version < 3) + { + return 0; + } + const char* ret = static_cast(this->cloopVTable)->getExplainedPlan(this); return ret; } }; - class IUdrPlugin : public IVersioned +#define FIREBIRD_ITRACE_FUNCTION_VERSION 3u + + class ITraceFunction : public IVersioned { public: struct VTable : public IVersioned::VTable { - IMaster* (CLOOP_CARG *getMaster)(IUdrPlugin* self) throw(); - void (CLOOP_CARG *registerFunction)(IUdrPlugin* self, IStatus* status, const char* name, IUdrFunctionFactory* factory) throw(); - void (CLOOP_CARG *registerProcedure)(IUdrPlugin* self, IStatus* status, const char* name, IUdrProcedureFactory* factory) throw(); - void (CLOOP_CARG *registerTrigger)(IUdrPlugin* self, IStatus* status, const char* name, IUdrTriggerFactory* factory) throw(); + const char* (CLOOP_CARG *getFuncName)(ITraceFunction* self) CLOOP_NOEXCEPT; + ITraceParams* (CLOOP_CARG *getInputs)(ITraceFunction* self) CLOOP_NOEXCEPT; + ITraceParams* (CLOOP_CARG *getResult)(ITraceFunction* self) CLOOP_NOEXCEPT; + PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceFunction* self) CLOOP_NOEXCEPT; + ISC_INT64 (CLOOP_CARG *getStmtID)(ITraceFunction* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getPlan)(ITraceFunction* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getExplainedPlan)(ITraceFunction* self) CLOOP_NOEXCEPT; }; protected: - IUdrPlugin(DoNotInherit) + ITraceFunction(DoNotInherit) : IVersioned(DoNotInherit()) { } - ~IUdrPlugin() + ~ITraceFunction() { } public: - static const unsigned VERSION = 2; + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_FUNCTION_VERSION; - IMaster* getMaster() + const char* getFuncName() { - IMaster* ret = static_cast(this->cloopVTable)->getMaster(this); + const char* ret = static_cast(this->cloopVTable)->getFuncName(this); return ret; } - template void registerFunction(StatusType* status, const char* name, IUdrFunctionFactory* factory) + ITraceParams* getInputs() { - StatusType::clearException(status); - static_cast(this->cloopVTable)->registerFunction(this, status, name, factory); - StatusType::checkException(status); + ITraceParams* ret = static_cast(this->cloopVTable)->getInputs(this); + return ret; } - template void registerProcedure(StatusType* status, const char* name, IUdrProcedureFactory* factory) + ITraceParams* getResult() + { + ITraceParams* ret = static_cast(this->cloopVTable)->getResult(this); + return ret; + } + + PerformanceInfo* getPerf() + { + PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); + return ret; + } + + ISC_INT64 getStmtID() + { + if (cloopVTable->version < 3) + { + return 0; + } + ISC_INT64 ret = static_cast(this->cloopVTable)->getStmtID(this); + return ret; + } + + const char* getPlan() + { + if (cloopVTable->version < 3) + { + return 0; + } + const char* ret = static_cast(this->cloopVTable)->getPlan(this); + return ret; + } + + const char* getExplainedPlan() + { + if (cloopVTable->version < 3) + { + return 0; + } + const char* ret = static_cast(this->cloopVTable)->getExplainedPlan(this); + return ret; + } + }; + +#define FIREBIRD_ITRACE_TRIGGER_VERSION 3u + + class ITraceTrigger : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const char* (CLOOP_CARG *getTriggerName)(ITraceTrigger* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getRelationName)(ITraceTrigger* self) CLOOP_NOEXCEPT; + int (CLOOP_CARG *getAction)(ITraceTrigger* self) CLOOP_NOEXCEPT; + int (CLOOP_CARG *getWhich)(ITraceTrigger* self) CLOOP_NOEXCEPT; + PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceTrigger* self) CLOOP_NOEXCEPT; + ISC_INT64 (CLOOP_CARG *getStmtID)(ITraceTrigger* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getPlan)(ITraceTrigger* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getExplainedPlan)(ITraceTrigger* self) CLOOP_NOEXCEPT; + }; + + protected: + ITraceTrigger(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceTrigger() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_TRIGGER_VERSION; + + static CLOOP_CONSTEXPR unsigned TYPE_ALL = 0; + static CLOOP_CONSTEXPR unsigned TYPE_BEFORE = 1; + static CLOOP_CONSTEXPR unsigned TYPE_AFTER = 2; + + const char* getTriggerName() + { + const char* ret = static_cast(this->cloopVTable)->getTriggerName(this); + return ret; + } + + const char* getRelationName() + { + const char* ret = static_cast(this->cloopVTable)->getRelationName(this); + return ret; + } + + int getAction() + { + int ret = static_cast(this->cloopVTable)->getAction(this); + return ret; + } + + int getWhich() + { + int ret = static_cast(this->cloopVTable)->getWhich(this); + return ret; + } + + PerformanceInfo* getPerf() + { + PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); + return ret; + } + + ISC_INT64 getStmtID() + { + if (cloopVTable->version < 3) + { + return 0; + } + ISC_INT64 ret = static_cast(this->cloopVTable)->getStmtID(this); + return ret; + } + + const char* getPlan() + { + if (cloopVTable->version < 3) + { + return 0; + } + const char* ret = static_cast(this->cloopVTable)->getPlan(this); + return ret; + } + + const char* getExplainedPlan() + { + if (cloopVTable->version < 3) + { + return 0; + } + const char* ret = static_cast(this->cloopVTable)->getExplainedPlan(this); + return ret; + } + }; + +#define FIREBIRD_ITRACE_SERVICE_CONNECTION_VERSION 3u + + class ITraceServiceConnection : public ITraceConnection + { + public: + struct VTable : public ITraceConnection::VTable + { + void* (CLOOP_CARG *getServiceID)(ITraceServiceConnection* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getServiceMgr)(ITraceServiceConnection* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getServiceName)(ITraceServiceConnection* self) CLOOP_NOEXCEPT; + }; + + protected: + ITraceServiceConnection(DoNotInherit) + : ITraceConnection(DoNotInherit()) + { + } + + ~ITraceServiceConnection() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_SERVICE_CONNECTION_VERSION; + + void* getServiceID() + { + void* ret = static_cast(this->cloopVTable)->getServiceID(this); + return ret; + } + + const char* getServiceMgr() + { + const char* ret = static_cast(this->cloopVTable)->getServiceMgr(this); + return ret; + } + + const char* getServiceName() + { + const char* ret = static_cast(this->cloopVTable)->getServiceName(this); + return ret; + } + }; + +#define FIREBIRD_ITRACE_STATUS_VECTOR_VERSION 2u + + class ITraceStatusVector : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + FB_BOOLEAN (CLOOP_CARG *hasError)(ITraceStatusVector* self) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *hasWarning)(ITraceStatusVector* self) CLOOP_NOEXCEPT; + IStatus* (CLOOP_CARG *getStatus)(ITraceStatusVector* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getText)(ITraceStatusVector* self) CLOOP_NOEXCEPT; + }; + + protected: + ITraceStatusVector(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceStatusVector() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_STATUS_VECTOR_VERSION; + + FB_BOOLEAN hasError() + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->hasError(this); + return ret; + } + + FB_BOOLEAN hasWarning() + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->hasWarning(this); + return ret; + } + + IStatus* getStatus() + { + IStatus* ret = static_cast(this->cloopVTable)->getStatus(this); + return ret; + } + + const char* getText() + { + const char* ret = static_cast(this->cloopVTable)->getText(this); + return ret; + } + }; + +#define FIREBIRD_ITRACE_SWEEP_INFO_VERSION 2u + + class ITraceSweepInfo : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + ISC_INT64 (CLOOP_CARG *getOIT)(ITraceSweepInfo* self) CLOOP_NOEXCEPT; + ISC_INT64 (CLOOP_CARG *getOST)(ITraceSweepInfo* self) CLOOP_NOEXCEPT; + ISC_INT64 (CLOOP_CARG *getOAT)(ITraceSweepInfo* self) CLOOP_NOEXCEPT; + ISC_INT64 (CLOOP_CARG *getNext)(ITraceSweepInfo* self) CLOOP_NOEXCEPT; + PerformanceInfo* (CLOOP_CARG *getPerf)(ITraceSweepInfo* self) CLOOP_NOEXCEPT; + }; + + protected: + ITraceSweepInfo(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceSweepInfo() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_SWEEP_INFO_VERSION; + + ISC_INT64 getOIT() + { + ISC_INT64 ret = static_cast(this->cloopVTable)->getOIT(this); + return ret; + } + + ISC_INT64 getOST() + { + ISC_INT64 ret = static_cast(this->cloopVTable)->getOST(this); + return ret; + } + + ISC_INT64 getOAT() + { + ISC_INT64 ret = static_cast(this->cloopVTable)->getOAT(this); + return ret; + } + + ISC_INT64 getNext() + { + ISC_INT64 ret = static_cast(this->cloopVTable)->getNext(this); + return ret; + } + + PerformanceInfo* getPerf() + { + PerformanceInfo* ret = static_cast(this->cloopVTable)->getPerf(this); + return ret; + } + }; + +#define FIREBIRD_ITRACE_LOG_WRITER_VERSION 4u + + class ITraceLogWriter : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + unsigned (CLOOP_CARG *write)(ITraceLogWriter* self, const void* buf, unsigned size) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *write_s)(ITraceLogWriter* self, IStatus* status, const void* buf, unsigned size) CLOOP_NOEXCEPT; + }; + + protected: + ITraceLogWriter(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~ITraceLogWriter() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_LOG_WRITER_VERSION; + + unsigned write(const void* buf, unsigned size) + { + unsigned ret = static_cast(this->cloopVTable)->write(this, buf, size); + return ret; + } + + template unsigned write_s(StatusType* status, const void* buf, unsigned size) + { + if (cloopVTable->version < 4) + { + StatusType::setVersionError(status, "ITraceLogWriter", cloopVTable->version, 4); + StatusType::checkException(status); + return 0; + } + StatusType::clearException(status); + unsigned ret = static_cast(this->cloopVTable)->write_s(this, status, buf, size); + StatusType::checkException(status); + return ret; + } + }; + +#define FIREBIRD_ITRACE_INIT_INFO_VERSION 2u + + class ITraceInitInfo : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const char* (CLOOP_CARG *getConfigText)(ITraceInitInfo* self) CLOOP_NOEXCEPT; + int (CLOOP_CARG *getTraceSessionID)(ITraceInitInfo* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getTraceSessionName)(ITraceInitInfo* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getFirebirdRootDirectory)(ITraceInitInfo* self) CLOOP_NOEXCEPT; + const char* (CLOOP_CARG *getDatabaseName)(ITraceInitInfo* self) CLOOP_NOEXCEPT; + ITraceDatabaseConnection* (CLOOP_CARG *getConnection)(ITraceInitInfo* self) CLOOP_NOEXCEPT; + ITraceLogWriter* (CLOOP_CARG *getLogWriter)(ITraceInitInfo* self) CLOOP_NOEXCEPT; + }; + + protected: + ITraceInitInfo(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~ITraceInitInfo() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_INIT_INFO_VERSION; + + const char* getConfigText() + { + const char* ret = static_cast(this->cloopVTable)->getConfigText(this); + return ret; + } + + int getTraceSessionID() + { + int ret = static_cast(this->cloopVTable)->getTraceSessionID(this); + return ret; + } + + const char* getTraceSessionName() + { + const char* ret = static_cast(this->cloopVTable)->getTraceSessionName(this); + return ret; + } + + const char* getFirebirdRootDirectory() + { + const char* ret = static_cast(this->cloopVTable)->getFirebirdRootDirectory(this); + return ret; + } + + const char* getDatabaseName() + { + const char* ret = static_cast(this->cloopVTable)->getDatabaseName(this); + return ret; + } + + ITraceDatabaseConnection* getConnection() + { + ITraceDatabaseConnection* ret = static_cast(this->cloopVTable)->getConnection(this); + return ret; + } + + ITraceLogWriter* getLogWriter() + { + ITraceLogWriter* ret = static_cast(this->cloopVTable)->getLogWriter(this); + return ret; + } + }; + +#define FIREBIRD_ITRACE_PLUGIN_VERSION 5u + + class ITracePlugin : public IReferenceCounted + { + public: + struct VTable : public IReferenceCounted::VTable + { + const char* (CLOOP_CARG *trace_get_error)(ITracePlugin* self) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_attach)(ITracePlugin* self, ITraceDatabaseConnection* connection, FB_BOOLEAN create_db, unsigned att_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_detach)(ITracePlugin* self, ITraceDatabaseConnection* connection, FB_BOOLEAN drop_db) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_transaction_start)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, unsigned tpb_length, const unsigned char* tpb, unsigned tra_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_transaction_end)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, FB_BOOLEAN commit, FB_BOOLEAN retain_context, unsigned tra_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_proc_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceProcedure* procedure, FB_BOOLEAN started, unsigned proc_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_trigger_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceTrigger* trigger, FB_BOOLEAN started, unsigned trig_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_set_context)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceContextVariable* variable) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_dsql_prepare)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, ISC_INT64 time_millis, unsigned req_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_dsql_free)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceSQLStatement* statement, unsigned option) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_dsql_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, FB_BOOLEAN started, unsigned req_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_blr_compile)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, ISC_INT64 time_millis, unsigned req_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_blr_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, unsigned req_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_dyn_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceDYNRequest* request, ISC_INT64 time_millis, unsigned req_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_service_attach)(ITracePlugin* self, ITraceServiceConnection* service, unsigned att_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_service_start)(ITracePlugin* self, ITraceServiceConnection* service, unsigned switches_length, const char* switches, unsigned start_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_service_query)(ITracePlugin* self, ITraceServiceConnection* service, unsigned send_item_length, const unsigned char* send_items, unsigned recv_item_length, const unsigned char* recv_items, unsigned query_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_service_detach)(ITracePlugin* self, ITraceServiceConnection* service, unsigned detach_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_event_error)(ITracePlugin* self, ITraceConnection* connection, ITraceStatusVector* status, const char* function) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_event_sweep)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceSweepInfo* sweep, unsigned sweep_state) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_func_execute)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceFunction* function, FB_BOOLEAN started, unsigned func_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_dsql_restart)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, unsigned number) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_proc_compile)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceProcedure* procedure, ISC_INT64 time_millis, unsigned proc_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_func_compile)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceFunction* function, ISC_INT64 time_millis, unsigned func_result) CLOOP_NOEXCEPT; + FB_BOOLEAN (CLOOP_CARG *trace_trigger_compile)(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTrigger* trigger, ISC_INT64 time_millis, unsigned trig_result) CLOOP_NOEXCEPT; + }; + + protected: + ITracePlugin(DoNotInherit) + : IReferenceCounted(DoNotInherit()) + { + } + + ~ITracePlugin() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_PLUGIN_VERSION; + + static CLOOP_CONSTEXPR unsigned RESULT_SUCCESS = 0; + static CLOOP_CONSTEXPR unsigned RESULT_FAILED = 1; + static CLOOP_CONSTEXPR unsigned RESULT_UNAUTHORIZED = 2; + static CLOOP_CONSTEXPR unsigned SWEEP_STATE_STARTED = 1; + static CLOOP_CONSTEXPR unsigned SWEEP_STATE_FINISHED = 2; + static CLOOP_CONSTEXPR unsigned SWEEP_STATE_FAILED = 3; + static CLOOP_CONSTEXPR unsigned SWEEP_STATE_PROGRESS = 4; + + const char* trace_get_error() + { + const char* ret = static_cast(this->cloopVTable)->trace_get_error(this); + return ret; + } + + FB_BOOLEAN trace_attach(ITraceDatabaseConnection* connection, FB_BOOLEAN create_db, unsigned att_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_attach(this, connection, create_db, att_result); + return ret; + } + + FB_BOOLEAN trace_detach(ITraceDatabaseConnection* connection, FB_BOOLEAN drop_db) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_detach(this, connection, drop_db); + return ret; + } + + FB_BOOLEAN trace_transaction_start(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, unsigned tpb_length, const unsigned char* tpb, unsigned tra_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_transaction_start(this, connection, transaction, tpb_length, tpb, tra_result); + return ret; + } + + FB_BOOLEAN trace_transaction_end(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, FB_BOOLEAN commit, FB_BOOLEAN retain_context, unsigned tra_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_transaction_end(this, connection, transaction, commit, retain_context, tra_result); + return ret; + } + + FB_BOOLEAN trace_proc_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceProcedure* procedure, FB_BOOLEAN started, unsigned proc_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_proc_execute(this, connection, transaction, procedure, started, proc_result); + return ret; + } + + FB_BOOLEAN trace_trigger_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceTrigger* trigger, FB_BOOLEAN started, unsigned trig_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_trigger_execute(this, connection, transaction, trigger, started, trig_result); + return ret; + } + + FB_BOOLEAN trace_set_context(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceContextVariable* variable) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_set_context(this, connection, transaction, variable); + return ret; + } + + FB_BOOLEAN trace_dsql_prepare(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, ISC_INT64 time_millis, unsigned req_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_dsql_prepare(this, connection, transaction, statement, time_millis, req_result); + return ret; + } + + FB_BOOLEAN trace_dsql_free(ITraceDatabaseConnection* connection, ITraceSQLStatement* statement, unsigned option) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_dsql_free(this, connection, statement, option); + return ret; + } + + FB_BOOLEAN trace_dsql_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, FB_BOOLEAN started, unsigned req_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_dsql_execute(this, connection, transaction, statement, started, req_result); + return ret; + } + + FB_BOOLEAN trace_blr_compile(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, ISC_INT64 time_millis, unsigned req_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_blr_compile(this, connection, transaction, statement, time_millis, req_result); + return ret; + } + + FB_BOOLEAN trace_blr_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, unsigned req_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_blr_execute(this, connection, transaction, statement, req_result); + return ret; + } + + FB_BOOLEAN trace_dyn_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceDYNRequest* request, ISC_INT64 time_millis, unsigned req_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_dyn_execute(this, connection, transaction, request, time_millis, req_result); + return ret; + } + + FB_BOOLEAN trace_service_attach(ITraceServiceConnection* service, unsigned att_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_service_attach(this, service, att_result); + return ret; + } + + FB_BOOLEAN trace_service_start(ITraceServiceConnection* service, unsigned switches_length, const char* switches, unsigned start_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_service_start(this, service, switches_length, switches, start_result); + return ret; + } + + FB_BOOLEAN trace_service_query(ITraceServiceConnection* service, unsigned send_item_length, const unsigned char* send_items, unsigned recv_item_length, const unsigned char* recv_items, unsigned query_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_service_query(this, service, send_item_length, send_items, recv_item_length, recv_items, query_result); + return ret; + } + + FB_BOOLEAN trace_service_detach(ITraceServiceConnection* service, unsigned detach_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_service_detach(this, service, detach_result); + return ret; + } + + FB_BOOLEAN trace_event_error(ITraceConnection* connection, ITraceStatusVector* status, const char* function) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_event_error(this, connection, status, function); + return ret; + } + + FB_BOOLEAN trace_event_sweep(ITraceDatabaseConnection* connection, ITraceSweepInfo* sweep, unsigned sweep_state) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_event_sweep(this, connection, sweep, sweep_state); + return ret; + } + + FB_BOOLEAN trace_func_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceFunction* function, FB_BOOLEAN started, unsigned func_result) + { + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_func_execute(this, connection, transaction, function, started, func_result); + return ret; + } + + FB_BOOLEAN trace_dsql_restart(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, unsigned number) + { + if (cloopVTable->version < 4) + { + return true; + } + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_dsql_restart(this, connection, transaction, statement, number); + return ret; + } + + FB_BOOLEAN trace_proc_compile(ITraceDatabaseConnection* connection, ITraceProcedure* procedure, ISC_INT64 time_millis, unsigned proc_result) + { + if (cloopVTable->version < 5) + { + return true; + } + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_proc_compile(this, connection, procedure, time_millis, proc_result); + return ret; + } + + FB_BOOLEAN trace_func_compile(ITraceDatabaseConnection* connection, ITraceFunction* function, ISC_INT64 time_millis, unsigned func_result) + { + if (cloopVTable->version < 5) + { + return true; + } + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_func_compile(this, connection, function, time_millis, func_result); + return ret; + } + + FB_BOOLEAN trace_trigger_compile(ITraceDatabaseConnection* connection, ITraceTrigger* trigger, ISC_INT64 time_millis, unsigned trig_result) + { + if (cloopVTable->version < 5) + { + return true; + } + FB_BOOLEAN ret = static_cast(this->cloopVTable)->trace_trigger_compile(this, connection, trigger, time_millis, trig_result); + return ret; + } + }; + +#define FIREBIRD_ITRACE_FACTORY_VERSION 4u + + class ITraceFactory : public IPluginBase + { + public: + struct VTable : public IPluginBase::VTable + { + ISC_UINT64 (CLOOP_CARG *trace_needs)(ITraceFactory* self) CLOOP_NOEXCEPT; + ITracePlugin* (CLOOP_CARG *trace_create)(ITraceFactory* self, IStatus* status, ITraceInitInfo* init_info) CLOOP_NOEXCEPT; + }; + + protected: + ITraceFactory(DoNotInherit) + : IPluginBase(DoNotInherit()) + { + } + + ~ITraceFactory() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_ITRACE_FACTORY_VERSION; + + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_ATTACH = 0; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_DETACH = 1; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_TRANSACTION_START = 2; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_TRANSACTION_END = 3; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_SET_CONTEXT = 4; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_PROC_EXECUTE = 5; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_TRIGGER_EXECUTE = 6; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_DSQL_PREPARE = 7; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_DSQL_FREE = 8; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_DSQL_EXECUTE = 9; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_BLR_COMPILE = 10; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_BLR_EXECUTE = 11; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_DYN_EXECUTE = 12; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_SERVICE_ATTACH = 13; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_SERVICE_START = 14; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_SERVICE_QUERY = 15; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_SERVICE_DETACH = 16; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_ERROR = 17; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_SWEEP = 18; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_FUNC_EXECUTE = 19; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_PROC_COMPILE = 20; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_FUNC_COMPILE = 21; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_TRIGGER_COMPILE = 22; + static CLOOP_CONSTEXPR unsigned TRACE_EVENT_MAX = 23; + + ISC_UINT64 trace_needs() + { + ISC_UINT64 ret = static_cast(this->cloopVTable)->trace_needs(this); + return ret; + } + + template ITracePlugin* trace_create(StatusType* status, ITraceInitInfo* init_info) + { + StatusType::clearException(status); + ITracePlugin* ret = static_cast(this->cloopVTable)->trace_create(this, status, init_info); + StatusType::checkException(status); + return ret; + } + }; + +#define FIREBIRD_IUDR_FUNCTION_FACTORY_VERSION 3u + + class IUdrFunctionFactory : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + void (CLOOP_CARG *setup)(IUdrFunctionFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) CLOOP_NOEXCEPT; + IExternalFunction* (CLOOP_CARG *newItem)(IUdrFunctionFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) CLOOP_NOEXCEPT; + }; + + protected: + IUdrFunctionFactory(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IUdrFunctionFactory() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IUDR_FUNCTION_FACTORY_VERSION; + + template void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setup(this, status, context, metadata, inBuilder, outBuilder); + StatusType::checkException(status); + } + + template IExternalFunction* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) + { + StatusType::clearException(status); + IExternalFunction* ret = static_cast(this->cloopVTable)->newItem(this, status, context, metadata); + StatusType::checkException(status); + return ret; + } + }; + +#define FIREBIRD_IUDR_PROCEDURE_FACTORY_VERSION 3u + + class IUdrProcedureFactory : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + void (CLOOP_CARG *setup)(IUdrProcedureFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) CLOOP_NOEXCEPT; + IExternalProcedure* (CLOOP_CARG *newItem)(IUdrProcedureFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) CLOOP_NOEXCEPT; + }; + + protected: + IUdrProcedureFactory(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IUdrProcedureFactory() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IUDR_PROCEDURE_FACTORY_VERSION; + + template void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setup(this, status, context, metadata, inBuilder, outBuilder); + StatusType::checkException(status); + } + + template IExternalProcedure* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) + { + StatusType::clearException(status); + IExternalProcedure* ret = static_cast(this->cloopVTable)->newItem(this, status, context, metadata); + StatusType::checkException(status); + return ret; + } + }; + +#define FIREBIRD_IUDR_TRIGGER_FACTORY_VERSION 3u + + class IUdrTriggerFactory : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + void (CLOOP_CARG *setup)(IUdrTriggerFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) CLOOP_NOEXCEPT; + IExternalTrigger* (CLOOP_CARG *newItem)(IUdrTriggerFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) CLOOP_NOEXCEPT; + }; + + protected: + IUdrTriggerFactory(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IUdrTriggerFactory() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IUDR_TRIGGER_FACTORY_VERSION; + + template void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setup(this, status, context, metadata, fieldsBuilder); + StatusType::checkException(status); + } + + template IExternalTrigger* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) + { + StatusType::clearException(status); + IExternalTrigger* ret = static_cast(this->cloopVTable)->newItem(this, status, context, metadata); + StatusType::checkException(status); + return ret; + } + }; + +#define FIREBIRD_IUDR_PLUGIN_VERSION 2u + + class IUdrPlugin : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + IMaster* (CLOOP_CARG *getMaster)(IUdrPlugin* self) CLOOP_NOEXCEPT; + void (CLOOP_CARG *registerFunction)(IUdrPlugin* self, IStatus* status, const char* name, IUdrFunctionFactory* factory) CLOOP_NOEXCEPT; + void (CLOOP_CARG *registerProcedure)(IUdrPlugin* self, IStatus* status, const char* name, IUdrProcedureFactory* factory) CLOOP_NOEXCEPT; + void (CLOOP_CARG *registerTrigger)(IUdrPlugin* self, IStatus* status, const char* name, IUdrTriggerFactory* factory) CLOOP_NOEXCEPT; + }; + + protected: + IUdrPlugin(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IUdrPlugin() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IUDR_PLUGIN_VERSION; + + IMaster* getMaster() + { + IMaster* ret = static_cast(this->cloopVTable)->getMaster(this); + return ret; + } + + template void registerFunction(StatusType* status, const char* name, IUdrFunctionFactory* factory) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->registerFunction(this, status, name, factory); + StatusType::checkException(status); + } + + template void registerProcedure(StatusType* status, const char* name, IUdrProcedureFactory* factory) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->registerProcedure(this, status, name, factory); + StatusType::checkException(status); + } + + template void registerTrigger(StatusType* status, const char* name, IUdrTriggerFactory* factory) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->registerTrigger(this, status, name, factory); + StatusType::checkException(status); + } + }; + +#define FIREBIRD_IDEC_FLOAT16_VERSION 2u + + class IDecFloat16 : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *toBcd)(IDecFloat16* self, const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp) CLOOP_NOEXCEPT; + void (CLOOP_CARG *toString)(IDecFloat16* self, IStatus* status, const FB_DEC16* from, unsigned bufferLength, char* buffer) CLOOP_NOEXCEPT; + void (CLOOP_CARG *fromBcd)(IDecFloat16* self, int sign, const unsigned char* bcd, int exp, FB_DEC16* to) CLOOP_NOEXCEPT; + void (CLOOP_CARG *fromString)(IDecFloat16* self, IStatus* status, const char* from, FB_DEC16* to) CLOOP_NOEXCEPT; + }; + + protected: + IDecFloat16(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IDecFloat16() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IDEC_FLOAT16_VERSION; + + static CLOOP_CONSTEXPR unsigned BCD_SIZE = 16; + static CLOOP_CONSTEXPR unsigned STRING_SIZE = 24; + + void toBcd(const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp) + { + static_cast(this->cloopVTable)->toBcd(this, from, sign, bcd, exp); + } + + template void toString(StatusType* status, const FB_DEC16* from, unsigned bufferLength, char* buffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->toString(this, status, from, bufferLength, buffer); + StatusType::checkException(status); + } + + void fromBcd(int sign, const unsigned char* bcd, int exp, FB_DEC16* to) + { + static_cast(this->cloopVTable)->fromBcd(this, sign, bcd, exp, to); + } + + template void fromString(StatusType* status, const char* from, FB_DEC16* to) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->fromString(this, status, from, to); + StatusType::checkException(status); + } + }; + +#define FIREBIRD_IDEC_FLOAT34_VERSION 2u + + class IDecFloat34 : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *toBcd)(IDecFloat34* self, const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp) CLOOP_NOEXCEPT; + void (CLOOP_CARG *toString)(IDecFloat34* self, IStatus* status, const FB_DEC34* from, unsigned bufferLength, char* buffer) CLOOP_NOEXCEPT; + void (CLOOP_CARG *fromBcd)(IDecFloat34* self, int sign, const unsigned char* bcd, int exp, FB_DEC34* to) CLOOP_NOEXCEPT; + void (CLOOP_CARG *fromString)(IDecFloat34* self, IStatus* status, const char* from, FB_DEC34* to) CLOOP_NOEXCEPT; + }; + + protected: + IDecFloat34(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IDecFloat34() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IDEC_FLOAT34_VERSION; + + static CLOOP_CONSTEXPR unsigned BCD_SIZE = 34; + static CLOOP_CONSTEXPR unsigned STRING_SIZE = 43; + + void toBcd(const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp) + { + static_cast(this->cloopVTable)->toBcd(this, from, sign, bcd, exp); + } + + template void toString(StatusType* status, const FB_DEC34* from, unsigned bufferLength, char* buffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->toString(this, status, from, bufferLength, buffer); + StatusType::checkException(status); + } + + void fromBcd(int sign, const unsigned char* bcd, int exp, FB_DEC34* to) + { + static_cast(this->cloopVTable)->fromBcd(this, sign, bcd, exp, to); + } + + template void fromString(StatusType* status, const char* from, FB_DEC34* to) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->fromString(this, status, from, to); + StatusType::checkException(status); + } + }; + +#define FIREBIRD_IINT128_VERSION 2u + + class IInt128 : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + void (CLOOP_CARG *toString)(IInt128* self, IStatus* status, const FB_I128* from, int scale, unsigned bufferLength, char* buffer) CLOOP_NOEXCEPT; + void (CLOOP_CARG *fromString)(IInt128* self, IStatus* status, int scale, const char* from, FB_I128* to) CLOOP_NOEXCEPT; + }; + + protected: + IInt128(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IInt128() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IINT128_VERSION; + + static CLOOP_CONSTEXPR unsigned STRING_SIZE = 46; + + template void toString(StatusType* status, const FB_I128* from, int scale, unsigned bufferLength, char* buffer) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->toString(this, status, from, scale, bufferLength, buffer); + StatusType::checkException(status); + } + + template void fromString(StatusType* status, int scale, const char* from, FB_I128* to) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->fromString(this, status, scale, from, to); + StatusType::checkException(status); + } + }; + +#define FIREBIRD_IREPLICATED_FIELD_VERSION 2u + + class IReplicatedField : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + const char* (CLOOP_CARG *getName)(IReplicatedField* self) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getType)(IReplicatedField* self) CLOOP_NOEXCEPT; + int (CLOOP_CARG *getSubType)(IReplicatedField* self) CLOOP_NOEXCEPT; + int (CLOOP_CARG *getScale)(IReplicatedField* self) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getLength)(IReplicatedField* self) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getCharSet)(IReplicatedField* self) CLOOP_NOEXCEPT; + const void* (CLOOP_CARG *getData)(IReplicatedField* self) CLOOP_NOEXCEPT; + }; + + protected: + IReplicatedField(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IReplicatedField() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IREPLICATED_FIELD_VERSION; + + const char* getName() + { + const char* ret = static_cast(this->cloopVTable)->getName(this); + return ret; + } + + unsigned getType() + { + unsigned ret = static_cast(this->cloopVTable)->getType(this); + return ret; + } + + int getSubType() + { + int ret = static_cast(this->cloopVTable)->getSubType(this); + return ret; + } + + int getScale() + { + int ret = static_cast(this->cloopVTable)->getScale(this); + return ret; + } + + unsigned getLength() + { + unsigned ret = static_cast(this->cloopVTable)->getLength(this); + return ret; + } + + unsigned getCharSet() + { + unsigned ret = static_cast(this->cloopVTable)->getCharSet(this); + return ret; + } + + const void* getData() + { + const void* ret = static_cast(this->cloopVTable)->getData(this); + return ret; + } + }; + +#define FIREBIRD_IREPLICATED_RECORD_VERSION 2u + + class IReplicatedRecord : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + unsigned (CLOOP_CARG *getCount)(IReplicatedRecord* self) CLOOP_NOEXCEPT; + IReplicatedField* (CLOOP_CARG *getField)(IReplicatedRecord* self, unsigned index) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getRawLength)(IReplicatedRecord* self) CLOOP_NOEXCEPT; + const unsigned char* (CLOOP_CARG *getRawData)(IReplicatedRecord* self) CLOOP_NOEXCEPT; + }; + + protected: + IReplicatedRecord(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IReplicatedRecord() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IREPLICATED_RECORD_VERSION; + + unsigned getCount() + { + unsigned ret = static_cast(this->cloopVTable)->getCount(this); + return ret; + } + + IReplicatedField* getField(unsigned index) + { + IReplicatedField* ret = static_cast(this->cloopVTable)->getField(this, index); + return ret; + } + + unsigned getRawLength() + { + unsigned ret = static_cast(this->cloopVTable)->getRawLength(this); + return ret; + } + + const unsigned char* getRawData() + { + const unsigned char* ret = static_cast(this->cloopVTable)->getRawData(this); + return ret; + } + }; + +#define FIREBIRD_IREPLICATED_TRANSACTION_VERSION 3u + + class IReplicatedTransaction : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + void (CLOOP_CARG *prepare)(IReplicatedTransaction* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *commit)(IReplicatedTransaction* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *rollback)(IReplicatedTransaction* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *startSavepoint)(IReplicatedTransaction* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *releaseSavepoint)(IReplicatedTransaction* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *rollbackSavepoint)(IReplicatedTransaction* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *insertRecord)(IReplicatedTransaction* self, IStatus* status, const char* name, IReplicatedRecord* record) CLOOP_NOEXCEPT; + void (CLOOP_CARG *updateRecord)(IReplicatedTransaction* self, IStatus* status, const char* name, IReplicatedRecord* orgRecord, IReplicatedRecord* newRecord) CLOOP_NOEXCEPT; + void (CLOOP_CARG *deleteRecord)(IReplicatedTransaction* self, IStatus* status, const char* name, IReplicatedRecord* record) CLOOP_NOEXCEPT; + void (CLOOP_CARG *executeSql)(IReplicatedTransaction* self, IStatus* status, const char* sql) CLOOP_NOEXCEPT; + void (CLOOP_CARG *executeSqlIntl)(IReplicatedTransaction* self, IStatus* status, unsigned charset, const char* sql) CLOOP_NOEXCEPT; + }; + + protected: + IReplicatedTransaction(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IReplicatedTransaction() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IREPLICATED_TRANSACTION_VERSION; + + template void prepare(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->prepare(this, status); + StatusType::checkException(status); + } + + template void commit(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->commit(this, status); + StatusType::checkException(status); + } + + template void rollback(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->rollback(this, status); + StatusType::checkException(status); + } + + template void startSavepoint(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->startSavepoint(this, status); + StatusType::checkException(status); + } + + template void releaseSavepoint(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->releaseSavepoint(this, status); + StatusType::checkException(status); + } + + template void rollbackSavepoint(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->rollbackSavepoint(this, status); + StatusType::checkException(status); + } + + template void insertRecord(StatusType* status, const char* name, IReplicatedRecord* record) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->insertRecord(this, status, name, record); + StatusType::checkException(status); + } + + template void updateRecord(StatusType* status, const char* name, IReplicatedRecord* orgRecord, IReplicatedRecord* newRecord) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->updateRecord(this, status, name, orgRecord, newRecord); + StatusType::checkException(status); + } + + template void deleteRecord(StatusType* status, const char* name, IReplicatedRecord* record) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->deleteRecord(this, status, name, record); + StatusType::checkException(status); + } + + template void executeSql(StatusType* status, const char* sql) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->executeSql(this, status, sql); + StatusType::checkException(status); + } + + template void executeSqlIntl(StatusType* status, unsigned charset, const char* sql) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->executeSqlIntl(this, status, charset, sql); + StatusType::checkException(status); + } + }; + +#define FIREBIRD_IREPLICATED_SESSION_VERSION 4u + + class IReplicatedSession : public IPluginBase + { + public: + struct VTable : public IPluginBase::VTable + { + FB_BOOLEAN (CLOOP_CARG *init)(IReplicatedSession* self, IStatus* status, IAttachment* attachment) CLOOP_NOEXCEPT; + IReplicatedTransaction* (CLOOP_CARG *startTransaction)(IReplicatedSession* self, IStatus* status, ITransaction* transaction, ISC_INT64 number) CLOOP_NOEXCEPT; + void (CLOOP_CARG *cleanupTransaction)(IReplicatedSession* self, IStatus* status, ISC_INT64 number) CLOOP_NOEXCEPT; + void (CLOOP_CARG *setSequence)(IReplicatedSession* self, IStatus* status, const char* name, ISC_INT64 value) CLOOP_NOEXCEPT; + }; + + protected: + IReplicatedSession(DoNotInherit) + : IPluginBase(DoNotInherit()) + { + } + + ~IReplicatedSession() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IREPLICATED_SESSION_VERSION; + + template FB_BOOLEAN init(StatusType* status, IAttachment* attachment) + { + StatusType::clearException(status); + FB_BOOLEAN ret = static_cast(this->cloopVTable)->init(this, status, attachment); + StatusType::checkException(status); + return ret; + } + + template IReplicatedTransaction* startTransaction(StatusType* status, ITransaction* transaction, ISC_INT64 number) + { + StatusType::clearException(status); + IReplicatedTransaction* ret = static_cast(this->cloopVTable)->startTransaction(this, status, transaction, number); + StatusType::checkException(status); + return ret; + } + + template void cleanupTransaction(StatusType* status, ISC_INT64 number) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->cleanupTransaction(this, status, number); + StatusType::checkException(status); + } + + template void setSequence(StatusType* status, const char* name, ISC_INT64 value) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->setSequence(this, status, name, value); + StatusType::checkException(status); + } + }; + +#define FIREBIRD_IPROFILER_PLUGIN_VERSION 4u + + class IProfilerPlugin : public IPluginBase + { + public: + struct VTable : public IPluginBase::VTable + { + void (CLOOP_CARG *init)(IProfilerPlugin* self, IStatus* status, IAttachment* attachment, ISC_UINT64 ticksFrequency) CLOOP_NOEXCEPT; + IProfilerSession* (CLOOP_CARG *startSession)(IProfilerPlugin* self, IStatus* status, const char* description, const char* options, ISC_TIMESTAMP_TZ timestamp) CLOOP_NOEXCEPT; + void (CLOOP_CARG *flush)(IProfilerPlugin* self, IStatus* status) CLOOP_NOEXCEPT; + }; + + protected: + IProfilerPlugin(DoNotInherit) + : IPluginBase(DoNotInherit()) + { + } + + ~IProfilerPlugin() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IPROFILER_PLUGIN_VERSION; + + template void init(StatusType* status, IAttachment* attachment, ISC_UINT64 ticksFrequency) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->init(this, status, attachment, ticksFrequency); + StatusType::checkException(status); + } + + template IProfilerSession* startSession(StatusType* status, const char* description, const char* options, ISC_TIMESTAMP_TZ timestamp) + { + StatusType::clearException(status); + IProfilerSession* ret = static_cast(this->cloopVTable)->startSession(this, status, description, options, timestamp); + StatusType::checkException(status); + return ret; + } + + template void flush(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->flush(this, status); + StatusType::checkException(status); + } + }; + +#define FIREBIRD_IPROFILER_SESSION_VERSION 3u + + class IProfilerSession : public IDisposable + { + public: + struct VTable : public IDisposable::VTable + { + ISC_INT64 (CLOOP_CARG *getId)(IProfilerSession* self) CLOOP_NOEXCEPT; + unsigned (CLOOP_CARG *getFlags)(IProfilerSession* self) CLOOP_NOEXCEPT; + void (CLOOP_CARG *cancel)(IProfilerSession* self, IStatus* status) CLOOP_NOEXCEPT; + void (CLOOP_CARG *finish)(IProfilerSession* self, IStatus* status, ISC_TIMESTAMP_TZ timestamp) CLOOP_NOEXCEPT; + void (CLOOP_CARG *defineStatement)(IProfilerSession* self, IStatus* status, ISC_INT64 statementId, ISC_INT64 parentStatementId, const char* type, const char* packageName, const char* routineName, const char* sqlText) CLOOP_NOEXCEPT; + void (CLOOP_CARG *defineCursor)(IProfilerSession* self, ISC_INT64 statementId, unsigned cursorId, const char* name, unsigned line, unsigned column) CLOOP_NOEXCEPT; + void (CLOOP_CARG *defineRecordSource)(IProfilerSession* self, ISC_INT64 statementId, unsigned cursorId, unsigned recSourceId, unsigned level, const char* accessPath, unsigned parentRecSourceId) CLOOP_NOEXCEPT; + void (CLOOP_CARG *onRequestStart)(IProfilerSession* self, IStatus* status, ISC_INT64 statementId, ISC_INT64 requestId, ISC_INT64 callerStatementId, ISC_INT64 callerRequestId, ISC_TIMESTAMP_TZ timestamp) CLOOP_NOEXCEPT; + void (CLOOP_CARG *onRequestFinish)(IProfilerSession* self, IStatus* status, ISC_INT64 statementId, ISC_INT64 requestId, ISC_TIMESTAMP_TZ timestamp, IProfilerStats* stats) CLOOP_NOEXCEPT; + void (CLOOP_CARG *beforePsqlLineColumn)(IProfilerSession* self, ISC_INT64 statementId, ISC_INT64 requestId, unsigned line, unsigned column) CLOOP_NOEXCEPT; + void (CLOOP_CARG *afterPsqlLineColumn)(IProfilerSession* self, ISC_INT64 statementId, ISC_INT64 requestId, unsigned line, unsigned column, IProfilerStats* stats) CLOOP_NOEXCEPT; + void (CLOOP_CARG *beforeRecordSourceOpen)(IProfilerSession* self, ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId) CLOOP_NOEXCEPT; + void (CLOOP_CARG *afterRecordSourceOpen)(IProfilerSession* self, ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId, IProfilerStats* stats) CLOOP_NOEXCEPT; + void (CLOOP_CARG *beforeRecordSourceGetRecord)(IProfilerSession* self, ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId) CLOOP_NOEXCEPT; + void (CLOOP_CARG *afterRecordSourceGetRecord)(IProfilerSession* self, ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId, IProfilerStats* stats) CLOOP_NOEXCEPT; + }; + + protected: + IProfilerSession(DoNotInherit) + : IDisposable(DoNotInherit()) + { + } + + ~IProfilerSession() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IPROFILER_SESSION_VERSION; + + static CLOOP_CONSTEXPR unsigned FLAG_BEFORE_EVENTS = 0x1; + static CLOOP_CONSTEXPR unsigned FLAG_AFTER_EVENTS = 0x2; + + ISC_INT64 getId() + { + ISC_INT64 ret = static_cast(this->cloopVTable)->getId(this); + return ret; + } + + unsigned getFlags() + { + unsigned ret = static_cast(this->cloopVTable)->getFlags(this); + return ret; + } + + template void cancel(StatusType* status) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->cancel(this, status); + StatusType::checkException(status); + } + + template void finish(StatusType* status, ISC_TIMESTAMP_TZ timestamp) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->finish(this, status, timestamp); + StatusType::checkException(status); + } + + template void defineStatement(StatusType* status, ISC_INT64 statementId, ISC_INT64 parentStatementId, const char* type, const char* packageName, const char* routineName, const char* sqlText) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->defineStatement(this, status, statementId, parentStatementId, type, packageName, routineName, sqlText); + StatusType::checkException(status); + } + + void defineCursor(ISC_INT64 statementId, unsigned cursorId, const char* name, unsigned line, unsigned column) + { + static_cast(this->cloopVTable)->defineCursor(this, statementId, cursorId, name, line, column); + } + + void defineRecordSource(ISC_INT64 statementId, unsigned cursorId, unsigned recSourceId, unsigned level, const char* accessPath, unsigned parentRecSourceId) + { + static_cast(this->cloopVTable)->defineRecordSource(this, statementId, cursorId, recSourceId, level, accessPath, parentRecSourceId); + } + + template void onRequestStart(StatusType* status, ISC_INT64 statementId, ISC_INT64 requestId, ISC_INT64 callerStatementId, ISC_INT64 callerRequestId, ISC_TIMESTAMP_TZ timestamp) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->onRequestStart(this, status, statementId, requestId, callerStatementId, callerRequestId, timestamp); + StatusType::checkException(status); + } + + template void onRequestFinish(StatusType* status, ISC_INT64 statementId, ISC_INT64 requestId, ISC_TIMESTAMP_TZ timestamp, IProfilerStats* stats) + { + StatusType::clearException(status); + static_cast(this->cloopVTable)->onRequestFinish(this, status, statementId, requestId, timestamp, stats); + StatusType::checkException(status); + } + + void beforePsqlLineColumn(ISC_INT64 statementId, ISC_INT64 requestId, unsigned line, unsigned column) + { + static_cast(this->cloopVTable)->beforePsqlLineColumn(this, statementId, requestId, line, column); + } + + void afterPsqlLineColumn(ISC_INT64 statementId, ISC_INT64 requestId, unsigned line, unsigned column, IProfilerStats* stats) + { + static_cast(this->cloopVTable)->afterPsqlLineColumn(this, statementId, requestId, line, column, stats); + } + + void beforeRecordSourceOpen(ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId) + { + static_cast(this->cloopVTable)->beforeRecordSourceOpen(this, statementId, requestId, cursorId, recSourceId); + } + + void afterRecordSourceOpen(ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId, IProfilerStats* stats) + { + static_cast(this->cloopVTable)->afterRecordSourceOpen(this, statementId, requestId, cursorId, recSourceId, stats); + } + + void beforeRecordSourceGetRecord(ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId) + { + static_cast(this->cloopVTable)->beforeRecordSourceGetRecord(this, statementId, requestId, cursorId, recSourceId); + } + + void afterRecordSourceGetRecord(ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId, IProfilerStats* stats) + { + static_cast(this->cloopVTable)->afterRecordSourceGetRecord(this, statementId, requestId, cursorId, recSourceId, stats); + } + }; + +#define FIREBIRD_IPROFILER_STATS_VERSION 2u + + class IProfilerStats : public IVersioned + { + public: + struct VTable : public IVersioned::VTable + { + ISC_UINT64 (CLOOP_CARG *getElapsedTicks)(IProfilerStats* self) CLOOP_NOEXCEPT; + }; + + protected: + IProfilerStats(DoNotInherit) + : IVersioned(DoNotInherit()) + { + } + + ~IProfilerStats() + { + } + + public: + static CLOOP_CONSTEXPR unsigned VERSION = FIREBIRD_IPROFILER_STATS_VERSION; + + ISC_UINT64 getElapsedTicks() + { + ISC_UINT64 ret = static_cast(this->cloopVTable)->getElapsedTicks(this); + return ret; + } + }; + + // Interfaces implementations + + template + class IVersionedBaseImpl : public Base + { + public: + typedef IVersioned Declaration; + + IVersionedBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + } + } vTable; + + this->cloopVTable = &vTable; + } + }; + + template > + class IVersionedImpl : public IVersionedBaseImpl + { + protected: + IVersionedImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IVersionedImpl() + { + } + + }; + + template + class IReferenceCountedBaseImpl : public Base + { + public: + typedef IReferenceCounted Declaration; + + IReferenceCountedBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class IReferenceCountedImpl : public IReferenceCountedBaseImpl + { + protected: + IReferenceCountedImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IReferenceCountedImpl() + { + } + + virtual void addRef() = 0; + virtual int release() = 0; + }; + + template + class IDisposableBaseImpl : public Base + { + public: + typedef IDisposable Declaration; + + IDisposableBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->dispose = &Name::cloopdisposeDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::dispose(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > + class IDisposableImpl : public IDisposableBaseImpl + { + protected: + IDisposableImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IDisposableImpl() + { + } + + virtual void dispose() = 0; + }; + + template + class IStatusBaseImpl : public Base + { + public: + typedef IStatus Declaration; + + IStatusBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->dispose = &Name::cloopdisposeDispatcher; + this->init = &Name::cloopinitDispatcher; + this->getState = &Name::cloopgetStateDispatcher; + this->setErrors2 = &Name::cloopsetErrors2Dispatcher; + this->setWarnings2 = &Name::cloopsetWarnings2Dispatcher; + this->setErrors = &Name::cloopsetErrorsDispatcher; + this->setWarnings = &Name::cloopsetWarningsDispatcher; + this->getErrors = &Name::cloopgetErrorsDispatcher; + this->getWarnings = &Name::cloopgetWarningsDispatcher; + this->clone = &Name::cloopcloneDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopinitDispatcher(IStatus* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::init(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static unsigned CLOOP_CARG cloopgetStateDispatcher(const IStatus* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getState(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetErrors2Dispatcher(IStatus* self, unsigned length, const intptr_t* value) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::setErrors2(length, value); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopsetWarnings2Dispatcher(IStatus* self, unsigned length, const intptr_t* value) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::setWarnings2(length, value); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopsetErrorsDispatcher(IStatus* self, const intptr_t* value) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::setErrors(value); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopsetWarningsDispatcher(IStatus* self, const intptr_t* value) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::setWarnings(value); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static const intptr_t* CLOOP_CARG cloopgetErrorsDispatcher(const IStatus* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getErrors(); + } + catch (...) + { + StatusType::catchException(0); + return stubError(); + } + } + + static const intptr_t* CLOOP_CARG cloopgetWarningsDispatcher(const IStatus* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getWarnings(); + } + catch (...) + { + StatusType::catchException(0); + return stubError(); + } + } + + static IStatus* CLOOP_CARG cloopcloneDispatcher(const IStatus* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::clone(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::dispose(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > > > + class IStatusImpl : public IStatusBaseImpl + { + protected: + IStatusImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IStatusImpl() + { + } + + virtual void init() = 0; + virtual unsigned getState() const = 0; + virtual void setErrors2(unsigned length, const intptr_t* value) = 0; + virtual void setWarnings2(unsigned length, const intptr_t* value) = 0; + virtual void setErrors(const intptr_t* value) = 0; + virtual void setWarnings(const intptr_t* value) = 0; + virtual const intptr_t* getErrors() const = 0; + virtual const intptr_t* getWarnings() const = 0; + virtual IStatus* clone() const = 0; + }; + + template + class IMasterBaseImpl : public Base + { + public: + typedef IMaster Declaration; + + IMasterBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getStatus = &Name::cloopgetStatusDispatcher; + this->getDispatcher = &Name::cloopgetDispatcherDispatcher; + this->getPluginManager = &Name::cloopgetPluginManagerDispatcher; + this->getTimerControl = &Name::cloopgetTimerControlDispatcher; + this->getDtc = &Name::cloopgetDtcDispatcher; + this->registerAttachment = &Name::cloopregisterAttachmentDispatcher; + this->registerTransaction = &Name::cloopregisterTransactionDispatcher; + this->getMetadataBuilder = &Name::cloopgetMetadataBuilderDispatcher; + this->serverMode = &Name::cloopserverModeDispatcher; + this->getUtilInterface = &Name::cloopgetUtilInterfaceDispatcher; + this->getConfigManager = &Name::cloopgetConfigManagerDispatcher; + this->getProcessExiting = &Name::cloopgetProcessExitingDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static IStatus* CLOOP_CARG cloopgetStatusDispatcher(IMaster* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getStatus(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IProvider* CLOOP_CARG cloopgetDispatcherDispatcher(IMaster* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getDispatcher(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IPluginManager* CLOOP_CARG cloopgetPluginManagerDispatcher(IMaster* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getPluginManager(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ITimerControl* CLOOP_CARG cloopgetTimerControlDispatcher(IMaster* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getTimerControl(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IDtc* CLOOP_CARG cloopgetDtcDispatcher(IMaster* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getDtc(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IAttachment* CLOOP_CARG cloopregisterAttachmentDispatcher(IMaster* self, IProvider* provider, IAttachment* attachment) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::registerAttachment(provider, attachment); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ITransaction* CLOOP_CARG cloopregisterTransactionDispatcher(IMaster* self, IAttachment* attachment, ITransaction* transaction) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::registerTransaction(attachment, transaction); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IMetadataBuilder* CLOOP_CARG cloopgetMetadataBuilderDispatcher(IMaster* self, IStatus* status, unsigned fieldCount) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getMetadataBuilder(&status2, fieldCount); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopserverModeDispatcher(IMaster* self, int mode) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::serverMode(mode); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IUtil* CLOOP_CARG cloopgetUtilInterfaceDispatcher(IMaster* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getUtilInterface(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IConfigManager* CLOOP_CARG cloopgetConfigManagerDispatcher(IMaster* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getConfigManager(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopgetProcessExitingDispatcher(IMaster* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getProcessExiting(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class IMasterImpl : public IMasterBaseImpl + { + protected: + IMasterImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IMasterImpl() + { + } + + virtual IStatus* getStatus() = 0; + virtual IProvider* getDispatcher() = 0; + virtual IPluginManager* getPluginManager() = 0; + virtual ITimerControl* getTimerControl() = 0; + virtual IDtc* getDtc() = 0; + virtual IAttachment* registerAttachment(IProvider* provider, IAttachment* attachment) = 0; + virtual ITransaction* registerTransaction(IAttachment* attachment, ITransaction* transaction) = 0; + virtual IMetadataBuilder* getMetadataBuilder(StatusType* status, unsigned fieldCount) = 0; + virtual int serverMode(int mode) = 0; + virtual IUtil* getUtilInterface() = 0; + virtual IConfigManager* getConfigManager() = 0; + virtual FB_BOOLEAN getProcessExiting() = 0; + }; + + template + class IPluginBaseBaseImpl : public Base + { + public: + typedef IPluginBase Declaration; + + IPluginBaseBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::setOwner(r); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getOwner(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IPluginBaseImpl : public IPluginBaseBaseImpl + { + protected: + IPluginBaseImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IPluginBaseImpl() + { + } + + virtual void setOwner(IReferenceCounted* r) = 0; + virtual IReferenceCounted* getOwner() = 0; + }; + + template + class IPluginSetBaseImpl : public Base + { + public: + typedef IPluginSet Declaration; + + IPluginSetBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getName = &Name::cloopgetNameDispatcher; + this->getModuleName = &Name::cloopgetModuleNameDispatcher; + this->getPlugin = &Name::cloopgetPluginDispatcher; + this->next = &Name::cloopnextDispatcher; + this->set = &Name::cloopsetDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetNameDispatcher(const IPluginSet* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetModuleNameDispatcher(const IPluginSet* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getModuleName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IPluginBase* CLOOP_CARG cloopgetPluginDispatcher(IPluginSet* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getPlugin(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopnextDispatcher(IPluginSet* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::next(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetDispatcher(IPluginSet* self, IStatus* status, const char* s) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::set(&status2, s); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IPluginSetImpl : public IPluginSetBaseImpl + { + protected: + IPluginSetImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IPluginSetImpl() + { + } + + virtual const char* getName() const = 0; + virtual const char* getModuleName() const = 0; + virtual IPluginBase* getPlugin(StatusType* status) = 0; + virtual void next(StatusType* status) = 0; + virtual void set(StatusType* status, const char* s) = 0; + }; + + template + class IConfigEntryBaseImpl : public Base + { + public: + typedef IConfigEntry Declaration; + + IConfigEntryBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getName = &Name::cloopgetNameDispatcher; + this->getValue = &Name::cloopgetValueDispatcher; + this->getIntValue = &Name::cloopgetIntValueDispatcher; + this->getBoolValue = &Name::cloopgetBoolValueDispatcher; + this->getSubConfig = &Name::cloopgetSubConfigDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetNameDispatcher(IConfigEntry* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetValueDispatcher(IConfigEntry* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getValue(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ISC_INT64 CLOOP_CARG cloopgetIntValueDispatcher(IConfigEntry* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getIntValue(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopgetBoolValueDispatcher(IConfigEntry* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getBoolValue(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IConfig* CLOOP_CARG cloopgetSubConfigDispatcher(IConfigEntry* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getSubConfig(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IConfigEntryImpl : public IConfigEntryBaseImpl + { + protected: + IConfigEntryImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IConfigEntryImpl() + { + } + + virtual const char* getName() = 0; + virtual const char* getValue() = 0; + virtual ISC_INT64 getIntValue() = 0; + virtual FB_BOOLEAN getBoolValue() = 0; + virtual IConfig* getSubConfig(StatusType* status) = 0; + }; + + template + class IConfigBaseImpl : public Base + { + public: + typedef IConfig Declaration; + + IConfigBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->find = &Name::cloopfindDispatcher; + this->findValue = &Name::cloopfindValueDispatcher; + this->findPos = &Name::cloopfindPosDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static IConfigEntry* CLOOP_CARG cloopfindDispatcher(IConfig* self, IStatus* status, const char* name) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::find(&status2, name); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IConfigEntry* CLOOP_CARG cloopfindValueDispatcher(IConfig* self, IStatus* status, const char* name, const char* value) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::findValue(&status2, name, value); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IConfigEntry* CLOOP_CARG cloopfindPosDispatcher(IConfig* self, IStatus* status, const char* name, unsigned pos) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::findPos(&status2, name, pos); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IConfigImpl : public IConfigBaseImpl + { + protected: + IConfigImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IConfigImpl() + { + } + + virtual IConfigEntry* find(StatusType* status, const char* name) = 0; + virtual IConfigEntry* findValue(StatusType* status, const char* name, const char* value) = 0; + virtual IConfigEntry* findPos(StatusType* status, const char* name, unsigned pos) = 0; + }; + + template + class IFirebirdConfBaseImpl : public Base + { + public: + typedef IFirebirdConf Declaration; + + IFirebirdConfBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getKey = &Name::cloopgetKeyDispatcher; + this->asInteger = &Name::cloopasIntegerDispatcher; + this->asString = &Name::cloopasStringDispatcher; + this->asBoolean = &Name::cloopasBooleanDispatcher; + this->getVersion = &Name::cloopgetVersionDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static unsigned CLOOP_CARG cloopgetKeyDispatcher(IFirebirdConf* self, const char* name) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getKey(name); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static ISC_INT64 CLOOP_CARG cloopasIntegerDispatcher(IFirebirdConf* self, unsigned key) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::asInteger(key); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopasStringDispatcher(IFirebirdConf* self, unsigned key) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::asString(key); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopasBooleanDispatcher(IFirebirdConf* self, unsigned key) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::asBoolean(key); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetVersionDispatcher(IFirebirdConf* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getVersion(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IFirebirdConfImpl : public IFirebirdConfBaseImpl + { + protected: + IFirebirdConfImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IFirebirdConfImpl() + { + } + + virtual unsigned getKey(const char* name) = 0; + virtual ISC_INT64 asInteger(unsigned key) = 0; + virtual const char* asString(unsigned key) = 0; + virtual FB_BOOLEAN asBoolean(unsigned key) = 0; + virtual unsigned getVersion(StatusType* status) = 0; + }; + + template + class IPluginConfigBaseImpl : public Base + { + public: + typedef IPluginConfig Declaration; + + IPluginConfigBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getConfigFileName = &Name::cloopgetConfigFileNameDispatcher; + this->getDefaultConfig = &Name::cloopgetDefaultConfigDispatcher; + this->getFirebirdConf = &Name::cloopgetFirebirdConfDispatcher; + this->setReleaseDelay = &Name::cloopsetReleaseDelayDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetConfigFileNameDispatcher(IPluginConfig* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getConfigFileName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IConfig* CLOOP_CARG cloopgetDefaultConfigDispatcher(IPluginConfig* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getDefaultConfig(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IFirebirdConf* CLOOP_CARG cloopgetFirebirdConfDispatcher(IPluginConfig* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getFirebirdConf(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetReleaseDelayDispatcher(IPluginConfig* self, IStatus* status, ISC_UINT64 microSeconds) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setReleaseDelay(&status2, microSeconds); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IPluginConfigImpl : public IPluginConfigBaseImpl + { + protected: + IPluginConfigImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IPluginConfigImpl() + { + } + + virtual const char* getConfigFileName() = 0; + virtual IConfig* getDefaultConfig(StatusType* status) = 0; + virtual IFirebirdConf* getFirebirdConf(StatusType* status) = 0; + virtual void setReleaseDelay(StatusType* status, ISC_UINT64 microSeconds) = 0; + }; + + template + class IPluginFactoryBaseImpl : public Base + { + public: + typedef IPluginFactory Declaration; + + IPluginFactoryBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->createPlugin = &Name::cloopcreatePluginDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static IPluginBase* CLOOP_CARG cloopcreatePluginDispatcher(IPluginFactory* self, IStatus* status, IPluginConfig* factoryParameter) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::createPlugin(&status2, factoryParameter); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + }; + + template > > + class IPluginFactoryImpl : public IPluginFactoryBaseImpl + { + protected: + IPluginFactoryImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IPluginFactoryImpl() + { + } + + virtual IPluginBase* createPlugin(StatusType* status, IPluginConfig* factoryParameter) = 0; + }; + + template + class IPluginModuleBaseImpl : public Base + { + public: + typedef IPluginModule Declaration; + + IPluginModuleBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->doClean = &Name::cloopdoCleanDispatcher; + this->threadDetach = &Name::cloopthreadDetachDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopdoCleanDispatcher(IPluginModule* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::doClean(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopthreadDetachDispatcher(IPluginModule* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::threadDetach(); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > + class IPluginModuleImpl : public IPluginModuleBaseImpl + { + protected: + IPluginModuleImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IPluginModuleImpl() + { + } + + virtual void doClean() = 0; + virtual void threadDetach() = 0; + }; + + template + class IPluginManagerBaseImpl : public Base + { + public: + typedef IPluginManager Declaration; + + IPluginManagerBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->registerPluginFactory = &Name::cloopregisterPluginFactoryDispatcher; + this->registerModule = &Name::cloopregisterModuleDispatcher; + this->unregisterModule = &Name::cloopunregisterModuleDispatcher; + this->getPlugins = &Name::cloopgetPluginsDispatcher; + this->getConfig = &Name::cloopgetConfigDispatcher; + this->releasePlugin = &Name::cloopreleasePluginDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopregisterPluginFactoryDispatcher(IPluginManager* self, unsigned pluginType, const char* defaultName, IPluginFactory* factory) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::registerPluginFactory(pluginType, defaultName, factory); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopregisterModuleDispatcher(IPluginManager* self, IPluginModule* cleanup) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::registerModule(cleanup); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopunregisterModuleDispatcher(IPluginManager* self, IPluginModule* cleanup) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::unregisterModule(cleanup); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static IPluginSet* CLOOP_CARG cloopgetPluginsDispatcher(IPluginManager* self, IStatus* status, unsigned pluginType, const char* namesList, IFirebirdConf* firebirdConf) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getPlugins(&status2, pluginType, namesList, firebirdConf); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IConfig* CLOOP_CARG cloopgetConfigDispatcher(IPluginManager* self, IStatus* status, const char* filename) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getConfig(&status2, filename); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopreleasePluginDispatcher(IPluginManager* self, IPluginBase* plugin) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::releasePlugin(plugin); + } + catch (...) + { + StatusType::catchException(0); + } + } + }; + + template > > + class IPluginManagerImpl : public IPluginManagerBaseImpl + { + protected: + IPluginManagerImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IPluginManagerImpl() + { + } + + virtual void registerPluginFactory(unsigned pluginType, const char* defaultName, IPluginFactory* factory) = 0; + virtual void registerModule(IPluginModule* cleanup) = 0; + virtual void unregisterModule(IPluginModule* cleanup) = 0; + virtual IPluginSet* getPlugins(StatusType* status, unsigned pluginType, const char* namesList, IFirebirdConf* firebirdConf) = 0; + virtual IConfig* getConfig(StatusType* status, const char* filename) = 0; + virtual void releasePlugin(IPluginBase* plugin) = 0; + }; + + template + class ICryptKeyBaseImpl : public Base + { + public: + typedef ICryptKey Declaration; + + ICryptKeyBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->setSymmetric = &Name::cloopsetSymmetricDispatcher; + this->setAsymmetric = &Name::cloopsetAsymmetricDispatcher; + this->getEncryptKey = &Name::cloopgetEncryptKeyDispatcher; + this->getDecryptKey = &Name::cloopgetDecryptKeyDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopsetSymmetricDispatcher(ICryptKey* self, IStatus* status, const char* type, unsigned keyLength, const void* key) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setSymmetric(&status2, type, keyLength, key); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetAsymmetricDispatcher(ICryptKey* self, IStatus* status, const char* type, unsigned encryptKeyLength, const void* encryptKey, unsigned decryptKeyLength, const void* decryptKey) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setAsymmetric(&status2, type, encryptKeyLength, encryptKey, decryptKeyLength, decryptKey); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static const void* CLOOP_CARG cloopgetEncryptKeyDispatcher(ICryptKey* self, unsigned* length) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getEncryptKey(length); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const void* CLOOP_CARG cloopgetDecryptKeyDispatcher(ICryptKey* self, unsigned* length) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getDecryptKey(length); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class ICryptKeyImpl : public ICryptKeyBaseImpl + { + protected: + ICryptKeyImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ICryptKeyImpl() + { + } + + virtual void setSymmetric(StatusType* status, const char* type, unsigned keyLength, const void* key) = 0; + virtual void setAsymmetric(StatusType* status, const char* type, unsigned encryptKeyLength, const void* encryptKey, unsigned decryptKeyLength, const void* decryptKey) = 0; + virtual const void* getEncryptKey(unsigned* length) = 0; + virtual const void* getDecryptKey(unsigned* length) = 0; + }; + + template + class IConfigManagerBaseImpl : public Base + { + public: + typedef IConfigManager Declaration; + + IConfigManagerBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getDirectory = &Name::cloopgetDirectoryDispatcher; + this->getFirebirdConf = &Name::cloopgetFirebirdConfDispatcher; + this->getDatabaseConf = &Name::cloopgetDatabaseConfDispatcher; + this->getPluginConfig = &Name::cloopgetPluginConfigDispatcher; + this->getInstallDirectory = &Name::cloopgetInstallDirectoryDispatcher; + this->getRootDirectory = &Name::cloopgetRootDirectoryDispatcher; + this->getDefaultSecurityDb = &Name::cloopgetDefaultSecurityDbDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetDirectoryDispatcher(IConfigManager* self, unsigned code) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getDirectory(code); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IFirebirdConf* CLOOP_CARG cloopgetFirebirdConfDispatcher(IConfigManager* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getFirebirdConf(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IFirebirdConf* CLOOP_CARG cloopgetDatabaseConfDispatcher(IConfigManager* self, const char* dbName) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getDatabaseConf(dbName); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IConfig* CLOOP_CARG cloopgetPluginConfigDispatcher(IConfigManager* self, const char* configuredPlugin) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getPluginConfig(configuredPlugin); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetInstallDirectoryDispatcher(IConfigManager* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getInstallDirectory(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRootDirectoryDispatcher(IConfigManager* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getRootDirectory(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetDefaultSecurityDbDispatcher(IConfigManager* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getDefaultSecurityDb(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class IConfigManagerImpl : public IConfigManagerBaseImpl + { + protected: + IConfigManagerImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IConfigManagerImpl() + { + } + + virtual const char* getDirectory(unsigned code) = 0; + virtual IFirebirdConf* getFirebirdConf() = 0; + virtual IFirebirdConf* getDatabaseConf(const char* dbName) = 0; + virtual IConfig* getPluginConfig(const char* configuredPlugin) = 0; + virtual const char* getInstallDirectory() = 0; + virtual const char* getRootDirectory() = 0; + virtual const char* getDefaultSecurityDb() = 0; + }; + + template + class IEventCallbackBaseImpl : public Base + { + public: + typedef IEventCallback Declaration; + + IEventCallbackBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->eventCallbackFunction = &Name::cloopeventCallbackFunctionDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopeventCallbackFunctionDispatcher(IEventCallback* self, unsigned length, const unsigned char* events) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::eventCallbackFunction(length, events); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IEventCallbackImpl : public IEventCallbackBaseImpl + { + protected: + IEventCallbackImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IEventCallbackImpl() + { + } + + virtual void eventCallbackFunction(unsigned length, const unsigned char* events) = 0; + }; + + template + class IBlobBaseImpl : public Base + { + public: + typedef IBlob Declaration; + + IBlobBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getInfo = &Name::cloopgetInfoDispatcher; + this->getSegment = &Name::cloopgetSegmentDispatcher; + this->putSegment = &Name::cloopputSegmentDispatcher; + this->deprecatedCancel = &Name::cloopdeprecatedCancelDispatcher; + this->deprecatedClose = &Name::cloopdeprecatedCloseDispatcher; + this->seek = &Name::cloopseekDispatcher; + this->cancel = &Name::cloopcancelDispatcher; + this->close = &Name::cloopcloseDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopgetInfoDispatcher(IBlob* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getInfo(&status2, itemsLength, items, bufferLength, buffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static int CLOOP_CARG cloopgetSegmentDispatcher(IBlob* self, IStatus* status, unsigned bufferLength, void* buffer, unsigned* segmentLength) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getSegment(&status2, bufferLength, buffer, segmentLength); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopputSegmentDispatcher(IBlob* self, IStatus* status, unsigned length, const void* buffer) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::putSegment(&status2, length, buffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedCancelDispatcher(IBlob* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedCancel(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedCloseDispatcher(IBlob* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedClose(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static int CLOOP_CARG cloopseekDispatcher(IBlob* self, IStatus* status, int mode, int offset) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::seek(&status2, mode, offset); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopcancelDispatcher(IBlob* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::cancel(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopcloseDispatcher(IBlob* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::close(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IBlobImpl : public IBlobBaseImpl + { + protected: + IBlobImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IBlobImpl() + { + } + + virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; + virtual int getSegment(StatusType* status, unsigned bufferLength, void* buffer, unsigned* segmentLength) = 0; + virtual void putSegment(StatusType* status, unsigned length, const void* buffer) = 0; + virtual void deprecatedCancel(StatusType* status) = 0; + virtual void deprecatedClose(StatusType* status) = 0; + virtual int seek(StatusType* status, int mode, int offset) = 0; + virtual void cancel(StatusType* status) = 0; + virtual void close(StatusType* status) = 0; + }; + + template + class ITransactionBaseImpl : public Base + { + public: + typedef ITransaction Declaration; + + ITransactionBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getInfo = &Name::cloopgetInfoDispatcher; + this->prepare = &Name::cloopprepareDispatcher; + this->deprecatedCommit = &Name::cloopdeprecatedCommitDispatcher; + this->commitRetaining = &Name::cloopcommitRetainingDispatcher; + this->deprecatedRollback = &Name::cloopdeprecatedRollbackDispatcher; + this->rollbackRetaining = &Name::clooprollbackRetainingDispatcher; + this->deprecatedDisconnect = &Name::cloopdeprecatedDisconnectDispatcher; + this->join = &Name::cloopjoinDispatcher; + this->validate = &Name::cloopvalidateDispatcher; + this->enterDtc = &Name::cloopenterDtcDispatcher; + this->commit = &Name::cloopcommitDispatcher; + this->rollback = &Name::clooprollbackDispatcher; + this->disconnect = &Name::cloopdisconnectDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopgetInfoDispatcher(ITransaction* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getInfo(&status2, itemsLength, items, bufferLength, buffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopprepareDispatcher(ITransaction* self, IStatus* status, unsigned msgLength, const unsigned char* message) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::prepare(&status2, msgLength, message); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedCommitDispatcher(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedCommit(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopcommitRetainingDispatcher(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::commitRetaining(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedRollbackDispatcher(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedRollback(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG clooprollbackRetainingDispatcher(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::rollbackRetaining(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdeprecatedDisconnectDispatcher(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::deprecatedDisconnect(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static ITransaction* CLOOP_CARG cloopjoinDispatcher(ITransaction* self, IStatus* status, ITransaction* transaction) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::join(&status2, transaction); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static ITransaction* CLOOP_CARG cloopvalidateDispatcher(ITransaction* self, IStatus* status, IAttachment* attachment) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::validate(&status2, attachment); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static ITransaction* CLOOP_CARG cloopenterDtcDispatcher(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::enterDtc(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopcommitDispatcher(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::commit(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG clooprollbackDispatcher(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::rollback(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopdisconnectDispatcher(ITransaction* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::disconnect(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class ITransactionImpl : public ITransactionBaseImpl + { + protected: + ITransactionImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITransactionImpl() + { + } + + virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; + virtual void prepare(StatusType* status, unsigned msgLength, const unsigned char* message) = 0; + virtual void deprecatedCommit(StatusType* status) = 0; + virtual void commitRetaining(StatusType* status) = 0; + virtual void deprecatedRollback(StatusType* status) = 0; + virtual void rollbackRetaining(StatusType* status) = 0; + virtual void deprecatedDisconnect(StatusType* status) = 0; + virtual ITransaction* join(StatusType* status, ITransaction* transaction) = 0; + virtual ITransaction* validate(StatusType* status, IAttachment* attachment) = 0; + virtual ITransaction* enterDtc(StatusType* status) = 0; + virtual void commit(StatusType* status) = 0; + virtual void rollback(StatusType* status) = 0; + virtual void disconnect(StatusType* status) = 0; + }; + + template + class IMessageMetadataBaseImpl : public Base + { + public: + typedef IMessageMetadata Declaration; + + IMessageMetadataBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getCount = &Name::cloopgetCountDispatcher; + this->getField = &Name::cloopgetFieldDispatcher; + this->getRelation = &Name::cloopgetRelationDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->getAlias = &Name::cloopgetAliasDispatcher; + this->getType = &Name::cloopgetTypeDispatcher; + this->isNullable = &Name::cloopisNullableDispatcher; + this->getSubType = &Name::cloopgetSubTypeDispatcher; + this->getLength = &Name::cloopgetLengthDispatcher; + this->getScale = &Name::cloopgetScaleDispatcher; + this->getCharSet = &Name::cloopgetCharSetDispatcher; + this->getOffset = &Name::cloopgetOffsetDispatcher; + this->getNullOffset = &Name::cloopgetNullOffsetDispatcher; + this->getBuilder = &Name::cloopgetBuilderDispatcher; + this->getMessageLength = &Name::cloopgetMessageLengthDispatcher; + this->getAlignment = &Name::cloopgetAlignmentDispatcher; + this->getAlignedLength = &Name::cloopgetAlignedLengthDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static unsigned CLOOP_CARG cloopgetCountDispatcher(IMessageMetadata* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getCount(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetFieldDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getField(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetRelationDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getRelation(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetOwnerDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getOwner(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetAliasDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getAlias(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetTypeDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getType(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopisNullableDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::isNullable(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetSubTypeDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getSubType(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetLengthDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getLength(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetScaleDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getScale(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetCharSetDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getCharSet(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetOffsetDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getOffset(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetNullOffsetDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getNullOffset(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IMetadataBuilder* CLOOP_CARG cloopgetBuilderDispatcher(IMessageMetadata* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getBuilder(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetMessageLengthDispatcher(IMessageMetadata* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getMessageLength(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetAlignmentDispatcher(IMessageMetadata* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getAlignment(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetAlignedLengthDispatcher(IMessageMetadata* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getAlignedLength(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IMessageMetadataImpl : public IMessageMetadataBaseImpl + { + protected: + IMessageMetadataImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IMessageMetadataImpl() + { + } + + virtual unsigned getCount(StatusType* status) = 0; + virtual const char* getField(StatusType* status, unsigned index) = 0; + virtual const char* getRelation(StatusType* status, unsigned index) = 0; + virtual const char* getOwner(StatusType* status, unsigned index) = 0; + virtual const char* getAlias(StatusType* status, unsigned index) = 0; + virtual unsigned getType(StatusType* status, unsigned index) = 0; + virtual FB_BOOLEAN isNullable(StatusType* status, unsigned index) = 0; + virtual int getSubType(StatusType* status, unsigned index) = 0; + virtual unsigned getLength(StatusType* status, unsigned index) = 0; + virtual int getScale(StatusType* status, unsigned index) = 0; + virtual unsigned getCharSet(StatusType* status, unsigned index) = 0; + virtual unsigned getOffset(StatusType* status, unsigned index) = 0; + virtual unsigned getNullOffset(StatusType* status, unsigned index) = 0; + virtual IMetadataBuilder* getBuilder(StatusType* status) = 0; + virtual unsigned getMessageLength(StatusType* status) = 0; + virtual unsigned getAlignment(StatusType* status) = 0; + virtual unsigned getAlignedLength(StatusType* status) = 0; + }; + + template + class IMetadataBuilderBaseImpl : public Base + { + public: + typedef IMetadataBuilder Declaration; + + IMetadataBuilderBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setType = &Name::cloopsetTypeDispatcher; + this->setSubType = &Name::cloopsetSubTypeDispatcher; + this->setLength = &Name::cloopsetLengthDispatcher; + this->setCharSet = &Name::cloopsetCharSetDispatcher; + this->setScale = &Name::cloopsetScaleDispatcher; + this->truncate = &Name::clooptruncateDispatcher; + this->moveNameToIndex = &Name::cloopmoveNameToIndexDispatcher; + this->remove = &Name::cloopremoveDispatcher; + this->addField = &Name::cloopaddFieldDispatcher; + this->getMetadata = &Name::cloopgetMetadataDispatcher; + this->setField = &Name::cloopsetFieldDispatcher; + this->setRelation = &Name::cloopsetRelationDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->setAlias = &Name::cloopsetAliasDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopsetTypeDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned type) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setType(&status2, index, type); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetSubTypeDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, int subType) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setSubType(&status2, index, subType); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetLengthDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned length) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setLength(&status2, index, length); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetCharSetDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned charSet) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setCharSet(&status2, index, charSet); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetScaleDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, int scale) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setScale(&status2, index, scale); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG clooptruncateDispatcher(IMetadataBuilder* self, IStatus* status, unsigned count) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::truncate(&status2, count); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopmoveNameToIndexDispatcher(IMetadataBuilder* self, IStatus* status, const char* name, unsigned index) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::moveNameToIndex(&status2, name, index); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopremoveDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::remove(&status2, index); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static unsigned CLOOP_CARG cloopaddFieldDispatcher(IMetadataBuilder* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::addField(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static IMessageMetadata* CLOOP_CARG cloopgetMetadataDispatcher(IMetadataBuilder* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getMetadata(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopsetFieldDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, const char* field) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setField(&status2, index, field); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetRelationDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, const char* relation) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setRelation(&status2, index, relation); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, const char* owner) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setOwner(&status2, index, owner); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopsetAliasDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, const char* alias) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::setAlias(&status2, index, alias); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class IMetadataBuilderImpl : public IMetadataBuilderBaseImpl + { + protected: + IMetadataBuilderImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IMetadataBuilderImpl() + { + } + + virtual void setType(StatusType* status, unsigned index, unsigned type) = 0; + virtual void setSubType(StatusType* status, unsigned index, int subType) = 0; + virtual void setLength(StatusType* status, unsigned index, unsigned length) = 0; + virtual void setCharSet(StatusType* status, unsigned index, unsigned charSet) = 0; + virtual void setScale(StatusType* status, unsigned index, int scale) = 0; + virtual void truncate(StatusType* status, unsigned count) = 0; + virtual void moveNameToIndex(StatusType* status, const char* name, unsigned index) = 0; + virtual void remove(StatusType* status, unsigned index) = 0; + virtual unsigned addField(StatusType* status) = 0; + virtual IMessageMetadata* getMetadata(StatusType* status) = 0; + virtual void setField(StatusType* status, unsigned index, const char* field) = 0; + virtual void setRelation(StatusType* status, unsigned index, const char* relation) = 0; + virtual void setOwner(StatusType* status, unsigned index, const char* owner) = 0; + virtual void setAlias(StatusType* status, unsigned index, const char* alias) = 0; + }; + + template + class IResultSetBaseImpl : public Base + { + public: + typedef IResultSet Declaration; + + IResultSetBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->fetchNext = &Name::cloopfetchNextDispatcher; + this->fetchPrior = &Name::cloopfetchPriorDispatcher; + this->fetchFirst = &Name::cloopfetchFirstDispatcher; + this->fetchLast = &Name::cloopfetchLastDispatcher; + this->fetchAbsolute = &Name::cloopfetchAbsoluteDispatcher; + this->fetchRelative = &Name::cloopfetchRelativeDispatcher; + this->isEof = &Name::cloopisEofDispatcher; + this->isBof = &Name::cloopisBofDispatcher; + this->getMetadata = &Name::cloopgetMetadataDispatcher; + this->deprecatedClose = &Name::cloopdeprecatedCloseDispatcher; + this->setDelayedOutputFormat = &Name::cloopsetDelayedOutputFormatDispatcher; + this->close = &Name::cloopcloseDispatcher; + this->getInfo = &Name::cloopgetInfoDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + + static int CLOOP_CARG cloopfetchNextDispatcher(IResultSet* self, IStatus* status, void* message) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::fetchNext(&status2, message); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopfetchPriorDispatcher(IResultSet* self, IStatus* status, void* message) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::fetchPrior(&status2, message); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopfetchFirstDispatcher(IResultSet* self, IStatus* status, void* message) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::fetchFirst(&status2, message); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopfetchLastDispatcher(IResultSet* self, IStatus* status, void* message) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::fetchLast(&status2, message); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopfetchAbsoluteDispatcher(IResultSet* self, IStatus* status, int position, void* message) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::fetchAbsolute(&status2, position, message); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopfetchRelativeDispatcher(IResultSet* self, IStatus* status, int offset, void* message) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::fetchRelative(&status2, offset, message); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopisEofDispatcher(IResultSet* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::isEof(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopisBofDispatcher(IResultSet* self, IStatus* status) CLOOP_NOEXCEPT { - StatusType::clearException(status); - static_cast(this->cloopVTable)->registerProcedure(this, status, name, factory); - StatusType::checkException(status); + StatusType status2(status); + + try + { + return static_cast(self)->Name::isBof(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } } - template void registerTrigger(StatusType* status, const char* name, IUdrTriggerFactory* factory) + static IMessageMetadata* CLOOP_CARG cloopgetMetadataDispatcher(IResultSet* self, IStatus* status) CLOOP_NOEXCEPT { - StatusType::clearException(status); - static_cast(this->cloopVTable)->registerTrigger(this, status, name, factory); - StatusType::checkException(status); + StatusType status2(status); + + try + { + return static_cast(self)->Name::getMetadata(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } } - }; - // Interfaces implementations + static void CLOOP_CARG cloopdeprecatedCloseDispatcher(IResultSet* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); - template - class IVersionedBaseImpl : public Base - { - public: - typedef IVersioned Declaration; + try + { + static_cast(self)->Name::deprecatedClose(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } - IVersionedBaseImpl(DoNotInherit = DoNotInherit()) + static void CLOOP_CARG cloopsetDelayedOutputFormatDispatcher(IResultSet* self, IStatus* status, IMessageMetadata* format) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable + StatusType status2(status); + + try { - VTableImpl() - { - this->version = Base::VERSION; - } - } vTable; + static_cast(self)->Name::setDelayedOutputFormat(&status2, format); + } + catch (...) + { + StatusType::catchException(&status2); + } + } - this->cloopVTable = &vTable; + static void CLOOP_CARG cloopcloseDispatcher(IResultSet* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::close(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopgetInfoDispatcher(IResultSet* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getInfo(&status2, itemsLength, items, bufferLength, buffer); + } + catch (...) + { + StatusType::catchException(&status2); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::release(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } } }; - template > - class IVersionedImpl : public IVersionedBaseImpl + template > > > > + class IResultSetImpl : public IResultSetBaseImpl { protected: - IVersionedImpl(DoNotInherit = DoNotInherit()) + IResultSetImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IVersionedImpl() + virtual ~IResultSetImpl() { } + virtual int fetchNext(StatusType* status, void* message) = 0; + virtual int fetchPrior(StatusType* status, void* message) = 0; + virtual int fetchFirst(StatusType* status, void* message) = 0; + virtual int fetchLast(StatusType* status, void* message) = 0; + virtual int fetchAbsolute(StatusType* status, int position, void* message) = 0; + virtual int fetchRelative(StatusType* status, int offset, void* message) = 0; + virtual FB_BOOLEAN isEof(StatusType* status) = 0; + virtual FB_BOOLEAN isBof(StatusType* status) = 0; + virtual IMessageMetadata* getMetadata(StatusType* status) = 0; + virtual void deprecatedClose(StatusType* status) = 0; + virtual void setDelayedOutputFormat(StatusType* status, IMessageMetadata* format) = 0; + virtual void close(StatusType* status) = 0; + virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; }; template - class IReferenceCountedBaseImpl : public Base + class IStatementBaseImpl : public Base { public: - typedef IReferenceCounted Declaration; + typedef IStatement Declaration; - IReferenceCountedBaseImpl(DoNotInherit = DoNotInherit()) + IStatementBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { @@ -5156,548 +10621,556 @@ namespace Firebird this->version = Base::VERSION; this->addRef = &Name::cloopaddRefDispatcher; this->release = &Name::cloopreleaseDispatcher; + this->getInfo = &Name::cloopgetInfoDispatcher; + this->getType = &Name::cloopgetTypeDispatcher; + this->getPlan = &Name::cloopgetPlanDispatcher; + this->getAffectedRecords = &Name::cloopgetAffectedRecordsDispatcher; + this->getInputMetadata = &Name::cloopgetInputMetadataDispatcher; + this->getOutputMetadata = &Name::cloopgetOutputMetadataDispatcher; + this->execute = &Name::cloopexecuteDispatcher; + this->openCursor = &Name::cloopopenCursorDispatcher; + this->setCursorName = &Name::cloopsetCursorNameDispatcher; + this->deprecatedFree = &Name::cloopdeprecatedFreeDispatcher; + this->getFlags = &Name::cloopgetFlagsDispatcher; + this->getTimeout = &Name::cloopgetTimeoutDispatcher; + this->setTimeout = &Name::cloopsetTimeoutDispatcher; + this->createBatch = &Name::cloopcreateBatchDispatcher; + this->free = &Name::cloopfreeDispatcher; + this->getMaxInlineBlobSize = &Name::cloopgetMaxInlineBlobSizeDispatcher; + this->setMaxInlineBlobSize = &Name::cloopsetMaxInlineBlobSizeDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopgetInfoDispatcher(IStatement* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::addRef(); + static_cast(self)->Name::getInfo(&status2, itemsLength, items, bufferLength, buffer); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static unsigned CLOOP_CARG cloopgetTypeDispatcher(IStatement* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::release(); + return static_cast(self)->Name::getType(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - }; - template > > - class IReferenceCountedImpl : public IReferenceCountedBaseImpl - { - protected: - IReferenceCountedImpl(DoNotInherit = DoNotInherit()) + static const char* CLOOP_CARG cloopgetPlanDispatcher(IStatement* self, IStatus* status, FB_BOOLEAN detailed) CLOOP_NOEXCEPT { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getPlan(&status2, detailed); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } } - public: - virtual ~IReferenceCountedImpl() + static ISC_UINT64 CLOOP_CARG cloopgetAffectedRecordsDispatcher(IStatement* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getAffectedRecords(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } } - virtual void addRef() = 0; - virtual int release() = 0; - }; + static IMessageMetadata* CLOOP_CARG cloopgetInputMetadataDispatcher(IStatement* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); - template - class IDisposableBaseImpl : public Base - { - public: - typedef IDisposable Declaration; + try + { + return static_cast(self)->Name::getInputMetadata(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } - IDisposableBaseImpl(DoNotInherit = DoNotInherit()) + static IMessageMetadata* CLOOP_CARG cloopgetOutputMetadataDispatcher(IStatement* self, IStatus* status) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable - { - VTableImpl() - { - this->version = Base::VERSION; - this->dispose = &Name::cloopdisposeDispatcher; - } - } vTable; + StatusType status2(status); - this->cloopVTable = &vTable; + try + { + return static_cast(self)->Name::getOutputMetadata(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } } - static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + static ITransaction* CLOOP_CARG cloopexecuteDispatcher(IStatement* self, IStatus* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::dispose(); + return static_cast(self)->Name::execute(&status2, transaction, inMetadata, inBuffer, outMetadata, outBuffer); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); + return static_cast(0); } } - }; - template > > - class IDisposableImpl : public IDisposableBaseImpl - { - protected: - IDisposableImpl(DoNotInherit = DoNotInherit()) + static IResultSet* CLOOP_CARG cloopopenCursorDispatcher(IStatement* self, IStatus* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, unsigned flags) CLOOP_NOEXCEPT { + StatusType status2(status); + + try + { + return static_cast(self)->Name::openCursor(&status2, transaction, inMetadata, inBuffer, outMetadata, flags); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } } - public: - virtual ~IDisposableImpl() + static void CLOOP_CARG cloopsetCursorNameDispatcher(IStatement* self, IStatus* status, const char* name) CLOOP_NOEXCEPT { - } - - virtual void dispose() = 0; - }; - - template - class IStatusBaseImpl : public Base - { - public: - typedef IStatus Declaration; + StatusType status2(status); - IStatusBaseImpl(DoNotInherit = DoNotInherit()) - { - static struct VTableImpl : Base::VTable + try { - VTableImpl() - { - this->version = Base::VERSION; - this->dispose = &Name::cloopdisposeDispatcher; - this->init = &Name::cloopinitDispatcher; - this->getState = &Name::cloopgetStateDispatcher; - this->setErrors2 = &Name::cloopsetErrors2Dispatcher; - this->setWarnings2 = &Name::cloopsetWarnings2Dispatcher; - this->setErrors = &Name::cloopsetErrorsDispatcher; - this->setWarnings = &Name::cloopsetWarningsDispatcher; - this->getErrors = &Name::cloopgetErrorsDispatcher; - this->getWarnings = &Name::cloopgetWarningsDispatcher; - this->clone = &Name::cloopcloneDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; + static_cast(self)->Name::setCursorName(&status2, name); + } + catch (...) + { + StatusType::catchException(&status2); + } } - static void CLOOP_CARG cloopinitDispatcher(IStatus* self) throw() + static void CLOOP_CARG cloopdeprecatedFreeDispatcher(IStatement* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::init(); + static_cast(self)->Name::deprecatedFree(&status2); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); } } - static unsigned CLOOP_CARG cloopgetStateDispatcher(const IStatus* self) throw() + static unsigned CLOOP_CARG cloopgetFlagsDispatcher(IStatement* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getState(); + return static_cast(self)->Name::getFlags(&status2); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); return static_cast(0); } } - static void CLOOP_CARG cloopsetErrors2Dispatcher(IStatus* self, unsigned length, const intptr_t* value) throw() + static unsigned CLOOP_CARG cloopgetTimeoutDispatcher(IStatement* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::setErrors2(length, value); + return static_cast(self)->Name::getTimeout(&status2); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static void CLOOP_CARG cloopsetWarnings2Dispatcher(IStatus* self, unsigned length, const intptr_t* value) throw() + static void CLOOP_CARG cloopsetTimeoutDispatcher(IStatement* self, IStatus* status, unsigned timeOut) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::setWarnings2(length, value); + static_cast(self)->Name::setTimeout(&status2, timeOut); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); } } - static void CLOOP_CARG cloopsetErrorsDispatcher(IStatus* self, const intptr_t* value) throw() + static IBatch* CLOOP_CARG cloopcreateBatchDispatcher(IStatement* self, IStatus* status, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::setErrors(value); + return static_cast(self)->Name::createBatch(&status2, inMetadata, parLength, par); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static void CLOOP_CARG cloopsetWarningsDispatcher(IStatus* self, const intptr_t* value) throw() + static void CLOOP_CARG cloopfreeDispatcher(IStatement* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::setWarnings(value); + static_cast(self)->Name::free(&status2); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); } } - static const intptr_t* CLOOP_CARG cloopgetErrorsDispatcher(const IStatus* self) throw() + static unsigned CLOOP_CARG cloopgetMaxInlineBlobSizeDispatcher(IStatement* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getErrors(); + return static_cast(self)->Name::getMaxInlineBlobSize(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static const intptr_t* CLOOP_CARG cloopgetWarningsDispatcher(const IStatus* self) throw() + static void CLOOP_CARG cloopsetMaxInlineBlobSizeDispatcher(IStatement* self, IStatus* status, unsigned size) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getWarnings(); + static_cast(self)->Name::setMaxInlineBlobSize(&status2, size); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static IStatus* CLOOP_CARG cloopcloneDispatcher(const IStatus* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::clone(); + static_cast(self)->Name::addRef(); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } - static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::dispose(); + return static_cast(self)->Name::release(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } }; - template > > > > - class IStatusImpl : public IStatusBaseImpl + template > > > > + class IStatementImpl : public IStatementBaseImpl { protected: - IStatusImpl(DoNotInherit = DoNotInherit()) + IStatementImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IStatusImpl() + virtual ~IStatementImpl() { } - virtual void init() = 0; - virtual unsigned getState() const = 0; - virtual void setErrors2(unsigned length, const intptr_t* value) = 0; - virtual void setWarnings2(unsigned length, const intptr_t* value) = 0; - virtual void setErrors(const intptr_t* value) = 0; - virtual void setWarnings(const intptr_t* value) = 0; - virtual const intptr_t* getErrors() const = 0; - virtual const intptr_t* getWarnings() const = 0; - virtual IStatus* clone() const = 0; + virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; + virtual unsigned getType(StatusType* status) = 0; + virtual const char* getPlan(StatusType* status, FB_BOOLEAN detailed) = 0; + virtual ISC_UINT64 getAffectedRecords(StatusType* status) = 0; + virtual IMessageMetadata* getInputMetadata(StatusType* status) = 0; + virtual IMessageMetadata* getOutputMetadata(StatusType* status) = 0; + virtual ITransaction* execute(StatusType* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) = 0; + virtual IResultSet* openCursor(StatusType* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, unsigned flags) = 0; + virtual void setCursorName(StatusType* status, const char* name) = 0; + virtual void deprecatedFree(StatusType* status) = 0; + virtual unsigned getFlags(StatusType* status) = 0; + virtual unsigned getTimeout(StatusType* status) = 0; + virtual void setTimeout(StatusType* status, unsigned timeOut) = 0; + virtual IBatch* createBatch(StatusType* status, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) = 0; + virtual void free(StatusType* status) = 0; + virtual unsigned getMaxInlineBlobSize(StatusType* status) = 0; + virtual void setMaxInlineBlobSize(StatusType* status, unsigned size) = 0; }; template - class IMasterBaseImpl : public Base + class IBatchBaseImpl : public Base { public: - typedef IMaster Declaration; + typedef IBatch Declaration; - IMasterBaseImpl(DoNotInherit = DoNotInherit()) + IBatchBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->getStatus = &Name::cloopgetStatusDispatcher; - this->getDispatcher = &Name::cloopgetDispatcherDispatcher; - this->getPluginManager = &Name::cloopgetPluginManagerDispatcher; - this->getTimerControl = &Name::cloopgetTimerControlDispatcher; - this->getDtc = &Name::cloopgetDtcDispatcher; - this->registerAttachment = &Name::cloopregisterAttachmentDispatcher; - this->registerTransaction = &Name::cloopregisterTransactionDispatcher; - this->getMetadataBuilder = &Name::cloopgetMetadataBuilderDispatcher; - this->serverMode = &Name::cloopserverModeDispatcher; - this->getUtilInterface = &Name::cloopgetUtilInterfaceDispatcher; - this->getConfigManager = &Name::cloopgetConfigManagerDispatcher; - this->getProcessExiting = &Name::cloopgetProcessExitingDispatcher; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->add = &Name::cloopaddDispatcher; + this->addBlob = &Name::cloopaddBlobDispatcher; + this->appendBlobData = &Name::cloopappendBlobDataDispatcher; + this->addBlobStream = &Name::cloopaddBlobStreamDispatcher; + this->registerBlob = &Name::cloopregisterBlobDispatcher; + this->execute = &Name::cloopexecuteDispatcher; + this->cancel = &Name::cloopcancelDispatcher; + this->getBlobAlignment = &Name::cloopgetBlobAlignmentDispatcher; + this->getMetadata = &Name::cloopgetMetadataDispatcher; + this->setDefaultBpb = &Name::cloopsetDefaultBpbDispatcher; + this->deprecatedClose = &Name::cloopdeprecatedCloseDispatcher; + this->close = &Name::cloopcloseDispatcher; + this->getInfo = &Name::cloopgetInfoDispatcher; } } vTable; this->cloopVTable = &vTable; } - static IStatus* CLOOP_CARG cloopgetStatusDispatcher(IMaster* self) throw() + static void CLOOP_CARG cloopaddDispatcher(IBatch* self, IStatus* status, unsigned count, const void* inBuffer) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::getStatus(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static IProvider* CLOOP_CARG cloopgetDispatcherDispatcher(IMaster* self) throw() - { try { - return static_cast(self)->Name::getDispatcher(); + static_cast(self)->Name::add(&status2, count, inBuffer); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static IPluginManager* CLOOP_CARG cloopgetPluginManagerDispatcher(IMaster* self) throw() + static void CLOOP_CARG cloopaddBlobDispatcher(IBatch* self, IStatus* status, unsigned length, const void* inBuffer, ISC_QUAD* blobId, unsigned parLength, const unsigned char* par) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::getPluginManager(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static ITimerControl* CLOOP_CARG cloopgetTimerControlDispatcher(IMaster* self) throw() - { try { - return static_cast(self)->Name::getTimerControl(); + static_cast(self)->Name::addBlob(&status2, length, inBuffer, blobId, parLength, par); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static IDtc* CLOOP_CARG cloopgetDtcDispatcher(IMaster* self) throw() + static void CLOOP_CARG cloopappendBlobDataDispatcher(IBatch* self, IStatus* status, unsigned length, const void* inBuffer) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getDtc(); + static_cast(self)->Name::appendBlobData(&status2, length, inBuffer); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static IAttachment* CLOOP_CARG cloopregisterAttachmentDispatcher(IMaster* self, IProvider* provider, IAttachment* attachment) throw() + static void CLOOP_CARG cloopaddBlobStreamDispatcher(IBatch* self, IStatus* status, unsigned length, const void* inBuffer) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::registerAttachment(provider, attachment); + static_cast(self)->Name::addBlobStream(&status2, length, inBuffer); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static ITransaction* CLOOP_CARG cloopregisterTransactionDispatcher(IMaster* self, IAttachment* attachment, ITransaction* transaction) throw() + static void CLOOP_CARG cloopregisterBlobDispatcher(IBatch* self, IStatus* status, const ISC_QUAD* existingBlob, ISC_QUAD* blobId) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::registerTransaction(attachment, transaction); + static_cast(self)->Name::registerBlob(&status2, existingBlob, blobId); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static IMetadataBuilder* CLOOP_CARG cloopgetMetadataBuilderDispatcher(IMaster* self, IStatus* status, unsigned fieldCount) throw() + static IBatchCompletionState* CLOOP_CARG cloopexecuteDispatcher(IBatch* self, IStatus* status, ITransaction* transaction) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getMetadataBuilder(&status2, fieldCount); + return static_cast(self)->Name::execute(&status2, transaction); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } - static int CLOOP_CARG cloopserverModeDispatcher(IMaster* self, int mode) throw() + static void CLOOP_CARG cloopcancelDispatcher(IBatch* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::serverMode(mode); + static_cast(self)->Name::cancel(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static IUtil* CLOOP_CARG cloopgetUtilInterfaceDispatcher(IMaster* self) throw() + static unsigned CLOOP_CARG cloopgetBlobAlignmentDispatcher(IBatch* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getUtilInterface(); + return static_cast(self)->Name::getBlobAlignment(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static IConfigManager* CLOOP_CARG cloopgetConfigManagerDispatcher(IMaster* self) throw() + static IMessageMetadata* CLOOP_CARG cloopgetMetadataDispatcher(IBatch* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getConfigManager(); + return static_cast(self)->Name::getMetadata(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static FB_BOOLEAN CLOOP_CARG cloopgetProcessExitingDispatcher(IMaster* self) throw() + static void CLOOP_CARG cloopsetDefaultBpbDispatcher(IBatch* self, IStatus* status, unsigned parLength, const unsigned char* par) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getProcessExiting(); + static_cast(self)->Name::setDefaultBpb(&status2, parLength, par); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } - } - }; - - template > > - class IMasterImpl : public IMasterBaseImpl - { - protected: - IMasterImpl(DoNotInherit = DoNotInherit()) - { - } - - public: - virtual ~IMasterImpl() - { - } - - virtual IStatus* getStatus() = 0; - virtual IProvider* getDispatcher() = 0; - virtual IPluginManager* getPluginManager() = 0; - virtual ITimerControl* getTimerControl() = 0; - virtual IDtc* getDtc() = 0; - virtual IAttachment* registerAttachment(IProvider* provider, IAttachment* attachment) = 0; - virtual ITransaction* registerTransaction(IAttachment* attachment, ITransaction* transaction) = 0; - virtual IMetadataBuilder* getMetadataBuilder(StatusType* status, unsigned fieldCount) = 0; - virtual int serverMode(int mode) = 0; - virtual IUtil* getUtilInterface() = 0; - virtual IConfigManager* getConfigManager() = 0; - virtual FB_BOOLEAN getProcessExiting() = 0; - }; - - template - class IPluginBaseBaseImpl : public Base - { - public: - typedef IPluginBase Declaration; + } - IPluginBaseBaseImpl(DoNotInherit = DoNotInherit()) + static void CLOOP_CARG cloopdeprecatedCloseDispatcher(IBatch* self, IStatus* status) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable - { - VTableImpl() - { - this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->setOwner = &Name::cloopsetOwnerDispatcher; - this->getOwner = &Name::cloopgetOwnerDispatcher; - } - } vTable; + StatusType status2(status); - this->cloopVTable = &vTable; + try + { + static_cast(self)->Name::deprecatedClose(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } } - static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + static void CLOOP_CARG cloopcloseDispatcher(IBatch* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::setOwner(r); + static_cast(self)->Name::close(&status2); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); } } - static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + static void CLOOP_CARG cloopgetInfoDispatcher(IBatch* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getOwner(); + static_cast(self)->Name::getInfo(&status2, itemsLength, items, bufferLength, buffer); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -5709,7 +11182,7 @@ namespace Firebird } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -5723,111 +11196,110 @@ namespace Firebird } }; - template > > > > - class IPluginBaseImpl : public IPluginBaseBaseImpl + template > > > > + class IBatchImpl : public IBatchBaseImpl { protected: - IPluginBaseImpl(DoNotInherit = DoNotInherit()) + IBatchImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IPluginBaseImpl() + virtual ~IBatchImpl() { } - virtual void setOwner(IReferenceCounted* r) = 0; - virtual IReferenceCounted* getOwner() = 0; + virtual void add(StatusType* status, unsigned count, const void* inBuffer) = 0; + virtual void addBlob(StatusType* status, unsigned length, const void* inBuffer, ISC_QUAD* blobId, unsigned parLength, const unsigned char* par) = 0; + virtual void appendBlobData(StatusType* status, unsigned length, const void* inBuffer) = 0; + virtual void addBlobStream(StatusType* status, unsigned length, const void* inBuffer) = 0; + virtual void registerBlob(StatusType* status, const ISC_QUAD* existingBlob, ISC_QUAD* blobId) = 0; + virtual IBatchCompletionState* execute(StatusType* status, ITransaction* transaction) = 0; + virtual void cancel(StatusType* status) = 0; + virtual unsigned getBlobAlignment(StatusType* status) = 0; + virtual IMessageMetadata* getMetadata(StatusType* status) = 0; + virtual void setDefaultBpb(StatusType* status, unsigned parLength, const unsigned char* par) = 0; + virtual void deprecatedClose(StatusType* status) = 0; + virtual void close(StatusType* status) = 0; + virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; }; template - class IPluginSetBaseImpl : public Base + class IBatchCompletionStateBaseImpl : public Base { public: - typedef IPluginSet Declaration; + typedef IBatchCompletionState Declaration; - IPluginSetBaseImpl(DoNotInherit = DoNotInherit()) + IBatchCompletionStateBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->getName = &Name::cloopgetNameDispatcher; - this->getModuleName = &Name::cloopgetModuleNameDispatcher; - this->getPlugin = &Name::cloopgetPluginDispatcher; - this->next = &Name::cloopnextDispatcher; - this->set = &Name::cloopsetDispatcher; + this->dispose = &Name::cloopdisposeDispatcher; + this->getSize = &Name::cloopgetSizeDispatcher; + this->getState = &Name::cloopgetStateDispatcher; + this->findError = &Name::cloopfindErrorDispatcher; + this->getStatus = &Name::cloopgetStatusDispatcher; } } vTable; this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetNameDispatcher(const IPluginSet* self) throw() + static unsigned CLOOP_CARG cloopgetSizeDispatcher(IBatchCompletionState* self, IStatus* status) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::getName(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static const char* CLOOP_CARG cloopgetModuleNameDispatcher(const IPluginSet* self) throw() - { try { - return static_cast(self)->Name::getModuleName(); + return static_cast(self)->Name::getSize(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static IPluginBase* CLOOP_CARG cloopgetPluginDispatcher(IPluginSet* self, IStatus* status) throw() + static int CLOOP_CARG cloopgetStateDispatcher(IBatchCompletionState* self, IStatus* status, unsigned pos) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getPlugin(&status2); + return static_cast(self)->Name::getState(&status2, pos); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } - static void CLOOP_CARG cloopnextDispatcher(IPluginSet* self, IStatus* status) throw() + static unsigned CLOOP_CARG cloopfindErrorDispatcher(IBatchCompletionState* self, IStatus* status, unsigned pos) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::next(&status2); + return static_cast(self)->Name::findError(&status2, pos); } catch (...) { StatusType::catchException(&status2); + return static_cast(0); } } - static void CLOOP_CARG cloopsetDispatcher(IPluginSet* self, IStatus* status, const char* s) throw() + static void CLOOP_CARG cloopgetStatusDispatcher(IBatchCompletionState* self, IStatus* status, IStatus* to, unsigned pos) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::set(&status2, s); + static_cast(self)->Name::getStatus(&status2, to, pos); } catch (...) { @@ -5835,59 +11307,45 @@ namespace Firebird } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() - { - try - { - static_cast(self)->Name::addRef(); - } - catch (...) - { - StatusType::catchException(0); - } - } - - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::release(); + static_cast(self)->Name::dispose(); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } }; - template > > > > - class IPluginSetImpl : public IPluginSetBaseImpl + template > > > > + class IBatchCompletionStateImpl : public IBatchCompletionStateBaseImpl { protected: - IPluginSetImpl(DoNotInherit = DoNotInherit()) + IBatchCompletionStateImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IPluginSetImpl() + virtual ~IBatchCompletionStateImpl() { } - virtual const char* getName() const = 0; - virtual const char* getModuleName() const = 0; - virtual IPluginBase* getPlugin(StatusType* status) = 0; - virtual void next(StatusType* status) = 0; - virtual void set(StatusType* status, const char* s) = 0; + virtual unsigned getSize(StatusType* status) = 0; + virtual int getState(StatusType* status, unsigned pos) = 0; + virtual unsigned findError(StatusType* status, unsigned pos) = 0; + virtual void getStatus(StatusType* status, IStatus* to, unsigned pos) = 0; }; template - class IConfigEntryBaseImpl : public Base + class IReplicatorBaseImpl : public Base { public: - typedef IConfigEntry Declaration; + typedef IReplicator Declaration; - IConfigEntryBaseImpl(DoNotInherit = DoNotInherit()) + IReplicatorBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { @@ -5896,85 +11354,58 @@ namespace Firebird this->version = Base::VERSION; this->addRef = &Name::cloopaddRefDispatcher; this->release = &Name::cloopreleaseDispatcher; - this->getName = &Name::cloopgetNameDispatcher; - this->getValue = &Name::cloopgetValueDispatcher; - this->getIntValue = &Name::cloopgetIntValueDispatcher; - this->getBoolValue = &Name::cloopgetBoolValueDispatcher; - this->getSubConfig = &Name::cloopgetSubConfigDispatcher; + this->process = &Name::cloopprocessDispatcher; + this->deprecatedClose = &Name::cloopdeprecatedCloseDispatcher; + this->close = &Name::cloopcloseDispatcher; } } vTable; this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetNameDispatcher(IConfigEntry* self) throw() + static void CLOOP_CARG cloopprocessDispatcher(IReplicator* self, IStatus* status, unsigned length, const unsigned char* data) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::getName(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static const char* CLOOP_CARG cloopgetValueDispatcher(IConfigEntry* self) throw() - { try { - return static_cast(self)->Name::getValue(); + static_cast(self)->Name::process(&status2, length, data); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static ISC_INT64 CLOOP_CARG cloopgetIntValueDispatcher(IConfigEntry* self) throw() + static void CLOOP_CARG cloopdeprecatedCloseDispatcher(IReplicator* self, IStatus* status) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::getIntValue(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static FB_BOOLEAN CLOOP_CARG cloopgetBoolValueDispatcher(IConfigEntry* self) throw() - { try { - return static_cast(self)->Name::getBoolValue(); + static_cast(self)->Name::deprecatedClose(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static IConfig* CLOOP_CARG cloopgetSubConfigDispatcher(IConfigEntry* self, IStatus* status) throw() + static void CLOOP_CARG cloopcloseDispatcher(IReplicator* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getSubConfig(&status2); + static_cast(self)->Name::close(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -5986,7 +11417,7 @@ namespace Firebird } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -6000,33 +11431,31 @@ namespace Firebird } }; - template > > > > - class IConfigEntryImpl : public IConfigEntryBaseImpl + template > > > > + class IReplicatorImpl : public IReplicatorBaseImpl { protected: - IConfigEntryImpl(DoNotInherit = DoNotInherit()) + IReplicatorImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IConfigEntryImpl() + virtual ~IReplicatorImpl() { } - virtual const char* getName() = 0; - virtual const char* getValue() = 0; - virtual ISC_INT64 getIntValue() = 0; - virtual FB_BOOLEAN getBoolValue() = 0; - virtual IConfig* getSubConfig(StatusType* status) = 0; + virtual void process(StatusType* status, unsigned length, const unsigned char* data) = 0; + virtual void deprecatedClose(StatusType* status) = 0; + virtual void close(StatusType* status) = 0; }; template - class IConfigBaseImpl : public Base + class IRequestBaseImpl : public Base { public: - typedef IConfig Declaration; + typedef IRequest Declaration; - IConfigBaseImpl(DoNotInherit = DoNotInherit()) + IRequestBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { @@ -6035,182 +11464,133 @@ namespace Firebird this->version = Base::VERSION; this->addRef = &Name::cloopaddRefDispatcher; this->release = &Name::cloopreleaseDispatcher; - this->find = &Name::cloopfindDispatcher; - this->findValue = &Name::cloopfindValueDispatcher; - this->findPos = &Name::cloopfindPosDispatcher; + this->receive = &Name::cloopreceiveDispatcher; + this->send = &Name::cloopsendDispatcher; + this->getInfo = &Name::cloopgetInfoDispatcher; + this->start = &Name::cloopstartDispatcher; + this->startAndSend = &Name::cloopstartAndSendDispatcher; + this->unwind = &Name::cloopunwindDispatcher; + this->deprecatedFree = &Name::cloopdeprecatedFreeDispatcher; + this->free = &Name::cloopfreeDispatcher; } } vTable; this->cloopVTable = &vTable; } - static IConfigEntry* CLOOP_CARG cloopfindDispatcher(IConfig* self, IStatus* status, const char* name) throw() + static void CLOOP_CARG cloopreceiveDispatcher(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, void* message) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::find(&status2, name); + static_cast(self)->Name::receive(&status2, level, msgType, length, message); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static IConfigEntry* CLOOP_CARG cloopfindValueDispatcher(IConfig* self, IStatus* status, const char* name, const char* value) throw() + static void CLOOP_CARG cloopsendDispatcher(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, const void* message) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::findValue(&status2, name, value); + static_cast(self)->Name::send(&status2, level, msgType, length, message); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static IConfigEntry* CLOOP_CARG cloopfindPosDispatcher(IConfig* self, IStatus* status, const char* name, unsigned pos) throw() + static void CLOOP_CARG cloopgetInfoDispatcher(IRequest* self, IStatus* status, int level, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::findPos(&status2, name, pos); + static_cast(self)->Name::getInfo(&status2, level, itemsLength, items, bufferLength, buffer); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopstartDispatcher(IRequest* self, IStatus* status, ITransaction* tra, int level) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::addRef(); + static_cast(self)->Name::start(&status2, tra, level); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopstartAndSendDispatcher(IRequest* self, IStatus* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const void* message) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::release(); + static_cast(self)->Name::startAndSend(&status2, tra, level, msgType, length, message); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - }; - - template > > > > - class IConfigImpl : public IConfigBaseImpl - { - protected: - IConfigImpl(DoNotInherit = DoNotInherit()) - { - } - - public: - virtual ~IConfigImpl() - { - } - - virtual IConfigEntry* find(StatusType* status, const char* name) = 0; - virtual IConfigEntry* findValue(StatusType* status, const char* name, const char* value) = 0; - virtual IConfigEntry* findPos(StatusType* status, const char* name, unsigned pos) = 0; - }; - - template - class IFirebirdConfBaseImpl : public Base - { - public: - typedef IFirebirdConf Declaration; - IFirebirdConfBaseImpl(DoNotInherit = DoNotInherit()) + static void CLOOP_CARG cloopunwindDispatcher(IRequest* self, IStatus* status, int level) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable - { - VTableImpl() - { - this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->getKey = &Name::cloopgetKeyDispatcher; - this->asInteger = &Name::cloopasIntegerDispatcher; - this->asString = &Name::cloopasStringDispatcher; - this->asBoolean = &Name::cloopasBooleanDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; - } + StatusType status2(status); - static unsigned CLOOP_CARG cloopgetKeyDispatcher(IFirebirdConf* self, const char* name) throw() - { try { - return static_cast(self)->Name::getKey(name); + static_cast(self)->Name::unwind(&status2, level); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static ISC_INT64 CLOOP_CARG cloopasIntegerDispatcher(IFirebirdConf* self, unsigned key) throw() + static void CLOOP_CARG cloopdeprecatedFreeDispatcher(IRequest* self, IStatus* status) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::asInteger(key); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static const char* CLOOP_CARG cloopasStringDispatcher(IFirebirdConf* self, unsigned key) throw() - { try { - return static_cast(self)->Name::asString(key); + static_cast(self)->Name::deprecatedFree(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static FB_BOOLEAN CLOOP_CARG cloopasBooleanDispatcher(IFirebirdConf* self, unsigned key) throw() + static void CLOOP_CARG cloopfreeDispatcher(IRequest* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::asBoolean(key); + static_cast(self)->Name::free(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -6222,7 +11602,7 @@ namespace Firebird } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -6236,32 +11616,36 @@ namespace Firebird } }; - template > > > > - class IFirebirdConfImpl : public IFirebirdConfBaseImpl + template > > > > + class IRequestImpl : public IRequestBaseImpl { protected: - IFirebirdConfImpl(DoNotInherit = DoNotInherit()) + IRequestImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IFirebirdConfImpl() + virtual ~IRequestImpl() { } - virtual unsigned getKey(const char* name) = 0; - virtual ISC_INT64 asInteger(unsigned key) = 0; - virtual const char* asString(unsigned key) = 0; - virtual FB_BOOLEAN asBoolean(unsigned key) = 0; + virtual void receive(StatusType* status, int level, unsigned msgType, unsigned length, void* message) = 0; + virtual void send(StatusType* status, int level, unsigned msgType, unsigned length, const void* message) = 0; + virtual void getInfo(StatusType* status, int level, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; + virtual void start(StatusType* status, ITransaction* tra, int level) = 0; + virtual void startAndSend(StatusType* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const void* message) = 0; + virtual void unwind(StatusType* status, int level) = 0; + virtual void deprecatedFree(StatusType* status) = 0; + virtual void free(StatusType* status) = 0; }; template - class IPluginConfigBaseImpl : public Base + class IEventsBaseImpl : public Base { public: - typedef IPluginConfig Declaration; + typedef IEvents Declaration; - IPluginConfigBaseImpl(DoNotInherit = DoNotInherit()) + IEventsBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { @@ -6270,66 +11654,35 @@ namespace Firebird this->version = Base::VERSION; this->addRef = &Name::cloopaddRefDispatcher; this->release = &Name::cloopreleaseDispatcher; - this->getConfigFileName = &Name::cloopgetConfigFileNameDispatcher; - this->getDefaultConfig = &Name::cloopgetDefaultConfigDispatcher; - this->getFirebirdConf = &Name::cloopgetFirebirdConfDispatcher; - this->setReleaseDelay = &Name::cloopsetReleaseDelayDispatcher; + this->deprecatedCancel = &Name::cloopdeprecatedCancelDispatcher; + this->cancel = &Name::cloopcancelDispatcher; } } vTable; this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetConfigFileNameDispatcher(IPluginConfig* self) throw() - { - try - { - return static_cast(self)->Name::getConfigFileName(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } - - static IConfig* CLOOP_CARG cloopgetDefaultConfigDispatcher(IPluginConfig* self, IStatus* status) throw() - { - StatusType status2(status); - - try - { - return static_cast(self)->Name::getDefaultConfig(&status2); - } - catch (...) - { - StatusType::catchException(&status2); - return static_cast(0); - } - } - - static IFirebirdConf* CLOOP_CARG cloopgetFirebirdConfDispatcher(IPluginConfig* self, IStatus* status) throw() + static void CLOOP_CARG cloopdeprecatedCancelDispatcher(IEvents* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getFirebirdConf(&status2); + static_cast(self)->Name::deprecatedCancel(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static void CLOOP_CARG cloopsetReleaseDelayDispatcher(IPluginConfig* self, IStatus* status, ISC_UINT64 microSeconds) throw() + static void CLOOP_CARG cloopcancelDispatcher(IEvents* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::setReleaseDelay(&status2, microSeconds); + static_cast(self)->Name::cancel(&status2); } catch (...) { @@ -6337,7 +11690,7 @@ namespace Firebird } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -6349,7 +11702,7 @@ namespace Firebird } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -6363,281 +11716,329 @@ namespace Firebird } }; - template > > > > - class IPluginConfigImpl : public IPluginConfigBaseImpl + template > > > > + class IEventsImpl : public IEventsBaseImpl { protected: - IPluginConfigImpl(DoNotInherit = DoNotInherit()) + IEventsImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IPluginConfigImpl() + virtual ~IEventsImpl() { } - virtual const char* getConfigFileName() = 0; - virtual IConfig* getDefaultConfig(StatusType* status) = 0; - virtual IFirebirdConf* getFirebirdConf(StatusType* status) = 0; - virtual void setReleaseDelay(StatusType* status, ISC_UINT64 microSeconds) = 0; + virtual void deprecatedCancel(StatusType* status) = 0; + virtual void cancel(StatusType* status) = 0; }; template - class IPluginFactoryBaseImpl : public Base + class IAttachmentBaseImpl : public Base { public: - typedef IPluginFactory Declaration; + typedef IAttachment Declaration; - IPluginFactoryBaseImpl(DoNotInherit = DoNotInherit()) + IAttachmentBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->createPlugin = &Name::cloopcreatePluginDispatcher; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getInfo = &Name::cloopgetInfoDispatcher; + this->startTransaction = &Name::cloopstartTransactionDispatcher; + this->reconnectTransaction = &Name::cloopreconnectTransactionDispatcher; + this->compileRequest = &Name::cloopcompileRequestDispatcher; + this->transactRequest = &Name::clooptransactRequestDispatcher; + this->createBlob = &Name::cloopcreateBlobDispatcher; + this->openBlob = &Name::cloopopenBlobDispatcher; + this->getSlice = &Name::cloopgetSliceDispatcher; + this->putSlice = &Name::cloopputSliceDispatcher; + this->executeDyn = &Name::cloopexecuteDynDispatcher; + this->prepare = &Name::cloopprepareDispatcher; + this->execute = &Name::cloopexecuteDispatcher; + this->openCursor = &Name::cloopopenCursorDispatcher; + this->queEvents = &Name::cloopqueEventsDispatcher; + this->cancelOperation = &Name::cloopcancelOperationDispatcher; + this->ping = &Name::clooppingDispatcher; + this->deprecatedDetach = &Name::cloopdeprecatedDetachDispatcher; + this->deprecatedDropDatabase = &Name::cloopdeprecatedDropDatabaseDispatcher; + this->getIdleTimeout = &Name::cloopgetIdleTimeoutDispatcher; + this->setIdleTimeout = &Name::cloopsetIdleTimeoutDispatcher; + this->getStatementTimeout = &Name::cloopgetStatementTimeoutDispatcher; + this->setStatementTimeout = &Name::cloopsetStatementTimeoutDispatcher; + this->createBatch = &Name::cloopcreateBatchDispatcher; + this->createReplicator = &Name::cloopcreateReplicatorDispatcher; + this->detach = &Name::cloopdetachDispatcher; + this->dropDatabase = &Name::cloopdropDatabaseDispatcher; + this->getMaxBlobCacheSize = &Name::cloopgetMaxBlobCacheSizeDispatcher; + this->setMaxBlobCacheSize = &Name::cloopsetMaxBlobCacheSizeDispatcher; + this->getMaxInlineBlobSize = &Name::cloopgetMaxInlineBlobSizeDispatcher; + this->setMaxInlineBlobSize = &Name::cloopsetMaxInlineBlobSizeDispatcher; } } vTable; this->cloopVTable = &vTable; } - static IPluginBase* CLOOP_CARG cloopcreatePluginDispatcher(IPluginFactory* self, IStatus* status, IPluginConfig* factoryParameter) throw() + static void CLOOP_CARG cloopgetInfoDispatcher(IAttachment* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::createPlugin(&status2, factoryParameter); + static_cast(self)->Name::getInfo(&status2, itemsLength, items, bufferLength, buffer); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - }; - template > > - class IPluginFactoryImpl : public IPluginFactoryBaseImpl - { - protected: - IPluginFactoryImpl(DoNotInherit = DoNotInherit()) + static ITransaction* CLOOP_CARG cloopstartTransactionDispatcher(IAttachment* self, IStatus* status, unsigned tpbLength, const unsigned char* tpb) CLOOP_NOEXCEPT { + StatusType status2(status); + + try + { + return static_cast(self)->Name::startTransaction(&status2, tpbLength, tpb); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } } - public: - virtual ~IPluginFactoryImpl() + static ITransaction* CLOOP_CARG cloopreconnectTransactionDispatcher(IAttachment* self, IStatus* status, unsigned length, const unsigned char* id) CLOOP_NOEXCEPT { + StatusType status2(status); + + try + { + return static_cast(self)->Name::reconnectTransaction(&status2, length, id); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } } - virtual IPluginBase* createPlugin(StatusType* status, IPluginConfig* factoryParameter) = 0; - }; + static IRequest* CLOOP_CARG cloopcompileRequestDispatcher(IAttachment* self, IStatus* status, unsigned blrLength, const unsigned char* blr) CLOOP_NOEXCEPT + { + StatusType status2(status); - template - class IPluginModuleBaseImpl : public Base - { - public: - typedef IPluginModule Declaration; + try + { + return static_cast(self)->Name::compileRequest(&status2, blrLength, blr); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } - IPluginModuleBaseImpl(DoNotInherit = DoNotInherit()) + static void CLOOP_CARG clooptransactRequestDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned blrLength, const unsigned char* blr, unsigned inMsgLength, const unsigned char* inMsg, unsigned outMsgLength, unsigned char* outMsg) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable - { - VTableImpl() - { - this->version = Base::VERSION; - this->doClean = &Name::cloopdoCleanDispatcher; - } - } vTable; + StatusType status2(status); - this->cloopVTable = &vTable; + try + { + static_cast(self)->Name::transactRequest(&status2, transaction, blrLength, blr, inMsgLength, inMsg, outMsgLength, outMsg); + } + catch (...) + { + StatusType::catchException(&status2); + } } - static void CLOOP_CARG cloopdoCleanDispatcher(IPluginModule* self) throw() + static IBlob* CLOOP_CARG cloopcreateBlobDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::doClean(); + return static_cast(self)->Name::createBlob(&status2, transaction, id, bpbLength, bpb); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); + return static_cast(0); } } - }; - template > > - class IPluginModuleImpl : public IPluginModuleBaseImpl - { - protected: - IPluginModuleImpl(DoNotInherit = DoNotInherit()) + static IBlob* CLOOP_CARG cloopopenBlobDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) CLOOP_NOEXCEPT { + StatusType status2(status); + + try + { + return static_cast(self)->Name::openBlob(&status2, transaction, id, bpbLength, bpb); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } } - public: - virtual ~IPluginModuleImpl() + static int CLOOP_CARG cloopgetSliceDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) CLOOP_NOEXCEPT { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getSlice(&status2, transaction, id, sdlLength, sdl, paramLength, param, sliceLength, slice); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } } - virtual void doClean() = 0; - }; + static void CLOOP_CARG cloopputSliceDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) CLOOP_NOEXCEPT + { + StatusType status2(status); - template - class IPluginManagerBaseImpl : public Base - { - public: - typedef IPluginManager Declaration; + try + { + static_cast(self)->Name::putSlice(&status2, transaction, id, sdlLength, sdl, paramLength, param, sliceLength, slice); + } + catch (...) + { + StatusType::catchException(&status2); + } + } - IPluginManagerBaseImpl(DoNotInherit = DoNotInherit()) + static void CLOOP_CARG cloopexecuteDynDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned length, const unsigned char* dyn) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable - { - VTableImpl() - { - this->version = Base::VERSION; - this->registerPluginFactory = &Name::cloopregisterPluginFactoryDispatcher; - this->registerModule = &Name::cloopregisterModuleDispatcher; - this->unregisterModule = &Name::cloopunregisterModuleDispatcher; - this->getPlugins = &Name::cloopgetPluginsDispatcher; - this->getConfig = &Name::cloopgetConfigDispatcher; - this->releasePlugin = &Name::cloopreleasePluginDispatcher; - } - } vTable; + StatusType status2(status); - this->cloopVTable = &vTable; + try + { + static_cast(self)->Name::executeDyn(&status2, transaction, length, dyn); + } + catch (...) + { + StatusType::catchException(&status2); + } } - static void CLOOP_CARG cloopregisterPluginFactoryDispatcher(IPluginManager* self, unsigned pluginType, const char* defaultName, IPluginFactory* factory) throw() + static IStatement* CLOOP_CARG cloopprepareDispatcher(IAttachment* self, IStatus* status, ITransaction* tra, unsigned stmtLength, const char* sqlStmt, unsigned dialect, unsigned flags) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::registerPluginFactory(pluginType, defaultName, factory); + return static_cast(self)->Name::prepare(&status2, tra, stmtLength, sqlStmt, dialect, flags); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static void CLOOP_CARG cloopregisterModuleDispatcher(IPluginManager* self, IPluginModule* cleanup) throw() + static ITransaction* CLOOP_CARG cloopexecuteDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::registerModule(cleanup); + return static_cast(self)->Name::execute(&status2, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, outMetadata, outBuffer); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static void CLOOP_CARG cloopunregisterModuleDispatcher(IPluginManager* self, IPluginModule* cleanup) throw() + static IResultSet* CLOOP_CARG cloopopenCursorDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, const char* cursorName, unsigned cursorFlags) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::unregisterModule(cleanup); + return static_cast(self)->Name::openCursor(&status2, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, outMetadata, cursorName, cursorFlags); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static IPluginSet* CLOOP_CARG cloopgetPluginsDispatcher(IPluginManager* self, IStatus* status, unsigned pluginType, const char* namesList, IFirebirdConf* firebirdConf) throw() + static IEvents* CLOOP_CARG cloopqueEventsDispatcher(IAttachment* self, IStatus* status, IEventCallback* callback, unsigned length, const unsigned char* events) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getPlugins(&status2, pluginType, namesList, firebirdConf); + return static_cast(self)->Name::queEvents(&status2, callback, length, events); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } - static IConfig* CLOOP_CARG cloopgetConfigDispatcher(IPluginManager* self, IStatus* status, const char* filename) throw() + static void CLOOP_CARG cloopcancelOperationDispatcher(IAttachment* self, IStatus* status, int option) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getConfig(&status2, filename); + static_cast(self)->Name::cancelOperation(&status2, option); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static void CLOOP_CARG cloopreleasePluginDispatcher(IPluginManager* self, IPluginBase* plugin) throw() + static void CLOOP_CARG clooppingDispatcher(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::releasePlugin(plugin); + static_cast(self)->Name::ping(&status2); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); } } - }; - - template > > - class IPluginManagerImpl : public IPluginManagerBaseImpl - { - protected: - IPluginManagerImpl(DoNotInherit = DoNotInherit()) - { - } - public: - virtual ~IPluginManagerImpl() + static void CLOOP_CARG cloopdeprecatedDetachDispatcher(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT { - } - - virtual void registerPluginFactory(unsigned pluginType, const char* defaultName, IPluginFactory* factory) = 0; - virtual void registerModule(IPluginModule* cleanup) = 0; - virtual void unregisterModule(IPluginModule* cleanup) = 0; - virtual IPluginSet* getPlugins(StatusType* status, unsigned pluginType, const char* namesList, IFirebirdConf* firebirdConf) = 0; - virtual IConfig* getConfig(StatusType* status, const char* filename) = 0; - virtual void releasePlugin(IPluginBase* plugin) = 0; - }; - - template - class ICryptKeyBaseImpl : public Base - { - public: - typedef ICryptKey Declaration; + StatusType status2(status); - ICryptKeyBaseImpl(DoNotInherit = DoNotInherit()) - { - static struct VTableImpl : Base::VTable + try { - VTableImpl() - { - this->version = Base::VERSION; - this->setSymmetric = &Name::cloopsetSymmetricDispatcher; - this->setAsymmetric = &Name::cloopsetAsymmetricDispatcher; - this->getEncryptKey = &Name::cloopgetEncryptKeyDispatcher; - this->getDecryptKey = &Name::cloopgetDecryptKeyDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; + static_cast(self)->Name::deprecatedDetach(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } } - static void CLOOP_CARG cloopsetSymmetricDispatcher(ICryptKey* self, IStatus* status, const char* type, unsigned keyLength, const void* key) throw() + static void CLOOP_CARG cloopdeprecatedDropDatabaseDispatcher(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::setSymmetric(&status2, type, keyLength, key); + static_cast(self)->Name::deprecatedDropDatabase(&status2); } catch (...) { @@ -6645,226 +12046,181 @@ namespace Firebird } } - static void CLOOP_CARG cloopsetAsymmetricDispatcher(ICryptKey* self, IStatus* status, const char* type, unsigned encryptKeyLength, const void* encryptKey, unsigned decryptKeyLength, const void* decryptKey) throw() + static unsigned CLOOP_CARG cloopgetIdleTimeoutDispatcher(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::setAsymmetric(&status2, type, encryptKeyLength, encryptKey, decryptKeyLength, decryptKey); + return static_cast(self)->Name::getIdleTimeout(&status2); } catch (...) { StatusType::catchException(&status2); + return static_cast(0); } } - static const void* CLOOP_CARG cloopgetEncryptKeyDispatcher(ICryptKey* self, unsigned* length) throw() + static void CLOOP_CARG cloopsetIdleTimeoutDispatcher(IAttachment* self, IStatus* status, unsigned timeOut) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getEncryptKey(length); + static_cast(self)->Name::setIdleTimeout(&status2, timeOut); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static const void* CLOOP_CARG cloopgetDecryptKeyDispatcher(ICryptKey* self, unsigned* length) throw() + static unsigned CLOOP_CARG cloopgetStatementTimeoutDispatcher(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getDecryptKey(length); + return static_cast(self)->Name::getStatementTimeout(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - }; - - template > > - class ICryptKeyImpl : public ICryptKeyBaseImpl - { - protected: - ICryptKeyImpl(DoNotInherit = DoNotInherit()) - { - } - public: - virtual ~ICryptKeyImpl() + static void CLOOP_CARG cloopsetStatementTimeoutDispatcher(IAttachment* self, IStatus* status, unsigned timeOut) CLOOP_NOEXCEPT { - } - - virtual void setSymmetric(StatusType* status, const char* type, unsigned keyLength, const void* key) = 0; - virtual void setAsymmetric(StatusType* status, const char* type, unsigned encryptKeyLength, const void* encryptKey, unsigned decryptKeyLength, const void* decryptKey) = 0; - virtual const void* getEncryptKey(unsigned* length) = 0; - virtual const void* getDecryptKey(unsigned* length) = 0; - }; - - template - class IConfigManagerBaseImpl : public Base - { - public: - typedef IConfigManager Declaration; + StatusType status2(status); - IConfigManagerBaseImpl(DoNotInherit = DoNotInherit()) - { - static struct VTableImpl : Base::VTable + try { - VTableImpl() - { - this->version = Base::VERSION; - this->getDirectory = &Name::cloopgetDirectoryDispatcher; - this->getFirebirdConf = &Name::cloopgetFirebirdConfDispatcher; - this->getDatabaseConf = &Name::cloopgetDatabaseConfDispatcher; - this->getPluginConfig = &Name::cloopgetPluginConfigDispatcher; - this->getInstallDirectory = &Name::cloopgetInstallDirectoryDispatcher; - this->getRootDirectory = &Name::cloopgetRootDirectoryDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; + static_cast(self)->Name::setStatementTimeout(&status2, timeOut); + } + catch (...) + { + StatusType::catchException(&status2); + } } - static const char* CLOOP_CARG cloopgetDirectoryDispatcher(IConfigManager* self, unsigned code) throw() + static IBatch* CLOOP_CARG cloopcreateBatchDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getDirectory(code); + return static_cast(self)->Name::createBatch(&status2, transaction, stmtLength, sqlStmt, dialect, inMetadata, parLength, par); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static IFirebirdConf* CLOOP_CARG cloopgetFirebirdConfDispatcher(IConfigManager* self) throw() + static IReplicator* CLOOP_CARG cloopcreateReplicatorDispatcher(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getFirebirdConf(); + return static_cast(self)->Name::createReplicator(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static IFirebirdConf* CLOOP_CARG cloopgetDatabaseConfDispatcher(IConfigManager* self, const char* dbName) throw() + static void CLOOP_CARG cloopdetachDispatcher(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getDatabaseConf(dbName); + static_cast(self)->Name::detach(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static IConfig* CLOOP_CARG cloopgetPluginConfigDispatcher(IConfigManager* self, const char* configuredPlugin) throw() + static void CLOOP_CARG cloopdropDatabaseDispatcher(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getPluginConfig(configuredPlugin); + static_cast(self)->Name::dropDatabase(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static const char* CLOOP_CARG cloopgetInstallDirectoryDispatcher(IConfigManager* self) throw() + static unsigned CLOOP_CARG cloopgetMaxBlobCacheSizeDispatcher(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getInstallDirectory(); + return static_cast(self)->Name::getMaxBlobCacheSize(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetRootDirectoryDispatcher(IConfigManager* self) throw() + static void CLOOP_CARG cloopsetMaxBlobCacheSizeDispatcher(IAttachment* self, IStatus* status, unsigned size) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getRootDirectory(); + static_cast(self)->Name::setMaxBlobCacheSize(&status2, size); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - }; - - template > > - class IConfigManagerImpl : public IConfigManagerBaseImpl - { - protected: - IConfigManagerImpl(DoNotInherit = DoNotInherit()) - { - } - public: - virtual ~IConfigManagerImpl() + static unsigned CLOOP_CARG cloopgetMaxInlineBlobSizeDispatcher(IAttachment* self, IStatus* status) CLOOP_NOEXCEPT { - } - - virtual const char* getDirectory(unsigned code) = 0; - virtual IFirebirdConf* getFirebirdConf() = 0; - virtual IFirebirdConf* getDatabaseConf(const char* dbName) = 0; - virtual IConfig* getPluginConfig(const char* configuredPlugin) = 0; - virtual const char* getInstallDirectory() = 0; - virtual const char* getRootDirectory() = 0; - }; - - template - class IEventCallbackBaseImpl : public Base - { - public: - typedef IEventCallback Declaration; + StatusType status2(status); - IEventCallbackBaseImpl(DoNotInherit = DoNotInherit()) - { - static struct VTableImpl : Base::VTable + try { - VTableImpl() - { - this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->eventCallbackFunction = &Name::cloopeventCallbackFunctionDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; + return static_cast(self)->Name::getMaxInlineBlobSize(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } } - static void CLOOP_CARG cloopeventCallbackFunctionDispatcher(IEventCallback* self, unsigned length, const unsigned char* events) throw() + static void CLOOP_CARG cloopsetMaxInlineBlobSizeDispatcher(IAttachment* self, IStatus* status, unsigned size) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::eventCallbackFunction(length, events); + static_cast(self)->Name::setMaxInlineBlobSize(&status2, size); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -6876,7 +12232,7 @@ namespace Firebird } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -6890,29 +12246,58 @@ namespace Firebird } }; - template > > > > - class IEventCallbackImpl : public IEventCallbackBaseImpl + template > > > > + class IAttachmentImpl : public IAttachmentBaseImpl { protected: - IEventCallbackImpl(DoNotInherit = DoNotInherit()) + IAttachmentImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IEventCallbackImpl() + virtual ~IAttachmentImpl() { } - virtual void eventCallbackFunction(unsigned length, const unsigned char* events) = 0; + virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; + virtual ITransaction* startTransaction(StatusType* status, unsigned tpbLength, const unsigned char* tpb) = 0; + virtual ITransaction* reconnectTransaction(StatusType* status, unsigned length, const unsigned char* id) = 0; + virtual IRequest* compileRequest(StatusType* status, unsigned blrLength, const unsigned char* blr) = 0; + virtual void transactRequest(StatusType* status, ITransaction* transaction, unsigned blrLength, const unsigned char* blr, unsigned inMsgLength, const unsigned char* inMsg, unsigned outMsgLength, unsigned char* outMsg) = 0; + virtual IBlob* createBlob(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) = 0; + virtual IBlob* openBlob(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) = 0; + virtual int getSlice(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) = 0; + virtual void putSlice(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) = 0; + virtual void executeDyn(StatusType* status, ITransaction* transaction, unsigned length, const unsigned char* dyn) = 0; + virtual IStatement* prepare(StatusType* status, ITransaction* tra, unsigned stmtLength, const char* sqlStmt, unsigned dialect, unsigned flags) = 0; + virtual ITransaction* execute(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) = 0; + virtual IResultSet* openCursor(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, const char* cursorName, unsigned cursorFlags) = 0; + virtual IEvents* queEvents(StatusType* status, IEventCallback* callback, unsigned length, const unsigned char* events) = 0; + virtual void cancelOperation(StatusType* status, int option) = 0; + virtual void ping(StatusType* status) = 0; + virtual void deprecatedDetach(StatusType* status) = 0; + virtual void deprecatedDropDatabase(StatusType* status) = 0; + virtual unsigned getIdleTimeout(StatusType* status) = 0; + virtual void setIdleTimeout(StatusType* status, unsigned timeOut) = 0; + virtual unsigned getStatementTimeout(StatusType* status) = 0; + virtual void setStatementTimeout(StatusType* status, unsigned timeOut) = 0; + virtual IBatch* createBatch(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) = 0; + virtual IReplicator* createReplicator(StatusType* status) = 0; + virtual void detach(StatusType* status) = 0; + virtual void dropDatabase(StatusType* status) = 0; + virtual unsigned getMaxBlobCacheSize(StatusType* status) = 0; + virtual void setMaxBlobCacheSize(StatusType* status, unsigned size) = 0; + virtual unsigned getMaxInlineBlobSize(StatusType* status) = 0; + virtual void setMaxInlineBlobSize(StatusType* status, unsigned size) = 0; }; template - class IBlobBaseImpl : public Base + class IServiceBaseImpl : public Base { public: - typedef IBlob Declaration; + typedef IService Declaration; - IBlobBaseImpl(DoNotInherit = DoNotInherit()) + IServiceBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { @@ -6921,54 +12306,38 @@ namespace Firebird this->version = Base::VERSION; this->addRef = &Name::cloopaddRefDispatcher; this->release = &Name::cloopreleaseDispatcher; - this->getInfo = &Name::cloopgetInfoDispatcher; - this->getSegment = &Name::cloopgetSegmentDispatcher; - this->putSegment = &Name::cloopputSegmentDispatcher; + this->deprecatedDetach = &Name::cloopdeprecatedDetachDispatcher; + this->query = &Name::cloopqueryDispatcher; + this->start = &Name::cloopstartDispatcher; + this->detach = &Name::cloopdetachDispatcher; this->cancel = &Name::cloopcancelDispatcher; - this->close = &Name::cloopcloseDispatcher; - this->seek = &Name::cloopseekDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopgetInfoDispatcher(IBlob* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw() - { - StatusType status2(status); - - try - { - static_cast(self)->Name::getInfo(&status2, itemsLength, items, bufferLength, buffer); - } - catch (...) - { - StatusType::catchException(&status2); - } - } - - static int CLOOP_CARG cloopgetSegmentDispatcher(IBlob* self, IStatus* status, unsigned bufferLength, void* buffer, unsigned* segmentLength) throw() + static void CLOOP_CARG cloopdeprecatedDetachDispatcher(IService* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getSegment(&status2, bufferLength, buffer, segmentLength); + static_cast(self)->Name::deprecatedDetach(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static void CLOOP_CARG cloopputSegmentDispatcher(IBlob* self, IStatus* status, unsigned length, const void* buffer) throw() + static void CLOOP_CARG cloopqueryDispatcher(IService* self, IStatus* status, unsigned sendLength, const unsigned char* sendItems, unsigned receiveLength, const unsigned char* receiveItems, unsigned bufferLength, unsigned char* buffer) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::putSegment(&status2, length, buffer); + static_cast(self)->Name::query(&status2, sendLength, sendItems, receiveLength, receiveItems, bufferLength, buffer); } catch (...) { @@ -6976,13 +12345,13 @@ namespace Firebird } } - static void CLOOP_CARG cloopcancelDispatcher(IBlob* self, IStatus* status) throw() + static void CLOOP_CARG cloopstartDispatcher(IService* self, IStatus* status, unsigned spbLength, const unsigned char* spb) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::cancel(&status2); + static_cast(self)->Name::start(&status2, spbLength, spb); } catch (...) { @@ -6990,13 +12359,13 @@ namespace Firebird } } - static void CLOOP_CARG cloopcloseDispatcher(IBlob* self, IStatus* status) throw() + static void CLOOP_CARG cloopdetachDispatcher(IService* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::close(&status2); + static_cast(self)->Name::detach(&status2); } catch (...) { @@ -7004,22 +12373,21 @@ namespace Firebird } } - static int CLOOP_CARG cloopseekDispatcher(IBlob* self, IStatus* status, int mode, int offset) throw() + static void CLOOP_CARG cloopcancelDispatcher(IService* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::seek(&status2, mode, offset); + static_cast(self)->Name::cancel(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -7031,7 +12399,7 @@ namespace Firebird } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -7045,34 +12413,33 @@ namespace Firebird } }; - template > > > > - class IBlobImpl : public IBlobBaseImpl + template > > > > + class IServiceImpl : public IServiceBaseImpl { protected: - IBlobImpl(DoNotInherit = DoNotInherit()) + IServiceImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IBlobImpl() + virtual ~IServiceImpl() { } - virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; - virtual int getSegment(StatusType* status, unsigned bufferLength, void* buffer, unsigned* segmentLength) = 0; - virtual void putSegment(StatusType* status, unsigned length, const void* buffer) = 0; + virtual void deprecatedDetach(StatusType* status) = 0; + virtual void query(StatusType* status, unsigned sendLength, const unsigned char* sendItems, unsigned receiveLength, const unsigned char* receiveItems, unsigned bufferLength, unsigned char* buffer) = 0; + virtual void start(StatusType* status, unsigned spbLength, const unsigned char* spb) = 0; + virtual void detach(StatusType* status) = 0; virtual void cancel(StatusType* status) = 0; - virtual void close(StatusType* status) = 0; - virtual int seek(StatusType* status, int mode, int offset) = 0; }; template - class ITransactionBaseImpl : public Base + class IProviderBaseImpl : public Base { public: - typedef ITransaction Declaration; + typedef IProvider Declaration; - ITransactionBaseImpl(DoNotInherit = DoNotInherit()) + IProviderBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { @@ -7081,113 +12448,71 @@ namespace Firebird this->version = Base::VERSION; this->addRef = &Name::cloopaddRefDispatcher; this->release = &Name::cloopreleaseDispatcher; - this->getInfo = &Name::cloopgetInfoDispatcher; - this->prepare = &Name::cloopprepareDispatcher; - this->commit = &Name::cloopcommitDispatcher; - this->commitRetaining = &Name::cloopcommitRetainingDispatcher; - this->rollback = &Name::clooprollbackDispatcher; - this->rollbackRetaining = &Name::clooprollbackRetainingDispatcher; - this->disconnect = &Name::cloopdisconnectDispatcher; - this->join = &Name::cloopjoinDispatcher; - this->validate = &Name::cloopvalidateDispatcher; - this->enterDtc = &Name::cloopenterDtcDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->attachDatabase = &Name::cloopattachDatabaseDispatcher; + this->createDatabase = &Name::cloopcreateDatabaseDispatcher; + this->attachServiceManager = &Name::cloopattachServiceManagerDispatcher; + this->shutdown = &Name::cloopshutdownDispatcher; + this->setDbCryptCallback = &Name::cloopsetDbCryptCallbackDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopgetInfoDispatcher(ITransaction* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw() - { - StatusType status2(status); - - try - { - static_cast(self)->Name::getInfo(&status2, itemsLength, items, bufferLength, buffer); - } - catch (...) - { - StatusType::catchException(&status2); - } - } - - static void CLOOP_CARG cloopprepareDispatcher(ITransaction* self, IStatus* status, unsigned msgLength, const unsigned char* message) throw() - { - StatusType status2(status); - - try - { - static_cast(self)->Name::prepare(&status2, msgLength, message); - } - catch (...) - { - StatusType::catchException(&status2); - } - } - - static void CLOOP_CARG cloopcommitDispatcher(ITransaction* self, IStatus* status) throw() + static IAttachment* CLOOP_CARG cloopattachDatabaseDispatcher(IProvider* self, IStatus* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::commit(&status2); - } - catch (...) - { - StatusType::catchException(&status2); - } - } - - static void CLOOP_CARG cloopcommitRetainingDispatcher(ITransaction* self, IStatus* status) throw() - { - StatusType status2(status); - - try - { - static_cast(self)->Name::commitRetaining(&status2); + return static_cast(self)->Name::attachDatabase(&status2, fileName, dpbLength, dpb); } catch (...) { StatusType::catchException(&status2); + return static_cast(0); } } - static void CLOOP_CARG clooprollbackDispatcher(ITransaction* self, IStatus* status) throw() + static IAttachment* CLOOP_CARG cloopcreateDatabaseDispatcher(IProvider* self, IStatus* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::rollback(&status2); + return static_cast(self)->Name::createDatabase(&status2, fileName, dpbLength, dpb); } catch (...) { StatusType::catchException(&status2); + return static_cast(0); } } - static void CLOOP_CARG clooprollbackRetainingDispatcher(ITransaction* self, IStatus* status) throw() + static IService* CLOOP_CARG cloopattachServiceManagerDispatcher(IProvider* self, IStatus* status, const char* service, unsigned spbLength, const unsigned char* spb) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::rollbackRetaining(&status2); + return static_cast(self)->Name::attachServiceManager(&status2, service, spbLength, spb); } catch (...) { StatusType::catchException(&status2); + return static_cast(0); } } - static void CLOOP_CARG cloopdisconnectDispatcher(ITransaction* self, IStatus* status) throw() + static void CLOOP_CARG cloopshutdownDispatcher(IProvider* self, IStatus* status, unsigned timeout, const int reason) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::disconnect(&status2); + static_cast(self)->Name::shutdown(&status2, timeout, reason); } catch (...) { @@ -7195,52 +12520,46 @@ namespace Firebird } } - static ITransaction* CLOOP_CARG cloopjoinDispatcher(ITransaction* self, IStatus* status, ITransaction* transaction) throw() + static void CLOOP_CARG cloopsetDbCryptCallbackDispatcher(IProvider* self, IStatus* status, ICryptKeyCallback* cryptCallback) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::join(&status2, transaction); + static_cast(self)->Name::setDbCryptCallback(&status2, cryptCallback); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static ITransaction* CLOOP_CARG cloopvalidateDispatcher(ITransaction* self, IStatus* status, IAttachment* attachment) throw() + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::validate(&status2, attachment); + static_cast(self)->Name::setOwner(r); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); } } - static ITransaction* CLOOP_CARG cloopenterDtcDispatcher(ITransaction* self, IStatus* status) throw() + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::enterDtc(&status2); + return static_cast(self)->Name::getOwner(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -7252,7 +12571,7 @@ namespace Firebird } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -7266,400 +12585,434 @@ namespace Firebird } }; - template > > > > - class ITransactionImpl : public ITransactionBaseImpl + template > > > > > > + class IProviderImpl : public IProviderBaseImpl { protected: - ITransactionImpl(DoNotInherit = DoNotInherit()) + IProviderImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ITransactionImpl() + virtual ~IProviderImpl() { } - virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; - virtual void prepare(StatusType* status, unsigned msgLength, const unsigned char* message) = 0; - virtual void commit(StatusType* status) = 0; - virtual void commitRetaining(StatusType* status) = 0; - virtual void rollback(StatusType* status) = 0; - virtual void rollbackRetaining(StatusType* status) = 0; - virtual void disconnect(StatusType* status) = 0; - virtual ITransaction* join(StatusType* status, ITransaction* transaction) = 0; - virtual ITransaction* validate(StatusType* status, IAttachment* attachment) = 0; - virtual ITransaction* enterDtc(StatusType* status) = 0; + virtual IAttachment* attachDatabase(StatusType* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) = 0; + virtual IAttachment* createDatabase(StatusType* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) = 0; + virtual IService* attachServiceManager(StatusType* status, const char* service, unsigned spbLength, const unsigned char* spb) = 0; + virtual void shutdown(StatusType* status, unsigned timeout, const int reason) = 0; + virtual void setDbCryptCallback(StatusType* status, ICryptKeyCallback* cryptCallback) = 0; }; template - class IMessageMetadataBaseImpl : public Base + class IDtcStartBaseImpl : public Base { public: - typedef IMessageMetadata Declaration; + typedef IDtcStart Declaration; - IMessageMetadataBaseImpl(DoNotInherit = DoNotInherit()) + IDtcStartBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->getCount = &Name::cloopgetCountDispatcher; - this->getField = &Name::cloopgetFieldDispatcher; - this->getRelation = &Name::cloopgetRelationDispatcher; - this->getOwner = &Name::cloopgetOwnerDispatcher; - this->getAlias = &Name::cloopgetAliasDispatcher; - this->getType = &Name::cloopgetTypeDispatcher; - this->isNullable = &Name::cloopisNullableDispatcher; - this->getSubType = &Name::cloopgetSubTypeDispatcher; - this->getLength = &Name::cloopgetLengthDispatcher; - this->getScale = &Name::cloopgetScaleDispatcher; - this->getCharSet = &Name::cloopgetCharSetDispatcher; - this->getOffset = &Name::cloopgetOffsetDispatcher; - this->getNullOffset = &Name::cloopgetNullOffsetDispatcher; - this->getBuilder = &Name::cloopgetBuilderDispatcher; - this->getMessageLength = &Name::cloopgetMessageLengthDispatcher; + this->dispose = &Name::cloopdisposeDispatcher; + this->addAttachment = &Name::cloopaddAttachmentDispatcher; + this->addWithTpb = &Name::cloopaddWithTpbDispatcher; + this->start = &Name::cloopstartDispatcher; } } vTable; this->cloopVTable = &vTable; } - static unsigned CLOOP_CARG cloopgetCountDispatcher(IMessageMetadata* self, IStatus* status) throw() + static void CLOOP_CARG cloopaddAttachmentDispatcher(IDtcStart* self, IStatus* status, IAttachment* att) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getCount(&status2); + static_cast(self)->Name::addAttachment(&status2, att); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static const char* CLOOP_CARG cloopgetFieldDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + static void CLOOP_CARG cloopaddWithTpbDispatcher(IDtcStart* self, IStatus* status, IAttachment* att, unsigned length, const unsigned char* tpb) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getField(&status2, index); + static_cast(self)->Name::addWithTpb(&status2, att, length, tpb); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static const char* CLOOP_CARG cloopgetRelationDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + static ITransaction* CLOOP_CARG cloopstartDispatcher(IDtcStart* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getRelation(&status2, index); + return static_cast(self)->Name::start(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetOwnerDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getOwner(&status2, index); + static_cast(self)->Name::dispose(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); } } + }; + + template > > > > + class IDtcStartImpl : public IDtcStartBaseImpl + { + protected: + IDtcStartImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IDtcStartImpl() + { + } + + virtual void addAttachment(StatusType* status, IAttachment* att) = 0; + virtual void addWithTpb(StatusType* status, IAttachment* att, unsigned length, const unsigned char* tpb) = 0; + virtual ITransaction* start(StatusType* status) = 0; + }; + + template + class IDtcBaseImpl : public Base + { + public: + typedef IDtc Declaration; + + IDtcBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->join = &Name::cloopjoinDispatcher; + this->startBuilder = &Name::cloopstartBuilderDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } - static const char* CLOOP_CARG cloopgetAliasDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + static ITransaction* CLOOP_CARG cloopjoinDispatcher(IDtc* self, IStatus* status, ITransaction* one, ITransaction* two) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getAlias(&status2, index); + return static_cast(self)->Name::join(&status2, one, two); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } - static unsigned CLOOP_CARG cloopgetTypeDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + static IDtcStart* CLOOP_CARG cloopstartBuilderDispatcher(IDtc* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getType(&status2, index); + return static_cast(self)->Name::startBuilder(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } + }; - static FB_BOOLEAN CLOOP_CARG cloopisNullableDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + template > > + class IDtcImpl : public IDtcBaseImpl + { + protected: + IDtcImpl(DoNotInherit = DoNotInherit()) { - StatusType status2(status); + } - try - { - return static_cast(self)->Name::isNullable(&status2, index); - } - catch (...) - { - StatusType::catchException(&status2); - return static_cast(0); - } + public: + virtual ~IDtcImpl() + { } - static int CLOOP_CARG cloopgetSubTypeDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + virtual ITransaction* join(StatusType* status, ITransaction* one, ITransaction* two) = 0; + virtual IDtcStart* startBuilder(StatusType* status) = 0; + }; + + template + class IAuthBaseImpl : public Base + { + public: + typedef IAuth Declaration; + + IAuthBaseImpl(DoNotInherit = DoNotInherit()) { - StatusType status2(status); + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + } + } vTable; + this->cloopVTable = &vTable; + } + + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) CLOOP_NOEXCEPT + { try { - return static_cast(self)->Name::getSubType(&status2, index); + static_cast(self)->Name::setOwner(r); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); } } - static unsigned CLOOP_CARG cloopgetLengthDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getLength(&status2, index); + return static_cast(self)->Name::getOwner(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static int CLOOP_CARG cloopgetScaleDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getScale(&status2, index); + static_cast(self)->Name::addRef(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); } } - static unsigned CLOOP_CARG cloopgetCharSetDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getCharSet(&status2, index); + return static_cast(self)->Name::release(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } + }; - static unsigned CLOOP_CARG cloopgetOffsetDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + template > > > > > > + class IAuthImpl : public IAuthBaseImpl + { + protected: + IAuthImpl(DoNotInherit = DoNotInherit()) { - StatusType status2(status); + } - try - { - return static_cast(self)->Name::getOffset(&status2, index); - } - catch (...) - { - StatusType::catchException(&status2); - return static_cast(0); - } + public: + virtual ~IAuthImpl() + { } - static unsigned CLOOP_CARG cloopgetNullOffsetDispatcher(IMessageMetadata* self, IStatus* status, unsigned index) throw() + }; + + template + class IWriterBaseImpl : public Base + { + public: + typedef IWriter Declaration; + + IWriterBaseImpl(DoNotInherit = DoNotInherit()) { - StatusType status2(status); + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->reset = &Name::cloopresetDispatcher; + this->add = &Name::cloopaddDispatcher; + this->setType = &Name::cloopsetTypeDispatcher; + this->setDb = &Name::cloopsetDbDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + static void CLOOP_CARG cloopresetDispatcher(IWriter* self) CLOOP_NOEXCEPT + { try { - return static_cast(self)->Name::getNullOffset(&status2, index); + static_cast(self)->Name::reset(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); } } - static IMetadataBuilder* CLOOP_CARG cloopgetBuilderDispatcher(IMessageMetadata* self, IStatus* status) throw() + static void CLOOP_CARG cloopaddDispatcher(IWriter* self, IStatus* status, const char* name) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getBuilder(&status2); + static_cast(self)->Name::add(&status2, name); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static unsigned CLOOP_CARG cloopgetMessageLengthDispatcher(IMessageMetadata* self, IStatus* status) throw() + static void CLOOP_CARG cloopsetTypeDispatcher(IWriter* self, IStatus* status, const char* value) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getMessageLength(&status2); + static_cast(self)->Name::setType(&status2, value); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopsetDbDispatcher(IWriter* self, IStatus* status, const char* value) CLOOP_NOEXCEPT { - try - { - static_cast(self)->Name::addRef(); - } - catch (...) - { - StatusType::catchException(0); - } - } + StatusType status2(status); - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() - { try { - return static_cast(self)->Name::release(); + static_cast(self)->Name::setDb(&status2, value); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } }; - template > > > > - class IMessageMetadataImpl : public IMessageMetadataBaseImpl + template > > + class IWriterImpl : public IWriterBaseImpl { protected: - IMessageMetadataImpl(DoNotInherit = DoNotInherit()) + IWriterImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IMessageMetadataImpl() + virtual ~IWriterImpl() { } - virtual unsigned getCount(StatusType* status) = 0; - virtual const char* getField(StatusType* status, unsigned index) = 0; - virtual const char* getRelation(StatusType* status, unsigned index) = 0; - virtual const char* getOwner(StatusType* status, unsigned index) = 0; - virtual const char* getAlias(StatusType* status, unsigned index) = 0; - virtual unsigned getType(StatusType* status, unsigned index) = 0; - virtual FB_BOOLEAN isNullable(StatusType* status, unsigned index) = 0; - virtual int getSubType(StatusType* status, unsigned index) = 0; - virtual unsigned getLength(StatusType* status, unsigned index) = 0; - virtual int getScale(StatusType* status, unsigned index) = 0; - virtual unsigned getCharSet(StatusType* status, unsigned index) = 0; - virtual unsigned getOffset(StatusType* status, unsigned index) = 0; - virtual unsigned getNullOffset(StatusType* status, unsigned index) = 0; - virtual IMetadataBuilder* getBuilder(StatusType* status) = 0; - virtual unsigned getMessageLength(StatusType* status) = 0; + virtual void reset() = 0; + virtual void add(StatusType* status, const char* name) = 0; + virtual void setType(StatusType* status, const char* value) = 0; + virtual void setDb(StatusType* status, const char* value) = 0; }; template - class IMetadataBuilderBaseImpl : public Base + class IServerBlockBaseImpl : public Base { public: - typedef IMetadataBuilder Declaration; + typedef IServerBlock Declaration; - IMetadataBuilderBaseImpl(DoNotInherit = DoNotInherit()) + IServerBlockBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->setType = &Name::cloopsetTypeDispatcher; - this->setSubType = &Name::cloopsetSubTypeDispatcher; - this->setLength = &Name::cloopsetLengthDispatcher; - this->setCharSet = &Name::cloopsetCharSetDispatcher; - this->setScale = &Name::cloopsetScaleDispatcher; - this->truncate = &Name::clooptruncateDispatcher; - this->moveNameToIndex = &Name::cloopmoveNameToIndexDispatcher; - this->remove = &Name::cloopremoveDispatcher; - this->addField = &Name::cloopaddFieldDispatcher; - this->getMetadata = &Name::cloopgetMetadataDispatcher; + this->getLogin = &Name::cloopgetLoginDispatcher; + this->getData = &Name::cloopgetDataDispatcher; + this->putData = &Name::cloopputDataDispatcher; + this->newKey = &Name::cloopnewKeyDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopsetTypeDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned type) throw() + static const char* CLOOP_CARG cloopgetLoginDispatcher(IServerBlock* self) CLOOP_NOEXCEPT { - StatusType status2(status); + try + { + return static_cast(self)->Name::getLogin(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + static const unsigned char* CLOOP_CARG cloopgetDataDispatcher(IServerBlock* self, unsigned* length) CLOOP_NOEXCEPT + { try { - static_cast(self)->Name::setType(&status2, index, type); + return static_cast(self)->Name::getData(length); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopsetSubTypeDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, int subType) throw() + static void CLOOP_CARG cloopputDataDispatcher(IServerBlock* self, IStatus* status, unsigned length, const void* data) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::setSubType(&status2, index, subType); + static_cast(self)->Name::putData(&status2, length, data); } catch (...) { @@ -7667,83 +13020,114 @@ namespace Firebird } } - static void CLOOP_CARG cloopsetLengthDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned length) throw() + static ICryptKey* CLOOP_CARG cloopnewKeyDispatcher(IServerBlock* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::setLength(&status2, index, length); + return static_cast(self)->Name::newKey(&status2); } catch (...) { StatusType::catchException(&status2); + return static_cast(0); } } + }; - static void CLOOP_CARG cloopsetCharSetDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, unsigned charSet) throw() + template > > + class IServerBlockImpl : public IServerBlockBaseImpl + { + protected: + IServerBlockImpl(DoNotInherit = DoNotInherit()) { - StatusType status2(status); + } + + public: + virtual ~IServerBlockImpl() + { + } + + virtual const char* getLogin() = 0; + virtual const unsigned char* getData(unsigned* length) = 0; + virtual void putData(StatusType* status, unsigned length, const void* data) = 0; + virtual ICryptKey* newKey(StatusType* status) = 0; + }; + + template + class IClientBlockBaseImpl : public Base + { + public: + typedef IClientBlock Declaration; - try - { - static_cast(self)->Name::setCharSet(&status2, index, charSet); - } - catch (...) + IClientBlockBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable { - StatusType::catchException(&status2); - } + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getLogin = &Name::cloopgetLoginDispatcher; + this->getPassword = &Name::cloopgetPasswordDispatcher; + this->getData = &Name::cloopgetDataDispatcher; + this->putData = &Name::cloopputDataDispatcher; + this->newKey = &Name::cloopnewKeyDispatcher; + this->getAuthBlock = &Name::cloopgetAuthBlockDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopsetScaleDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index, int scale) throw() + static const char* CLOOP_CARG cloopgetLoginDispatcher(IClientBlock* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::setScale(&status2, index, scale); + return static_cast(self)->Name::getLogin(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG clooptruncateDispatcher(IMetadataBuilder* self, IStatus* status, unsigned count) throw() + static const char* CLOOP_CARG cloopgetPasswordDispatcher(IClientBlock* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::truncate(&status2, count); + return static_cast(self)->Name::getPassword(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopmoveNameToIndexDispatcher(IMetadataBuilder* self, IStatus* status, const char* name, unsigned index) throw() + static const unsigned char* CLOOP_CARG cloopgetDataDispatcher(IClientBlock* self, unsigned* length) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::moveNameToIndex(&status2, name, index); + return static_cast(self)->Name::getData(length); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopremoveDispatcher(IMetadataBuilder* self, IStatus* status, unsigned index) throw() + static void CLOOP_CARG cloopputDataDispatcher(IClientBlock* self, IStatus* status, unsigned length, const void* data) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::remove(&status2, index); + static_cast(self)->Name::putData(&status2, length, data); } catch (...) { @@ -7751,37 +13135,37 @@ namespace Firebird } } - static unsigned CLOOP_CARG cloopaddFieldDispatcher(IMetadataBuilder* self, IStatus* status) throw() + static ICryptKey* CLOOP_CARG cloopnewKeyDispatcher(IClientBlock* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::addField(&status2); + return static_cast(self)->Name::newKey(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } - static IMessageMetadata* CLOOP_CARG cloopgetMetadataDispatcher(IMetadataBuilder* self, IStatus* status) throw() + static IAuthBlock* CLOOP_CARG cloopgetAuthBlockDispatcher(IClientBlock* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getMetadata(&status2); + return static_cast(self)->Name::getAuthBlock(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -7793,7 +13177,7 @@ namespace Firebird } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -7807,38 +13191,34 @@ namespace Firebird } }; - template > > > > - class IMetadataBuilderImpl : public IMetadataBuilderBaseImpl + template > > > > + class IClientBlockImpl : public IClientBlockBaseImpl { protected: - IMetadataBuilderImpl(DoNotInherit = DoNotInherit()) + IClientBlockImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IMetadataBuilderImpl() + virtual ~IClientBlockImpl() { } - virtual void setType(StatusType* status, unsigned index, unsigned type) = 0; - virtual void setSubType(StatusType* status, unsigned index, int subType) = 0; - virtual void setLength(StatusType* status, unsigned index, unsigned length) = 0; - virtual void setCharSet(StatusType* status, unsigned index, unsigned charSet) = 0; - virtual void setScale(StatusType* status, unsigned index, int scale) = 0; - virtual void truncate(StatusType* status, unsigned count) = 0; - virtual void moveNameToIndex(StatusType* status, const char* name, unsigned index) = 0; - virtual void remove(StatusType* status, unsigned index) = 0; - virtual unsigned addField(StatusType* status) = 0; - virtual IMessageMetadata* getMetadata(StatusType* status) = 0; + virtual const char* getLogin() = 0; + virtual const char* getPassword() = 0; + virtual const unsigned char* getData(unsigned* length) = 0; + virtual void putData(StatusType* status, unsigned length, const void* data) = 0; + virtual ICryptKey* newKey(StatusType* status) = 0; + virtual IAuthBlock* getAuthBlock(StatusType* status) = 0; }; template - class IResultSetBaseImpl : public Base + class IServerBaseImpl : public Base { public: - typedef IResultSet Declaration; + typedef IServer Declaration; - IResultSetBaseImpl(DoNotInherit = DoNotInherit()) + IServerBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { @@ -7847,30 +13227,23 @@ namespace Firebird this->version = Base::VERSION; this->addRef = &Name::cloopaddRefDispatcher; this->release = &Name::cloopreleaseDispatcher; - this->fetchNext = &Name::cloopfetchNextDispatcher; - this->fetchPrior = &Name::cloopfetchPriorDispatcher; - this->fetchFirst = &Name::cloopfetchFirstDispatcher; - this->fetchLast = &Name::cloopfetchLastDispatcher; - this->fetchAbsolute = &Name::cloopfetchAbsoluteDispatcher; - this->fetchRelative = &Name::cloopfetchRelativeDispatcher; - this->isEof = &Name::cloopisEofDispatcher; - this->isBof = &Name::cloopisBofDispatcher; - this->getMetadata = &Name::cloopgetMetadataDispatcher; - this->close = &Name::cloopcloseDispatcher; - this->setDelayedOutputFormat = &Name::cloopsetDelayedOutputFormatDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->authenticate = &Name::cloopauthenticateDispatcher; + this->setDbCryptCallback = &Name::cloopsetDbCryptCallbackDispatcher; } } vTable; this->cloopVTable = &vTable; } - static int CLOOP_CARG cloopfetchNextDispatcher(IResultSet* self, IStatus* status, void* message) throw() + static int CLOOP_CARG cloopauthenticateDispatcher(IServer* self, IStatus* status, IServerBlock* sBlock, IWriter* writerInterface) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::fetchNext(&status2, message); + return static_cast(self)->Name::authenticate(&status2, sBlock, writerInterface); } catch (...) { @@ -7879,73 +13252,119 @@ namespace Firebird } } - static int CLOOP_CARG cloopfetchPriorDispatcher(IResultSet* self, IStatus* status, void* message) throw() + static void CLOOP_CARG cloopsetDbCryptCallbackDispatcher(IServer* self, IStatus* status, ICryptKeyCallback* cryptCallback) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::fetchPrior(&status2, message); + static_cast(self)->Name::setDbCryptCallback(&status2, cryptCallback); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static int CLOOP_CARG cloopfetchFirstDispatcher(IResultSet* self, IStatus* status, void* message) throw() + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::fetchFirst(&status2, message); + static_cast(self)->Name::setOwner(r); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); } } - static int CLOOP_CARG cloopfetchLastDispatcher(IResultSet* self, IStatus* status, void* message) throw() + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::fetchLast(&status2, message); + return static_cast(self)->Name::getOwner(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static int CLOOP_CARG cloopfetchAbsoluteDispatcher(IResultSet* self, IStatus* status, int position, void* message) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { - StatusType status2(status); + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { try { - return static_cast(self)->Name::fetchAbsolute(&status2, position, message); + return static_cast(self)->Name::release(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); return static_cast(0); } } + }; + + template > > > > > > > > + class IServerImpl : public IServerBaseImpl + { + protected: + IServerImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IServerImpl() + { + } + + virtual int authenticate(StatusType* status, IServerBlock* sBlock, IWriter* writerInterface) = 0; + virtual void setDbCryptCallback(StatusType* status, ICryptKeyCallback* cryptCallback) = 0; + }; + + template + class IClientBaseImpl : public Base + { + public: + typedef IClient Declaration; + + IClientBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->authenticate = &Name::cloopauthenticateDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } - static int CLOOP_CARG cloopfetchRelativeDispatcher(IResultSet* self, IStatus* status, int offset, void* message) throw() + static int CLOOP_CARG cloopauthenticateDispatcher(IClient* self, IStatus* status, IClientBlock* cBlock) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::fetchRelative(&status2, offset, message); + return static_cast(self)->Name::authenticate(&status2, cBlock); } catch (...) { @@ -7954,303 +13373,307 @@ namespace Firebird } } - static FB_BOOLEAN CLOOP_CARG cloopisEofDispatcher(IResultSet* self, IStatus* status) throw() + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::isEof(&status2); + static_cast(self)->Name::setOwner(r); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); } } - static FB_BOOLEAN CLOOP_CARG cloopisBofDispatcher(IResultSet* self, IStatus* status) throw() + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::isBof(&status2); + return static_cast(self)->Name::getOwner(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static IMessageMetadata* CLOOP_CARG cloopgetMetadataDispatcher(IResultSet* self, IStatus* status) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getMetadata(&status2); + static_cast(self)->Name::addRef(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); } } - static void CLOOP_CARG cloopcloseDispatcher(IResultSet* self, IStatus* status) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::close(&status2); + return static_cast(self)->Name::release(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } + }; + + template > > > > > > > > + class IClientImpl : public IClientBaseImpl + { + protected: + IClientImpl(DoNotInherit = DoNotInherit()) + { + } - static void CLOOP_CARG cloopsetDelayedOutputFormatDispatcher(IResultSet* self, IStatus* status, IMessageMetadata* format) throw() + public: + virtual ~IClientImpl() { - StatusType status2(status); + } + + virtual int authenticate(StatusType* status, IClientBlock* cBlock) = 0; + }; + + template + class IUserFieldBaseImpl : public Base + { + public: + typedef IUserField Declaration; + + IUserFieldBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->entered = &Name::cloopenteredDispatcher; + this->specified = &Name::cloopspecifiedDispatcher; + this->setEntered = &Name::cloopsetEnteredDispatcher; + } + } vTable; + this->cloopVTable = &vTable; + } + + static int CLOOP_CARG cloopenteredDispatcher(IUserField* self) CLOOP_NOEXCEPT + { try { - static_cast(self)->Name::setDelayedOutputFormat(&status2, format); + return static_cast(self)->Name::entered(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static int CLOOP_CARG cloopspecifiedDispatcher(IUserField* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::addRef(); + return static_cast(self)->Name::specified(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopsetEnteredDispatcher(IUserField* self, IStatus* status, int newValue) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::release(); + static_cast(self)->Name::setEntered(&status2, newValue); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } }; - template > > > > - class IResultSetImpl : public IResultSetBaseImpl + template > > + class IUserFieldImpl : public IUserFieldBaseImpl { protected: - IResultSetImpl(DoNotInherit = DoNotInherit()) + IUserFieldImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IResultSetImpl() + virtual ~IUserFieldImpl() { } - virtual int fetchNext(StatusType* status, void* message) = 0; - virtual int fetchPrior(StatusType* status, void* message) = 0; - virtual int fetchFirst(StatusType* status, void* message) = 0; - virtual int fetchLast(StatusType* status, void* message) = 0; - virtual int fetchAbsolute(StatusType* status, int position, void* message) = 0; - virtual int fetchRelative(StatusType* status, int offset, void* message) = 0; - virtual FB_BOOLEAN isEof(StatusType* status) = 0; - virtual FB_BOOLEAN isBof(StatusType* status) = 0; - virtual IMessageMetadata* getMetadata(StatusType* status) = 0; - virtual void close(StatusType* status) = 0; - virtual void setDelayedOutputFormat(StatusType* status, IMessageMetadata* format) = 0; + virtual int entered() = 0; + virtual int specified() = 0; + virtual void setEntered(StatusType* status, int newValue) = 0; }; template - class IStatementBaseImpl : public Base + class ICharUserFieldBaseImpl : public Base { public: - typedef IStatement Declaration; + typedef ICharUserField Declaration; - IStatementBaseImpl(DoNotInherit = DoNotInherit()) + ICharUserFieldBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->getInfo = &Name::cloopgetInfoDispatcher; - this->getType = &Name::cloopgetTypeDispatcher; - this->getPlan = &Name::cloopgetPlanDispatcher; - this->getAffectedRecords = &Name::cloopgetAffectedRecordsDispatcher; - this->getInputMetadata = &Name::cloopgetInputMetadataDispatcher; - this->getOutputMetadata = &Name::cloopgetOutputMetadataDispatcher; - this->execute = &Name::cloopexecuteDispatcher; - this->openCursor = &Name::cloopopenCursorDispatcher; - this->setCursorName = &Name::cloopsetCursorNameDispatcher; - this->free = &Name::cloopfreeDispatcher; - this->getFlags = &Name::cloopgetFlagsDispatcher; + this->entered = &Name::cloopenteredDispatcher; + this->specified = &Name::cloopspecifiedDispatcher; + this->setEntered = &Name::cloopsetEnteredDispatcher; + this->get = &Name::cloopgetDispatcher; + this->set = &Name::cloopsetDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopgetInfoDispatcher(IStatement* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw() + static const char* CLOOP_CARG cloopgetDispatcher(ICharUserField* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::getInfo(&status2, itemsLength, items, bufferLength, buffer); + return static_cast(self)->Name::get(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static unsigned CLOOP_CARG cloopgetTypeDispatcher(IStatement* self, IStatus* status) throw() + static void CLOOP_CARG cloopsetDispatcher(ICharUserField* self, IStatus* status, const char* newValue) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getType(&status2); + static_cast(self)->Name::set(&status2, newValue); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static const char* CLOOP_CARG cloopgetPlanDispatcher(IStatement* self, IStatus* status, FB_BOOLEAN detailed) throw() + static int CLOOP_CARG cloopenteredDispatcher(IUserField* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getPlan(&status2, detailed); + return static_cast(self)->Name::entered(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static ISC_UINT64 CLOOP_CARG cloopgetAffectedRecordsDispatcher(IStatement* self, IStatus* status) throw() + static int CLOOP_CARG cloopspecifiedDispatcher(IUserField* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getAffectedRecords(&status2); + return static_cast(self)->Name::specified(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static IMessageMetadata* CLOOP_CARG cloopgetInputMetadataDispatcher(IStatement* self, IStatus* status) throw() + static void CLOOP_CARG cloopsetEnteredDispatcher(IUserField* self, IStatus* status, int newValue) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getInputMetadata(&status2); + static_cast(self)->Name::setEntered(&status2, newValue); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } + }; - static IMessageMetadata* CLOOP_CARG cloopgetOutputMetadataDispatcher(IStatement* self, IStatus* status) throw() + template > > > > + class ICharUserFieldImpl : public ICharUserFieldBaseImpl + { + protected: + ICharUserFieldImpl(DoNotInherit = DoNotInherit()) { - StatusType status2(status); - - try - { - return static_cast(self)->Name::getOutputMetadata(&status2); - } - catch (...) - { - StatusType::catchException(&status2); - return static_cast(0); - } } - static ITransaction* CLOOP_CARG cloopexecuteDispatcher(IStatement* self, IStatus* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) throw() + public: + virtual ~ICharUserFieldImpl() { - StatusType status2(status); - - try - { - return static_cast(self)->Name::execute(&status2, transaction, inMetadata, inBuffer, outMetadata, outBuffer); - } - catch (...) - { - StatusType::catchException(&status2); - return static_cast(0); - } } - static IResultSet* CLOOP_CARG cloopopenCursorDispatcher(IStatement* self, IStatus* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, unsigned flags) throw() - { - StatusType status2(status); + virtual const char* get() = 0; + virtual void set(StatusType* status, const char* newValue) = 0; + }; - try - { - return static_cast(self)->Name::openCursor(&status2, transaction, inMetadata, inBuffer, outMetadata, flags); - } - catch (...) + template + class IIntUserFieldBaseImpl : public Base + { + public: + typedef IIntUserField Declaration; + + IIntUserFieldBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable { - StatusType::catchException(&status2); - return static_cast(0); - } + VTableImpl() + { + this->version = Base::VERSION; + this->entered = &Name::cloopenteredDispatcher; + this->specified = &Name::cloopspecifiedDispatcher; + this->setEntered = &Name::cloopsetEnteredDispatcher; + this->get = &Name::cloopgetDispatcher; + this->set = &Name::cloopsetDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopsetCursorNameDispatcher(IStatement* self, IStatus* status, const char* name) throw() + static int CLOOP_CARG cloopgetDispatcher(IIntUserField* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::setCursorName(&status2, name); + return static_cast(self)->Name::get(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopfreeDispatcher(IStatement* self, IStatus* status) throw() + static void CLOOP_CARG cloopsetDispatcher(IIntUserField* self, IStatus* status, int newValue) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::free(&status2); + static_cast(self)->Name::set(&status2, newValue); } catch (...) { @@ -8258,577 +13681,523 @@ namespace Firebird } } - static unsigned CLOOP_CARG cloopgetFlagsDispatcher(IStatement* self, IStatus* status) throw() + static int CLOOP_CARG cloopenteredDispatcher(IUserField* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getFlags(&status2); + return static_cast(self)->Name::entered(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static int CLOOP_CARG cloopspecifiedDispatcher(IUserField* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::addRef(); + return static_cast(self)->Name::specified(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopsetEnteredDispatcher(IUserField* self, IStatus* status, int newValue) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::release(); + static_cast(self)->Name::setEntered(&status2, newValue); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } }; - template > > > > - class IStatementImpl : public IStatementBaseImpl + template > > > > + class IIntUserFieldImpl : public IIntUserFieldBaseImpl { protected: - IStatementImpl(DoNotInherit = DoNotInherit()) + IIntUserFieldImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IStatementImpl() + virtual ~IIntUserFieldImpl() { } - virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; - virtual unsigned getType(StatusType* status) = 0; - virtual const char* getPlan(StatusType* status, FB_BOOLEAN detailed) = 0; - virtual ISC_UINT64 getAffectedRecords(StatusType* status) = 0; - virtual IMessageMetadata* getInputMetadata(StatusType* status) = 0; - virtual IMessageMetadata* getOutputMetadata(StatusType* status) = 0; - virtual ITransaction* execute(StatusType* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) = 0; - virtual IResultSet* openCursor(StatusType* status, ITransaction* transaction, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, unsigned flags) = 0; - virtual void setCursorName(StatusType* status, const char* name) = 0; - virtual void free(StatusType* status) = 0; - virtual unsigned getFlags(StatusType* status) = 0; + virtual int get() = 0; + virtual void set(StatusType* status, int newValue) = 0; }; template - class IRequestBaseImpl : public Base + class IUserBaseImpl : public Base { public: - typedef IRequest Declaration; + typedef IUser Declaration; - IRequestBaseImpl(DoNotInherit = DoNotInherit()) + IUserBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->receive = &Name::cloopreceiveDispatcher; - this->send = &Name::cloopsendDispatcher; - this->getInfo = &Name::cloopgetInfoDispatcher; - this->start = &Name::cloopstartDispatcher; - this->startAndSend = &Name::cloopstartAndSendDispatcher; - this->unwind = &Name::cloopunwindDispatcher; - this->free = &Name::cloopfreeDispatcher; + this->operation = &Name::cloopoperationDispatcher; + this->userName = &Name::cloopuserNameDispatcher; + this->password = &Name::clooppasswordDispatcher; + this->firstName = &Name::cloopfirstNameDispatcher; + this->lastName = &Name::clooplastNameDispatcher; + this->middleName = &Name::cloopmiddleNameDispatcher; + this->comment = &Name::cloopcommentDispatcher; + this->attributes = &Name::cloopattributesDispatcher; + this->active = &Name::cloopactiveDispatcher; + this->admin = &Name::cloopadminDispatcher; + this->clear = &Name::cloopclearDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopreceiveDispatcher(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, unsigned char* message) throw() + static unsigned CLOOP_CARG cloopoperationDispatcher(IUser* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::receive(&status2, level, msgType, length, message); + return static_cast(self)->Name::operation(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopsendDispatcher(IRequest* self, IStatus* status, int level, unsigned msgType, unsigned length, const unsigned char* message) throw() + static ICharUserField* CLOOP_CARG cloopuserNameDispatcher(IUser* self) CLOOP_NOEXCEPT { - StatusType status2(status); + try + { + return static_cast(self)->Name::userName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + static ICharUserField* CLOOP_CARG clooppasswordDispatcher(IUser* self) CLOOP_NOEXCEPT + { try { - static_cast(self)->Name::send(&status2, level, msgType, length, message); + return static_cast(self)->Name::password(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopgetInfoDispatcher(IRequest* self, IStatus* status, int level, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw() + static ICharUserField* CLOOP_CARG cloopfirstNameDispatcher(IUser* self) CLOOP_NOEXCEPT { - StatusType status2(status); + try + { + return static_cast(self)->Name::firstName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + static ICharUserField* CLOOP_CARG clooplastNameDispatcher(IUser* self) CLOOP_NOEXCEPT + { try { - static_cast(self)->Name::getInfo(&status2, level, itemsLength, items, bufferLength, buffer); + return static_cast(self)->Name::lastName(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopstartDispatcher(IRequest* self, IStatus* status, ITransaction* tra, int level) throw() + static ICharUserField* CLOOP_CARG cloopmiddleNameDispatcher(IUser* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::start(&status2, tra, level); + return static_cast(self)->Name::middleName(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopstartAndSendDispatcher(IRequest* self, IStatus* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const unsigned char* message) throw() + static ICharUserField* CLOOP_CARG cloopcommentDispatcher(IUser* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::startAndSend(&status2, tra, level, msgType, length, message); + return static_cast(self)->Name::comment(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopunwindDispatcher(IRequest* self, IStatus* status, int level) throw() + static ICharUserField* CLOOP_CARG cloopattributesDispatcher(IUser* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::unwind(&status2, level); + return static_cast(self)->Name::attributes(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopfreeDispatcher(IRequest* self, IStatus* status) throw() + static IIntUserField* CLOOP_CARG cloopactiveDispatcher(IUser* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::free(&status2); + return static_cast(self)->Name::active(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static IIntUserField* CLOOP_CARG cloopadminDispatcher(IUser* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::addRef(); + return static_cast(self)->Name::admin(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopclearDispatcher(IUser* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::release(); + static_cast(self)->Name::clear(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } }; - template > > > > - class IRequestImpl : public IRequestBaseImpl + template > > + class IUserImpl : public IUserBaseImpl { protected: - IRequestImpl(DoNotInherit = DoNotInherit()) + IUserImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IRequestImpl() + virtual ~IUserImpl() { } - virtual void receive(StatusType* status, int level, unsigned msgType, unsigned length, unsigned char* message) = 0; - virtual void send(StatusType* status, int level, unsigned msgType, unsigned length, const unsigned char* message) = 0; - virtual void getInfo(StatusType* status, int level, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; - virtual void start(StatusType* status, ITransaction* tra, int level) = 0; - virtual void startAndSend(StatusType* status, ITransaction* tra, int level, unsigned msgType, unsigned length, const unsigned char* message) = 0; - virtual void unwind(StatusType* status, int level) = 0; - virtual void free(StatusType* status) = 0; + virtual unsigned operation() = 0; + virtual ICharUserField* userName() = 0; + virtual ICharUserField* password() = 0; + virtual ICharUserField* firstName() = 0; + virtual ICharUserField* lastName() = 0; + virtual ICharUserField* middleName() = 0; + virtual ICharUserField* comment() = 0; + virtual ICharUserField* attributes() = 0; + virtual IIntUserField* active() = 0; + virtual IIntUserField* admin() = 0; + virtual void clear(StatusType* status) = 0; }; template - class IEventsBaseImpl : public Base + class IListUsersBaseImpl : public Base { public: - typedef IEvents Declaration; + typedef IListUsers Declaration; - IEventsBaseImpl(DoNotInherit = DoNotInherit()) + IListUsersBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->cancel = &Name::cloopcancelDispatcher; + this->list = &Name::clooplistDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopcancelDispatcher(IEvents* self, IStatus* status) throw() + static void CLOOP_CARG clooplistDispatcher(IListUsers* self, IStatus* status, IUser* user) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::cancel(&status2); + static_cast(self)->Name::list(&status2, user); } catch (...) { StatusType::catchException(&status2); } } - - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() - { - try - { - static_cast(self)->Name::addRef(); - } - catch (...) - { - StatusType::catchException(0); - } - } - - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() - { - try - { - return static_cast(self)->Name::release(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } }; - template > > > > - class IEventsImpl : public IEventsBaseImpl + template > > + class IListUsersImpl : public IListUsersBaseImpl { protected: - IEventsImpl(DoNotInherit = DoNotInherit()) + IListUsersImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IEventsImpl() + virtual ~IListUsersImpl() { } - virtual void cancel(StatusType* status) = 0; + virtual void list(StatusType* status, IUser* user) = 0; }; template - class IAttachmentBaseImpl : public Base + class ILogonInfoBaseImpl : public Base { public: - typedef IAttachment Declaration; + typedef ILogonInfo Declaration; - IAttachmentBaseImpl(DoNotInherit = DoNotInherit()) + ILogonInfoBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->getInfo = &Name::cloopgetInfoDispatcher; - this->startTransaction = &Name::cloopstartTransactionDispatcher; - this->reconnectTransaction = &Name::cloopreconnectTransactionDispatcher; - this->compileRequest = &Name::cloopcompileRequestDispatcher; - this->transactRequest = &Name::clooptransactRequestDispatcher; - this->createBlob = &Name::cloopcreateBlobDispatcher; - this->openBlob = &Name::cloopopenBlobDispatcher; - this->getSlice = &Name::cloopgetSliceDispatcher; - this->putSlice = &Name::cloopputSliceDispatcher; - this->executeDyn = &Name::cloopexecuteDynDispatcher; - this->prepare = &Name::cloopprepareDispatcher; - this->execute = &Name::cloopexecuteDispatcher; - this->openCursor = &Name::cloopopenCursorDispatcher; - this->queEvents = &Name::cloopqueEventsDispatcher; - this->cancelOperation = &Name::cloopcancelOperationDispatcher; - this->ping = &Name::clooppingDispatcher; - this->detach = &Name::cloopdetachDispatcher; - this->dropDatabase = &Name::cloopdropDatabaseDispatcher; + this->name = &Name::cloopnameDispatcher; + this->role = &Name::clooproleDispatcher; + this->networkProtocol = &Name::cloopnetworkProtocolDispatcher; + this->remoteAddress = &Name::cloopremoteAddressDispatcher; + this->authBlock = &Name::cloopauthBlockDispatcher; + this->attachment = &Name::cloopattachmentDispatcher; + this->transaction = &Name::clooptransactionDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopgetInfoDispatcher(IAttachment* self, IStatus* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) throw() + static const char* CLOOP_CARG cloopnameDispatcher(ILogonInfo* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::getInfo(&status2, itemsLength, items, bufferLength, buffer); + return static_cast(self)->Name::name(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static ITransaction* CLOOP_CARG cloopstartTransactionDispatcher(IAttachment* self, IStatus* status, unsigned tpbLength, const unsigned char* tpb) throw() + static const char* CLOOP_CARG clooproleDispatcher(ILogonInfo* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::startTransaction(&status2, tpbLength, tpb); + return static_cast(self)->Name::role(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static ITransaction* CLOOP_CARG cloopreconnectTransactionDispatcher(IAttachment* self, IStatus* status, unsigned length, const unsigned char* id) throw() + static const char* CLOOP_CARG cloopnetworkProtocolDispatcher(ILogonInfo* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::reconnectTransaction(&status2, length, id); + return static_cast(self)->Name::networkProtocol(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static IRequest* CLOOP_CARG cloopcompileRequestDispatcher(IAttachment* self, IStatus* status, unsigned blrLength, const unsigned char* blr) throw() + static const char* CLOOP_CARG cloopremoteAddressDispatcher(ILogonInfo* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::compileRequest(&status2, blrLength, blr); + return static_cast(self)->Name::remoteAddress(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG clooptransactRequestDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned blrLength, const unsigned char* blr, unsigned inMsgLength, const unsigned char* inMsg, unsigned outMsgLength, unsigned char* outMsg) throw() + static const unsigned char* CLOOP_CARG cloopauthBlockDispatcher(ILogonInfo* self, unsigned* length) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::transactRequest(&status2, transaction, blrLength, blr, inMsgLength, inMsg, outMsgLength, outMsg); + return static_cast(self)->Name::authBlock(length); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static IBlob* CLOOP_CARG cloopcreateBlobDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) throw() + static IAttachment* CLOOP_CARG cloopattachmentDispatcher(ILogonInfo* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::createBlob(&status2, transaction, id, bpbLength, bpb); + return static_cast(self)->Name::attachment(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } - static IBlob* CLOOP_CARG cloopopenBlobDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) throw() + static ITransaction* CLOOP_CARG clooptransactionDispatcher(ILogonInfo* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::openBlob(&status2, transaction, id, bpbLength, bpb); + return static_cast(self)->Name::transaction(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } + }; - static int CLOOP_CARG cloopgetSliceDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) throw() + template > > + class ILogonInfoImpl : public ILogonInfoBaseImpl + { + protected: + ILogonInfoImpl(DoNotInherit = DoNotInherit()) { - StatusType status2(status); - - try - { - return static_cast(self)->Name::getSlice(&status2, transaction, id, sdlLength, sdl, paramLength, param, sliceLength, slice); - } - catch (...) - { - StatusType::catchException(&status2); - return static_cast(0); - } } - static void CLOOP_CARG cloopputSliceDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) throw() + public: + virtual ~ILogonInfoImpl() { - StatusType status2(status); - - try - { - static_cast(self)->Name::putSlice(&status2, transaction, id, sdlLength, sdl, paramLength, param, sliceLength, slice); - } - catch (...) - { - StatusType::catchException(&status2); - } } - static void CLOOP_CARG cloopexecuteDynDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned length, const unsigned char* dyn) throw() - { - StatusType status2(status); + virtual const char* name() = 0; + virtual const char* role() = 0; + virtual const char* networkProtocol() = 0; + virtual const char* remoteAddress() = 0; + virtual const unsigned char* authBlock(unsigned* length) = 0; + virtual IAttachment* attachment(StatusType* status) = 0; + virtual ITransaction* transaction(StatusType* status) = 0; + }; - try - { - static_cast(self)->Name::executeDyn(&status2, transaction, length, dyn); - } - catch (...) - { - StatusType::catchException(&status2); - } - } + template + class IManagementBaseImpl : public Base + { + public: + typedef IManagement Declaration; - static IStatement* CLOOP_CARG cloopprepareDispatcher(IAttachment* self, IStatus* status, ITransaction* tra, unsigned stmtLength, const char* sqlStmt, unsigned dialect, unsigned flags) throw() + IManagementBaseImpl(DoNotInherit = DoNotInherit()) { - StatusType status2(status); - - try - { - return static_cast(self)->Name::prepare(&status2, tra, stmtLength, sqlStmt, dialect, flags); - } - catch (...) + static struct VTableImpl : Base::VTable { - StatusType::catchException(&status2); - return static_cast(0); - } - } - - static ITransaction* CLOOP_CARG cloopexecuteDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) throw() - { - StatusType status2(status); + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->start = &Name::cloopstartDispatcher; + this->execute = &Name::cloopexecuteDispatcher; + this->commit = &Name::cloopcommitDispatcher; + this->rollback = &Name::clooprollbackDispatcher; + } + } vTable; - try - { - return static_cast(self)->Name::execute(&status2, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, outMetadata, outBuffer); - } - catch (...) - { - StatusType::catchException(&status2); - return static_cast(0); - } + this->cloopVTable = &vTable; } - static IResultSet* CLOOP_CARG cloopopenCursorDispatcher(IAttachment* self, IStatus* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, const char* cursorName, unsigned cursorFlags) throw() + static void CLOOP_CARG cloopstartDispatcher(IManagement* self, IStatus* status, ILogonInfo* logonInfo) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::openCursor(&status2, transaction, stmtLength, sqlStmt, dialect, inMetadata, inBuffer, outMetadata, cursorName, cursorFlags); + static_cast(self)->Name::start(&status2, logonInfo); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static IEvents* CLOOP_CARG cloopqueEventsDispatcher(IAttachment* self, IStatus* status, IEventCallback* callback, unsigned length, const unsigned char* events) throw() + static int CLOOP_CARG cloopexecuteDispatcher(IManagement* self, IStatus* status, IUser* user, IListUsers* callback) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::queEvents(&status2, callback, length, events); + return static_cast(self)->Name::execute(&status2, user, callback); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } - static void CLOOP_CARG cloopcancelOperationDispatcher(IAttachment* self, IStatus* status, int option) throw() + static void CLOOP_CARG cloopcommitDispatcher(IManagement* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::cancelOperation(&status2, option); + static_cast(self)->Name::commit(&status2); } catch (...) { @@ -8836,13 +14205,13 @@ namespace Firebird } } - static void CLOOP_CARG clooppingDispatcher(IAttachment* self, IStatus* status) throw() + static void CLOOP_CARG clooprollbackDispatcher(IManagement* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::ping(&status2); + static_cast(self)->Name::rollback(&status2); } catch (...) { @@ -8850,35 +14219,32 @@ namespace Firebird } } - static void CLOOP_CARG cloopdetachDispatcher(IAttachment* self, IStatus* status) throw() + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::detach(&status2); + static_cast(self)->Name::setOwner(r); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); } } - static void CLOOP_CARG cloopdropDatabaseDispatcher(IAttachment* self, IStatus* status) throw() + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::dropDatabase(&status2); + return static_cast(self)->Name::getOwner(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -8890,7 +14256,7 @@ namespace Firebird } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -8904,156 +14270,176 @@ namespace Firebird } }; - template > > > > - class IAttachmentImpl : public IAttachmentBaseImpl + template > > > > > > + class IManagementImpl : public IManagementBaseImpl { protected: - IAttachmentImpl(DoNotInherit = DoNotInherit()) + IManagementImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IAttachmentImpl() + virtual ~IManagementImpl() { } - virtual void getInfo(StatusType* status, unsigned itemsLength, const unsigned char* items, unsigned bufferLength, unsigned char* buffer) = 0; - virtual ITransaction* startTransaction(StatusType* status, unsigned tpbLength, const unsigned char* tpb) = 0; - virtual ITransaction* reconnectTransaction(StatusType* status, unsigned length, const unsigned char* id) = 0; - virtual IRequest* compileRequest(StatusType* status, unsigned blrLength, const unsigned char* blr) = 0; - virtual void transactRequest(StatusType* status, ITransaction* transaction, unsigned blrLength, const unsigned char* blr, unsigned inMsgLength, const unsigned char* inMsg, unsigned outMsgLength, unsigned char* outMsg) = 0; - virtual IBlob* createBlob(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) = 0; - virtual IBlob* openBlob(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned bpbLength, const unsigned char* bpb) = 0; - virtual int getSlice(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) = 0; - virtual void putSlice(StatusType* status, ITransaction* transaction, ISC_QUAD* id, unsigned sdlLength, const unsigned char* sdl, unsigned paramLength, const unsigned char* param, int sliceLength, unsigned char* slice) = 0; - virtual void executeDyn(StatusType* status, ITransaction* transaction, unsigned length, const unsigned char* dyn) = 0; - virtual IStatement* prepare(StatusType* status, ITransaction* tra, unsigned stmtLength, const char* sqlStmt, unsigned dialect, unsigned flags) = 0; - virtual ITransaction* execute(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) = 0; - virtual IResultSet* openCursor(StatusType* status, ITransaction* transaction, unsigned stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, const char* cursorName, unsigned cursorFlags) = 0; - virtual IEvents* queEvents(StatusType* status, IEventCallback* callback, unsigned length, const unsigned char* events) = 0; - virtual void cancelOperation(StatusType* status, int option) = 0; - virtual void ping(StatusType* status) = 0; - virtual void detach(StatusType* status) = 0; - virtual void dropDatabase(StatusType* status) = 0; + virtual void start(StatusType* status, ILogonInfo* logonInfo) = 0; + virtual int execute(StatusType* status, IUser* user, IListUsers* callback) = 0; + virtual void commit(StatusType* status) = 0; + virtual void rollback(StatusType* status) = 0; }; template - class IServiceBaseImpl : public Base + class IAuthBlockBaseImpl : public Base { public: - typedef IService Declaration; + typedef IAuthBlock Declaration; - IServiceBaseImpl(DoNotInherit = DoNotInherit()) + IAuthBlockBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->detach = &Name::cloopdetachDispatcher; - this->query = &Name::cloopqueryDispatcher; - this->start = &Name::cloopstartDispatcher; + this->getType = &Name::cloopgetTypeDispatcher; + this->getName = &Name::cloopgetNameDispatcher; + this->getPlugin = &Name::cloopgetPluginDispatcher; + this->getSecurityDb = &Name::cloopgetSecurityDbDispatcher; + this->getOriginalPlugin = &Name::cloopgetOriginalPluginDispatcher; + this->next = &Name::cloopnextDispatcher; + this->first = &Name::cloopfirstDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopdetachDispatcher(IService* self, IStatus* status) throw() + static const char* CLOOP_CARG cloopgetTypeDispatcher(IAuthBlock* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::detach(&status2); + return static_cast(self)->Name::getType(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopqueryDispatcher(IService* self, IStatus* status, unsigned sendLength, const unsigned char* sendItems, unsigned receiveLength, const unsigned char* receiveItems, unsigned bufferLength, unsigned char* buffer) throw() + static const char* CLOOP_CARG cloopgetNameDispatcher(IAuthBlock* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::query(&status2, sendLength, sendItems, receiveLength, receiveItems, bufferLength, buffer); + return static_cast(self)->Name::getName(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopstartDispatcher(IService* self, IStatus* status, unsigned spbLength, const unsigned char* spb) throw() + static const char* CLOOP_CARG cloopgetPluginDispatcher(IAuthBlock* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::start(&status2, spbLength, spb); + return static_cast(self)->Name::getPlugin(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static const char* CLOOP_CARG cloopgetSecurityDbDispatcher(IAuthBlock* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::addRef(); + return static_cast(self)->Name::getSecurityDb(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static const char* CLOOP_CARG cloopgetOriginalPluginDispatcher(IAuthBlock* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::release(); + return static_cast(self)->Name::getOriginalPlugin(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopnextDispatcher(IAuthBlock* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::next(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static FB_BOOLEAN CLOOP_CARG cloopfirstDispatcher(IAuthBlock* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::first(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); } } }; - template > > > > - class IServiceImpl : public IServiceBaseImpl + template > > + class IAuthBlockImpl : public IAuthBlockBaseImpl { protected: - IServiceImpl(DoNotInherit = DoNotInherit()) + IAuthBlockImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IServiceImpl() + virtual ~IAuthBlockImpl() { } - virtual void detach(StatusType* status) = 0; - virtual void query(StatusType* status, unsigned sendLength, const unsigned char* sendItems, unsigned receiveLength, const unsigned char* receiveItems, unsigned bufferLength, unsigned char* buffer) = 0; - virtual void start(StatusType* status, unsigned spbLength, const unsigned char* spb) = 0; + virtual const char* getType() = 0; + virtual const char* getName() = 0; + virtual const char* getPlugin() = 0; + virtual const char* getSecurityDb() = 0; + virtual const char* getOriginalPlugin() = 0; + virtual FB_BOOLEAN next(StatusType* status) = 0; + virtual FB_BOOLEAN first(StatusType* status) = 0; }; template - class IProviderBaseImpl : public Base + class IWireCryptPluginBaseImpl : public Base { public: - typedef IProvider Declaration; + typedef IWireCryptPlugin Declaration; - IProviderBaseImpl(DoNotInherit = DoNotInherit()) + IWireCryptPluginBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { @@ -9064,69 +14450,68 @@ namespace Firebird this->release = &Name::cloopreleaseDispatcher; this->setOwner = &Name::cloopsetOwnerDispatcher; this->getOwner = &Name::cloopgetOwnerDispatcher; - this->attachDatabase = &Name::cloopattachDatabaseDispatcher; - this->createDatabase = &Name::cloopcreateDatabaseDispatcher; - this->attachServiceManager = &Name::cloopattachServiceManagerDispatcher; - this->shutdown = &Name::cloopshutdownDispatcher; - this->setDbCryptCallback = &Name::cloopsetDbCryptCallbackDispatcher; + this->getKnownTypes = &Name::cloopgetKnownTypesDispatcher; + this->setKey = &Name::cloopsetKeyDispatcher; + this->encrypt = &Name::cloopencryptDispatcher; + this->decrypt = &Name::cloopdecryptDispatcher; + this->getSpecificData = &Name::cloopgetSpecificDataDispatcher; + this->setSpecificData = &Name::cloopsetSpecificDataDispatcher; } } vTable; this->cloopVTable = &vTable; } - static IAttachment* CLOOP_CARG cloopattachDatabaseDispatcher(IProvider* self, IStatus* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) throw() + static const char* CLOOP_CARG cloopgetKnownTypesDispatcher(IWireCryptPlugin* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::attachDatabase(&status2, fileName, dpbLength, dpb); + return static_cast(self)->Name::getKnownTypes(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } - static IAttachment* CLOOP_CARG cloopcreateDatabaseDispatcher(IProvider* self, IStatus* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) throw() + static void CLOOP_CARG cloopsetKeyDispatcher(IWireCryptPlugin* self, IStatus* status, ICryptKey* key) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::createDatabase(&status2, fileName, dpbLength, dpb); + static_cast(self)->Name::setKey(&status2, key); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static IService* CLOOP_CARG cloopattachServiceManagerDispatcher(IProvider* self, IStatus* status, const char* service, unsigned spbLength, const unsigned char* spb) throw() + static void CLOOP_CARG cloopencryptDispatcher(IWireCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::attachServiceManager(&status2, service, spbLength, spb); + static_cast(self)->Name::encrypt(&status2, length, from, to); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static void CLOOP_CARG cloopshutdownDispatcher(IProvider* self, IStatus* status, unsigned timeout, const int reason) throw() + static void CLOOP_CARG cloopdecryptDispatcher(IWireCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::shutdown(&status2, timeout, reason); + static_cast(self)->Name::decrypt(&status2, length, from, to); } catch (...) { @@ -9134,264 +14519,231 @@ namespace Firebird } } - static void CLOOP_CARG cloopsetDbCryptCallbackDispatcher(IProvider* self, IStatus* status, ICryptKeyCallback* cryptCallback) throw() + static const unsigned char* CLOOP_CARG cloopgetSpecificDataDispatcher(IWireCryptPlugin* self, IStatus* status, const char* keyType, unsigned* length) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::setDbCryptCallback(&status2, cryptCallback); + return static_cast(self)->Name::getSpecificData(&status2, keyType, length); } catch (...) { StatusType::catchException(&status2); + return static_cast(0); } } - static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() - { - try - { - static_cast(self)->Name::setOwner(r); - } - catch (...) - { - StatusType::catchException(0); - } - } - - static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() - { - try - { - return static_cast(self)->Name::getOwner(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } - - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopsetSpecificDataDispatcher(IWireCryptPlugin* self, IStatus* status, const char* keyType, unsigned length, const unsigned char* data) CLOOP_NOEXCEPT { - try - { - static_cast(self)->Name::addRef(); - } - catch (...) - { - StatusType::catchException(0); - } - } + StatusType status2(status); - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() - { try { - return static_cast(self)->Name::release(); + static_cast(self)->Name::setSpecificData(&status2, keyType, length, data); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - }; - - template > > > > > > - class IProviderImpl : public IProviderBaseImpl - { - protected: - IProviderImpl(DoNotInherit = DoNotInherit()) - { - } - - public: - virtual ~IProviderImpl() - { - } - - virtual IAttachment* attachDatabase(StatusType* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) = 0; - virtual IAttachment* createDatabase(StatusType* status, const char* fileName, unsigned dpbLength, const unsigned char* dpb) = 0; - virtual IService* attachServiceManager(StatusType* status, const char* service, unsigned spbLength, const unsigned char* spb) = 0; - virtual void shutdown(StatusType* status, unsigned timeout, const int reason) = 0; - virtual void setDbCryptCallback(StatusType* status, ICryptKeyCallback* cryptCallback) = 0; - }; - - template - class IDtcStartBaseImpl : public Base - { - public: - typedef IDtcStart Declaration; - - IDtcStartBaseImpl(DoNotInherit = DoNotInherit()) - { - static struct VTableImpl : Base::VTable - { - VTableImpl() - { - this->version = Base::VERSION; - this->dispose = &Name::cloopdisposeDispatcher; - this->addAttachment = &Name::cloopaddAttachmentDispatcher; - this->addWithTpb = &Name::cloopaddWithTpbDispatcher; - this->start = &Name::cloopstartDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; - } - static void CLOOP_CARG cloopaddAttachmentDispatcher(IDtcStart* self, IStatus* status, IAttachment* att) throw() + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::addAttachment(&status2, att); + static_cast(self)->Name::setOwner(r); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); } } - static void CLOOP_CARG cloopaddWithTpbDispatcher(IDtcStart* self, IStatus* status, IAttachment* att, unsigned length, const unsigned char* tpb) throw() + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::addWithTpb(&status2, att, length, tpb); + return static_cast(self)->Name::getOwner(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static ITransaction* CLOOP_CARG cloopstartDispatcher(IDtcStart* self, IStatus* status) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::start(&status2); + static_cast(self)->Name::addRef(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); } } - static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::dispose(); + return static_cast(self)->Name::release(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } }; - template > > > > - class IDtcStartImpl : public IDtcStartBaseImpl + template > > > > > > + class IWireCryptPluginImpl : public IWireCryptPluginBaseImpl { protected: - IDtcStartImpl(DoNotInherit = DoNotInherit()) + IWireCryptPluginImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IDtcStartImpl() + virtual ~IWireCryptPluginImpl() { } - virtual void addAttachment(StatusType* status, IAttachment* att) = 0; - virtual void addWithTpb(StatusType* status, IAttachment* att, unsigned length, const unsigned char* tpb) = 0; - virtual ITransaction* start(StatusType* status) = 0; + virtual const char* getKnownTypes(StatusType* status) = 0; + virtual void setKey(StatusType* status, ICryptKey* key) = 0; + virtual void encrypt(StatusType* status, unsigned length, const void* from, void* to) = 0; + virtual void decrypt(StatusType* status, unsigned length, const void* from, void* to) = 0; + virtual const unsigned char* getSpecificData(StatusType* status, const char* keyType, unsigned* length) = 0; + virtual void setSpecificData(StatusType* status, const char* keyType, unsigned length, const unsigned char* data) = 0; }; template - class IDtcBaseImpl : public Base + class ICryptKeyCallbackBaseImpl : public Base { public: - typedef IDtc Declaration; + typedef ICryptKeyCallback Declaration; - IDtcBaseImpl(DoNotInherit = DoNotInherit()) + ICryptKeyCallbackBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->join = &Name::cloopjoinDispatcher; - this->startBuilder = &Name::cloopstartBuilderDispatcher; + this->callback = &Name::cloopcallbackDispatcher; + this->dummy1 = &Name::cloopdummy1Dispatcher; + this->dummy2 = &Name::cloopdummy2Dispatcher; + this->getHashLength = &Name::cloopgetHashLengthDispatcher; + this->getHashData = &Name::cloopgetHashDataDispatcher; } } vTable; this->cloopVTable = &vTable; } - static ITransaction* CLOOP_CARG cloopjoinDispatcher(IDtc* self, IStatus* status, ITransaction* one, ITransaction* two) throw() + static unsigned CLOOP_CARG cloopcallbackDispatcher(ICryptKeyCallback* self, unsigned dataLength, const void* data, unsigned bufferLength, void* buffer) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::callback(dataLength, data, bufferLength, buffer); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopdummy1Dispatcher(ICryptKeyCallback* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::join(&status2, one, two); + static_cast(self)->Name::dummy1(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static IDtcStart* CLOOP_CARG cloopstartBuilderDispatcher(IDtc* self, IStatus* status) throw() + static void CLOOP_CARG cloopdummy2Dispatcher(ICryptKeyCallback* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::dummy2(); + } + catch (...) + { + StatusType::catchException(0); + } + } + + static int CLOOP_CARG cloopgetHashLengthDispatcher(ICryptKeyCallback* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::startBuilder(&status2); + return static_cast(self)->Name::getHashLength(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopgetHashDataDispatcher(ICryptKeyCallback* self, IStatus* status, void* hash) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::getHashData(&status2, hash); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } }; - template > > - class IDtcImpl : public IDtcBaseImpl + template > > + class ICryptKeyCallbackImpl : public ICryptKeyCallbackBaseImpl { protected: - IDtcImpl(DoNotInherit = DoNotInherit()) + ICryptKeyCallbackImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IDtcImpl() + virtual ~ICryptKeyCallbackImpl() { } - virtual ITransaction* join(StatusType* status, ITransaction* one, ITransaction* two) = 0; - virtual IDtcStart* startBuilder(StatusType* status) = 0; + virtual unsigned callback(unsigned dataLength, const void* data, unsigned bufferLength, void* buffer) = 0; + virtual void dummy1(StatusType* status) + { + } + virtual void dummy2() + { + } + virtual int getHashLength(StatusType* status) = 0; + virtual void getHashData(StatusType* status, void* hash) = 0; }; template - class IAuthBaseImpl : public Base + class IKeyHolderPluginBaseImpl : public Base { public: - typedef IAuth Declaration; + typedef IKeyHolderPlugin Declaration; - IAuthBaseImpl(DoNotInherit = DoNotInherit()) + IKeyHolderPluginBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { @@ -9402,106 +14754,81 @@ namespace Firebird this->release = &Name::cloopreleaseDispatcher; this->setOwner = &Name::cloopsetOwnerDispatcher; this->getOwner = &Name::cloopgetOwnerDispatcher; + this->keyCallback = &Name::cloopkeyCallbackDispatcher; + this->keyHandle = &Name::cloopkeyHandleDispatcher; + this->useOnlyOwnKeys = &Name::cloopuseOnlyOwnKeysDispatcher; + this->chainHandle = &Name::cloopchainHandleDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + static int CLOOP_CARG cloopkeyCallbackDispatcher(IKeyHolderPlugin* self, IStatus* status, ICryptKeyCallback* callback) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::setOwner(r); + return static_cast(self)->Name::keyCallback(&status2, callback); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + static ICryptKeyCallback* CLOOP_CARG cloopkeyHandleDispatcher(IKeyHolderPlugin* self, IStatus* status, const char* keyName) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getOwner(); + return static_cast(self)->Name::keyHandle(&status2, keyName); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static FB_BOOLEAN CLOOP_CARG cloopuseOnlyOwnKeysDispatcher(IKeyHolderPlugin* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::addRef(); + return static_cast(self)->Name::useOnlyOwnKeys(&status2); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static ICryptKeyCallback* CLOOP_CARG cloopchainHandleDispatcher(IKeyHolderPlugin* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::release(); + return static_cast(self)->Name::chainHandle(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - }; - - template > > > > > > - class IAuthImpl : public IAuthBaseImpl - { - protected: - IAuthImpl(DoNotInherit = DoNotInherit()) - { - } - - public: - virtual ~IAuthImpl() - { - } - - }; - - template - class IWriterBaseImpl : public Base - { - public: - typedef IWriter Declaration; - - IWriterBaseImpl(DoNotInherit = DoNotInherit()) - { - static struct VTableImpl : Base::VTable - { - VTableImpl() - { - this->version = Base::VERSION; - this->reset = &Name::cloopresetDispatcher; - this->add = &Name::cloopaddDispatcher; - this->setType = &Name::cloopsetTypeDispatcher; - this->setDb = &Name::cloopsetDbDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; - } - static void CLOOP_CARG cloopresetDispatcher(IWriter* self) throw() + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::reset(); + static_cast(self)->Name::setOwner(r); } catch (...) { @@ -9509,173 +14836,150 @@ namespace Firebird } } - static void CLOOP_CARG cloopaddDispatcher(IWriter* self, IStatus* status, const char* name) throw() + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::add(&status2, name); + return static_cast(self)->Name::getOwner(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopsetTypeDispatcher(IWriter* self, IStatus* status, const char* value) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::setType(&status2, value); + static_cast(self)->Name::addRef(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); } } - static void CLOOP_CARG cloopsetDbDispatcher(IWriter* self, IStatus* status, const char* value) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::setDb(&status2, value); + return static_cast(self)->Name::release(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } }; - template > > - class IWriterImpl : public IWriterBaseImpl + template > > > > > > + class IKeyHolderPluginImpl : public IKeyHolderPluginBaseImpl { protected: - IWriterImpl(DoNotInherit = DoNotInherit()) + IKeyHolderPluginImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IWriterImpl() + virtual ~IKeyHolderPluginImpl() { } - virtual void reset() = 0; - virtual void add(StatusType* status, const char* name) = 0; - virtual void setType(StatusType* status, const char* value) = 0; - virtual void setDb(StatusType* status, const char* value) = 0; + virtual int keyCallback(StatusType* status, ICryptKeyCallback* callback) = 0; + virtual ICryptKeyCallback* keyHandle(StatusType* status, const char* keyName) = 0; + virtual FB_BOOLEAN useOnlyOwnKeys(StatusType* status) = 0; + virtual ICryptKeyCallback* chainHandle(StatusType* status) = 0; }; template - class IServerBlockBaseImpl : public Base + class IDbCryptInfoBaseImpl : public Base { public: - typedef IServerBlock Declaration; + typedef IDbCryptInfo Declaration; - IServerBlockBaseImpl(DoNotInherit = DoNotInherit()) + IDbCryptInfoBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->getLogin = &Name::cloopgetLoginDispatcher; - this->getData = &Name::cloopgetDataDispatcher; - this->putData = &Name::cloopputDataDispatcher; - this->newKey = &Name::cloopnewKeyDispatcher; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->getDatabaseFullPath = &Name::cloopgetDatabaseFullPathDispatcher; } } vTable; this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetLoginDispatcher(IServerBlock* self) throw() + static const char* CLOOP_CARG cloopgetDatabaseFullPathDispatcher(IDbCryptInfo* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getLogin(); + return static_cast(self)->Name::getDatabaseFullPath(&status2); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); return static_cast(0); } } - static const unsigned char* CLOOP_CARG cloopgetDataDispatcher(IServerBlock* self, unsigned* length) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getData(length); + static_cast(self)->Name::addRef(); } catch (...) { StatusType::catchException(0); - return static_cast(0); - } - } - - static void CLOOP_CARG cloopputDataDispatcher(IServerBlock* self, IStatus* status, unsigned length, const void* data) throw() - { - StatusType status2(status); - - try - { - static_cast(self)->Name::putData(&status2, length, data); - } - catch (...) - { - StatusType::catchException(&status2); } } - static ICryptKey* CLOOP_CARG cloopnewKeyDispatcher(IServerBlock* self, IStatus* status) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::newKey(&status2); + return static_cast(self)->Name::release(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } }; - template > > - class IServerBlockImpl : public IServerBlockBaseImpl + template > > > > + class IDbCryptInfoImpl : public IDbCryptInfoBaseImpl { protected: - IServerBlockImpl(DoNotInherit = DoNotInherit()) + IDbCryptInfoImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IServerBlockImpl() + virtual ~IDbCryptInfoImpl() { } - virtual const char* getLogin() = 0; - virtual const unsigned char* getData(unsigned* length) = 0; - virtual void putData(StatusType* status, unsigned length, const void* data) = 0; - virtual ICryptKey* newKey(StatusType* status) = 0; + virtual const char* getDatabaseFullPath(StatusType* status) = 0; }; template - class IClientBlockBaseImpl : public Base + class IDbCryptPluginBaseImpl : public Base { public: - typedef IClientBlock Declaration; + typedef IDbCryptPlugin Declaration; - IClientBlockBaseImpl(DoNotInherit = DoNotInherit()) + IDbCryptPluginBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { @@ -9684,63 +14988,67 @@ namespace Firebird this->version = Base::VERSION; this->addRef = &Name::cloopaddRefDispatcher; this->release = &Name::cloopreleaseDispatcher; - this->getLogin = &Name::cloopgetLoginDispatcher; - this->getPassword = &Name::cloopgetPasswordDispatcher; - this->getData = &Name::cloopgetDataDispatcher; - this->putData = &Name::cloopputDataDispatcher; - this->newKey = &Name::cloopnewKeyDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->setKey = &Name::cloopsetKeyDispatcher; + this->encrypt = &Name::cloopencryptDispatcher; + this->decrypt = &Name::cloopdecryptDispatcher; + this->setInfo = &Name::cloopsetInfoDispatcher; } } vTable; this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetLoginDispatcher(IClientBlock* self) throw() + static void CLOOP_CARG cloopsetKeyDispatcher(IDbCryptPlugin* self, IStatus* status, unsigned length, IKeyHolderPlugin** sources, const char* keyName) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getLogin(); + static_cast(self)->Name::setKey(&status2, length, sources, keyName); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static const char* CLOOP_CARG cloopgetPasswordDispatcher(IClientBlock* self) throw() + static void CLOOP_CARG cloopencryptDispatcher(IDbCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getPassword(); + static_cast(self)->Name::encrypt(&status2, length, from, to); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static const unsigned char* CLOOP_CARG cloopgetDataDispatcher(IClientBlock* self, unsigned* length) throw() + static void CLOOP_CARG cloopdecryptDispatcher(IDbCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getData(length); + static_cast(self)->Name::decrypt(&status2, length, from, to); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static void CLOOP_CARG cloopputDataDispatcher(IClientBlock* self, IStatus* status, unsigned length, const void* data) throw() + static void CLOOP_CARG cloopsetInfoDispatcher(IDbCryptPlugin* self, IStatus* status, IDbCryptInfo* info) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::putData(&status2, length, data); + static_cast(self)->Name::setInfo(&status2, info); } catch (...) { @@ -9748,22 +15056,32 @@ namespace Firebird } } - static ICryptKey* CLOOP_CARG cloopnewKeyDispatcher(IClientBlock* self, IStatus* status) throw() + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) CLOOP_NOEXCEPT { - StatusType status2(status); + try + { + static_cast(self)->Name::setOwner(r); + } + catch (...) + { + StatusType::catchException(0); + } + } + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) CLOOP_NOEXCEPT + { try { - return static_cast(self)->Name::newKey(&status2); + return static_cast(self)->Name::getOwner(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -9775,7 +15093,7 @@ namespace Firebird } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -9789,122 +15107,156 @@ namespace Firebird } }; - template > > > > - class IClientBlockImpl : public IClientBlockBaseImpl + template > > > > > > + class IDbCryptPluginImpl : public IDbCryptPluginBaseImpl { protected: - IClientBlockImpl(DoNotInherit = DoNotInherit()) + IDbCryptPluginImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IClientBlockImpl() + virtual ~IDbCryptPluginImpl() { } - virtual const char* getLogin() = 0; - virtual const char* getPassword() = 0; - virtual const unsigned char* getData(unsigned* length) = 0; - virtual void putData(StatusType* status, unsigned length, const void* data) = 0; - virtual ICryptKey* newKey(StatusType* status) = 0; + virtual void setKey(StatusType* status, unsigned length, IKeyHolderPlugin** sources, const char* keyName) = 0; + virtual void encrypt(StatusType* status, unsigned length, const void* from, void* to) = 0; + virtual void decrypt(StatusType* status, unsigned length, const void* from, void* to) = 0; + virtual void setInfo(StatusType* status, IDbCryptInfo* info) = 0; }; template - class IServerBaseImpl : public Base + class IExternalContextBaseImpl : public Base { public: - typedef IServer Declaration; + typedef IExternalContext Declaration; - IServerBaseImpl(DoNotInherit = DoNotInherit()) + IExternalContextBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->setOwner = &Name::cloopsetOwnerDispatcher; - this->getOwner = &Name::cloopgetOwnerDispatcher; - this->authenticate = &Name::cloopauthenticateDispatcher; - this->setDbCryptCallback = &Name::cloopsetDbCryptCallbackDispatcher; + this->getMaster = &Name::cloopgetMasterDispatcher; + this->getEngine = &Name::cloopgetEngineDispatcher; + this->getAttachment = &Name::cloopgetAttachmentDispatcher; + this->getTransaction = &Name::cloopgetTransactionDispatcher; + this->getUserName = &Name::cloopgetUserNameDispatcher; + this->getDatabaseName = &Name::cloopgetDatabaseNameDispatcher; + this->getClientCharSet = &Name::cloopgetClientCharSetDispatcher; + this->obtainInfoCode = &Name::cloopobtainInfoCodeDispatcher; + this->getInfo = &Name::cloopgetInfoDispatcher; + this->setInfo = &Name::cloopsetInfoDispatcher; } } vTable; this->cloopVTable = &vTable; } - static int CLOOP_CARG cloopauthenticateDispatcher(IServer* self, IStatus* status, IServerBlock* sBlock, IWriter* writerInterface) throw() + static IMaster* CLOOP_CARG cloopgetMasterDispatcher(IExternalContext* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getMaster(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static IExternalEngine* CLOOP_CARG cloopgetEngineDispatcher(IExternalContext* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::authenticate(&status2, sBlock, writerInterface); + return static_cast(self)->Name::getEngine(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } - static void CLOOP_CARG cloopsetDbCryptCallbackDispatcher(IServer* self, IStatus* status, ICryptKeyCallback* cryptCallback) throw() + static IAttachment* CLOOP_CARG cloopgetAttachmentDispatcher(IExternalContext* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::setDbCryptCallback(&status2, cryptCallback); + return static_cast(self)->Name::getAttachment(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static ITransaction* CLOOP_CARG cloopgetTransactionDispatcher(IExternalContext* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + return static_cast(self)->Name::getTransaction(&status2); } catch (...) { StatusType::catchException(&status2); + return static_cast(0); } } - static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + static const char* CLOOP_CARG cloopgetUserNameDispatcher(IExternalContext* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::setOwner(r); + return static_cast(self)->Name::getUserName(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } - static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + static const char* CLOOP_CARG cloopgetDatabaseNameDispatcher(IExternalContext* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getOwner(); + return static_cast(self)->Name::getDatabaseName(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static const char* CLOOP_CARG cloopgetClientCharSetDispatcher(IExternalContext* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::addRef(); + return static_cast(self)->Name::getClientCharSet(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static int CLOOP_CARG cloopobtainInfoCodeDispatcher(IExternalContext* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::release(); + return static_cast(self)->Name::obtainInfoCode(); } catch (...) { @@ -9912,256 +15264,233 @@ namespace Firebird return static_cast(0); } } + + static void* CLOOP_CARG cloopgetInfoDispatcher(IExternalContext* self, int code) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getInfo(code); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static void* CLOOP_CARG cloopsetInfoDispatcher(IExternalContext* self, int code, void* value) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::setInfo(code, value); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } }; - template > > > > > > > > - class IServerImpl : public IServerBaseImpl + template > > + class IExternalContextImpl : public IExternalContextBaseImpl { protected: - IServerImpl(DoNotInherit = DoNotInherit()) + IExternalContextImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IServerImpl() + virtual ~IExternalContextImpl() { } - virtual int authenticate(StatusType* status, IServerBlock* sBlock, IWriter* writerInterface) = 0; - virtual void setDbCryptCallback(StatusType* status, ICryptKeyCallback* cryptCallback) = 0; + virtual IMaster* getMaster() = 0; + virtual IExternalEngine* getEngine(StatusType* status) = 0; + virtual IAttachment* getAttachment(StatusType* status) = 0; + virtual ITransaction* getTransaction(StatusType* status) = 0; + virtual const char* getUserName() = 0; + virtual const char* getDatabaseName() = 0; + virtual const char* getClientCharSet() = 0; + virtual int obtainInfoCode() = 0; + virtual void* getInfo(int code) = 0; + virtual void* setInfo(int code, void* value) = 0; }; template - class IClientBaseImpl : public Base + class IExternalResultSetBaseImpl : public Base { public: - typedef IClient Declaration; + typedef IExternalResultSet Declaration; - IClientBaseImpl(DoNotInherit = DoNotInherit()) + IExternalResultSetBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->setOwner = &Name::cloopsetOwnerDispatcher; - this->getOwner = &Name::cloopgetOwnerDispatcher; - this->authenticate = &Name::cloopauthenticateDispatcher; + this->dispose = &Name::cloopdisposeDispatcher; + this->fetch = &Name::cloopfetchDispatcher; } } vTable; this->cloopVTable = &vTable; } - static int CLOOP_CARG cloopauthenticateDispatcher(IClient* self, IStatus* status, IClientBlock* cBlock) throw() + static FB_BOOLEAN CLOOP_CARG cloopfetchDispatcher(IExternalResultSet* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::authenticate(&status2, cBlock); + return static_cast(self)->Name::fetch(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); - } - } - - static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() - { - try - { - static_cast(self)->Name::setOwner(r); - } - catch (...) - { - StatusType::catchException(0); - } - } - - static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() - { - try - { - return static_cast(self)->Name::getOwner(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } - - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() - { - try - { - static_cast(self)->Name::addRef(); - } - catch (...) - { - StatusType::catchException(0); + return static_cast(0); } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::release(); + static_cast(self)->Name::dispose(); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } }; - template > > > > > > > > - class IClientImpl : public IClientBaseImpl + template > > > > + class IExternalResultSetImpl : public IExternalResultSetBaseImpl { protected: - IClientImpl(DoNotInherit = DoNotInherit()) + IExternalResultSetImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IClientImpl() + virtual ~IExternalResultSetImpl() { } - virtual int authenticate(StatusType* status, IClientBlock* cBlock) = 0; + virtual FB_BOOLEAN fetch(StatusType* status) = 0; }; template - class IUserFieldBaseImpl : public Base + class IExternalFunctionBaseImpl : public Base { public: - typedef IUserField Declaration; + typedef IExternalFunction Declaration; - IUserFieldBaseImpl(DoNotInherit = DoNotInherit()) + IExternalFunctionBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->entered = &Name::cloopenteredDispatcher; - this->specified = &Name::cloopspecifiedDispatcher; - this->setEntered = &Name::cloopsetEnteredDispatcher; + this->dispose = &Name::cloopdisposeDispatcher; + this->getCharSet = &Name::cloopgetCharSetDispatcher; + this->execute = &Name::cloopexecuteDispatcher; } } vTable; this->cloopVTable = &vTable; } - static int CLOOP_CARG cloopenteredDispatcher(IUserField* self) throw() + static void CLOOP_CARG cloopgetCharSetDispatcher(IExternalFunction* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::entered(); + static_cast(self)->Name::getCharSet(&status2, context, name, nameSize); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static int CLOOP_CARG cloopspecifiedDispatcher(IUserField* self) throw() + static void CLOOP_CARG cloopexecuteDispatcher(IExternalFunction* self, IStatus* status, IExternalContext* context, void* inMsg, void* outMsg) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::specified(); + static_cast(self)->Name::execute(&status2, context, inMsg, outMsg); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static void CLOOP_CARG cloopsetEnteredDispatcher(IUserField* self, IStatus* status, int newValue) throw() + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::setEntered(&status2, newValue); + static_cast(self)->Name::dispose(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); } } }; - template > > - class IUserFieldImpl : public IUserFieldBaseImpl + template > > > > + class IExternalFunctionImpl : public IExternalFunctionBaseImpl { protected: - IUserFieldImpl(DoNotInherit = DoNotInherit()) + IExternalFunctionImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IUserFieldImpl() + virtual ~IExternalFunctionImpl() { } - virtual int entered() = 0; - virtual int specified() = 0; - virtual void setEntered(StatusType* status, int newValue) = 0; + virtual void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) = 0; + virtual void execute(StatusType* status, IExternalContext* context, void* inMsg, void* outMsg) = 0; }; template - class ICharUserFieldBaseImpl : public Base + class IExternalProcedureBaseImpl : public Base { public: - typedef ICharUserField Declaration; + typedef IExternalProcedure Declaration; - ICharUserFieldBaseImpl(DoNotInherit = DoNotInherit()) + IExternalProcedureBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->entered = &Name::cloopenteredDispatcher; - this->specified = &Name::cloopspecifiedDispatcher; - this->setEntered = &Name::cloopsetEnteredDispatcher; - this->get = &Name::cloopgetDispatcher; - this->set = &Name::cloopsetDispatcher; + this->dispose = &Name::cloopdisposeDispatcher; + this->getCharSet = &Name::cloopgetCharSetDispatcher; + this->open = &Name::cloopopenDispatcher; } } vTable; this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetDispatcher(ICharUserField* self) throw() - { - try - { - return static_cast(self)->Name::get(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } - - static void CLOOP_CARG cloopsetDispatcher(ICharUserField* self, IStatus* status, const char* newValue) throw() + static void CLOOP_CARG cloopgetCharSetDispatcher(IExternalProcedure* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::set(&status2, newValue); + static_cast(self)->Name::getCharSet(&status2, context, name, nameSize); } catch (...) { @@ -10169,108 +15498,80 @@ namespace Firebird } } - static int CLOOP_CARG cloopenteredDispatcher(IUserField* self) throw() + static IExternalResultSet* CLOOP_CARG cloopopenDispatcher(IExternalProcedure* self, IStatus* status, IExternalContext* context, void* inMsg, void* outMsg) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::entered(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static int CLOOP_CARG cloopspecifiedDispatcher(IUserField* self) throw() - { try { - return static_cast(self)->Name::specified(); + return static_cast(self)->Name::open(&status2, context, inMsg, outMsg); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static void CLOOP_CARG cloopsetEnteredDispatcher(IUserField* self, IStatus* status, int newValue) throw() + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::setEntered(&status2, newValue); + static_cast(self)->Name::dispose(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); } } }; - template > > > > - class ICharUserFieldImpl : public ICharUserFieldBaseImpl + template > > > > + class IExternalProcedureImpl : public IExternalProcedureBaseImpl { protected: - ICharUserFieldImpl(DoNotInherit = DoNotInherit()) + IExternalProcedureImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ICharUserFieldImpl() + virtual ~IExternalProcedureImpl() { } - virtual const char* get() = 0; - virtual void set(StatusType* status, const char* newValue) = 0; + virtual void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) = 0; + virtual IExternalResultSet* open(StatusType* status, IExternalContext* context, void* inMsg, void* outMsg) = 0; }; template - class IIntUserFieldBaseImpl : public Base + class IExternalTriggerBaseImpl : public Base { public: - typedef IIntUserField Declaration; + typedef IExternalTrigger Declaration; - IIntUserFieldBaseImpl(DoNotInherit = DoNotInherit()) + IExternalTriggerBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->entered = &Name::cloopenteredDispatcher; - this->specified = &Name::cloopspecifiedDispatcher; - this->setEntered = &Name::cloopsetEnteredDispatcher; - this->get = &Name::cloopgetDispatcher; - this->set = &Name::cloopsetDispatcher; + this->dispose = &Name::cloopdisposeDispatcher; + this->getCharSet = &Name::cloopgetCharSetDispatcher; + this->execute = &Name::cloopexecuteDispatcher; } } vTable; this->cloopVTable = &vTable; } - static int CLOOP_CARG cloopgetDispatcher(IIntUserField* self) throw() - { - try - { - return static_cast(self)->Name::get(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } - - static void CLOOP_CARG cloopsetDispatcher(IIntUserField* self, IStatus* status, int newValue) throw() + static void CLOOP_CARG cloopgetCharSetDispatcher(IExternalTrigger* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::set(&status2, newValue); + static_cast(self)->Name::getCharSet(&status2, context, name, nameSize); } catch (...) { @@ -10278,433 +15579,433 @@ namespace Firebird } } - static int CLOOP_CARG cloopenteredDispatcher(IUserField* self) throw() + static void CLOOP_CARG cloopexecuteDispatcher(IExternalTrigger* self, IStatus* status, IExternalContext* context, unsigned action, void* oldMsg, void* newMsg) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::entered(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static int CLOOP_CARG cloopspecifiedDispatcher(IUserField* self) throw() - { try { - return static_cast(self)->Name::specified(); + static_cast(self)->Name::execute(&status2, context, action, oldMsg, newMsg); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static void CLOOP_CARG cloopsetEnteredDispatcher(IUserField* self, IStatus* status, int newValue) throw() + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::setEntered(&status2, newValue); + static_cast(self)->Name::dispose(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); } } }; - template > > > > - class IIntUserFieldImpl : public IIntUserFieldBaseImpl + template > > > > + class IExternalTriggerImpl : public IExternalTriggerBaseImpl { protected: - IIntUserFieldImpl(DoNotInherit = DoNotInherit()) + IExternalTriggerImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IIntUserFieldImpl() + virtual ~IExternalTriggerImpl() { } - virtual int get() = 0; - virtual void set(StatusType* status, int newValue) = 0; + virtual void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) = 0; + virtual void execute(StatusType* status, IExternalContext* context, unsigned action, void* oldMsg, void* newMsg) = 0; }; template - class IUserBaseImpl : public Base + class IRoutineMetadataBaseImpl : public Base { public: - typedef IUser Declaration; + typedef IRoutineMetadata Declaration; - IUserBaseImpl(DoNotInherit = DoNotInherit()) + IRoutineMetadataBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->operation = &Name::cloopoperationDispatcher; - this->userName = &Name::cloopuserNameDispatcher; - this->password = &Name::clooppasswordDispatcher; - this->firstName = &Name::cloopfirstNameDispatcher; - this->lastName = &Name::clooplastNameDispatcher; - this->middleName = &Name::cloopmiddleNameDispatcher; - this->comment = &Name::cloopcommentDispatcher; - this->attributes = &Name::cloopattributesDispatcher; - this->active = &Name::cloopactiveDispatcher; - this->admin = &Name::cloopadminDispatcher; - this->clear = &Name::cloopclearDispatcher; + this->getPackage = &Name::cloopgetPackageDispatcher; + this->getName = &Name::cloopgetNameDispatcher; + this->getEntryPoint = &Name::cloopgetEntryPointDispatcher; + this->getBody = &Name::cloopgetBodyDispatcher; + this->getInputMetadata = &Name::cloopgetInputMetadataDispatcher; + this->getOutputMetadata = &Name::cloopgetOutputMetadataDispatcher; + this->getTriggerMetadata = &Name::cloopgetTriggerMetadataDispatcher; + this->getTriggerTable = &Name::cloopgetTriggerTableDispatcher; + this->getTriggerType = &Name::cloopgetTriggerTypeDispatcher; } } vTable; this->cloopVTable = &vTable; } - static unsigned CLOOP_CARG cloopoperationDispatcher(IUser* self) throw() + static const char* CLOOP_CARG cloopgetPackageDispatcher(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::operation(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static ICharUserField* CLOOP_CARG cloopuserNameDispatcher(IUser* self) throw() - { try { - return static_cast(self)->Name::userName(); + return static_cast(self)->Name::getPackage(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static ICharUserField* CLOOP_CARG clooppasswordDispatcher(IUser* self) throw() + static const char* CLOOP_CARG cloopgetNameDispatcher(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::password(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static ICharUserField* CLOOP_CARG cloopfirstNameDispatcher(IUser* self) throw() - { try { - return static_cast(self)->Name::firstName(); + return static_cast(self)->Name::getName(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static ICharUserField* CLOOP_CARG clooplastNameDispatcher(IUser* self) throw() + static const char* CLOOP_CARG cloopgetEntryPointDispatcher(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::lastName(); + return static_cast(self)->Name::getEntryPoint(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static ICharUserField* CLOOP_CARG cloopmiddleNameDispatcher(IUser* self) throw() + static const char* CLOOP_CARG cloopgetBodyDispatcher(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::middleName(); + return static_cast(self)->Name::getBody(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static ICharUserField* CLOOP_CARG cloopcommentDispatcher(IUser* self) throw() + static IMessageMetadata* CLOOP_CARG cloopgetInputMetadataDispatcher(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::comment(); + return static_cast(self)->Name::getInputMetadata(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static ICharUserField* CLOOP_CARG cloopattributesDispatcher(IUser* self) throw() + static IMessageMetadata* CLOOP_CARG cloopgetOutputMetadataDispatcher(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::attributes(); + return static_cast(self)->Name::getOutputMetadata(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static IIntUserField* CLOOP_CARG cloopactiveDispatcher(IUser* self) throw() + static IMessageMetadata* CLOOP_CARG cloopgetTriggerMetadataDispatcher(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::active(); + return static_cast(self)->Name::getTriggerMetadata(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static IIntUserField* CLOOP_CARG cloopadminDispatcher(IUser* self) throw() + static const char* CLOOP_CARG cloopgetTriggerTableDispatcher(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::admin(); + return static_cast(self)->Name::getTriggerTable(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static void CLOOP_CARG cloopclearDispatcher(IUser* self, IStatus* status) throw() + static unsigned CLOOP_CARG cloopgetTriggerTypeDispatcher(const IRoutineMetadata* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::clear(&status2); + return static_cast(self)->Name::getTriggerType(&status2); } catch (...) { StatusType::catchException(&status2); + return static_cast(0); } } }; - template > > - class IUserImpl : public IUserBaseImpl + template > > + class IRoutineMetadataImpl : public IRoutineMetadataBaseImpl { protected: - IUserImpl(DoNotInherit = DoNotInherit()) + IRoutineMetadataImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IUserImpl() + virtual ~IRoutineMetadataImpl() { } - virtual unsigned operation() = 0; - virtual ICharUserField* userName() = 0; - virtual ICharUserField* password() = 0; - virtual ICharUserField* firstName() = 0; - virtual ICharUserField* lastName() = 0; - virtual ICharUserField* middleName() = 0; - virtual ICharUserField* comment() = 0; - virtual ICharUserField* attributes() = 0; - virtual IIntUserField* active() = 0; - virtual IIntUserField* admin() = 0; - virtual void clear(StatusType* status) = 0; + virtual const char* getPackage(StatusType* status) const = 0; + virtual const char* getName(StatusType* status) const = 0; + virtual const char* getEntryPoint(StatusType* status) const = 0; + virtual const char* getBody(StatusType* status) const = 0; + virtual IMessageMetadata* getInputMetadata(StatusType* status) const = 0; + virtual IMessageMetadata* getOutputMetadata(StatusType* status) const = 0; + virtual IMessageMetadata* getTriggerMetadata(StatusType* status) const = 0; + virtual const char* getTriggerTable(StatusType* status) const = 0; + virtual unsigned getTriggerType(StatusType* status) const = 0; }; template - class IListUsersBaseImpl : public Base + class IExternalEngineBaseImpl : public Base { public: - typedef IListUsers Declaration; + typedef IExternalEngine Declaration; - IListUsersBaseImpl(DoNotInherit = DoNotInherit()) + IExternalEngineBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->list = &Name::clooplistDispatcher; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->open = &Name::cloopopenDispatcher; + this->openAttachment = &Name::cloopopenAttachmentDispatcher; + this->closeAttachment = &Name::cloopcloseAttachmentDispatcher; + this->makeFunction = &Name::cloopmakeFunctionDispatcher; + this->makeProcedure = &Name::cloopmakeProcedureDispatcher; + this->makeTrigger = &Name::cloopmakeTriggerDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG clooplistDispatcher(IListUsers* self, IStatus* status, IUser* user) throw() + static void CLOOP_CARG cloopopenDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context, char* charSet, unsigned charSetSize) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::list(&status2, user); + static_cast(self)->Name::open(&status2, context, charSet, charSetSize); } catch (...) { StatusType::catchException(&status2); } } - }; - template > > - class IListUsersImpl : public IListUsersBaseImpl - { - protected: - IListUsersImpl(DoNotInherit = DoNotInherit()) + static void CLOOP_CARG cloopopenAttachmentDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context) CLOOP_NOEXCEPT { + StatusType status2(status); + + try + { + static_cast(self)->Name::openAttachment(&status2, context); + } + catch (...) + { + StatusType::catchException(&status2); + } } - public: - virtual ~IListUsersImpl() + static void CLOOP_CARG cloopcloseAttachmentDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context) CLOOP_NOEXCEPT { + StatusType status2(status); + + try + { + static_cast(self)->Name::closeAttachment(&status2, context); + } + catch (...) + { + StatusType::catchException(&status2); + } } - virtual void list(StatusType* status, IUser* user) = 0; - }; + static IExternalFunction* CLOOP_CARG cloopmakeFunctionDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) CLOOP_NOEXCEPT + { + StatusType status2(status); - template - class ILogonInfoBaseImpl : public Base - { - public: - typedef ILogonInfo Declaration; + try + { + return static_cast(self)->Name::makeFunction(&status2, context, metadata, inBuilder, outBuilder); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } - ILogonInfoBaseImpl(DoNotInherit = DoNotInherit()) + static IExternalProcedure* CLOOP_CARG cloopmakeProcedureDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable - { - VTableImpl() - { - this->version = Base::VERSION; - this->name = &Name::cloopnameDispatcher; - this->role = &Name::clooproleDispatcher; - this->networkProtocol = &Name::cloopnetworkProtocolDispatcher; - this->remoteAddress = &Name::cloopremoteAddressDispatcher; - this->authBlock = &Name::cloopauthBlockDispatcher; - } - } vTable; + StatusType status2(status); - this->cloopVTable = &vTable; + try + { + return static_cast(self)->Name::makeProcedure(&status2, context, metadata, inBuilder, outBuilder); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } } - static const char* CLOOP_CARG cloopnameDispatcher(ILogonInfo* self) throw() + static IExternalTrigger* CLOOP_CARG cloopmakeTriggerDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::name(); + return static_cast(self)->Name::makeTrigger(&status2, context, metadata, fieldsBuilder); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static const char* CLOOP_CARG clooproleDispatcher(ILogonInfo* self) throw() + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::role(); + static_cast(self)->Name::setOwner(r); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } - static const char* CLOOP_CARG cloopnetworkProtocolDispatcher(ILogonInfo* self) throw() + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::networkProtocol(); + return static_cast(self)->Name::getOwner(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopremoteAddressDispatcher(ILogonInfo* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::remoteAddress(); + static_cast(self)->Name::addRef(); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } - static const unsigned char* CLOOP_CARG cloopauthBlockDispatcher(ILogonInfo* self, unsigned* length) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::authBlock(length); + return static_cast(self)->Name::release(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } }; - template > > - class ILogonInfoImpl : public ILogonInfoBaseImpl + template > > > > > > + class IExternalEngineImpl : public IExternalEngineBaseImpl { protected: - ILogonInfoImpl(DoNotInherit = DoNotInherit()) + IExternalEngineImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ILogonInfoImpl() + virtual ~IExternalEngineImpl() { } - virtual const char* name() = 0; - virtual const char* role() = 0; - virtual const char* networkProtocol() = 0; - virtual const char* remoteAddress() = 0; - virtual const unsigned char* authBlock(unsigned* length) = 0; + virtual void open(StatusType* status, IExternalContext* context, char* charSet, unsigned charSetSize) = 0; + virtual void openAttachment(StatusType* status, IExternalContext* context) = 0; + virtual void closeAttachment(StatusType* status, IExternalContext* context) = 0; + virtual IExternalFunction* makeFunction(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; + virtual IExternalProcedure* makeProcedure(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; + virtual IExternalTrigger* makeTrigger(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) = 0; }; template - class IManagementBaseImpl : public Base + class ITimerBaseImpl : public Base { public: - typedef IManagement Declaration; + typedef ITimer Declaration; - IManagementBaseImpl(DoNotInherit = DoNotInherit()) + ITimerBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { @@ -10713,54 +16014,95 @@ namespace Firebird this->version = Base::VERSION; this->addRef = &Name::cloopaddRefDispatcher; this->release = &Name::cloopreleaseDispatcher; - this->setOwner = &Name::cloopsetOwnerDispatcher; - this->getOwner = &Name::cloopgetOwnerDispatcher; - this->start = &Name::cloopstartDispatcher; - this->execute = &Name::cloopexecuteDispatcher; - this->commit = &Name::cloopcommitDispatcher; - this->rollback = &Name::clooprollbackDispatcher; + this->handler = &Name::cloophandlerDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopstartDispatcher(IManagement* self, IStatus* status, ILogonInfo* logonInfo) throw() + static void CLOOP_CARG cloophandlerDispatcher(ITimer* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::start(&status2, logonInfo); + static_cast(self)->Name::handler(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); } } - static int CLOOP_CARG cloopexecuteDispatcher(IManagement* self, IStatus* status, IUser* user, IListUsers* callback) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { - StatusType status2(status); + try + { + static_cast(self)->Name::addRef(); + } + catch (...) + { + StatusType::catchException(0); + } + } + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { try { - return static_cast(self)->Name::execute(&status2, user, callback); + return static_cast(self)->Name::release(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); - } + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > > > + class ITimerImpl : public ITimerBaseImpl + { + protected: + ITimerImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITimerImpl() + { + } + + virtual void handler() = 0; + }; + + template + class ITimerControlBaseImpl : public Base + { + public: + typedef ITimerControl Declaration; + + ITimerControlBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->start = &Name::cloopstartDispatcher; + this->stop = &Name::cloopstopDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopcommitDispatcher(IManagement* self, IStatus* status) throw() + static void CLOOP_CARG cloopstartDispatcher(ITimerControl* self, IStatus* status, ITimer* timer, ISC_UINT64 microSeconds) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::commit(&status2); + static_cast(self)->Name::start(&status2, timer, microSeconds); } catch (...) { @@ -10768,139 +16110,151 @@ namespace Firebird } } - static void CLOOP_CARG clooprollbackDispatcher(IManagement* self, IStatus* status) throw() + static void CLOOP_CARG cloopstopDispatcher(ITimerControl* self, IStatus* status, ITimer* timer) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::rollback(&status2); + static_cast(self)->Name::stop(&status2, timer); } catch (...) { StatusType::catchException(&status2); } } + }; - static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + template > > + class ITimerControlImpl : public ITimerControlBaseImpl + { + protected: + ITimerControlImpl(DoNotInherit = DoNotInherit()) { - try - { - static_cast(self)->Name::setOwner(r); - } - catch (...) - { - StatusType::catchException(0); - } } - static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + public: + virtual ~ITimerControlImpl() { - try - { - return static_cast(self)->Name::getOwner(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + virtual void start(StatusType* status, ITimer* timer, ISC_UINT64 microSeconds) = 0; + virtual void stop(StatusType* status, ITimer* timer) = 0; + }; + + template + class IVersionCallbackBaseImpl : public Base + { + public: + typedef IVersionCallback Declaration; + + IVersionCallbackBaseImpl(DoNotInherit = DoNotInherit()) { - try - { - static_cast(self)->Name::addRef(); - } - catch (...) + static struct VTableImpl : Base::VTable { - StatusType::catchException(0); - } + VTableImpl() + { + this->version = Base::VERSION; + this->callback = &Name::cloopcallbackDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopcallbackDispatcher(IVersionCallback* self, IStatus* status, const char* text) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::release(); + static_cast(self)->Name::callback(&status2, text); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } }; - template > > > > > > - class IManagementImpl : public IManagementBaseImpl + template > > + class IVersionCallbackImpl : public IVersionCallbackBaseImpl { protected: - IManagementImpl(DoNotInherit = DoNotInherit()) + IVersionCallbackImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IManagementImpl() + virtual ~IVersionCallbackImpl() { } - virtual void start(StatusType* status, ILogonInfo* logonInfo) = 0; - virtual int execute(StatusType* status, IUser* user, IListUsers* callback) = 0; - virtual void commit(StatusType* status) = 0; - virtual void rollback(StatusType* status) = 0; + virtual void callback(StatusType* status, const char* text) = 0; }; template - class IWireCryptPluginBaseImpl : public Base + class IUtilBaseImpl : public Base { public: - typedef IWireCryptPlugin Declaration; + typedef IUtil Declaration; - IWireCryptPluginBaseImpl(DoNotInherit = DoNotInherit()) + IUtilBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->setOwner = &Name::cloopsetOwnerDispatcher; - this->getOwner = &Name::cloopgetOwnerDispatcher; - this->getKnownTypes = &Name::cloopgetKnownTypesDispatcher; - this->setKey = &Name::cloopsetKeyDispatcher; - this->encrypt = &Name::cloopencryptDispatcher; - this->decrypt = &Name::cloopdecryptDispatcher; + this->getFbVersion = &Name::cloopgetFbVersionDispatcher; + this->loadBlob = &Name::clooploadBlobDispatcher; + this->dumpBlob = &Name::cloopdumpBlobDispatcher; + this->getPerfCounters = &Name::cloopgetPerfCountersDispatcher; + this->executeCreateDatabase = &Name::cloopexecuteCreateDatabaseDispatcher; + this->decodeDate = &Name::cloopdecodeDateDispatcher; + this->decodeTime = &Name::cloopdecodeTimeDispatcher; + this->encodeDate = &Name::cloopencodeDateDispatcher; + this->encodeTime = &Name::cloopencodeTimeDispatcher; + this->formatStatus = &Name::cloopformatStatusDispatcher; + this->getClientVersion = &Name::cloopgetClientVersionDispatcher; + this->getXpbBuilder = &Name::cloopgetXpbBuilderDispatcher; + this->setOffsets = &Name::cloopsetOffsetsDispatcher; + this->getDecFloat16 = &Name::cloopgetDecFloat16Dispatcher; + this->getDecFloat34 = &Name::cloopgetDecFloat34Dispatcher; + this->decodeTimeTz = &Name::cloopdecodeTimeTzDispatcher; + this->decodeTimeStampTz = &Name::cloopdecodeTimeStampTzDispatcher; + this->encodeTimeTz = &Name::cloopencodeTimeTzDispatcher; + this->encodeTimeStampTz = &Name::cloopencodeTimeStampTzDispatcher; + this->getInt128 = &Name::cloopgetInt128Dispatcher; + this->decodeTimeTzEx = &Name::cloopdecodeTimeTzExDispatcher; + this->decodeTimeStampTzEx = &Name::cloopdecodeTimeStampTzExDispatcher; } } vTable; this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetKnownTypesDispatcher(IWireCryptPlugin* self, IStatus* status) throw() + static void CLOOP_CARG cloopgetFbVersionDispatcher(IUtil* self, IStatus* status, IAttachment* att, IVersionCallback* callback) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getKnownTypes(&status2); + static_cast(self)->Name::getFbVersion(&status2, att, callback); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static void CLOOP_CARG cloopsetKeyDispatcher(IWireCryptPlugin* self, IStatus* status, ICryptKey* key) throw() + static void CLOOP_CARG clooploadBlobDispatcher(IUtil* self, IStatus* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::setKey(&status2, key); + static_cast(self)->Name::loadBlob(&status2, blobId, att, tra, file, txt); } catch (...) { @@ -10908,13 +16262,13 @@ namespace Firebird } } - static void CLOOP_CARG cloopencryptDispatcher(IWireCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw() + static void CLOOP_CARG cloopdumpBlobDispatcher(IUtil* self, IStatus* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::encrypt(&status2, length, from, to); + static_cast(self)->Name::dumpBlob(&status2, blobId, att, tra, file, txt); } catch (...) { @@ -10922,13 +16276,13 @@ namespace Firebird } } - static void CLOOP_CARG cloopdecryptDispatcher(IWireCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw() + static void CLOOP_CARG cloopgetPerfCountersDispatcher(IUtil* self, IStatus* status, IAttachment* att, const char* countersSet, ISC_INT64* counters) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::decrypt(&status2, length, from, to); + static_cast(self)->Name::getPerfCounters(&status2, att, countersSet, counters); } catch (...) { @@ -10936,36 +16290,38 @@ namespace Firebird } } - static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + static IAttachment* CLOOP_CARG cloopexecuteCreateDatabaseDispatcher(IUtil* self, IStatus* status, unsigned stmtLength, const char* creatDBstatement, unsigned dialect, FB_BOOLEAN* stmtIsCreateDb) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::setOwner(r); + return static_cast(self)->Name::executeCreateDatabase(&status2, stmtLength, creatDBstatement, dialect, stmtIsCreateDb); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + static void CLOOP_CARG cloopdecodeDateDispatcher(IUtil* self, ISC_DATE date, unsigned* year, unsigned* month, unsigned* day) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getOwner(); + static_cast(self)->Name::decodeDate(date, year, month, day); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopdecodeTimeDispatcher(IUtil* self, ISC_TIME time, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::addRef(); + static_cast(self)->Name::decodeTime(time, hours, minutes, seconds, fractions); } catch (...) { @@ -10973,64 +16329,50 @@ namespace Firebird } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static ISC_DATE CLOOP_CARG cloopencodeDateDispatcher(IUtil* self, unsigned year, unsigned month, unsigned day) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::release(); + return static_cast(self)->Name::encodeDate(year, month, day); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - }; - - template > > > > > > - class IWireCryptPluginImpl : public IWireCryptPluginBaseImpl - { - protected: - IWireCryptPluginImpl(DoNotInherit = DoNotInherit()) - { - } - public: - virtual ~IWireCryptPluginImpl() + static ISC_TIME CLOOP_CARG cloopencodeTimeDispatcher(IUtil* self, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions) CLOOP_NOEXCEPT { + try + { + return static_cast(self)->Name::encodeTime(hours, minutes, seconds, fractions); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } } - virtual const char* getKnownTypes(StatusType* status) = 0; - virtual void setKey(StatusType* status, ICryptKey* key) = 0; - virtual void encrypt(StatusType* status, unsigned length, const void* from, void* to) = 0; - virtual void decrypt(StatusType* status, unsigned length, const void* from, void* to) = 0; - }; - - template - class ICryptKeyCallbackBaseImpl : public Base - { - public: - typedef ICryptKeyCallback Declaration; - - ICryptKeyCallbackBaseImpl(DoNotInherit = DoNotInherit()) + static unsigned CLOOP_CARG cloopformatStatusDispatcher(IUtil* self, char* buffer, unsigned bufferSize, IStatus* status) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable + try { - VTableImpl() - { - this->version = Base::VERSION; - this->callback = &Name::cloopcallbackDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; + return static_cast(self)->Name::formatStatus(buffer, bufferSize, status); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } } - static unsigned CLOOP_CARG cloopcallbackDispatcher(ICryptKeyCallback* self, unsigned dataLength, const void* data, unsigned bufferLength, void* buffer) throw() + static unsigned CLOOP_CARG cloopgetClientVersionDispatcher(IUtil* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::callback(dataLength, data, bufferLength, buffer); + return static_cast(self)->Name::getClientVersion(); } catch (...) { @@ -11038,294 +16380,302 @@ namespace Firebird return static_cast(0); } } - }; - template > > - class ICryptKeyCallbackImpl : public ICryptKeyCallbackBaseImpl - { - protected: - ICryptKeyCallbackImpl(DoNotInherit = DoNotInherit()) + static IXpbBuilder* CLOOP_CARG cloopgetXpbBuilderDispatcher(IUtil* self, IStatus* status, unsigned kind, const unsigned char* buf, unsigned len) CLOOP_NOEXCEPT { - } + StatusType status2(status); - public: - virtual ~ICryptKeyCallbackImpl() - { + try + { + return static_cast(self)->Name::getXpbBuilder(&status2, kind, buf, len); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } } - virtual unsigned callback(unsigned dataLength, const void* data, unsigned bufferLength, void* buffer) = 0; - }; + static unsigned CLOOP_CARG cloopsetOffsetsDispatcher(IUtil* self, IStatus* status, IMessageMetadata* metadata, IOffsetsCallback* callback) CLOOP_NOEXCEPT + { + StatusType status2(status); - template - class IKeyHolderPluginBaseImpl : public Base - { - public: - typedef IKeyHolderPlugin Declaration; + try + { + return static_cast(self)->Name::setOffsets(&status2, metadata, callback); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } - IKeyHolderPluginBaseImpl(DoNotInherit = DoNotInherit()) + static IDecFloat16* CLOOP_CARG cloopgetDecFloat16Dispatcher(IUtil* self, IStatus* status) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable - { - VTableImpl() - { - this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->setOwner = &Name::cloopsetOwnerDispatcher; - this->getOwner = &Name::cloopgetOwnerDispatcher; - this->keyCallback = &Name::cloopkeyCallbackDispatcher; - this->keyHandle = &Name::cloopkeyHandleDispatcher; - this->useOnlyOwnKeys = &Name::cloopuseOnlyOwnKeysDispatcher; - this->chainHandle = &Name::cloopchainHandleDispatcher; - } - } vTable; + StatusType status2(status); - this->cloopVTable = &vTable; + try + { + return static_cast(self)->Name::getDecFloat16(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } } - static int CLOOP_CARG cloopkeyCallbackDispatcher(IKeyHolderPlugin* self, IStatus* status, ICryptKeyCallback* callback) throw() + static IDecFloat34* CLOOP_CARG cloopgetDecFloat34Dispatcher(IUtil* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::keyCallback(&status2, callback); + return static_cast(self)->Name::getDecFloat34(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } - static ICryptKeyCallback* CLOOP_CARG cloopkeyHandleDispatcher(IKeyHolderPlugin* self, IStatus* status, const char* keyName) throw() + static void CLOOP_CARG cloopdecodeTimeTzDispatcher(IUtil* self, IStatus* status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::keyHandle(&status2, keyName); + static_cast(self)->Name::decodeTimeTz(&status2, timeTz, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static FB_BOOLEAN CLOOP_CARG cloopuseOnlyOwnKeysDispatcher(IKeyHolderPlugin* self, IStatus* status) throw() + static void CLOOP_CARG cloopdecodeTimeStampTzDispatcher(IUtil* self, IStatus* status, const ISC_TIMESTAMP_TZ* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::useOnlyOwnKeys(&status2); + static_cast(self)->Name::decodeTimeStampTz(&status2, timeStampTz, year, month, day, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static ICryptKeyCallback* CLOOP_CARG cloopchainHandleDispatcher(IKeyHolderPlugin* self, IStatus* status) throw() + static void CLOOP_CARG cloopencodeTimeTzDispatcher(IUtil* self, IStatus* status, ISC_TIME_TZ* timeTz, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::chainHandle(&status2); + static_cast(self)->Name::encodeTimeTz(&status2, timeTz, hours, minutes, seconds, fractions, timeZone); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + static void CLOOP_CARG cloopencodeTimeStampTzDispatcher(IUtil* self, IStatus* status, ISC_TIMESTAMP_TZ* timeStampTz, unsigned year, unsigned month, unsigned day, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::setOwner(r); + static_cast(self)->Name::encodeTimeStampTz(&status2, timeStampTz, year, month, day, hours, minutes, seconds, fractions, timeZone); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); } } - static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + static IInt128* CLOOP_CARG cloopgetInt128Dispatcher(IUtil* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getOwner(); + return static_cast(self)->Name::getInt128(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopdecodeTimeTzExDispatcher(IUtil* self, IStatus* status, const ISC_TIME_TZ_EX* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::addRef(); + static_cast(self)->Name::decodeTimeTzEx(&status2, timeTz, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopdecodeTimeStampTzExDispatcher(IUtil* self, IStatus* status, const ISC_TIMESTAMP_TZ_EX* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::release(); + static_cast(self)->Name::decodeTimeStampTzEx(&status2, timeStampTz, year, month, day, hours, minutes, seconds, fractions, timeZoneBufferLength, timeZoneBuffer); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } }; - template > > > > > > - class IKeyHolderPluginImpl : public IKeyHolderPluginBaseImpl + template > > + class IUtilImpl : public IUtilBaseImpl { protected: - IKeyHolderPluginImpl(DoNotInherit = DoNotInherit()) + IUtilImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IKeyHolderPluginImpl() + virtual ~IUtilImpl() { } - virtual int keyCallback(StatusType* status, ICryptKeyCallback* callback) = 0; - virtual ICryptKeyCallback* keyHandle(StatusType* status, const char* keyName) = 0; - virtual FB_BOOLEAN useOnlyOwnKeys(StatusType* status) = 0; - virtual ICryptKeyCallback* chainHandle(StatusType* status) = 0; + virtual void getFbVersion(StatusType* status, IAttachment* att, IVersionCallback* callback) = 0; + virtual void loadBlob(StatusType* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) = 0; + virtual void dumpBlob(StatusType* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) = 0; + virtual void getPerfCounters(StatusType* status, IAttachment* att, const char* countersSet, ISC_INT64* counters) = 0; + virtual IAttachment* executeCreateDatabase(StatusType* status, unsigned stmtLength, const char* creatDBstatement, unsigned dialect, FB_BOOLEAN* stmtIsCreateDb) = 0; + virtual void decodeDate(ISC_DATE date, unsigned* year, unsigned* month, unsigned* day) = 0; + virtual void decodeTime(ISC_TIME time, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions) = 0; + virtual ISC_DATE encodeDate(unsigned year, unsigned month, unsigned day) = 0; + virtual ISC_TIME encodeTime(unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions) = 0; + virtual unsigned formatStatus(char* buffer, unsigned bufferSize, IStatus* status) = 0; + virtual unsigned getClientVersion() = 0; + virtual IXpbBuilder* getXpbBuilder(StatusType* status, unsigned kind, const unsigned char* buf, unsigned len) = 0; + virtual unsigned setOffsets(StatusType* status, IMessageMetadata* metadata, IOffsetsCallback* callback) = 0; + virtual IDecFloat16* getDecFloat16(StatusType* status) = 0; + virtual IDecFloat34* getDecFloat34(StatusType* status) = 0; + virtual void decodeTimeTz(StatusType* status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) = 0; + virtual void decodeTimeStampTz(StatusType* status, const ISC_TIMESTAMP_TZ* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) = 0; + virtual void encodeTimeTz(StatusType* status, ISC_TIME_TZ* timeTz, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) = 0; + virtual void encodeTimeStampTz(StatusType* status, ISC_TIMESTAMP_TZ* timeStampTz, unsigned year, unsigned month, unsigned day, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions, const char* timeZone) = 0; + virtual IInt128* getInt128(StatusType* status) = 0; + virtual void decodeTimeTzEx(StatusType* status, const ISC_TIME_TZ_EX* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) = 0; + virtual void decodeTimeStampTzEx(StatusType* status, const ISC_TIMESTAMP_TZ_EX* timeStampTz, unsigned* year, unsigned* month, unsigned* day, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) = 0; }; template - class IDbCryptInfoBaseImpl : public Base + class IOffsetsCallbackBaseImpl : public Base { public: - typedef IDbCryptInfo Declaration; + typedef IOffsetsCallback Declaration; - IDbCryptInfoBaseImpl(DoNotInherit = DoNotInherit()) + IOffsetsCallbackBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->getDatabaseFullPath = &Name::cloopgetDatabaseFullPathDispatcher; + this->setOffset = &Name::cloopsetOffsetDispatcher; } } vTable; this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetDatabaseFullPathDispatcher(IDbCryptInfo* self, IStatus* status) throw() + static void CLOOP_CARG cloopsetOffsetDispatcher(IOffsetsCallback* self, IStatus* status, unsigned index, unsigned offset, unsigned nullOffset) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getDatabaseFullPath(&status2); + static_cast(self)->Name::setOffset(&status2, index, offset, nullOffset); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); - } - } - - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() - { - try - { - static_cast(self)->Name::addRef(); - } - catch (...) - { - StatusType::catchException(0); - } - } - - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() - { - try - { - return static_cast(self)->Name::release(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); } } }; - template > > > > - class IDbCryptInfoImpl : public IDbCryptInfoBaseImpl + template > > + class IOffsetsCallbackImpl : public IOffsetsCallbackBaseImpl { protected: - IDbCryptInfoImpl(DoNotInherit = DoNotInherit()) + IOffsetsCallbackImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IDbCryptInfoImpl() + virtual ~IOffsetsCallbackImpl() { } - virtual const char* getDatabaseFullPath(StatusType* status) = 0; + virtual void setOffset(StatusType* status, unsigned index, unsigned offset, unsigned nullOffset) = 0; }; template - class IDbCryptPluginBaseImpl : public Base + class IXpbBuilderBaseImpl : public Base { public: - typedef IDbCryptPlugin Declaration; + typedef IXpbBuilder Declaration; - IDbCryptPluginBaseImpl(DoNotInherit = DoNotInherit()) + IXpbBuilderBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->setOwner = &Name::cloopsetOwnerDispatcher; - this->getOwner = &Name::cloopgetOwnerDispatcher; - this->setKey = &Name::cloopsetKeyDispatcher; - this->encrypt = &Name::cloopencryptDispatcher; - this->decrypt = &Name::cloopdecryptDispatcher; - this->setInfo = &Name::cloopsetInfoDispatcher; + this->dispose = &Name::cloopdisposeDispatcher; + this->clear = &Name::cloopclearDispatcher; + this->removeCurrent = &Name::cloopremoveCurrentDispatcher; + this->insertInt = &Name::cloopinsertIntDispatcher; + this->insertBigInt = &Name::cloopinsertBigIntDispatcher; + this->insertBytes = &Name::cloopinsertBytesDispatcher; + this->insertString = &Name::cloopinsertStringDispatcher; + this->insertTag = &Name::cloopinsertTagDispatcher; + this->isEof = &Name::cloopisEofDispatcher; + this->moveNext = &Name::cloopmoveNextDispatcher; + this->rewind = &Name::clooprewindDispatcher; + this->findFirst = &Name::cloopfindFirstDispatcher; + this->findNext = &Name::cloopfindNextDispatcher; + this->getTag = &Name::cloopgetTagDispatcher; + this->getLength = &Name::cloopgetLengthDispatcher; + this->getInt = &Name::cloopgetIntDispatcher; + this->getBigInt = &Name::cloopgetBigIntDispatcher; + this->getString = &Name::cloopgetStringDispatcher; + this->getBytes = &Name::cloopgetBytesDispatcher; + this->getBufferLength = &Name::cloopgetBufferLengthDispatcher; + this->getBuffer = &Name::cloopgetBufferDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopsetKeyDispatcher(IDbCryptPlugin* self, IStatus* status, unsigned length, IKeyHolderPlugin** sources, const char* keyName) throw() + static void CLOOP_CARG cloopclearDispatcher(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::setKey(&status2, length, sources, keyName); + static_cast(self)->Name::clear(&status2); } catch (...) { @@ -11333,13 +16683,13 @@ namespace Firebird } } - static void CLOOP_CARG cloopencryptDispatcher(IDbCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw() + static void CLOOP_CARG cloopremoveCurrentDispatcher(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::encrypt(&status2, length, from, to); + static_cast(self)->Name::removeCurrent(&status2); } catch (...) { @@ -11347,13 +16697,13 @@ namespace Firebird } } - static void CLOOP_CARG cloopdecryptDispatcher(IDbCryptPlugin* self, IStatus* status, unsigned length, const void* from, void* to) throw() + static void CLOOP_CARG cloopinsertIntDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag, int value) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::decrypt(&status2, length, from, to); + static_cast(self)->Name::insertInt(&status2, tag, value); } catch (...) { @@ -11361,13 +16711,13 @@ namespace Firebird } } - static void CLOOP_CARG cloopsetInfoDispatcher(IDbCryptPlugin* self, IStatus* status, IDbCryptInfo* info) throw() + static void CLOOP_CARG cloopinsertBigIntDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag, ISC_INT64 value) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::setInfo(&status2, info); + static_cast(self)->Name::insertBigInt(&status2, tag, value); } catch (...) { @@ -11375,1883 +16725,2036 @@ namespace Firebird } } - static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + static void CLOOP_CARG cloopinsertBytesDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag, const void* bytes, unsigned length) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::setOwner(r); + static_cast(self)->Name::insertBytes(&status2, tag, bytes, length); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); } } - static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + static void CLOOP_CARG cloopinsertStringDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag, const char* str) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getOwner(); + static_cast(self)->Name::insertString(&status2, tag, str); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopinsertTagDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::addRef(); + static_cast(self)->Name::insertTag(&status2, tag); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static FB_BOOLEAN CLOOP_CARG cloopisEofDispatcher(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::release(); + return static_cast(self)->Name::isEof(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - }; - template > > > > > > - class IDbCryptPluginImpl : public IDbCryptPluginBaseImpl - { - protected: - IDbCryptPluginImpl(DoNotInherit = DoNotInherit()) + static void CLOOP_CARG cloopmoveNextDispatcher(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT { - } + StatusType status2(status); - public: - virtual ~IDbCryptPluginImpl() - { + try + { + static_cast(self)->Name::moveNext(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } } - virtual void setKey(StatusType* status, unsigned length, IKeyHolderPlugin** sources, const char* keyName) = 0; - virtual void encrypt(StatusType* status, unsigned length, const void* from, void* to) = 0; - virtual void decrypt(StatusType* status, unsigned length, const void* from, void* to) = 0; - virtual void setInfo(StatusType* status, IDbCryptInfo* info) = 0; - }; + static void CLOOP_CARG clooprewindDispatcher(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); - template - class IExternalContextBaseImpl : public Base - { - public: - typedef IExternalContext Declaration; + try + { + static_cast(self)->Name::rewind(&status2); + } + catch (...) + { + StatusType::catchException(&status2); + } + } - IExternalContextBaseImpl(DoNotInherit = DoNotInherit()) + static FB_BOOLEAN CLOOP_CARG cloopfindFirstDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable - { - VTableImpl() - { - this->version = Base::VERSION; - this->getMaster = &Name::cloopgetMasterDispatcher; - this->getEngine = &Name::cloopgetEngineDispatcher; - this->getAttachment = &Name::cloopgetAttachmentDispatcher; - this->getTransaction = &Name::cloopgetTransactionDispatcher; - this->getUserName = &Name::cloopgetUserNameDispatcher; - this->getDatabaseName = &Name::cloopgetDatabaseNameDispatcher; - this->getClientCharSet = &Name::cloopgetClientCharSetDispatcher; - this->obtainInfoCode = &Name::cloopobtainInfoCodeDispatcher; - this->getInfo = &Name::cloopgetInfoDispatcher; - this->setInfo = &Name::cloopsetInfoDispatcher; - } - } vTable; + StatusType status2(status); - this->cloopVTable = &vTable; + try + { + return static_cast(self)->Name::findFirst(&status2, tag); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } } - static IMaster* CLOOP_CARG cloopgetMasterDispatcher(IExternalContext* self) throw() + static FB_BOOLEAN CLOOP_CARG cloopfindNextDispatcher(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getMaster(); + return static_cast(self)->Name::findNext(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static IExternalEngine* CLOOP_CARG cloopgetEngineDispatcher(IExternalContext* self, IStatus* status) throw() + static unsigned char CLOOP_CARG cloopgetTagDispatcher(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getEngine(&status2); + return static_cast(self)->Name::getTag(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } - static IAttachment* CLOOP_CARG cloopgetAttachmentDispatcher(IExternalContext* self, IStatus* status) throw() + static unsigned CLOOP_CARG cloopgetLengthDispatcher(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getAttachment(&status2); + return static_cast(self)->Name::getLength(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } - static ITransaction* CLOOP_CARG cloopgetTransactionDispatcher(IExternalContext* self, IStatus* status) throw() + static int CLOOP_CARG cloopgetIntDispatcher(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getTransaction(&status2); + return static_cast(self)->Name::getInt(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetUserNameDispatcher(IExternalContext* self) throw() + static ISC_INT64 CLOOP_CARG cloopgetBigIntDispatcher(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getUserName(); + return static_cast(self)->Name::getBigInt(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetDatabaseNameDispatcher(IExternalContext* self) throw() + static const char* CLOOP_CARG cloopgetStringDispatcher(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getDatabaseName(); + return static_cast(self)->Name::getString(&status2); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); return static_cast(0); } } - static const char* CLOOP_CARG cloopgetClientCharSetDispatcher(IExternalContext* self) throw() + static const unsigned char* CLOOP_CARG cloopgetBytesDispatcher(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getClientCharSet(); + return static_cast(self)->Name::getBytes(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static int CLOOP_CARG cloopobtainInfoCodeDispatcher(IExternalContext* self) throw() + static unsigned CLOOP_CARG cloopgetBufferLengthDispatcher(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::obtainInfoCode(); + return static_cast(self)->Name::getBufferLength(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static void* CLOOP_CARG cloopgetInfoDispatcher(IExternalContext* self, int code) throw() + static const unsigned char* CLOOP_CARG cloopgetBufferDispatcher(IXpbBuilder* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getInfo(code); + return static_cast(self)->Name::getBuffer(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static void* CLOOP_CARG cloopsetInfoDispatcher(IExternalContext* self, int code, void* value) throw() + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::setInfo(code, value); + static_cast(self)->Name::dispose(); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } }; - template > > - class IExternalContextImpl : public IExternalContextBaseImpl + template > > > > + class IXpbBuilderImpl : public IXpbBuilderBaseImpl { protected: - IExternalContextImpl(DoNotInherit = DoNotInherit()) + IXpbBuilderImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IExternalContextImpl() + virtual ~IXpbBuilderImpl() { } - virtual IMaster* getMaster() = 0; - virtual IExternalEngine* getEngine(StatusType* status) = 0; - virtual IAttachment* getAttachment(StatusType* status) = 0; - virtual ITransaction* getTransaction(StatusType* status) = 0; - virtual const char* getUserName() = 0; - virtual const char* getDatabaseName() = 0; - virtual const char* getClientCharSet() = 0; - virtual int obtainInfoCode() = 0; - virtual void* getInfo(int code) = 0; - virtual void* setInfo(int code, void* value) = 0; + virtual void clear(StatusType* status) = 0; + virtual void removeCurrent(StatusType* status) = 0; + virtual void insertInt(StatusType* status, unsigned char tag, int value) = 0; + virtual void insertBigInt(StatusType* status, unsigned char tag, ISC_INT64 value) = 0; + virtual void insertBytes(StatusType* status, unsigned char tag, const void* bytes, unsigned length) = 0; + virtual void insertString(StatusType* status, unsigned char tag, const char* str) = 0; + virtual void insertTag(StatusType* status, unsigned char tag) = 0; + virtual FB_BOOLEAN isEof(StatusType* status) = 0; + virtual void moveNext(StatusType* status) = 0; + virtual void rewind(StatusType* status) = 0; + virtual FB_BOOLEAN findFirst(StatusType* status, unsigned char tag) = 0; + virtual FB_BOOLEAN findNext(StatusType* status) = 0; + virtual unsigned char getTag(StatusType* status) = 0; + virtual unsigned getLength(StatusType* status) = 0; + virtual int getInt(StatusType* status) = 0; + virtual ISC_INT64 getBigInt(StatusType* status) = 0; + virtual const char* getString(StatusType* status) = 0; + virtual const unsigned char* getBytes(StatusType* status) = 0; + virtual unsigned getBufferLength(StatusType* status) = 0; + virtual const unsigned char* getBuffer(StatusType* status) = 0; }; template - class IExternalResultSetBaseImpl : public Base + class ITraceConnectionBaseImpl : public Base { public: - typedef IExternalResultSet Declaration; + typedef ITraceConnection Declaration; - IExternalResultSetBaseImpl(DoNotInherit = DoNotInherit()) + ITraceConnectionBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->dispose = &Name::cloopdisposeDispatcher; - this->fetch = &Name::cloopfetchDispatcher; + this->getKind = &Name::cloopgetKindDispatcher; + this->getProcessID = &Name::cloopgetProcessIDDispatcher; + this->getUserName = &Name::cloopgetUserNameDispatcher; + this->getRoleName = &Name::cloopgetRoleNameDispatcher; + this->getCharSet = &Name::cloopgetCharSetDispatcher; + this->getRemoteProtocol = &Name::cloopgetRemoteProtocolDispatcher; + this->getRemoteAddress = &Name::cloopgetRemoteAddressDispatcher; + this->getRemoteProcessID = &Name::cloopgetRemoteProcessIDDispatcher; + this->getRemoteProcessName = &Name::cloopgetRemoteProcessNameDispatcher; } } vTable; this->cloopVTable = &vTable; } - static FB_BOOLEAN CLOOP_CARG cloopfetchDispatcher(IExternalResultSet* self, IStatus* status) throw() + static unsigned CLOOP_CARG cloopgetKindDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::fetch(&status2); + return static_cast(self)->Name::getKind(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + static int CLOOP_CARG cloopgetProcessIDDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::dispose(); + return static_cast(self)->Name::getProcessID(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } - }; - template > > > > - class IExternalResultSetImpl : public IExternalResultSetBaseImpl - { - protected: - IExternalResultSetImpl(DoNotInherit = DoNotInherit()) + static const char* CLOOP_CARG cloopgetUserNameDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { + try + { + return static_cast(self)->Name::getUserName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } } - public: - virtual ~IExternalResultSetImpl() + static const char* CLOOP_CARG cloopgetRoleNameDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { + try + { + return static_cast(self)->Name::getRoleName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } } - virtual FB_BOOLEAN fetch(StatusType* status) = 0; - }; - - template - class IExternalFunctionBaseImpl : public Base - { - public: - typedef IExternalFunction Declaration; - - IExternalFunctionBaseImpl(DoNotInherit = DoNotInherit()) + static const char* CLOOP_CARG cloopgetCharSetDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable + try { - VTableImpl() - { - this->version = Base::VERSION; - this->dispose = &Name::cloopdisposeDispatcher; - this->getCharSet = &Name::cloopgetCharSetDispatcher; - this->execute = &Name::cloopexecuteDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; + return static_cast(self)->Name::getCharSet(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } } - static void CLOOP_CARG cloopgetCharSetDispatcher(IExternalFunction* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) throw() + static const char* CLOOP_CARG cloopgetRemoteProtocolDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::getCharSet(&status2, context, name, nameSize); + return static_cast(self)->Name::getRemoteProtocol(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopexecuteDispatcher(IExternalFunction* self, IStatus* status, IExternalContext* context, void* inMsg, void* outMsg) throw() + static const char* CLOOP_CARG cloopgetRemoteAddressDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); + try + { + return static_cast(self)->Name::getRemoteAddress(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + static int CLOOP_CARG cloopgetRemoteProcessIDDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT + { try { - static_cast(self)->Name::execute(&status2, context, inMsg, outMsg); + return static_cast(self)->Name::getRemoteProcessID(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + static const char* CLOOP_CARG cloopgetRemoteProcessNameDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::dispose(); + return static_cast(self)->Name::getRemoteProcessName(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } }; - template > > > > - class IExternalFunctionImpl : public IExternalFunctionBaseImpl + template > > + class ITraceConnectionImpl : public ITraceConnectionBaseImpl { protected: - IExternalFunctionImpl(DoNotInherit = DoNotInherit()) + ITraceConnectionImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IExternalFunctionImpl() + virtual ~ITraceConnectionImpl() { } - virtual void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) = 0; - virtual void execute(StatusType* status, IExternalContext* context, void* inMsg, void* outMsg) = 0; + virtual unsigned getKind() = 0; + virtual int getProcessID() = 0; + virtual const char* getUserName() = 0; + virtual const char* getRoleName() = 0; + virtual const char* getCharSet() = 0; + virtual const char* getRemoteProtocol() = 0; + virtual const char* getRemoteAddress() = 0; + virtual int getRemoteProcessID() = 0; + virtual const char* getRemoteProcessName() = 0; }; template - class IExternalProcedureBaseImpl : public Base + class ITraceDatabaseConnectionBaseImpl : public Base { public: - typedef IExternalProcedure Declaration; + typedef ITraceDatabaseConnection Declaration; - IExternalProcedureBaseImpl(DoNotInherit = DoNotInherit()) + ITraceDatabaseConnectionBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->dispose = &Name::cloopdisposeDispatcher; + this->getKind = &Name::cloopgetKindDispatcher; + this->getProcessID = &Name::cloopgetProcessIDDispatcher; + this->getUserName = &Name::cloopgetUserNameDispatcher; + this->getRoleName = &Name::cloopgetRoleNameDispatcher; this->getCharSet = &Name::cloopgetCharSetDispatcher; - this->open = &Name::cloopopenDispatcher; + this->getRemoteProtocol = &Name::cloopgetRemoteProtocolDispatcher; + this->getRemoteAddress = &Name::cloopgetRemoteAddressDispatcher; + this->getRemoteProcessID = &Name::cloopgetRemoteProcessIDDispatcher; + this->getRemoteProcessName = &Name::cloopgetRemoteProcessNameDispatcher; + this->getConnectionID = &Name::cloopgetConnectionIDDispatcher; + this->getDatabaseName = &Name::cloopgetDatabaseNameDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopgetCharSetDispatcher(IExternalProcedure* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) throw() + static ISC_INT64 CLOOP_CARG cloopgetConnectionIDDispatcher(ITraceDatabaseConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); + try + { + return static_cast(self)->Name::getConnectionID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetDatabaseNameDispatcher(ITraceDatabaseConnection* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getDatabaseName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + static unsigned CLOOP_CARG cloopgetKindDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT + { try { - static_cast(self)->Name::getCharSet(&status2, context, name, nameSize); + return static_cast(self)->Name::getKind(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static IExternalResultSet* CLOOP_CARG cloopopenDispatcher(IExternalProcedure* self, IStatus* status, IExternalContext* context, void* inMsg, void* outMsg) throw() + static int CLOOP_CARG cloopgetProcessIDDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::open(&status2, context, inMsg, outMsg); + return static_cast(self)->Name::getProcessID(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + static const char* CLOOP_CARG cloopgetUserNameDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::dispose(); + return static_cast(self)->Name::getUserName(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } - }; - template > > > > - class IExternalProcedureImpl : public IExternalProcedureBaseImpl - { - protected: - IExternalProcedureImpl(DoNotInherit = DoNotInherit()) + static const char* CLOOP_CARG cloopgetRoleNameDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { + try + { + return static_cast(self)->Name::getRoleName(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } } - public: - virtual ~IExternalProcedureImpl() + static const char* CLOOP_CARG cloopgetCharSetDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { + try + { + return static_cast(self)->Name::getCharSet(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } } - virtual void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) = 0; - virtual IExternalResultSet* open(StatusType* status, IExternalContext* context, void* inMsg, void* outMsg) = 0; - }; - - template - class IExternalTriggerBaseImpl : public Base - { - public: - typedef IExternalTrigger Declaration; - - IExternalTriggerBaseImpl(DoNotInherit = DoNotInherit()) + static const char* CLOOP_CARG cloopgetRemoteProtocolDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable + try { - VTableImpl() - { - this->version = Base::VERSION; - this->dispose = &Name::cloopdisposeDispatcher; - this->getCharSet = &Name::cloopgetCharSetDispatcher; - this->execute = &Name::cloopexecuteDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; + return static_cast(self)->Name::getRemoteProtocol(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } } - static void CLOOP_CARG cloopgetCharSetDispatcher(IExternalTrigger* self, IStatus* status, IExternalContext* context, char* name, unsigned nameSize) throw() + static const char* CLOOP_CARG cloopgetRemoteAddressDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::getCharSet(&status2, context, name, nameSize); + return static_cast(self)->Name::getRemoteAddress(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopexecuteDispatcher(IExternalTrigger* self, IStatus* status, IExternalContext* context, unsigned action, void* oldMsg, void* newMsg) throw() + static int CLOOP_CARG cloopgetRemoteProcessIDDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::execute(&status2, context, action, oldMsg, newMsg); + return static_cast(self)->Name::getRemoteProcessID(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + static const char* CLOOP_CARG cloopgetRemoteProcessNameDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::dispose(); + return static_cast(self)->Name::getRemoteProcessName(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } }; - template > > > > - class IExternalTriggerImpl : public IExternalTriggerBaseImpl + template > > > > + class ITraceDatabaseConnectionImpl : public ITraceDatabaseConnectionBaseImpl { protected: - IExternalTriggerImpl(DoNotInherit = DoNotInherit()) + ITraceDatabaseConnectionImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IExternalTriggerImpl() + virtual ~ITraceDatabaseConnectionImpl() { } - virtual void getCharSet(StatusType* status, IExternalContext* context, char* name, unsigned nameSize) = 0; - virtual void execute(StatusType* status, IExternalContext* context, unsigned action, void* oldMsg, void* newMsg) = 0; + virtual ISC_INT64 getConnectionID() = 0; + virtual const char* getDatabaseName() = 0; }; template - class IRoutineMetadataBaseImpl : public Base + class ITraceTransactionBaseImpl : public Base { public: - typedef IRoutineMetadata Declaration; + typedef ITraceTransaction Declaration; - IRoutineMetadataBaseImpl(DoNotInherit = DoNotInherit()) + ITraceTransactionBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->getPackage = &Name::cloopgetPackageDispatcher; - this->getName = &Name::cloopgetNameDispatcher; - this->getEntryPoint = &Name::cloopgetEntryPointDispatcher; - this->getBody = &Name::cloopgetBodyDispatcher; - this->getInputMetadata = &Name::cloopgetInputMetadataDispatcher; - this->getOutputMetadata = &Name::cloopgetOutputMetadataDispatcher; - this->getTriggerMetadata = &Name::cloopgetTriggerMetadataDispatcher; - this->getTriggerTable = &Name::cloopgetTriggerTableDispatcher; - this->getTriggerType = &Name::cloopgetTriggerTypeDispatcher; + this->getTransactionID = &Name::cloopgetTransactionIDDispatcher; + this->getReadOnly = &Name::cloopgetReadOnlyDispatcher; + this->getWait = &Name::cloopgetWaitDispatcher; + this->getIsolation = &Name::cloopgetIsolationDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; + this->getInitialID = &Name::cloopgetInitialIDDispatcher; + this->getPreviousID = &Name::cloopgetPreviousIDDispatcher; } } vTable; this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetPackageDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + static ISC_INT64 CLOOP_CARG cloopgetTransactionIDDispatcher(ITraceTransaction* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getPackage(&status2); + return static_cast(self)->Name::getTransactionID(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetNameDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + static FB_BOOLEAN CLOOP_CARG cloopgetReadOnlyDispatcher(ITraceTransaction* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getName(&status2); + return static_cast(self)->Name::getReadOnly(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetEntryPointDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + static int CLOOP_CARG cloopgetWaitDispatcher(ITraceTransaction* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getEntryPoint(&status2); + return static_cast(self)->Name::getWait(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetBodyDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + static unsigned CLOOP_CARG cloopgetIsolationDispatcher(ITraceTransaction* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getBody(&status2); + return static_cast(self)->Name::getIsolation(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static IMessageMetadata* CLOOP_CARG cloopgetInputMetadataDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceTransaction* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getInputMetadata(&status2); + return static_cast(self)->Name::getPerf(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static IMessageMetadata* CLOOP_CARG cloopgetOutputMetadataDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + static ISC_INT64 CLOOP_CARG cloopgetInitialIDDispatcher(ITraceTransaction* self) CLOOP_NOEXCEPT { - StatusType status2(status); + try + { + return static_cast(self)->Name::getInitialID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + static ISC_INT64 CLOOP_CARG cloopgetPreviousIDDispatcher(ITraceTransaction* self) CLOOP_NOEXCEPT + { try { - return static_cast(self)->Name::getOutputMetadata(&status2); + return static_cast(self)->Name::getPreviousID(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } + }; - static IMessageMetadata* CLOOP_CARG cloopgetTriggerMetadataDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + template > > + class ITraceTransactionImpl : public ITraceTransactionBaseImpl + { + protected: + ITraceTransactionImpl(DoNotInherit = DoNotInherit()) { - StatusType status2(status); + } + + public: + virtual ~ITraceTransactionImpl() + { + } + + virtual ISC_INT64 getTransactionID() = 0; + virtual FB_BOOLEAN getReadOnly() = 0; + virtual int getWait() = 0; + virtual unsigned getIsolation() = 0; + virtual PerformanceInfo* getPerf() = 0; + virtual ISC_INT64 getInitialID() = 0; + virtual ISC_INT64 getPreviousID() = 0; + }; + + template + class ITraceParamsBaseImpl : public Base + { + public: + typedef ITraceParams Declaration; + + ITraceParamsBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getCount = &Name::cloopgetCountDispatcher; + this->getParam = &Name::cloopgetParamDispatcher; + this->getTextUTF8 = &Name::cloopgetTextUTF8Dispatcher; + } + } vTable; + this->cloopVTable = &vTable; + } + + static unsigned CLOOP_CARG cloopgetCountDispatcher(ITraceParams* self) CLOOP_NOEXCEPT + { try { - return static_cast(self)->Name::getTriggerMetadata(&status2); + return static_cast(self)->Name::getCount(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetTriggerTableDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + static const dsc* CLOOP_CARG cloopgetParamDispatcher(ITraceParams* self, unsigned idx) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getTriggerTable(&status2); + return static_cast(self)->Name::getParam(idx); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static unsigned CLOOP_CARG cloopgetTriggerTypeDispatcher(const IRoutineMetadata* self, IStatus* status) throw() + static const char* CLOOP_CARG cloopgetTextUTF8Dispatcher(ITraceParams* self, IStatus* status, unsigned idx) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::getTriggerType(&status2); + return static_cast(self)->Name::getTextUTF8(&status2, idx); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); + return static_cast(0); } } }; - template > > - class IRoutineMetadataImpl : public IRoutineMetadataBaseImpl + template > > + class ITraceParamsImpl : public ITraceParamsBaseImpl { protected: - IRoutineMetadataImpl(DoNotInherit = DoNotInherit()) + ITraceParamsImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IRoutineMetadataImpl() + virtual ~ITraceParamsImpl() { - } - - virtual const char* getPackage(StatusType* status) const = 0; - virtual const char* getName(StatusType* status) const = 0; - virtual const char* getEntryPoint(StatusType* status) const = 0; - virtual const char* getBody(StatusType* status) const = 0; - virtual IMessageMetadata* getInputMetadata(StatusType* status) const = 0; - virtual IMessageMetadata* getOutputMetadata(StatusType* status) const = 0; - virtual IMessageMetadata* getTriggerMetadata(StatusType* status) const = 0; - virtual const char* getTriggerTable(StatusType* status) const = 0; - virtual unsigned getTriggerType(StatusType* status) const = 0; + } + + virtual unsigned getCount() = 0; + virtual const dsc* getParam(unsigned idx) = 0; + virtual const char* getTextUTF8(StatusType* status, unsigned idx) = 0; }; template - class IExternalEngineBaseImpl : public Base + class ITraceStatementBaseImpl : public Base { public: - typedef IExternalEngine Declaration; + typedef ITraceStatement Declaration; - IExternalEngineBaseImpl(DoNotInherit = DoNotInherit()) + ITraceStatementBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->setOwner = &Name::cloopsetOwnerDispatcher; - this->getOwner = &Name::cloopgetOwnerDispatcher; - this->open = &Name::cloopopenDispatcher; - this->openAttachment = &Name::cloopopenAttachmentDispatcher; - this->closeAttachment = &Name::cloopcloseAttachmentDispatcher; - this->makeFunction = &Name::cloopmakeFunctionDispatcher; - this->makeProcedure = &Name::cloopmakeProcedureDispatcher; - this->makeTrigger = &Name::cloopmakeTriggerDispatcher; + this->getStmtID = &Name::cloopgetStmtIDDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopopenDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context, char* charSet, unsigned charSetSize) throw() + static ISC_INT64 CLOOP_CARG cloopgetStmtIDDispatcher(ITraceStatement* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::open(&status2, context, charSet, charSetSize); + return static_cast(self)->Name::getStmtID(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopopenAttachmentDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context) throw() + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceStatement* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::openAttachment(&status2, context); + return static_cast(self)->Name::getPerf(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } + }; - static void CLOOP_CARG cloopcloseAttachmentDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context) throw() + template > > + class ITraceStatementImpl : public ITraceStatementBaseImpl + { + protected: + ITraceStatementImpl(DoNotInherit = DoNotInherit()) { - StatusType status2(status); + } - try - { - static_cast(self)->Name::closeAttachment(&status2, context); - } - catch (...) - { - StatusType::catchException(&status2); - } + public: + virtual ~ITraceStatementImpl() + { } - static IExternalFunction* CLOOP_CARG cloopmakeFunctionDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw() + virtual ISC_INT64 getStmtID() = 0; + virtual PerformanceInfo* getPerf() = 0; + }; + + template + class ITraceSQLStatementBaseImpl : public Base + { + public: + typedef ITraceSQLStatement Declaration; + + ITraceSQLStatementBaseImpl(DoNotInherit = DoNotInherit()) { - StatusType status2(status); + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getStmtID = &Name::cloopgetStmtIDDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; + this->getText = &Name::cloopgetTextDispatcher; + this->getPlan = &Name::cloopgetPlanDispatcher; + this->getInputs = &Name::cloopgetInputsDispatcher; + this->getTextUTF8 = &Name::cloopgetTextUTF8Dispatcher; + this->getExplainedPlan = &Name::cloopgetExplainedPlanDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } + static const char* CLOOP_CARG cloopgetTextDispatcher(ITraceSQLStatement* self) CLOOP_NOEXCEPT + { try { - return static_cast(self)->Name::makeFunction(&status2, context, metadata, inBuilder, outBuilder); + return static_cast(self)->Name::getText(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static IExternalProcedure* CLOOP_CARG cloopmakeProcedureDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw() + static const char* CLOOP_CARG cloopgetPlanDispatcher(ITraceSQLStatement* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::makeProcedure(&status2, context, metadata, inBuilder, outBuilder); + return static_cast(self)->Name::getPlan(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static IExternalTrigger* CLOOP_CARG cloopmakeTriggerDispatcher(IExternalEngine* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) throw() + static ITraceParams* CLOOP_CARG cloopgetInputsDispatcher(ITraceSQLStatement* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::makeTrigger(&status2, context, metadata, fieldsBuilder); + return static_cast(self)->Name::getInputs(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + static const char* CLOOP_CARG cloopgetTextUTF8Dispatcher(ITraceSQLStatement* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::setOwner(r); + return static_cast(self)->Name::getTextUTF8(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } - static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + static const char* CLOOP_CARG cloopgetExplainedPlanDispatcher(ITraceSQLStatement* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getOwner(); + return static_cast(self)->Name::getExplainedPlan(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static ISC_INT64 CLOOP_CARG cloopgetStmtIDDispatcher(ITraceStatement* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::addRef(); + return static_cast(self)->Name::getStmtID(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceStatement* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::release(); + return static_cast(self)->Name::getPerf(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } }; - template > > > > > > - class IExternalEngineImpl : public IExternalEngineBaseImpl + template > > > > + class ITraceSQLStatementImpl : public ITraceSQLStatementBaseImpl { protected: - IExternalEngineImpl(DoNotInherit = DoNotInherit()) + ITraceSQLStatementImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IExternalEngineImpl() + virtual ~ITraceSQLStatementImpl() { } - virtual void open(StatusType* status, IExternalContext* context, char* charSet, unsigned charSetSize) = 0; - virtual void openAttachment(StatusType* status, IExternalContext* context) = 0; - virtual void closeAttachment(StatusType* status, IExternalContext* context) = 0; - virtual IExternalFunction* makeFunction(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; - virtual IExternalProcedure* makeProcedure(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; - virtual IExternalTrigger* makeTrigger(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) = 0; + virtual const char* getText() = 0; + virtual const char* getPlan() = 0; + virtual ITraceParams* getInputs() = 0; + virtual const char* getTextUTF8() = 0; + virtual const char* getExplainedPlan() = 0; }; template - class ITimerBaseImpl : public Base + class ITraceBLRStatementBaseImpl : public Base { public: - typedef ITimer Declaration; + typedef ITraceBLRStatement Declaration; - ITimerBaseImpl(DoNotInherit = DoNotInherit()) + ITraceBLRStatementBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->handler = &Name::cloophandlerDispatcher; + this->getStmtID = &Name::cloopgetStmtIDDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; + this->getData = &Name::cloopgetDataDispatcher; + this->getDataLength = &Name::cloopgetDataLengthDispatcher; + this->getText = &Name::cloopgetTextDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloophandlerDispatcher(ITimer* self) throw() + static const unsigned char* CLOOP_CARG cloopgetDataDispatcher(ITraceBLRStatement* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::handler(); + return static_cast(self)->Name::getData(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static unsigned CLOOP_CARG cloopgetDataLengthDispatcher(ITraceBLRStatement* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::addRef(); + return static_cast(self)->Name::getDataLength(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const char* CLOOP_CARG cloopgetTextDispatcher(ITraceBLRStatement* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getText(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static ISC_INT64 CLOOP_CARG cloopgetStmtIDDispatcher(ITraceStatement* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::release(); + return static_cast(self)->Name::getStmtID(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); + } + } + + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceStatement* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getPerf(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); } } }; - template > > > > - class ITimerImpl : public ITimerBaseImpl + template > > > > + class ITraceBLRStatementImpl : public ITraceBLRStatementBaseImpl { protected: - ITimerImpl(DoNotInherit = DoNotInherit()) + ITraceBLRStatementImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ITimerImpl() + virtual ~ITraceBLRStatementImpl() { } - virtual void handler() = 0; + virtual const unsigned char* getData() = 0; + virtual unsigned getDataLength() = 0; + virtual const char* getText() = 0; }; template - class ITimerControlBaseImpl : public Base + class ITraceDYNRequestBaseImpl : public Base { public: - typedef ITimerControl Declaration; + typedef ITraceDYNRequest Declaration; - ITimerControlBaseImpl(DoNotInherit = DoNotInherit()) + ITraceDYNRequestBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->start = &Name::cloopstartDispatcher; - this->stop = &Name::cloopstopDispatcher; + this->getData = &Name::cloopgetDataDispatcher; + this->getDataLength = &Name::cloopgetDataLengthDispatcher; + this->getText = &Name::cloopgetTextDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopstartDispatcher(ITimerControl* self, IStatus* status, ITimer* timer, ISC_UINT64 microSeconds) throw() - { - StatusType status2(status); - - try - { - static_cast(self)->Name::start(&status2, timer, microSeconds); - } - catch (...) - { - StatusType::catchException(&status2); - } - } - - static void CLOOP_CARG cloopstopDispatcher(ITimerControl* self, IStatus* status, ITimer* timer) throw() + static const unsigned char* CLOOP_CARG cloopgetDataDispatcher(ITraceDYNRequest* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::stop(&status2, timer); + return static_cast(self)->Name::getData(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - }; - - template > > - class ITimerControlImpl : public ITimerControlBaseImpl - { - protected: - ITimerControlImpl(DoNotInherit = DoNotInherit()) - { - } - public: - virtual ~ITimerControlImpl() - { - } - - virtual void start(StatusType* status, ITimer* timer, ISC_UINT64 microSeconds) = 0; - virtual void stop(StatusType* status, ITimer* timer) = 0; - }; - - template - class IVersionCallbackBaseImpl : public Base - { - public: - typedef IVersionCallback Declaration; - - IVersionCallbackBaseImpl(DoNotInherit = DoNotInherit()) + static unsigned CLOOP_CARG cloopgetDataLengthDispatcher(ITraceDYNRequest* self) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable + try { - VTableImpl() - { - this->version = Base::VERSION; - this->callback = &Name::cloopcallbackDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; + return static_cast(self)->Name::getDataLength(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } } - static void CLOOP_CARG cloopcallbackDispatcher(IVersionCallback* self, IStatus* status, const char* text) throw() + static const char* CLOOP_CARG cloopgetTextDispatcher(ITraceDYNRequest* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::callback(&status2, text); + return static_cast(self)->Name::getText(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } }; - template > > - class IVersionCallbackImpl : public IVersionCallbackBaseImpl + template > > + class ITraceDYNRequestImpl : public ITraceDYNRequestBaseImpl { protected: - IVersionCallbackImpl(DoNotInherit = DoNotInherit()) + ITraceDYNRequestImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IVersionCallbackImpl() + virtual ~ITraceDYNRequestImpl() { } - virtual void callback(StatusType* status, const char* text) = 0; + virtual const unsigned char* getData() = 0; + virtual unsigned getDataLength() = 0; + virtual const char* getText() = 0; }; template - class IUtilBaseImpl : public Base + class ITraceContextVariableBaseImpl : public Base { public: - typedef IUtil Declaration; + typedef ITraceContextVariable Declaration; - IUtilBaseImpl(DoNotInherit = DoNotInherit()) + ITraceContextVariableBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->getFbVersion = &Name::cloopgetFbVersionDispatcher; - this->loadBlob = &Name::clooploadBlobDispatcher; - this->dumpBlob = &Name::cloopdumpBlobDispatcher; - this->getPerfCounters = &Name::cloopgetPerfCountersDispatcher; - this->executeCreateDatabase = &Name::cloopexecuteCreateDatabaseDispatcher; - this->decodeDate = &Name::cloopdecodeDateDispatcher; - this->decodeTime = &Name::cloopdecodeTimeDispatcher; - this->encodeDate = &Name::cloopencodeDateDispatcher; - this->encodeTime = &Name::cloopencodeTimeDispatcher; - this->formatStatus = &Name::cloopformatStatusDispatcher; - this->getClientVersion = &Name::cloopgetClientVersionDispatcher; - this->getXpbBuilder = &Name::cloopgetXpbBuilderDispatcher; - this->setOffsets = &Name::cloopsetOffsetsDispatcher; + this->getNameSpace = &Name::cloopgetNameSpaceDispatcher; + this->getVarName = &Name::cloopgetVarNameDispatcher; + this->getVarValue = &Name::cloopgetVarValueDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopgetFbVersionDispatcher(IUtil* self, IStatus* status, IAttachment* att, IVersionCallback* callback) throw() + static const char* CLOOP_CARG cloopgetNameSpaceDispatcher(ITraceContextVariable* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::getFbVersion(&status2, att, callback); + return static_cast(self)->Name::getNameSpace(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG clooploadBlobDispatcher(IUtil* self, IStatus* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) throw() + static const char* CLOOP_CARG cloopgetVarNameDispatcher(ITraceContextVariable* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::loadBlob(&status2, blobId, att, tra, file, txt); + return static_cast(self)->Name::getVarName(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopdumpBlobDispatcher(IUtil* self, IStatus* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) throw() + static const char* CLOOP_CARG cloopgetVarValueDispatcher(ITraceContextVariable* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::dumpBlob(&status2, blobId, att, tra, file, txt); + return static_cast(self)->Name::getVarValue(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } + }; - static void CLOOP_CARG cloopgetPerfCountersDispatcher(IUtil* self, IStatus* status, IAttachment* att, const char* countersSet, ISC_INT64* counters) throw() + template > > + class ITraceContextVariableImpl : public ITraceContextVariableBaseImpl + { + protected: + ITraceContextVariableImpl(DoNotInherit = DoNotInherit()) { - StatusType status2(status); + } - try - { - static_cast(self)->Name::getPerfCounters(&status2, att, countersSet, counters); - } - catch (...) - { - StatusType::catchException(&status2); - } + public: + virtual ~ITraceContextVariableImpl() + { } - static IAttachment* CLOOP_CARG cloopexecuteCreateDatabaseDispatcher(IUtil* self, IStatus* status, unsigned stmtLength, const char* creatDBstatement, unsigned dialect, FB_BOOLEAN* stmtIsCreateDb) throw() + virtual const char* getNameSpace() = 0; + virtual const char* getVarName() = 0; + virtual const char* getVarValue() = 0; + }; + + template + class ITraceProcedureBaseImpl : public Base + { + public: + typedef ITraceProcedure Declaration; + + ITraceProcedureBaseImpl(DoNotInherit = DoNotInherit()) { - StatusType status2(status); + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getProcName = &Name::cloopgetProcNameDispatcher; + this->getInputs = &Name::cloopgetInputsDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; + this->getStmtID = &Name::cloopgetStmtIDDispatcher; + this->getPlan = &Name::cloopgetPlanDispatcher; + this->getExplainedPlan = &Name::cloopgetExplainedPlanDispatcher; + } + } vTable; + this->cloopVTable = &vTable; + } + + static const char* CLOOP_CARG cloopgetProcNameDispatcher(ITraceProcedure* self) CLOOP_NOEXCEPT + { try { - return static_cast(self)->Name::executeCreateDatabase(&status2, stmtLength, creatDBstatement, dialect, stmtIsCreateDb); + return static_cast(self)->Name::getProcName(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopdecodeDateDispatcher(IUtil* self, ISC_DATE date, unsigned* year, unsigned* month, unsigned* day) throw() + static ITraceParams* CLOOP_CARG cloopgetInputsDispatcher(ITraceProcedure* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::decodeDate(date, year, month, day); + return static_cast(self)->Name::getInputs(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopdecodeTimeDispatcher(IUtil* self, ISC_TIME time, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions) throw() + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceProcedure* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::decodeTime(time, hours, minutes, seconds, fractions); + return static_cast(self)->Name::getPerf(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } - static ISC_DATE CLOOP_CARG cloopencodeDateDispatcher(IUtil* self, unsigned year, unsigned month, unsigned day) throw() + static ISC_INT64 CLOOP_CARG cloopgetStmtIDDispatcher(ITraceProcedure* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::encodeDate(year, month, day); + return static_cast(self)->Name::getStmtID(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static ISC_TIME CLOOP_CARG cloopencodeTimeDispatcher(IUtil* self, unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions) throw() + static const char* CLOOP_CARG cloopgetPlanDispatcher(ITraceProcedure* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::encodeTime(hours, minutes, seconds, fractions); + return static_cast(self)->Name::getPlan(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static unsigned CLOOP_CARG cloopformatStatusDispatcher(IUtil* self, char* buffer, unsigned bufferSize, IStatus* status) throw() + static const char* CLOOP_CARG cloopgetExplainedPlanDispatcher(ITraceProcedure* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::formatStatus(buffer, bufferSize, status); + return static_cast(self)->Name::getExplainedPlan(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } + }; + + template > > + class ITraceProcedureImpl : public ITraceProcedureBaseImpl + { + protected: + ITraceProcedureImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceProcedureImpl() + { + } + + virtual const char* getProcName() = 0; + virtual ITraceParams* getInputs() = 0; + virtual PerformanceInfo* getPerf() = 0; + virtual ISC_INT64 getStmtID() = 0; + virtual const char* getPlan() = 0; + virtual const char* getExplainedPlan() = 0; + }; + + template + class ITraceFunctionBaseImpl : public Base + { + public: + typedef ITraceFunction Declaration; + + ITraceFunctionBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getFuncName = &Name::cloopgetFuncNameDispatcher; + this->getInputs = &Name::cloopgetInputsDispatcher; + this->getResult = &Name::cloopgetResultDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; + this->getStmtID = &Name::cloopgetStmtIDDispatcher; + this->getPlan = &Name::cloopgetPlanDispatcher; + this->getExplainedPlan = &Name::cloopgetExplainedPlanDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } - static unsigned CLOOP_CARG cloopgetClientVersionDispatcher(IUtil* self) throw() + static const char* CLOOP_CARG cloopgetFuncNameDispatcher(ITraceFunction* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getClientVersion(); + return static_cast(self)->Name::getFuncName(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static IXpbBuilder* CLOOP_CARG cloopgetXpbBuilderDispatcher(IUtil* self, IStatus* status, unsigned kind, const unsigned char* buf, unsigned len) throw() + static ITraceParams* CLOOP_CARG cloopgetInputsDispatcher(ITraceFunction* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getXpbBuilder(&status2, kind, buf, len); + return static_cast(self)->Name::getInputs(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static unsigned CLOOP_CARG cloopsetOffsetsDispatcher(IUtil* self, IStatus* status, IMessageMetadata* metadata, IOffsetsCallback* callback) throw() + static ITraceParams* CLOOP_CARG cloopgetResultDispatcher(ITraceFunction* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::setOffsets(&status2, metadata, callback); + return static_cast(self)->Name::getResult(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - }; - - template > > - class IUtilImpl : public IUtilBaseImpl - { - protected: - IUtilImpl(DoNotInherit = DoNotInherit()) - { - } - - public: - virtual ~IUtilImpl() - { - } - - virtual void getFbVersion(StatusType* status, IAttachment* att, IVersionCallback* callback) = 0; - virtual void loadBlob(StatusType* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) = 0; - virtual void dumpBlob(StatusType* status, ISC_QUAD* blobId, IAttachment* att, ITransaction* tra, const char* file, FB_BOOLEAN txt) = 0; - virtual void getPerfCounters(StatusType* status, IAttachment* att, const char* countersSet, ISC_INT64* counters) = 0; - virtual IAttachment* executeCreateDatabase(StatusType* status, unsigned stmtLength, const char* creatDBstatement, unsigned dialect, FB_BOOLEAN* stmtIsCreateDb) = 0; - virtual void decodeDate(ISC_DATE date, unsigned* year, unsigned* month, unsigned* day) = 0; - virtual void decodeTime(ISC_TIME time, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions) = 0; - virtual ISC_DATE encodeDate(unsigned year, unsigned month, unsigned day) = 0; - virtual ISC_TIME encodeTime(unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions) = 0; - virtual unsigned formatStatus(char* buffer, unsigned bufferSize, IStatus* status) = 0; - virtual unsigned getClientVersion() = 0; - virtual IXpbBuilder* getXpbBuilder(StatusType* status, unsigned kind, const unsigned char* buf, unsigned len) = 0; - virtual unsigned setOffsets(StatusType* status, IMessageMetadata* metadata, IOffsetsCallback* callback) = 0; - }; - - template - class IOffsetsCallbackBaseImpl : public Base - { - public: - typedef IOffsetsCallback Declaration; - IOffsetsCallbackBaseImpl(DoNotInherit = DoNotInherit()) + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceFunction* self) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable + try { - VTableImpl() - { - this->version = Base::VERSION; - this->setOffset = &Name::cloopsetOffsetDispatcher; - } - } vTable; + return static_cast(self)->Name::getPerf(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } - this->cloopVTable = &vTable; + static ISC_INT64 CLOOP_CARG cloopgetStmtIDDispatcher(ITraceFunction* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getStmtID(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } } - static void CLOOP_CARG cloopsetOffsetDispatcher(IOffsetsCallback* self, IStatus* status, unsigned index, unsigned offset, unsigned nullOffset) throw() + static const char* CLOOP_CARG cloopgetPlanDispatcher(ITraceFunction* self) CLOOP_NOEXCEPT { - StatusType status2(status); + try + { + return static_cast(self)->Name::getPlan(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + static const char* CLOOP_CARG cloopgetExplainedPlanDispatcher(ITraceFunction* self) CLOOP_NOEXCEPT + { try { - static_cast(self)->Name::setOffset(&status2, index, offset, nullOffset); + return static_cast(self)->Name::getExplainedPlan(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } }; - template > > - class IOffsetsCallbackImpl : public IOffsetsCallbackBaseImpl + template > > + class ITraceFunctionImpl : public ITraceFunctionBaseImpl { protected: - IOffsetsCallbackImpl(DoNotInherit = DoNotInherit()) + ITraceFunctionImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IOffsetsCallbackImpl() + virtual ~ITraceFunctionImpl() { } - virtual void setOffset(StatusType* status, unsigned index, unsigned offset, unsigned nullOffset) = 0; + virtual const char* getFuncName() = 0; + virtual ITraceParams* getInputs() = 0; + virtual ITraceParams* getResult() = 0; + virtual PerformanceInfo* getPerf() = 0; + virtual ISC_INT64 getStmtID() = 0; + virtual const char* getPlan() = 0; + virtual const char* getExplainedPlan() = 0; }; template - class IXpbBuilderBaseImpl : public Base + class ITraceTriggerBaseImpl : public Base { public: - typedef IXpbBuilder Declaration; + typedef ITraceTrigger Declaration; - IXpbBuilderBaseImpl(DoNotInherit = DoNotInherit()) + ITraceTriggerBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->dispose = &Name::cloopdisposeDispatcher; - this->clear = &Name::cloopclearDispatcher; - this->removeCurrent = &Name::cloopremoveCurrentDispatcher; - this->insertInt = &Name::cloopinsertIntDispatcher; - this->insertBigInt = &Name::cloopinsertBigIntDispatcher; - this->insertBytes = &Name::cloopinsertBytesDispatcher; - this->insertString = &Name::cloopinsertStringDispatcher; - this->insertTag = &Name::cloopinsertTagDispatcher; - this->isEof = &Name::cloopisEofDispatcher; - this->moveNext = &Name::cloopmoveNextDispatcher; - this->rewind = &Name::clooprewindDispatcher; - this->findFirst = &Name::cloopfindFirstDispatcher; - this->findNext = &Name::cloopfindNextDispatcher; - this->getTag = &Name::cloopgetTagDispatcher; - this->getLength = &Name::cloopgetLengthDispatcher; - this->getInt = &Name::cloopgetIntDispatcher; - this->getBigInt = &Name::cloopgetBigIntDispatcher; - this->getString = &Name::cloopgetStringDispatcher; - this->getBytes = &Name::cloopgetBytesDispatcher; - this->getBufferLength = &Name::cloopgetBufferLengthDispatcher; - this->getBuffer = &Name::cloopgetBufferDispatcher; + this->getTriggerName = &Name::cloopgetTriggerNameDispatcher; + this->getRelationName = &Name::cloopgetRelationNameDispatcher; + this->getAction = &Name::cloopgetActionDispatcher; + this->getWhich = &Name::cloopgetWhichDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; + this->getStmtID = &Name::cloopgetStmtIDDispatcher; + this->getPlan = &Name::cloopgetPlanDispatcher; + this->getExplainedPlan = &Name::cloopgetExplainedPlanDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopclearDispatcher(IXpbBuilder* self, IStatus* status) throw() + static const char* CLOOP_CARG cloopgetTriggerNameDispatcher(ITraceTrigger* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::clear(&status2); + return static_cast(self)->Name::getTriggerName(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopremoveCurrentDispatcher(IXpbBuilder* self, IStatus* status) throw() + static const char* CLOOP_CARG cloopgetRelationNameDispatcher(ITraceTrigger* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::removeCurrent(&status2); + return static_cast(self)->Name::getRelationName(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopinsertIntDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag, int value) throw() + static int CLOOP_CARG cloopgetActionDispatcher(ITraceTrigger* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::insertInt(&status2, tag, value); + return static_cast(self)->Name::getAction(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopinsertBigIntDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag, ISC_INT64 value) throw() + static int CLOOP_CARG cloopgetWhichDispatcher(ITraceTrigger* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::insertBigInt(&status2, tag, value); + return static_cast(self)->Name::getWhich(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopinsertBytesDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag, const void* bytes, unsigned length) throw() + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceTrigger* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::insertBytes(&status2, tag, bytes, length); + return static_cast(self)->Name::getPerf(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopinsertStringDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag, const char* str) throw() + static ISC_INT64 CLOOP_CARG cloopgetStmtIDDispatcher(ITraceTrigger* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::insertString(&status2, tag, str); + return static_cast(self)->Name::getStmtID(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopinsertTagDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag) throw() + static const char* CLOOP_CARG cloopgetPlanDispatcher(ITraceTrigger* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::insertTag(&status2, tag); + return static_cast(self)->Name::getPlan(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static FB_BOOLEAN CLOOP_CARG cloopisEofDispatcher(IXpbBuilder* self, IStatus* status) throw() + static const char* CLOOP_CARG cloopgetExplainedPlanDispatcher(ITraceTrigger* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::isEof(&status2); + return static_cast(self)->Name::getExplainedPlan(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } + }; - static void CLOOP_CARG cloopmoveNextDispatcher(IXpbBuilder* self, IStatus* status) throw() + template > > + class ITraceTriggerImpl : public ITraceTriggerBaseImpl + { + protected: + ITraceTriggerImpl(DoNotInherit = DoNotInherit()) { - StatusType status2(status); + } - try - { - static_cast(self)->Name::moveNext(&status2); - } - catch (...) - { - StatusType::catchException(&status2); - } + public: + virtual ~ITraceTriggerImpl() + { } - static void CLOOP_CARG clooprewindDispatcher(IXpbBuilder* self, IStatus* status) throw() + virtual const char* getTriggerName() = 0; + virtual const char* getRelationName() = 0; + virtual int getAction() = 0; + virtual int getWhich() = 0; + virtual PerformanceInfo* getPerf() = 0; + virtual ISC_INT64 getStmtID() = 0; + virtual const char* getPlan() = 0; + virtual const char* getExplainedPlan() = 0; + }; + + template + class ITraceServiceConnectionBaseImpl : public Base + { + public: + typedef ITraceServiceConnection Declaration; + + ITraceServiceConnectionBaseImpl(DoNotInherit = DoNotInherit()) { - StatusType status2(status); + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getKind = &Name::cloopgetKindDispatcher; + this->getProcessID = &Name::cloopgetProcessIDDispatcher; + this->getUserName = &Name::cloopgetUserNameDispatcher; + this->getRoleName = &Name::cloopgetRoleNameDispatcher; + this->getCharSet = &Name::cloopgetCharSetDispatcher; + this->getRemoteProtocol = &Name::cloopgetRemoteProtocolDispatcher; + this->getRemoteAddress = &Name::cloopgetRemoteAddressDispatcher; + this->getRemoteProcessID = &Name::cloopgetRemoteProcessIDDispatcher; + this->getRemoteProcessName = &Name::cloopgetRemoteProcessNameDispatcher; + this->getServiceID = &Name::cloopgetServiceIDDispatcher; + this->getServiceMgr = &Name::cloopgetServiceMgrDispatcher; + this->getServiceName = &Name::cloopgetServiceNameDispatcher; + } + } vTable; + this->cloopVTable = &vTable; + } + + static void* CLOOP_CARG cloopgetServiceIDDispatcher(ITraceServiceConnection* self) CLOOP_NOEXCEPT + { try { - static_cast(self)->Name::rewind(&status2); + return static_cast(self)->Name::getServiceID(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static FB_BOOLEAN CLOOP_CARG cloopfindFirstDispatcher(IXpbBuilder* self, IStatus* status, unsigned char tag) throw() + static const char* CLOOP_CARG cloopgetServiceMgrDispatcher(ITraceServiceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::findFirst(&status2, tag); + return static_cast(self)->Name::getServiceMgr(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static FB_BOOLEAN CLOOP_CARG cloopfindNextDispatcher(IXpbBuilder* self, IStatus* status) throw() + static const char* CLOOP_CARG cloopgetServiceNameDispatcher(ITraceServiceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::findNext(&status2); + return static_cast(self)->Name::getServiceName(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static unsigned char CLOOP_CARG cloopgetTagDispatcher(IXpbBuilder* self, IStatus* status) throw() + static unsigned CLOOP_CARG cloopgetKindDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getTag(&status2); + return static_cast(self)->Name::getKind(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static unsigned CLOOP_CARG cloopgetLengthDispatcher(IXpbBuilder* self, IStatus* status) throw() + static int CLOOP_CARG cloopgetProcessIDDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getLength(&status2); + return static_cast(self)->Name::getProcessID(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static int CLOOP_CARG cloopgetIntDispatcher(IXpbBuilder* self, IStatus* status) throw() + static const char* CLOOP_CARG cloopgetUserNameDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getInt(&status2); + return static_cast(self)->Name::getUserName(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static ISC_INT64 CLOOP_CARG cloopgetBigIntDispatcher(IXpbBuilder* self, IStatus* status) throw() + static const char* CLOOP_CARG cloopgetRoleNameDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getBigInt(&status2); + return static_cast(self)->Name::getRoleName(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetStringDispatcher(IXpbBuilder* self, IStatus* status) throw() + static const char* CLOOP_CARG cloopgetCharSetDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getString(&status2); + return static_cast(self)->Name::getCharSet(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); return static_cast(0); } } - static const unsigned char* CLOOP_CARG cloopgetBytesDispatcher(IXpbBuilder* self, IStatus* status) throw() + static const char* CLOOP_CARG cloopgetRemoteProtocolDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getBytes(&status2); + return static_cast(self)->Name::getRemoteProtocol(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static unsigned CLOOP_CARG cloopgetBufferLengthDispatcher(IXpbBuilder* self, IStatus* status) throw() + static const char* CLOOP_CARG cloopgetRemoteAddressDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getBufferLength(&status2); + return static_cast(self)->Name::getRemoteAddress(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static const unsigned char* CLOOP_CARG cloopgetBufferDispatcher(IXpbBuilder* self, IStatus* status) throw() + static int CLOOP_CARG cloopgetRemoteProcessIDDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::getBuffer(&status2); + return static_cast(self)->Name::getRemoteProcessID(); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); + return static_cast(0); } } - static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + static const char* CLOOP_CARG cloopgetRemoteProcessNameDispatcher(ITraceConnection* self) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::dispose(); + return static_cast(self)->Name::getRemoteProcessName(); } catch (...) { StatusType::catchException(0); + return static_cast(0); } } }; - template > > > > - class IXpbBuilderImpl : public IXpbBuilderBaseImpl + template > > > > + class ITraceServiceConnectionImpl : public ITraceServiceConnectionBaseImpl { protected: - IXpbBuilderImpl(DoNotInherit = DoNotInherit()) + ITraceServiceConnectionImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IXpbBuilderImpl() + virtual ~ITraceServiceConnectionImpl() { } - virtual void clear(StatusType* status) = 0; - virtual void removeCurrent(StatusType* status) = 0; - virtual void insertInt(StatusType* status, unsigned char tag, int value) = 0; - virtual void insertBigInt(StatusType* status, unsigned char tag, ISC_INT64 value) = 0; - virtual void insertBytes(StatusType* status, unsigned char tag, const void* bytes, unsigned length) = 0; - virtual void insertString(StatusType* status, unsigned char tag, const char* str) = 0; - virtual void insertTag(StatusType* status, unsigned char tag) = 0; - virtual FB_BOOLEAN isEof(StatusType* status) = 0; - virtual void moveNext(StatusType* status) = 0; - virtual void rewind(StatusType* status) = 0; - virtual FB_BOOLEAN findFirst(StatusType* status, unsigned char tag) = 0; - virtual FB_BOOLEAN findNext(StatusType* status) = 0; - virtual unsigned char getTag(StatusType* status) = 0; - virtual unsigned getLength(StatusType* status) = 0; - virtual int getInt(StatusType* status) = 0; - virtual ISC_INT64 getBigInt(StatusType* status) = 0; - virtual const char* getString(StatusType* status) = 0; - virtual const unsigned char* getBytes(StatusType* status) = 0; - virtual unsigned getBufferLength(StatusType* status) = 0; - virtual const unsigned char* getBuffer(StatusType* status) = 0; + virtual void* getServiceID() = 0; + virtual const char* getServiceMgr() = 0; + virtual const char* getServiceName() = 0; }; template - class ITraceConnectionBaseImpl : public Base + class ITraceStatusVectorBaseImpl : public Base { public: - typedef ITraceConnection Declaration; + typedef ITraceStatusVector Declaration; - ITraceConnectionBaseImpl(DoNotInherit = DoNotInherit()) + ITraceStatusVectorBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->getKind = &Name::cloopgetKindDispatcher; - this->getProcessID = &Name::cloopgetProcessIDDispatcher; - this->getUserName = &Name::cloopgetUserNameDispatcher; - this->getRoleName = &Name::cloopgetRoleNameDispatcher; - this->getCharSet = &Name::cloopgetCharSetDispatcher; - this->getRemoteProtocol = &Name::cloopgetRemoteProtocolDispatcher; - this->getRemoteAddress = &Name::cloopgetRemoteAddressDispatcher; - this->getRemoteProcessID = &Name::cloopgetRemoteProcessIDDispatcher; - this->getRemoteProcessName = &Name::cloopgetRemoteProcessNameDispatcher; + this->hasError = &Name::cloophasErrorDispatcher; + this->hasWarning = &Name::cloophasWarningDispatcher; + this->getStatus = &Name::cloopgetStatusDispatcher; + this->getText = &Name::cloopgetTextDispatcher; } } vTable; this->cloopVTable = &vTable; } - static unsigned CLOOP_CARG cloopgetKindDispatcher(ITraceConnection* self) throw() + static FB_BOOLEAN CLOOP_CARG cloophasErrorDispatcher(ITraceStatusVector* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getKind(); + return static_cast(self)->Name::hasError(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static int CLOOP_CARG cloopgetProcessIDDispatcher(ITraceConnection* self) throw() + static FB_BOOLEAN CLOOP_CARG cloophasWarningDispatcher(ITraceStatusVector* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getProcessID(); + return static_cast(self)->Name::hasWarning(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetUserNameDispatcher(ITraceConnection* self) throw() + static IStatus* CLOOP_CARG cloopgetStatusDispatcher(ITraceStatusVector* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getUserName(); + return static_cast(self)->Name::getStatus(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetRoleNameDispatcher(ITraceConnection* self) throw() + static const char* CLOOP_CARG cloopgetTextDispatcher(ITraceStatusVector* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getRoleName(); + return static_cast(self)->Name::getText(); } catch (...) { @@ -13259,184 +18762,262 @@ namespace Firebird return static_cast(0); } } + }; + + template > > + class ITraceStatusVectorImpl : public ITraceStatusVectorBaseImpl + { + protected: + ITraceStatusVectorImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceStatusVectorImpl() + { + } + + virtual FB_BOOLEAN hasError() = 0; + virtual FB_BOOLEAN hasWarning() = 0; + virtual IStatus* getStatus() = 0; + virtual const char* getText() = 0; + }; + + template + class ITraceSweepInfoBaseImpl : public Base + { + public: + typedef ITraceSweepInfo Declaration; + + ITraceSweepInfoBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getOIT = &Name::cloopgetOITDispatcher; + this->getOST = &Name::cloopgetOSTDispatcher; + this->getOAT = &Name::cloopgetOATDispatcher; + this->getNext = &Name::cloopgetNextDispatcher; + this->getPerf = &Name::cloopgetPerfDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; + } - static const char* CLOOP_CARG cloopgetCharSetDispatcher(ITraceConnection* self) throw() + static ISC_INT64 CLOOP_CARG cloopgetOITDispatcher(ITraceSweepInfo* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getCharSet(); + return static_cast(self)->Name::getOIT(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetRemoteProtocolDispatcher(ITraceConnection* self) throw() + static ISC_INT64 CLOOP_CARG cloopgetOSTDispatcher(ITraceSweepInfo* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getRemoteProtocol(); + return static_cast(self)->Name::getOST(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetRemoteAddressDispatcher(ITraceConnection* self) throw() + static ISC_INT64 CLOOP_CARG cloopgetOATDispatcher(ITraceSweepInfo* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getRemoteAddress(); + return static_cast(self)->Name::getOAT(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static int CLOOP_CARG cloopgetRemoteProcessIDDispatcher(ITraceConnection* self) throw() + static ISC_INT64 CLOOP_CARG cloopgetNextDispatcher(ITraceSweepInfo* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getRemoteProcessID(); + return static_cast(self)->Name::getNext(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetRemoteProcessNameDispatcher(ITraceConnection* self) throw() + static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceSweepInfo* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getRemoteProcessName(); + return static_cast(self)->Name::getPerf(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } }; - template > > - class ITraceConnectionImpl : public ITraceConnectionBaseImpl + template > > + class ITraceSweepInfoImpl : public ITraceSweepInfoBaseImpl { protected: - ITraceConnectionImpl(DoNotInherit = DoNotInherit()) + ITraceSweepInfoImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ITraceConnectionImpl() + virtual ~ITraceSweepInfoImpl() { } - virtual unsigned getKind() = 0; - virtual int getProcessID() = 0; - virtual const char* getUserName() = 0; - virtual const char* getRoleName() = 0; - virtual const char* getCharSet() = 0; - virtual const char* getRemoteProtocol() = 0; - virtual const char* getRemoteAddress() = 0; - virtual int getRemoteProcessID() = 0; - virtual const char* getRemoteProcessName() = 0; + virtual ISC_INT64 getOIT() = 0; + virtual ISC_INT64 getOST() = 0; + virtual ISC_INT64 getOAT() = 0; + virtual ISC_INT64 getNext() = 0; + virtual PerformanceInfo* getPerf() = 0; }; template - class ITraceDatabaseConnectionBaseImpl : public Base + class ITraceLogWriterBaseImpl : public Base { public: - typedef ITraceDatabaseConnection Declaration; + typedef ITraceLogWriter Declaration; - ITraceDatabaseConnectionBaseImpl(DoNotInherit = DoNotInherit()) + ITraceLogWriterBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->getKind = &Name::cloopgetKindDispatcher; - this->getProcessID = &Name::cloopgetProcessIDDispatcher; - this->getUserName = &Name::cloopgetUserNameDispatcher; - this->getRoleName = &Name::cloopgetRoleNameDispatcher; - this->getCharSet = &Name::cloopgetCharSetDispatcher; - this->getRemoteProtocol = &Name::cloopgetRemoteProtocolDispatcher; - this->getRemoteAddress = &Name::cloopgetRemoteAddressDispatcher; - this->getRemoteProcessID = &Name::cloopgetRemoteProcessIDDispatcher; - this->getRemoteProcessName = &Name::cloopgetRemoteProcessNameDispatcher; - this->getConnectionID = &Name::cloopgetConnectionIDDispatcher; - this->getDatabaseName = &Name::cloopgetDatabaseNameDispatcher; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->write = &Name::cloopwriteDispatcher; + this->write_s = &Name::cloopwrite_sDispatcher; } } vTable; this->cloopVTable = &vTable; } - static ISC_INT64 CLOOP_CARG cloopgetConnectionIDDispatcher(ITraceDatabaseConnection* self) throw() + static unsigned CLOOP_CARG cloopwriteDispatcher(ITraceLogWriter* self, const void* buf, unsigned size) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getConnectionID(); + return static_cast(self)->Name::write(buf, size); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetDatabaseNameDispatcher(ITraceDatabaseConnection* self) throw() + static unsigned CLOOP_CARG cloopwrite_sDispatcher(ITraceLogWriter* self, IStatus* status, const void* buf, unsigned size) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getDatabaseName(); + return static_cast(self)->Name::write_s(&status2, buf, size); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT + { + try + { + static_cast(self)->Name::addRef(); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } - static unsigned CLOOP_CARG cloopgetKindDispatcher(ITraceConnection* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getKind(); + return static_cast(self)->Name::release(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } + }; + + template > > > > + class ITraceLogWriterImpl : public ITraceLogWriterBaseImpl + { + protected: + ITraceLogWriterImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~ITraceLogWriterImpl() + { + } + + virtual unsigned write(const void* buf, unsigned size) = 0; + virtual unsigned write_s(StatusType* status, const void* buf, unsigned size) = 0; + }; + + template + class ITraceInitInfoBaseImpl : public Base + { + public: + typedef ITraceInitInfo Declaration; - static int CLOOP_CARG cloopgetProcessIDDispatcher(ITraceConnection* self) throw() + ITraceInitInfoBaseImpl(DoNotInherit = DoNotInherit()) { - try - { - return static_cast(self)->Name::getProcessID(); - } - catch (...) + static struct VTableImpl : Base::VTable { - StatusType::catchException(0); - return static_cast(0); - } + VTableImpl() + { + this->version = Base::VERSION; + this->getConfigText = &Name::cloopgetConfigTextDispatcher; + this->getTraceSessionID = &Name::cloopgetTraceSessionIDDispatcher; + this->getTraceSessionName = &Name::cloopgetTraceSessionNameDispatcher; + this->getFirebirdRootDirectory = &Name::cloopgetFirebirdRootDirectoryDispatcher; + this->getDatabaseName = &Name::cloopgetDatabaseNameDispatcher; + this->getConnection = &Name::cloopgetConnectionDispatcher; + this->getLogWriter = &Name::cloopgetLogWriterDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetUserNameDispatcher(ITraceConnection* self) throw() + static const char* CLOOP_CARG cloopgetConfigTextDispatcher(ITraceInitInfo* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getUserName(); + return static_cast(self)->Name::getConfigText(); } catch (...) { @@ -13445,24 +19026,24 @@ namespace Firebird } } - static const char* CLOOP_CARG cloopgetRoleNameDispatcher(ITraceConnection* self) throw() + static int CLOOP_CARG cloopgetTraceSessionIDDispatcher(ITraceInitInfo* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getRoleName(); + return static_cast(self)->Name::getTraceSessionID(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetCharSetDispatcher(ITraceConnection* self) throw() + static const char* CLOOP_CARG cloopgetTraceSessionNameDispatcher(ITraceInitInfo* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getCharSet(); + return static_cast(self)->Name::getTraceSessionName(); } catch (...) { @@ -13471,11 +19052,11 @@ namespace Firebird } } - static const char* CLOOP_CARG cloopgetRemoteProtocolDispatcher(ITraceConnection* self) throw() + static const char* CLOOP_CARG cloopgetFirebirdRootDirectoryDispatcher(ITraceInitInfo* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getRemoteProtocol(); + return static_cast(self)->Name::getFirebirdRootDirectory(); } catch (...) { @@ -13484,11 +19065,11 @@ namespace Firebird } } - static const char* CLOOP_CARG cloopgetRemoteAddressDispatcher(ITraceConnection* self) throw() + static const char* CLOOP_CARG cloopgetDatabaseNameDispatcher(ITraceInitInfo* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getRemoteAddress(); + return static_cast(self)->Name::getDatabaseName(); } catch (...) { @@ -13497,92 +19078,119 @@ namespace Firebird } } - static int CLOOP_CARG cloopgetRemoteProcessIDDispatcher(ITraceConnection* self) throw() + static ITraceDatabaseConnection* CLOOP_CARG cloopgetConnectionDispatcher(ITraceInitInfo* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getRemoteProcessID(); + return static_cast(self)->Name::getConnection(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetRemoteProcessNameDispatcher(ITraceConnection* self) throw() + static ITraceLogWriter* CLOOP_CARG cloopgetLogWriterDispatcher(ITraceInitInfo* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getRemoteProcessName(); + return static_cast(self)->Name::getLogWriter(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } }; - template > > > > - class ITraceDatabaseConnectionImpl : public ITraceDatabaseConnectionBaseImpl + template > > + class ITraceInitInfoImpl : public ITraceInitInfoBaseImpl { protected: - ITraceDatabaseConnectionImpl(DoNotInherit = DoNotInherit()) + ITraceInitInfoImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ITraceDatabaseConnectionImpl() + virtual ~ITraceInitInfoImpl() { } - virtual ISC_INT64 getConnectionID() = 0; + virtual const char* getConfigText() = 0; + virtual int getTraceSessionID() = 0; + virtual const char* getTraceSessionName() = 0; + virtual const char* getFirebirdRootDirectory() = 0; virtual const char* getDatabaseName() = 0; + virtual ITraceDatabaseConnection* getConnection() = 0; + virtual ITraceLogWriter* getLogWriter() = 0; }; template - class ITraceTransactionBaseImpl : public Base + class ITracePluginBaseImpl : public Base { public: - typedef ITraceTransaction Declaration; + typedef ITracePlugin Declaration; - ITraceTransactionBaseImpl(DoNotInherit = DoNotInherit()) + ITracePluginBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->getTransactionID = &Name::cloopgetTransactionIDDispatcher; - this->getReadOnly = &Name::cloopgetReadOnlyDispatcher; - this->getWait = &Name::cloopgetWaitDispatcher; - this->getIsolation = &Name::cloopgetIsolationDispatcher; - this->getPerf = &Name::cloopgetPerfDispatcher; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->trace_get_error = &Name::clooptrace_get_errorDispatcher; + this->trace_attach = &Name::clooptrace_attachDispatcher; + this->trace_detach = &Name::clooptrace_detachDispatcher; + this->trace_transaction_start = &Name::clooptrace_transaction_startDispatcher; + this->trace_transaction_end = &Name::clooptrace_transaction_endDispatcher; + this->trace_proc_execute = &Name::clooptrace_proc_executeDispatcher; + this->trace_trigger_execute = &Name::clooptrace_trigger_executeDispatcher; + this->trace_set_context = &Name::clooptrace_set_contextDispatcher; + this->trace_dsql_prepare = &Name::clooptrace_dsql_prepareDispatcher; + this->trace_dsql_free = &Name::clooptrace_dsql_freeDispatcher; + this->trace_dsql_execute = &Name::clooptrace_dsql_executeDispatcher; + this->trace_blr_compile = &Name::clooptrace_blr_compileDispatcher; + this->trace_blr_execute = &Name::clooptrace_blr_executeDispatcher; + this->trace_dyn_execute = &Name::clooptrace_dyn_executeDispatcher; + this->trace_service_attach = &Name::clooptrace_service_attachDispatcher; + this->trace_service_start = &Name::clooptrace_service_startDispatcher; + this->trace_service_query = &Name::clooptrace_service_queryDispatcher; + this->trace_service_detach = &Name::clooptrace_service_detachDispatcher; + this->trace_event_error = &Name::clooptrace_event_errorDispatcher; + this->trace_event_sweep = &Name::clooptrace_event_sweepDispatcher; + this->trace_func_execute = &Name::clooptrace_func_executeDispatcher; + this->trace_dsql_restart = &Name::clooptrace_dsql_restartDispatcher; + this->trace_proc_compile = &Name::clooptrace_proc_compileDispatcher; + this->trace_func_compile = &Name::clooptrace_func_compileDispatcher; + this->trace_trigger_compile = &Name::clooptrace_trigger_compileDispatcher; } } vTable; this->cloopVTable = &vTable; } - static ISC_INT64 CLOOP_CARG cloopgetTransactionIDDispatcher(ITraceTransaction* self) throw() + static const char* CLOOP_CARG clooptrace_get_errorDispatcher(ITracePlugin* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getTransactionID(); + return static_cast(self)->Name::trace_get_error(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static FB_BOOLEAN CLOOP_CARG cloopgetReadOnlyDispatcher(ITraceTransaction* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_attachDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, FB_BOOLEAN create_db, unsigned att_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getReadOnly(); + return static_cast(self)->Name::trace_attach(connection, create_db, att_result); } catch (...) { @@ -13591,1406 +19199,1121 @@ namespace Firebird } } - static int CLOOP_CARG cloopgetWaitDispatcher(ITraceTransaction* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_detachDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, FB_BOOLEAN drop_db) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getWait(); + return static_cast(self)->Name::trace_detach(connection, drop_db); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static unsigned CLOOP_CARG cloopgetIsolationDispatcher(ITraceTransaction* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_transaction_startDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, unsigned tpb_length, const unsigned char* tpb, unsigned tra_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getIsolation(); + return static_cast(self)->Name::trace_transaction_start(connection, transaction, tpb_length, tpb, tra_result); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceTransaction* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_transaction_endDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, FB_BOOLEAN commit, FB_BOOLEAN retain_context, unsigned tra_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getPerf(); + return static_cast(self)->Name::trace_transaction_end(connection, transaction, commit, retain_context, tra_result); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - }; - - template > > - class ITraceTransactionImpl : public ITraceTransactionBaseImpl - { - protected: - ITraceTransactionImpl(DoNotInherit = DoNotInherit()) - { - } - - public: - virtual ~ITraceTransactionImpl() - { - } - virtual ISC_INT64 getTransactionID() = 0; - virtual FB_BOOLEAN getReadOnly() = 0; - virtual int getWait() = 0; - virtual unsigned getIsolation() = 0; - virtual PerformanceInfo* getPerf() = 0; - }; - - template - class ITraceParamsBaseImpl : public Base - { - public: - typedef ITraceParams Declaration; - - ITraceParamsBaseImpl(DoNotInherit = DoNotInherit()) - { - static struct VTableImpl : Base::VTable - { - VTableImpl() - { - this->version = Base::VERSION; - this->getCount = &Name::cloopgetCountDispatcher; - this->getParam = &Name::cloopgetParamDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; - } - - static unsigned CLOOP_CARG cloopgetCountDispatcher(ITraceParams* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_proc_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceProcedure* procedure, FB_BOOLEAN started, unsigned proc_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getCount(); + return static_cast(self)->Name::trace_proc_execute(connection, transaction, procedure, started, proc_result); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const dsc* CLOOP_CARG cloopgetParamDispatcher(ITraceParams* self, unsigned idx) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_trigger_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceTrigger* trigger, FB_BOOLEAN started, unsigned trig_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getParam(idx); + return static_cast(self)->Name::trace_trigger_execute(connection, transaction, trigger, started, trig_result); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - }; - - template > > - class ITraceParamsImpl : public ITraceParamsBaseImpl - { - protected: - ITraceParamsImpl(DoNotInherit = DoNotInherit()) - { - } - - public: - virtual ~ITraceParamsImpl() - { - } - - virtual unsigned getCount() = 0; - virtual const dsc* getParam(unsigned idx) = 0; - }; - - template - class ITraceStatementBaseImpl : public Base - { - public: - typedef ITraceStatement Declaration; - - ITraceStatementBaseImpl(DoNotInherit = DoNotInherit()) - { - static struct VTableImpl : Base::VTable - { - VTableImpl() - { - this->version = Base::VERSION; - this->getStmtID = &Name::cloopgetStmtIDDispatcher; - this->getPerf = &Name::cloopgetPerfDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; - } - static ISC_INT64 CLOOP_CARG cloopgetStmtIDDispatcher(ITraceStatement* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_set_contextDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceContextVariable* variable) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getStmtID(); + return static_cast(self)->Name::trace_set_context(connection, transaction, variable); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceStatement* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_dsql_prepareDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, ISC_INT64 time_millis, unsigned req_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getPerf(); + return static_cast(self)->Name::trace_dsql_prepare(connection, transaction, statement, time_millis, req_result); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - }; - - template > > - class ITraceStatementImpl : public ITraceStatementBaseImpl - { - protected: - ITraceStatementImpl(DoNotInherit = DoNotInherit()) - { - } - - public: - virtual ~ITraceStatementImpl() - { - } - - virtual ISC_INT64 getStmtID() = 0; - virtual PerformanceInfo* getPerf() = 0; - }; - - template - class ITraceSQLStatementBaseImpl : public Base - { - public: - typedef ITraceSQLStatement Declaration; - ITraceSQLStatementBaseImpl(DoNotInherit = DoNotInherit()) + static FB_BOOLEAN CLOOP_CARG clooptrace_dsql_freeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceSQLStatement* statement, unsigned option) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable + try { - VTableImpl() - { - this->version = Base::VERSION; - this->getStmtID = &Name::cloopgetStmtIDDispatcher; - this->getPerf = &Name::cloopgetPerfDispatcher; - this->getText = &Name::cloopgetTextDispatcher; - this->getPlan = &Name::cloopgetPlanDispatcher; - this->getInputs = &Name::cloopgetInputsDispatcher; - this->getTextUTF8 = &Name::cloopgetTextUTF8Dispatcher; - this->getExplainedPlan = &Name::cloopgetExplainedPlanDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; + return static_cast(self)->Name::trace_dsql_free(connection, statement, option); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } } - static const char* CLOOP_CARG cloopgetTextDispatcher(ITraceSQLStatement* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_dsql_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, FB_BOOLEAN started, unsigned req_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getText(); + return static_cast(self)->Name::trace_dsql_execute(connection, transaction, statement, started, req_result); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetPlanDispatcher(ITraceSQLStatement* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_blr_compileDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, ISC_INT64 time_millis, unsigned req_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getPlan(); + return static_cast(self)->Name::trace_blr_compile(connection, transaction, statement, time_millis, req_result); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static ITraceParams* CLOOP_CARG cloopgetInputsDispatcher(ITraceSQLStatement* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_blr_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, unsigned req_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getInputs(); + return static_cast(self)->Name::trace_blr_execute(connection, transaction, statement, req_result); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetTextUTF8Dispatcher(ITraceSQLStatement* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_dyn_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceDYNRequest* request, ISC_INT64 time_millis, unsigned req_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getTextUTF8(); + return static_cast(self)->Name::trace_dyn_execute(connection, transaction, request, time_millis, req_result); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetExplainedPlanDispatcher(ITraceSQLStatement* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_service_attachDispatcher(ITracePlugin* self, ITraceServiceConnection* service, unsigned att_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getExplainedPlan(); + return static_cast(self)->Name::trace_service_attach(service, att_result); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static ISC_INT64 CLOOP_CARG cloopgetStmtIDDispatcher(ITraceStatement* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_service_startDispatcher(ITracePlugin* self, ITraceServiceConnection* service, unsigned switches_length, const char* switches, unsigned start_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getStmtID(); + return static_cast(self)->Name::trace_service_start(service, switches_length, switches, start_result); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceStatement* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_service_queryDispatcher(ITracePlugin* self, ITraceServiceConnection* service, unsigned send_item_length, const unsigned char* send_items, unsigned recv_item_length, const unsigned char* recv_items, unsigned query_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getPerf(); + return static_cast(self)->Name::trace_service_query(service, send_item_length, send_items, recv_item_length, recv_items, query_result); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - }; - - template > > > > - class ITraceSQLStatementImpl : public ITraceSQLStatementBaseImpl - { - protected: - ITraceSQLStatementImpl(DoNotInherit = DoNotInherit()) - { - } - - public: - virtual ~ITraceSQLStatementImpl() - { - } - - virtual const char* getText() = 0; - virtual const char* getPlan() = 0; - virtual ITraceParams* getInputs() = 0; - virtual const char* getTextUTF8() = 0; - virtual const char* getExplainedPlan() = 0; - }; - - template - class ITraceBLRStatementBaseImpl : public Base - { - public: - typedef ITraceBLRStatement Declaration; - ITraceBLRStatementBaseImpl(DoNotInherit = DoNotInherit()) + static FB_BOOLEAN CLOOP_CARG clooptrace_service_detachDispatcher(ITracePlugin* self, ITraceServiceConnection* service, unsigned detach_result) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable + try { - VTableImpl() - { - this->version = Base::VERSION; - this->getStmtID = &Name::cloopgetStmtIDDispatcher; - this->getPerf = &Name::cloopgetPerfDispatcher; - this->getData = &Name::cloopgetDataDispatcher; - this->getDataLength = &Name::cloopgetDataLengthDispatcher; - this->getText = &Name::cloopgetTextDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; + return static_cast(self)->Name::trace_service_detach(service, detach_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } } - static const unsigned char* CLOOP_CARG cloopgetDataDispatcher(ITraceBLRStatement* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_event_errorDispatcher(ITracePlugin* self, ITraceConnection* connection, ITraceStatusVector* status, const char* function) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getData(); + return static_cast(self)->Name::trace_event_error(connection, status, function); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static unsigned CLOOP_CARG cloopgetDataLengthDispatcher(ITraceBLRStatement* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_event_sweepDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceSweepInfo* sweep, unsigned sweep_state) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getDataLength(); + return static_cast(self)->Name::trace_event_sweep(connection, sweep, sweep_state); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetTextDispatcher(ITraceBLRStatement* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_func_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceFunction* function, FB_BOOLEAN started, unsigned func_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getText(); + return static_cast(self)->Name::trace_func_execute(connection, transaction, function, started, func_result); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static ISC_INT64 CLOOP_CARG cloopgetStmtIDDispatcher(ITraceStatement* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_dsql_restartDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, unsigned number) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getStmtID(); + return static_cast(self)->Name::trace_dsql_restart(connection, transaction, statement, number); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceStatement* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_proc_compileDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceProcedure* procedure, ISC_INT64 time_millis, unsigned proc_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getPerf(); + return static_cast(self)->Name::trace_proc_compile(connection, procedure, time_millis, proc_result); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - }; - - template > > > > - class ITraceBLRStatementImpl : public ITraceBLRStatementBaseImpl - { - protected: - ITraceBLRStatementImpl(DoNotInherit = DoNotInherit()) - { - } - - public: - virtual ~ITraceBLRStatementImpl() - { - } - virtual const unsigned char* getData() = 0; - virtual unsigned getDataLength() = 0; - virtual const char* getText() = 0; - }; - - template - class ITraceDYNRequestBaseImpl : public Base - { - public: - typedef ITraceDYNRequest Declaration; - - ITraceDYNRequestBaseImpl(DoNotInherit = DoNotInherit()) + static FB_BOOLEAN CLOOP_CARG clooptrace_func_compileDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceFunction* function, ISC_INT64 time_millis, unsigned func_result) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable + try { - VTableImpl() - { - this->version = Base::VERSION; - this->getData = &Name::cloopgetDataDispatcher; - this->getDataLength = &Name::cloopgetDataLengthDispatcher; - this->getText = &Name::cloopgetTextDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; + return static_cast(self)->Name::trace_func_compile(connection, function, time_millis, func_result); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } } - static const unsigned char* CLOOP_CARG cloopgetDataDispatcher(ITraceDYNRequest* self) throw() + static FB_BOOLEAN CLOOP_CARG clooptrace_trigger_compileDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTrigger* trigger, ISC_INT64 time_millis, unsigned trig_result) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getData(); + return static_cast(self)->Name::trace_trigger_compile(connection, trigger, time_millis, trig_result); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static unsigned CLOOP_CARG cloopgetDataLengthDispatcher(ITraceDYNRequest* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getDataLength(); + static_cast(self)->Name::addRef(); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } - static const char* CLOOP_CARG cloopgetTextDispatcher(ITraceDYNRequest* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getText(); + return static_cast(self)->Name::release(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } }; - template > > - class ITraceDYNRequestImpl : public ITraceDYNRequestBaseImpl + template > > > > + class ITracePluginImpl : public ITracePluginBaseImpl { protected: - ITraceDYNRequestImpl(DoNotInherit = DoNotInherit()) + ITracePluginImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ITraceDYNRequestImpl() + virtual ~ITracePluginImpl() { } - virtual const unsigned char* getData() = 0; - virtual unsigned getDataLength() = 0; - virtual const char* getText() = 0; + virtual const char* trace_get_error() = 0; + virtual FB_BOOLEAN trace_attach(ITraceDatabaseConnection* connection, FB_BOOLEAN create_db, unsigned att_result) = 0; + virtual FB_BOOLEAN trace_detach(ITraceDatabaseConnection* connection, FB_BOOLEAN drop_db) = 0; + virtual FB_BOOLEAN trace_transaction_start(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, unsigned tpb_length, const unsigned char* tpb, unsigned tra_result) = 0; + virtual FB_BOOLEAN trace_transaction_end(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, FB_BOOLEAN commit, FB_BOOLEAN retain_context, unsigned tra_result) = 0; + virtual FB_BOOLEAN trace_proc_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceProcedure* procedure, FB_BOOLEAN started, unsigned proc_result) = 0; + virtual FB_BOOLEAN trace_trigger_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceTrigger* trigger, FB_BOOLEAN started, unsigned trig_result) = 0; + virtual FB_BOOLEAN trace_set_context(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceContextVariable* variable) = 0; + virtual FB_BOOLEAN trace_dsql_prepare(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, ISC_INT64 time_millis, unsigned req_result) = 0; + virtual FB_BOOLEAN trace_dsql_free(ITraceDatabaseConnection* connection, ITraceSQLStatement* statement, unsigned option) = 0; + virtual FB_BOOLEAN trace_dsql_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, FB_BOOLEAN started, unsigned req_result) = 0; + virtual FB_BOOLEAN trace_blr_compile(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, ISC_INT64 time_millis, unsigned req_result) = 0; + virtual FB_BOOLEAN trace_blr_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, unsigned req_result) = 0; + virtual FB_BOOLEAN trace_dyn_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceDYNRequest* request, ISC_INT64 time_millis, unsigned req_result) = 0; + virtual FB_BOOLEAN trace_service_attach(ITraceServiceConnection* service, unsigned att_result) = 0; + virtual FB_BOOLEAN trace_service_start(ITraceServiceConnection* service, unsigned switches_length, const char* switches, unsigned start_result) = 0; + virtual FB_BOOLEAN trace_service_query(ITraceServiceConnection* service, unsigned send_item_length, const unsigned char* send_items, unsigned recv_item_length, const unsigned char* recv_items, unsigned query_result) = 0; + virtual FB_BOOLEAN trace_service_detach(ITraceServiceConnection* service, unsigned detach_result) = 0; + virtual FB_BOOLEAN trace_event_error(ITraceConnection* connection, ITraceStatusVector* status, const char* function) = 0; + virtual FB_BOOLEAN trace_event_sweep(ITraceDatabaseConnection* connection, ITraceSweepInfo* sweep, unsigned sweep_state) = 0; + virtual FB_BOOLEAN trace_func_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceFunction* function, FB_BOOLEAN started, unsigned func_result) = 0; + virtual FB_BOOLEAN trace_dsql_restart(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, unsigned number) = 0; + virtual FB_BOOLEAN trace_proc_compile(ITraceDatabaseConnection* connection, ITraceProcedure* procedure, ISC_INT64 time_millis, unsigned proc_result) = 0; + virtual FB_BOOLEAN trace_func_compile(ITraceDatabaseConnection* connection, ITraceFunction* function, ISC_INT64 time_millis, unsigned func_result) = 0; + virtual FB_BOOLEAN trace_trigger_compile(ITraceDatabaseConnection* connection, ITraceTrigger* trigger, ISC_INT64 time_millis, unsigned trig_result) = 0; }; template - class ITraceContextVariableBaseImpl : public Base + class ITraceFactoryBaseImpl : public Base { public: - typedef ITraceContextVariable Declaration; + typedef ITraceFactory Declaration; - ITraceContextVariableBaseImpl(DoNotInherit = DoNotInherit()) + ITraceFactoryBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->getNameSpace = &Name::cloopgetNameSpaceDispatcher; - this->getVarName = &Name::cloopgetVarNameDispatcher; - this->getVarValue = &Name::cloopgetVarValueDispatcher; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->trace_needs = &Name::clooptrace_needsDispatcher; + this->trace_create = &Name::clooptrace_createDispatcher; } } vTable; this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetNameSpaceDispatcher(ITraceContextVariable* self) throw() + static ISC_UINT64 CLOOP_CARG clooptrace_needsDispatcher(ITraceFactory* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getNameSpace(); + return static_cast(self)->Name::trace_needs(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetVarNameDispatcher(ITraceContextVariable* self) throw() + static ITracePlugin* CLOOP_CARG clooptrace_createDispatcher(ITraceFactory* self, IStatus* status, ITraceInitInfo* init_info) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getVarName(); + return static_cast(self)->Name::trace_create(&status2, init_info); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetVarValueDispatcher(ITraceContextVariable* self) throw() + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getVarValue(); + static_cast(self)->Name::setOwner(r); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } - }; - - template > > - class ITraceContextVariableImpl : public ITraceContextVariableBaseImpl - { - protected: - ITraceContextVariableImpl(DoNotInherit = DoNotInherit()) - { - } - - public: - virtual ~ITraceContextVariableImpl() - { - } - - virtual const char* getNameSpace() = 0; - virtual const char* getVarName() = 0; - virtual const char* getVarValue() = 0; - }; - - template - class ITraceProcedureBaseImpl : public Base - { - public: - typedef ITraceProcedure Declaration; - - ITraceProcedureBaseImpl(DoNotInherit = DoNotInherit()) - { - static struct VTableImpl : Base::VTable - { - VTableImpl() - { - this->version = Base::VERSION; - this->getProcName = &Name::cloopgetProcNameDispatcher; - this->getInputs = &Name::cloopgetInputsDispatcher; - this->getPerf = &Name::cloopgetPerfDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; - } - static const char* CLOOP_CARG cloopgetProcNameDispatcher(ITraceProcedure* self) throw() + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getProcName(); + return static_cast(self)->Name::getOwner(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static ITraceParams* CLOOP_CARG cloopgetInputsDispatcher(ITraceProcedure* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getInputs(); + static_cast(self)->Name::addRef(); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } - static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceProcedure* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getPerf(); + return static_cast(self)->Name::release(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } }; - template > > - class ITraceProcedureImpl : public ITraceProcedureBaseImpl + template > > > > > > + class ITraceFactoryImpl : public ITraceFactoryBaseImpl { protected: - ITraceProcedureImpl(DoNotInherit = DoNotInherit()) + ITraceFactoryImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ITraceProcedureImpl() + virtual ~ITraceFactoryImpl() { } - virtual const char* getProcName() = 0; - virtual ITraceParams* getInputs() = 0; - virtual PerformanceInfo* getPerf() = 0; + virtual ISC_UINT64 trace_needs() = 0; + virtual ITracePlugin* trace_create(StatusType* status, ITraceInitInfo* init_info) = 0; }; template - class ITraceFunctionBaseImpl : public Base + class IUdrFunctionFactoryBaseImpl : public Base { public: - typedef ITraceFunction Declaration; + typedef IUdrFunctionFactory Declaration; - ITraceFunctionBaseImpl(DoNotInherit = DoNotInherit()) + IUdrFunctionFactoryBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->getFuncName = &Name::cloopgetFuncNameDispatcher; - this->getInputs = &Name::cloopgetInputsDispatcher; - this->getResult = &Name::cloopgetResultDispatcher; - this->getPerf = &Name::cloopgetPerfDispatcher; + this->dispose = &Name::cloopdisposeDispatcher; + this->setup = &Name::cloopsetupDispatcher; + this->newItem = &Name::cloopnewItemDispatcher; } } vTable; this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetFuncNameDispatcher(ITraceFunction* self) throw() + static void CLOOP_CARG cloopsetupDispatcher(IUdrFunctionFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::getFuncName(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static ITraceParams* CLOOP_CARG cloopgetInputsDispatcher(ITraceFunction* self) throw() - { try { - return static_cast(self)->Name::getInputs(); + static_cast(self)->Name::setup(&status2, context, metadata, inBuilder, outBuilder); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static ITraceParams* CLOOP_CARG cloopgetResultDispatcher(ITraceFunction* self) throw() + static IExternalFunction* CLOOP_CARG cloopnewItemDispatcher(IUdrFunctionFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getResult(); + return static_cast(self)->Name::newItem(&status2, context, metadata); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceFunction* self) throw() + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getPerf(); + static_cast(self)->Name::dispose(); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } }; - template > > - class ITraceFunctionImpl : public ITraceFunctionBaseImpl + template > > > > + class IUdrFunctionFactoryImpl : public IUdrFunctionFactoryBaseImpl { protected: - ITraceFunctionImpl(DoNotInherit = DoNotInherit()) + IUdrFunctionFactoryImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ITraceFunctionImpl() + virtual ~IUdrFunctionFactoryImpl() { } - virtual const char* getFuncName() = 0; - virtual ITraceParams* getInputs() = 0; - virtual ITraceParams* getResult() = 0; - virtual PerformanceInfo* getPerf() = 0; + virtual void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; + virtual IExternalFunction* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) = 0; }; template - class ITraceTriggerBaseImpl : public Base + class IUdrProcedureFactoryBaseImpl : public Base { public: - typedef ITraceTrigger Declaration; + typedef IUdrProcedureFactory Declaration; - ITraceTriggerBaseImpl(DoNotInherit = DoNotInherit()) + IUdrProcedureFactoryBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->getTriggerName = &Name::cloopgetTriggerNameDispatcher; - this->getRelationName = &Name::cloopgetRelationNameDispatcher; - this->getAction = &Name::cloopgetActionDispatcher; - this->getWhich = &Name::cloopgetWhichDispatcher; - this->getPerf = &Name::cloopgetPerfDispatcher; + this->dispose = &Name::cloopdisposeDispatcher; + this->setup = &Name::cloopsetupDispatcher; + this->newItem = &Name::cloopnewItemDispatcher; } } vTable; this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetTriggerNameDispatcher(ITraceTrigger* self) throw() + static void CLOOP_CARG cloopsetupDispatcher(IUdrProcedureFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::getTriggerName(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static const char* CLOOP_CARG cloopgetRelationNameDispatcher(ITraceTrigger* self) throw() - { try { - return static_cast(self)->Name::getRelationName(); + static_cast(self)->Name::setup(&status2, context, metadata, inBuilder, outBuilder); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static int CLOOP_CARG cloopgetActionDispatcher(ITraceTrigger* self) throw() + static IExternalProcedure* CLOOP_CARG cloopnewItemDispatcher(IUdrProcedureFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::getAction(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static int CLOOP_CARG cloopgetWhichDispatcher(ITraceTrigger* self) throw() - { try { - return static_cast(self)->Name::getWhich(); + return static_cast(self)->Name::newItem(&status2, context, metadata); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceTrigger* self) throw() + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getPerf(); + static_cast(self)->Name::dispose(); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } }; - template > > - class ITraceTriggerImpl : public ITraceTriggerBaseImpl + template > > > > + class IUdrProcedureFactoryImpl : public IUdrProcedureFactoryBaseImpl { protected: - ITraceTriggerImpl(DoNotInherit = DoNotInherit()) + IUdrProcedureFactoryImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ITraceTriggerImpl() + virtual ~IUdrProcedureFactoryImpl() { } - virtual const char* getTriggerName() = 0; - virtual const char* getRelationName() = 0; - virtual int getAction() = 0; - virtual int getWhich() = 0; - virtual PerformanceInfo* getPerf() = 0; + virtual void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; + virtual IExternalProcedure* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) = 0; }; template - class ITraceServiceConnectionBaseImpl : public Base + class IUdrTriggerFactoryBaseImpl : public Base { public: - typedef ITraceServiceConnection Declaration; + typedef IUdrTriggerFactory Declaration; - ITraceServiceConnectionBaseImpl(DoNotInherit = DoNotInherit()) + IUdrTriggerFactoryBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->getKind = &Name::cloopgetKindDispatcher; - this->getProcessID = &Name::cloopgetProcessIDDispatcher; - this->getUserName = &Name::cloopgetUserNameDispatcher; - this->getRoleName = &Name::cloopgetRoleNameDispatcher; - this->getCharSet = &Name::cloopgetCharSetDispatcher; - this->getRemoteProtocol = &Name::cloopgetRemoteProtocolDispatcher; - this->getRemoteAddress = &Name::cloopgetRemoteAddressDispatcher; - this->getRemoteProcessID = &Name::cloopgetRemoteProcessIDDispatcher; - this->getRemoteProcessName = &Name::cloopgetRemoteProcessNameDispatcher; - this->getServiceID = &Name::cloopgetServiceIDDispatcher; - this->getServiceMgr = &Name::cloopgetServiceMgrDispatcher; - this->getServiceName = &Name::cloopgetServiceNameDispatcher; + this->dispose = &Name::cloopdisposeDispatcher; + this->setup = &Name::cloopsetupDispatcher; + this->newItem = &Name::cloopnewItemDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void* CLOOP_CARG cloopgetServiceIDDispatcher(ITraceServiceConnection* self) throw() + static void CLOOP_CARG cloopsetupDispatcher(IUdrTriggerFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::getServiceID(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static const char* CLOOP_CARG cloopgetServiceMgrDispatcher(ITraceServiceConnection* self) throw() - { try { - return static_cast(self)->Name::getServiceMgr(); + static_cast(self)->Name::setup(&status2, context, metadata, fieldsBuilder); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static const char* CLOOP_CARG cloopgetServiceNameDispatcher(ITraceServiceConnection* self) throw() + static IExternalTrigger* CLOOP_CARG cloopnewItemDispatcher(IUdrTriggerFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::getServiceName(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static unsigned CLOOP_CARG cloopgetKindDispatcher(ITraceConnection* self) throw() - { try { - return static_cast(self)->Name::getKind(); + return static_cast(self)->Name::newItem(&status2, context, metadata); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static int CLOOP_CARG cloopgetProcessIDDispatcher(ITraceConnection* self) throw() + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getProcessID(); + static_cast(self)->Name::dispose(); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } + }; - static const char* CLOOP_CARG cloopgetUserNameDispatcher(ITraceConnection* self) throw() + template > > > > + class IUdrTriggerFactoryImpl : public IUdrTriggerFactoryBaseImpl + { + protected: + IUdrTriggerFactoryImpl(DoNotInherit = DoNotInherit()) { - try - { - return static_cast(self)->Name::getUserName(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } } - static const char* CLOOP_CARG cloopgetRoleNameDispatcher(ITraceConnection* self) throw() + public: + virtual ~IUdrTriggerFactoryImpl() { - try - { - return static_cast(self)->Name::getRoleName(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } } - static const char* CLOOP_CARG cloopgetCharSetDispatcher(ITraceConnection* self) throw() + virtual void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) = 0; + virtual IExternalTrigger* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) = 0; + }; + + template + class IUdrPluginBaseImpl : public Base + { + public: + typedef IUdrPlugin Declaration; + + IUdrPluginBaseImpl(DoNotInherit = DoNotInherit()) { - try - { - return static_cast(self)->Name::getCharSet(); - } - catch (...) + static struct VTableImpl : Base::VTable { - StatusType::catchException(0); - return static_cast(0); - } + VTableImpl() + { + this->version = Base::VERSION; + this->getMaster = &Name::cloopgetMasterDispatcher; + this->registerFunction = &Name::cloopregisterFunctionDispatcher; + this->registerProcedure = &Name::cloopregisterProcedureDispatcher; + this->registerTrigger = &Name::cloopregisterTriggerDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetRemoteProtocolDispatcher(ITraceConnection* self) throw() + static IMaster* CLOOP_CARG cloopgetMasterDispatcher(IUdrPlugin* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getRemoteProtocol(); + return static_cast(self)->Name::getMaster(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetRemoteAddressDispatcher(ITraceConnection* self) throw() + static void CLOOP_CARG cloopregisterFunctionDispatcher(IUdrPlugin* self, IStatus* status, const char* name, IUdrFunctionFactory* factory) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getRemoteAddress(); + static_cast(self)->Name::registerFunction(&status2, name, factory); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static int CLOOP_CARG cloopgetRemoteProcessIDDispatcher(ITraceConnection* self) throw() + static void CLOOP_CARG cloopregisterProcedureDispatcher(IUdrPlugin* self, IStatus* status, const char* name, IUdrProcedureFactory* factory) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getRemoteProcessID(); + static_cast(self)->Name::registerProcedure(&status2, name, factory); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static const char* CLOOP_CARG cloopgetRemoteProcessNameDispatcher(ITraceConnection* self) throw() + static void CLOOP_CARG cloopregisterTriggerDispatcher(IUdrPlugin* self, IStatus* status, const char* name, IUdrTriggerFactory* factory) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getRemoteProcessName(); + static_cast(self)->Name::registerTrigger(&status2, name, factory); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } }; - template > > > > - class ITraceServiceConnectionImpl : public ITraceServiceConnectionBaseImpl + template > > + class IUdrPluginImpl : public IUdrPluginBaseImpl { protected: - ITraceServiceConnectionImpl(DoNotInherit = DoNotInherit()) + IUdrPluginImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ITraceServiceConnectionImpl() + virtual ~IUdrPluginImpl() { } - virtual void* getServiceID() = 0; - virtual const char* getServiceMgr() = 0; - virtual const char* getServiceName() = 0; + virtual IMaster* getMaster() = 0; + virtual void registerFunction(StatusType* status, const char* name, IUdrFunctionFactory* factory) = 0; + virtual void registerProcedure(StatusType* status, const char* name, IUdrProcedureFactory* factory) = 0; + virtual void registerTrigger(StatusType* status, const char* name, IUdrTriggerFactory* factory) = 0; }; template - class ITraceStatusVectorBaseImpl : public Base + class IDecFloat16BaseImpl : public Base { public: - typedef ITraceStatusVector Declaration; + typedef IDecFloat16 Declaration; - ITraceStatusVectorBaseImpl(DoNotInherit = DoNotInherit()) + IDecFloat16BaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->hasError = &Name::cloophasErrorDispatcher; - this->hasWarning = &Name::cloophasWarningDispatcher; - this->getStatus = &Name::cloopgetStatusDispatcher; - this->getText = &Name::cloopgetTextDispatcher; + this->toBcd = &Name::clooptoBcdDispatcher; + this->toString = &Name::clooptoStringDispatcher; + this->fromBcd = &Name::cloopfromBcdDispatcher; + this->fromString = &Name::cloopfromStringDispatcher; } } vTable; this->cloopVTable = &vTable; } - static FB_BOOLEAN CLOOP_CARG cloophasErrorDispatcher(ITraceStatusVector* self) throw() + static void CLOOP_CARG clooptoBcdDispatcher(IDecFloat16* self, const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::hasError(); + static_cast(self)->Name::toBcd(from, sign, bcd, exp); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } - static FB_BOOLEAN CLOOP_CARG cloophasWarningDispatcher(ITraceStatusVector* self) throw() + static void CLOOP_CARG clooptoStringDispatcher(IDecFloat16* self, IStatus* status, const FB_DEC16* from, unsigned bufferLength, char* buffer) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::hasWarning(); + static_cast(self)->Name::toString(&status2, from, bufferLength, buffer); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static IStatus* CLOOP_CARG cloopgetStatusDispatcher(ITraceStatusVector* self) throw() + static void CLOOP_CARG cloopfromBcdDispatcher(IDecFloat16* self, int sign, const unsigned char* bcd, int exp, FB_DEC16* to) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getStatus(); + static_cast(self)->Name::fromBcd(sign, bcd, exp, to); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } - static const char* CLOOP_CARG cloopgetTextDispatcher(ITraceStatusVector* self) throw() + static void CLOOP_CARG cloopfromStringDispatcher(IDecFloat16* self, IStatus* status, const char* from, FB_DEC16* to) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getText(); + static_cast(self)->Name::fromString(&status2, from, to); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } }; - template > > - class ITraceStatusVectorImpl : public ITraceStatusVectorBaseImpl + template > > + class IDecFloat16Impl : public IDecFloat16BaseImpl { protected: - ITraceStatusVectorImpl(DoNotInherit = DoNotInherit()) + IDecFloat16Impl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ITraceStatusVectorImpl() + virtual ~IDecFloat16Impl() { } - virtual FB_BOOLEAN hasError() = 0; - virtual FB_BOOLEAN hasWarning() = 0; - virtual IStatus* getStatus() = 0; - virtual const char* getText() = 0; + virtual void toBcd(const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp) = 0; + virtual void toString(StatusType* status, const FB_DEC16* from, unsigned bufferLength, char* buffer) = 0; + virtual void fromBcd(int sign, const unsigned char* bcd, int exp, FB_DEC16* to) = 0; + virtual void fromString(StatusType* status, const char* from, FB_DEC16* to) = 0; }; template - class ITraceSweepInfoBaseImpl : public Base + class IDecFloat34BaseImpl : public Base { public: - typedef ITraceSweepInfo Declaration; + typedef IDecFloat34 Declaration; - ITraceSweepInfoBaseImpl(DoNotInherit = DoNotInherit()) + IDecFloat34BaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->getOIT = &Name::cloopgetOITDispatcher; - this->getOST = &Name::cloopgetOSTDispatcher; - this->getOAT = &Name::cloopgetOATDispatcher; - this->getNext = &Name::cloopgetNextDispatcher; - this->getPerf = &Name::cloopgetPerfDispatcher; + this->toBcd = &Name::clooptoBcdDispatcher; + this->toString = &Name::clooptoStringDispatcher; + this->fromBcd = &Name::cloopfromBcdDispatcher; + this->fromString = &Name::cloopfromStringDispatcher; } } vTable; this->cloopVTable = &vTable; } - static ISC_INT64 CLOOP_CARG cloopgetOITDispatcher(ITraceSweepInfo* self) throw() + static void CLOOP_CARG clooptoBcdDispatcher(IDecFloat34* self, const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getOIT(); + static_cast(self)->Name::toBcd(from, sign, bcd, exp); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } - static ISC_INT64 CLOOP_CARG cloopgetOSTDispatcher(ITraceSweepInfo* self) throw() + static void CLOOP_CARG clooptoStringDispatcher(IDecFloat34* self, IStatus* status, const FB_DEC34* from, unsigned bufferLength, char* buffer) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::getOST(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static ISC_INT64 CLOOP_CARG cloopgetOATDispatcher(ITraceSweepInfo* self) throw() - { try { - return static_cast(self)->Name::getOAT(); + static_cast(self)->Name::toString(&status2, from, bufferLength, buffer); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static ISC_INT64 CLOOP_CARG cloopgetNextDispatcher(ITraceSweepInfo* self) throw() + static void CLOOP_CARG cloopfromBcdDispatcher(IDecFloat34* self, int sign, const unsigned char* bcd, int exp, FB_DEC34* to) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getNext(); + static_cast(self)->Name::fromBcd(sign, bcd, exp, to); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } - static PerformanceInfo* CLOOP_CARG cloopgetPerfDispatcher(ITraceSweepInfo* self) throw() + static void CLOOP_CARG cloopfromStringDispatcher(IDecFloat34* self, IStatus* status, const char* from, FB_DEC34* to) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::getPerf(); + static_cast(self)->Name::fromString(&status2, from, to); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } }; - template > > - class ITraceSweepInfoImpl : public ITraceSweepInfoBaseImpl + template > > + class IDecFloat34Impl : public IDecFloat34BaseImpl { protected: - ITraceSweepInfoImpl(DoNotInherit = DoNotInherit()) + IDecFloat34Impl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ITraceSweepInfoImpl() + virtual ~IDecFloat34Impl() { } - virtual ISC_INT64 getOIT() = 0; - virtual ISC_INT64 getOST() = 0; - virtual ISC_INT64 getOAT() = 0; - virtual ISC_INT64 getNext() = 0; - virtual PerformanceInfo* getPerf() = 0; + virtual void toBcd(const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp) = 0; + virtual void toString(StatusType* status, const FB_DEC34* from, unsigned bufferLength, char* buffer) = 0; + virtual void fromBcd(int sign, const unsigned char* bcd, int exp, FB_DEC34* to) = 0; + virtual void fromString(StatusType* status, const char* from, FB_DEC34* to) = 0; }; template - class ITraceLogWriterBaseImpl : public Base + class IInt128BaseImpl : public Base { public: - typedef ITraceLogWriter Declaration; + typedef IInt128 Declaration; - ITraceLogWriterBaseImpl(DoNotInherit = DoNotInherit()) + IInt128BaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->write = &Name::cloopwriteDispatcher; + this->toString = &Name::clooptoStringDispatcher; + this->fromString = &Name::cloopfromStringDispatcher; } } vTable; this->cloopVTable = &vTable; } - static unsigned CLOOP_CARG cloopwriteDispatcher(ITraceLogWriter* self, const void* buf, unsigned size) throw() + static void CLOOP_CARG clooptoStringDispatcher(IInt128* self, IStatus* status, const FB_I128* from, int scale, unsigned bufferLength, char* buffer) CLOOP_NOEXCEPT { - try - { - return static_cast(self)->Name::write(buf, size); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } - } + StatusType status2(status); - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() - { try { - static_cast(self)->Name::addRef(); + static_cast(self)->Name::toString(&status2, from, scale, bufferLength, buffer); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopfromStringDispatcher(IInt128* self, IStatus* status, int scale, const char* from, FB_I128* to) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::release(); + static_cast(self)->Name::fromString(&status2, scale, from, to); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } }; - template > > > > - class ITraceLogWriterImpl : public ITraceLogWriterBaseImpl + template > > + class IInt128Impl : public IInt128BaseImpl { protected: - ITraceLogWriterImpl(DoNotInherit = DoNotInherit()) + IInt128Impl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ITraceLogWriterImpl() + virtual ~IInt128Impl() { } - virtual unsigned write(const void* buf, unsigned size) = 0; + virtual void toString(StatusType* status, const FB_I128* from, int scale, unsigned bufferLength, char* buffer) = 0; + virtual void fromString(StatusType* status, int scale, const char* from, FB_I128* to) = 0; }; template - class ITraceInitInfoBaseImpl : public Base + class IReplicatedFieldBaseImpl : public Base { public: - typedef ITraceInitInfo Declaration; + typedef IReplicatedField Declaration; - ITraceInitInfoBaseImpl(DoNotInherit = DoNotInherit()) + IReplicatedFieldBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->getConfigText = &Name::cloopgetConfigTextDispatcher; - this->getTraceSessionID = &Name::cloopgetTraceSessionIDDispatcher; - this->getTraceSessionName = &Name::cloopgetTraceSessionNameDispatcher; - this->getFirebirdRootDirectory = &Name::cloopgetFirebirdRootDirectoryDispatcher; - this->getDatabaseName = &Name::cloopgetDatabaseNameDispatcher; - this->getConnection = &Name::cloopgetConnectionDispatcher; - this->getLogWriter = &Name::cloopgetLogWriterDispatcher; + this->getName = &Name::cloopgetNameDispatcher; + this->getType = &Name::cloopgetTypeDispatcher; + this->getSubType = &Name::cloopgetSubTypeDispatcher; + this->getScale = &Name::cloopgetScaleDispatcher; + this->getLength = &Name::cloopgetLengthDispatcher; + this->getCharSet = &Name::cloopgetCharSetDispatcher; + this->getData = &Name::cloopgetDataDispatcher; } } vTable; this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetConfigTextDispatcher(ITraceInitInfo* self) throw() + static const char* CLOOP_CARG cloopgetNameDispatcher(IReplicatedField* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getConfigText(); + return static_cast(self)->Name::getName(); } catch (...) { @@ -14999,11 +20322,37 @@ namespace Firebird } } - static int CLOOP_CARG cloopgetTraceSessionIDDispatcher(ITraceInitInfo* self) throw() + static unsigned CLOOP_CARG cloopgetTypeDispatcher(IReplicatedField* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getTraceSessionID(); + return static_cast(self)->Name::getType(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetSubTypeDispatcher(IReplicatedField* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getSubType(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static int CLOOP_CARG cloopgetScaleDispatcher(IReplicatedField* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getScale(); } catch (...) { @@ -15012,410 +20361,498 @@ namespace Firebird } } - static const char* CLOOP_CARG cloopgetTraceSessionNameDispatcher(ITraceInitInfo* self) throw() - { - try - { - return static_cast(self)->Name::getTraceSessionName(); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } + static unsigned CLOOP_CARG cloopgetLengthDispatcher(IReplicatedField* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getLength(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static unsigned CLOOP_CARG cloopgetCharSetDispatcher(IReplicatedField* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getCharSet(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + + static const void* CLOOP_CARG cloopgetDataDispatcher(IReplicatedField* self) CLOOP_NOEXCEPT + { + try + { + return static_cast(self)->Name::getData(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + }; + + template > > + class IReplicatedFieldImpl : public IReplicatedFieldBaseImpl + { + protected: + IReplicatedFieldImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IReplicatedFieldImpl() + { + } + + virtual const char* getName() = 0; + virtual unsigned getType() = 0; + virtual int getSubType() = 0; + virtual int getScale() = 0; + virtual unsigned getLength() = 0; + virtual unsigned getCharSet() = 0; + virtual const void* getData() = 0; + }; + + template + class IReplicatedRecordBaseImpl : public Base + { + public: + typedef IReplicatedRecord Declaration; + + IReplicatedRecordBaseImpl(DoNotInherit = DoNotInherit()) + { + static struct VTableImpl : Base::VTable + { + VTableImpl() + { + this->version = Base::VERSION; + this->getCount = &Name::cloopgetCountDispatcher; + this->getField = &Name::cloopgetFieldDispatcher; + this->getRawLength = &Name::cloopgetRawLengthDispatcher; + this->getRawData = &Name::cloopgetRawDataDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; } - static const char* CLOOP_CARG cloopgetFirebirdRootDirectoryDispatcher(ITraceInitInfo* self) throw() + static unsigned CLOOP_CARG cloopgetCountDispatcher(IReplicatedRecord* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getFirebirdRootDirectory(); + return static_cast(self)->Name::getCount(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static const char* CLOOP_CARG cloopgetDatabaseNameDispatcher(ITraceInitInfo* self) throw() + static IReplicatedField* CLOOP_CARG cloopgetFieldDispatcher(IReplicatedRecord* self, unsigned index) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getDatabaseName(); + return static_cast(self)->Name::getField(index); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static ITraceDatabaseConnection* CLOOP_CARG cloopgetConnectionDispatcher(ITraceInitInfo* self) throw() + static unsigned CLOOP_CARG cloopgetRawLengthDispatcher(IReplicatedRecord* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getConnection(); + return static_cast(self)->Name::getRawLength(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static ITraceLogWriter* CLOOP_CARG cloopgetLogWriterDispatcher(ITraceInitInfo* self) throw() + static const unsigned char* CLOOP_CARG cloopgetRawDataDispatcher(IReplicatedRecord* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getLogWriter(); + return static_cast(self)->Name::getRawData(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } }; - template > > - class ITraceInitInfoImpl : public ITraceInitInfoBaseImpl + template > > + class IReplicatedRecordImpl : public IReplicatedRecordBaseImpl { protected: - ITraceInitInfoImpl(DoNotInherit = DoNotInherit()) + IReplicatedRecordImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ITraceInitInfoImpl() + virtual ~IReplicatedRecordImpl() { } - virtual const char* getConfigText() = 0; - virtual int getTraceSessionID() = 0; - virtual const char* getTraceSessionName() = 0; - virtual const char* getFirebirdRootDirectory() = 0; - virtual const char* getDatabaseName() = 0; - virtual ITraceDatabaseConnection* getConnection() = 0; - virtual ITraceLogWriter* getLogWriter() = 0; + virtual unsigned getCount() = 0; + virtual IReplicatedField* getField(unsigned index) = 0; + virtual unsigned getRawLength() = 0; + virtual const unsigned char* getRawData() = 0; }; template - class ITracePluginBaseImpl : public Base + class IReplicatedTransactionBaseImpl : public Base { public: - typedef ITracePlugin Declaration; + typedef IReplicatedTransaction Declaration; - ITracePluginBaseImpl(DoNotInherit = DoNotInherit()) + IReplicatedTransactionBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->addRef = &Name::cloopaddRefDispatcher; - this->release = &Name::cloopreleaseDispatcher; - this->trace_get_error = &Name::clooptrace_get_errorDispatcher; - this->trace_attach = &Name::clooptrace_attachDispatcher; - this->trace_detach = &Name::clooptrace_detachDispatcher; - this->trace_transaction_start = &Name::clooptrace_transaction_startDispatcher; - this->trace_transaction_end = &Name::clooptrace_transaction_endDispatcher; - this->trace_proc_execute = &Name::clooptrace_proc_executeDispatcher; - this->trace_trigger_execute = &Name::clooptrace_trigger_executeDispatcher; - this->trace_set_context = &Name::clooptrace_set_contextDispatcher; - this->trace_dsql_prepare = &Name::clooptrace_dsql_prepareDispatcher; - this->trace_dsql_free = &Name::clooptrace_dsql_freeDispatcher; - this->trace_dsql_execute = &Name::clooptrace_dsql_executeDispatcher; - this->trace_blr_compile = &Name::clooptrace_blr_compileDispatcher; - this->trace_blr_execute = &Name::clooptrace_blr_executeDispatcher; - this->trace_dyn_execute = &Name::clooptrace_dyn_executeDispatcher; - this->trace_service_attach = &Name::clooptrace_service_attachDispatcher; - this->trace_service_start = &Name::clooptrace_service_startDispatcher; - this->trace_service_query = &Name::clooptrace_service_queryDispatcher; - this->trace_service_detach = &Name::clooptrace_service_detachDispatcher; - this->trace_event_error = &Name::clooptrace_event_errorDispatcher; - this->trace_event_sweep = &Name::clooptrace_event_sweepDispatcher; - this->trace_func_execute = &Name::clooptrace_func_executeDispatcher; + this->dispose = &Name::cloopdisposeDispatcher; + this->prepare = &Name::cloopprepareDispatcher; + this->commit = &Name::cloopcommitDispatcher; + this->rollback = &Name::clooprollbackDispatcher; + this->startSavepoint = &Name::cloopstartSavepointDispatcher; + this->releaseSavepoint = &Name::cloopreleaseSavepointDispatcher; + this->rollbackSavepoint = &Name::clooprollbackSavepointDispatcher; + this->insertRecord = &Name::cloopinsertRecordDispatcher; + this->updateRecord = &Name::cloopupdateRecordDispatcher; + this->deleteRecord = &Name::cloopdeleteRecordDispatcher; + this->executeSql = &Name::cloopexecuteSqlDispatcher; + this->executeSqlIntl = &Name::cloopexecuteSqlIntlDispatcher; } } vTable; this->cloopVTable = &vTable; } - static const char* CLOOP_CARG clooptrace_get_errorDispatcher(ITracePlugin* self) throw() + static void CLOOP_CARG cloopprepareDispatcher(IReplicatedTransaction* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_get_error(); + static_cast(self)->Name::prepare(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_attachDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, FB_BOOLEAN create_db, unsigned att_result) throw() + static void CLOOP_CARG cloopcommitDispatcher(IReplicatedTransaction* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_attach(connection, create_db, att_result); + static_cast(self)->Name::commit(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_detachDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, FB_BOOLEAN drop_db) throw() + static void CLOOP_CARG clooprollbackDispatcher(IReplicatedTransaction* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_detach(connection, drop_db); + static_cast(self)->Name::rollback(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_transaction_startDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, unsigned tpb_length, const unsigned char* tpb, unsigned tra_result) throw() + static void CLOOP_CARG cloopstartSavepointDispatcher(IReplicatedTransaction* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_transaction_start(connection, transaction, tpb_length, tpb, tra_result); + static_cast(self)->Name::startSavepoint(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_transaction_endDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, FB_BOOLEAN commit, FB_BOOLEAN retain_context, unsigned tra_result) throw() + static void CLOOP_CARG cloopreleaseSavepointDispatcher(IReplicatedTransaction* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_transaction_end(connection, transaction, commit, retain_context, tra_result); + static_cast(self)->Name::releaseSavepoint(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_proc_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceProcedure* procedure, FB_BOOLEAN started, unsigned proc_result) throw() + static void CLOOP_CARG clooprollbackSavepointDispatcher(IReplicatedTransaction* self, IStatus* status) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_proc_execute(connection, transaction, procedure, started, proc_result); + static_cast(self)->Name::rollbackSavepoint(&status2); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_trigger_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceTrigger* trigger, FB_BOOLEAN started, unsigned trig_result) throw() + static void CLOOP_CARG cloopinsertRecordDispatcher(IReplicatedTransaction* self, IStatus* status, const char* name, IReplicatedRecord* record) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_trigger_execute(connection, transaction, trigger, started, trig_result); + static_cast(self)->Name::insertRecord(&status2, name, record); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_set_contextDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceContextVariable* variable) throw() + static void CLOOP_CARG cloopupdateRecordDispatcher(IReplicatedTransaction* self, IStatus* status, const char* name, IReplicatedRecord* orgRecord, IReplicatedRecord* newRecord) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_set_context(connection, transaction, variable); + static_cast(self)->Name::updateRecord(&status2, name, orgRecord, newRecord); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_dsql_prepareDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, ISC_INT64 time_millis, unsigned req_result) throw() + static void CLOOP_CARG cloopdeleteRecordDispatcher(IReplicatedTransaction* self, IStatus* status, const char* name, IReplicatedRecord* record) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_dsql_prepare(connection, transaction, statement, time_millis, req_result); + static_cast(self)->Name::deleteRecord(&status2, name, record); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_dsql_freeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceSQLStatement* statement, unsigned option) throw() + static void CLOOP_CARG cloopexecuteSqlDispatcher(IReplicatedTransaction* self, IStatus* status, const char* sql) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_dsql_free(connection, statement, option); + static_cast(self)->Name::executeSql(&status2, sql); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_dsql_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, FB_BOOLEAN started, unsigned req_result) throw() + static void CLOOP_CARG cloopexecuteSqlIntlDispatcher(IReplicatedTransaction* self, IStatus* status, unsigned charset, const char* sql) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_dsql_execute(connection, transaction, statement, started, req_result); + static_cast(self)->Name::executeSqlIntl(&status2, charset, sql); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_blr_compileDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, ISC_INT64 time_millis, unsigned req_result) throw() + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::trace_blr_compile(connection, transaction, statement, time_millis, req_result); + static_cast(self)->Name::dispose(); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } + }; - static FB_BOOLEAN CLOOP_CARG clooptrace_blr_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, unsigned req_result) throw() + template > > > > + class IReplicatedTransactionImpl : public IReplicatedTransactionBaseImpl + { + protected: + IReplicatedTransactionImpl(DoNotInherit = DoNotInherit()) { - try - { - return static_cast(self)->Name::trace_blr_execute(connection, transaction, statement, req_result); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } } - static FB_BOOLEAN CLOOP_CARG clooptrace_dyn_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceDYNRequest* request, ISC_INT64 time_millis, unsigned req_result) throw() + public: + virtual ~IReplicatedTransactionImpl() { - try - { - return static_cast(self)->Name::trace_dyn_execute(connection, transaction, request, time_millis, req_result); - } - catch (...) - { - StatusType::catchException(0); - return static_cast(0); - } } - static FB_BOOLEAN CLOOP_CARG clooptrace_service_attachDispatcher(ITracePlugin* self, ITraceServiceConnection* service, unsigned att_result) throw() + virtual void prepare(StatusType* status) = 0; + virtual void commit(StatusType* status) = 0; + virtual void rollback(StatusType* status) = 0; + virtual void startSavepoint(StatusType* status) = 0; + virtual void releaseSavepoint(StatusType* status) = 0; + virtual void rollbackSavepoint(StatusType* status) = 0; + virtual void insertRecord(StatusType* status, const char* name, IReplicatedRecord* record) = 0; + virtual void updateRecord(StatusType* status, const char* name, IReplicatedRecord* orgRecord, IReplicatedRecord* newRecord) = 0; + virtual void deleteRecord(StatusType* status, const char* name, IReplicatedRecord* record) = 0; + virtual void executeSql(StatusType* status, const char* sql) = 0; + virtual void executeSqlIntl(StatusType* status, unsigned charset, const char* sql) = 0; + }; + + template + class IReplicatedSessionBaseImpl : public Base + { + public: + typedef IReplicatedSession Declaration; + + IReplicatedSessionBaseImpl(DoNotInherit = DoNotInherit()) { - try - { - return static_cast(self)->Name::trace_service_attach(service, att_result); - } - catch (...) + static struct VTableImpl : Base::VTable { - StatusType::catchException(0); - return static_cast(0); - } + VTableImpl() + { + this->version = Base::VERSION; + this->addRef = &Name::cloopaddRefDispatcher; + this->release = &Name::cloopreleaseDispatcher; + this->setOwner = &Name::cloopsetOwnerDispatcher; + this->getOwner = &Name::cloopgetOwnerDispatcher; + this->init = &Name::cloopinitDispatcher; + this->startTransaction = &Name::cloopstartTransactionDispatcher; + this->cleanupTransaction = &Name::cloopcleanupTransactionDispatcher; + this->setSequence = &Name::cloopsetSequenceDispatcher; + } + } vTable; + + this->cloopVTable = &vTable; } - static FB_BOOLEAN CLOOP_CARG clooptrace_service_startDispatcher(ITracePlugin* self, ITraceServiceConnection* service, unsigned switches_length, const char* switches, unsigned start_result) throw() + static FB_BOOLEAN CLOOP_CARG cloopinitDispatcher(IReplicatedSession* self, IStatus* status, IAttachment* attachment) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_service_start(service, switches_length, switches, start_result); + return static_cast(self)->Name::init(&status2, attachment); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); return static_cast(0); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_service_queryDispatcher(ITracePlugin* self, ITraceServiceConnection* service, unsigned send_item_length, const unsigned char* send_items, unsigned recv_item_length, const unsigned char* recv_items, unsigned query_result) throw() + static IReplicatedTransaction* CLOOP_CARG cloopstartTransactionDispatcher(IReplicatedSession* self, IStatus* status, ITransaction* transaction, ISC_INT64 number) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_service_query(service, send_item_length, send_items, recv_item_length, recv_items, query_result); + return static_cast(self)->Name::startTransaction(&status2, transaction, number); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); + return static_cast(0); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_service_detachDispatcher(ITracePlugin* self, ITraceServiceConnection* service, unsigned detach_result) throw() + static void CLOOP_CARG cloopcleanupTransactionDispatcher(IReplicatedSession* self, IStatus* status, ISC_INT64 number) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_service_detach(service, detach_result); + static_cast(self)->Name::cleanupTransaction(&status2, number); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_event_errorDispatcher(ITracePlugin* self, ITraceConnection* connection, ITraceStatusVector* status, const char* function) throw() + static void CLOOP_CARG cloopsetSequenceDispatcher(IReplicatedSession* self, IStatus* status, const char* name, ISC_INT64 value) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_event_error(connection, status, function); + static_cast(self)->Name::setSequence(&status2, name, value); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_event_sweepDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceSweepInfo* sweep, unsigned sweep_state) throw() + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::trace_event_sweep(connection, sweep, sweep_state); + static_cast(self)->Name::setOwner(r); } catch (...) { StatusType::catchException(0); - return static_cast(0); } } - static FB_BOOLEAN CLOOP_CARG clooptrace_func_executeDispatcher(ITracePlugin* self, ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceFunction* function, FB_BOOLEAN started, unsigned func_result) throw() + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::trace_func_execute(connection, transaction, function, started, func_result); + return static_cast(self)->Name::getOwner(); } catch (...) { StatusType::catchException(0); - return static_cast(0); + return static_cast(0); } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -15427,7 +20864,7 @@ namespace Firebird } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -15437,53 +20874,36 @@ namespace Firebird { StatusType::catchException(0); return static_cast(0); - } - } - }; - - template > > > > - class ITracePluginImpl : public ITracePluginBaseImpl - { - protected: - ITracePluginImpl(DoNotInherit = DoNotInherit()) - { - } - - public: - virtual ~ITracePluginImpl() - { - } - - virtual const char* trace_get_error() = 0; - virtual FB_BOOLEAN trace_attach(ITraceDatabaseConnection* connection, FB_BOOLEAN create_db, unsigned att_result) = 0; - virtual FB_BOOLEAN trace_detach(ITraceDatabaseConnection* connection, FB_BOOLEAN drop_db) = 0; - virtual FB_BOOLEAN trace_transaction_start(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, unsigned tpb_length, const unsigned char* tpb, unsigned tra_result) = 0; - virtual FB_BOOLEAN trace_transaction_end(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, FB_BOOLEAN commit, FB_BOOLEAN retain_context, unsigned tra_result) = 0; - virtual FB_BOOLEAN trace_proc_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceProcedure* procedure, FB_BOOLEAN started, unsigned proc_result) = 0; - virtual FB_BOOLEAN trace_trigger_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceTrigger* trigger, FB_BOOLEAN started, unsigned trig_result) = 0; - virtual FB_BOOLEAN trace_set_context(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceContextVariable* variable) = 0; - virtual FB_BOOLEAN trace_dsql_prepare(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, ISC_INT64 time_millis, unsigned req_result) = 0; - virtual FB_BOOLEAN trace_dsql_free(ITraceDatabaseConnection* connection, ITraceSQLStatement* statement, unsigned option) = 0; - virtual FB_BOOLEAN trace_dsql_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceSQLStatement* statement, FB_BOOLEAN started, unsigned req_result) = 0; - virtual FB_BOOLEAN trace_blr_compile(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, ISC_INT64 time_millis, unsigned req_result) = 0; - virtual FB_BOOLEAN trace_blr_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceBLRStatement* statement, unsigned req_result) = 0; - virtual FB_BOOLEAN trace_dyn_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceDYNRequest* request, ISC_INT64 time_millis, unsigned req_result) = 0; - virtual FB_BOOLEAN trace_service_attach(ITraceServiceConnection* service, unsigned att_result) = 0; - virtual FB_BOOLEAN trace_service_start(ITraceServiceConnection* service, unsigned switches_length, const char* switches, unsigned start_result) = 0; - virtual FB_BOOLEAN trace_service_query(ITraceServiceConnection* service, unsigned send_item_length, const unsigned char* send_items, unsigned recv_item_length, const unsigned char* recv_items, unsigned query_result) = 0; - virtual FB_BOOLEAN trace_service_detach(ITraceServiceConnection* service, unsigned detach_result) = 0; - virtual FB_BOOLEAN trace_event_error(ITraceConnection* connection, ITraceStatusVector* status, const char* function) = 0; - virtual FB_BOOLEAN trace_event_sweep(ITraceDatabaseConnection* connection, ITraceSweepInfo* sweep, unsigned sweep_state) = 0; - virtual FB_BOOLEAN trace_func_execute(ITraceDatabaseConnection* connection, ITraceTransaction* transaction, ITraceFunction* function, FB_BOOLEAN started, unsigned func_result) = 0; + } + } + }; + + template > > > > > > + class IReplicatedSessionImpl : public IReplicatedSessionBaseImpl + { + protected: + IReplicatedSessionImpl(DoNotInherit = DoNotInherit()) + { + } + + public: + virtual ~IReplicatedSessionImpl() + { + } + + virtual FB_BOOLEAN init(StatusType* status, IAttachment* attachment) = 0; + virtual IReplicatedTransaction* startTransaction(StatusType* status, ITransaction* transaction, ISC_INT64 number) = 0; + virtual void cleanupTransaction(StatusType* status, ISC_INT64 number) = 0; + virtual void setSequence(StatusType* status, const char* name, ISC_INT64 value) = 0; }; template - class ITraceFactoryBaseImpl : public Base + class IProfilerPluginBaseImpl : public Base { public: - typedef ITraceFactory Declaration; + typedef IProfilerPlugin Declaration; - ITraceFactoryBaseImpl(DoNotInherit = DoNotInherit()) + IProfilerPluginBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { @@ -15494,43 +20914,59 @@ namespace Firebird this->release = &Name::cloopreleaseDispatcher; this->setOwner = &Name::cloopsetOwnerDispatcher; this->getOwner = &Name::cloopgetOwnerDispatcher; - this->trace_needs = &Name::clooptrace_needsDispatcher; - this->trace_create = &Name::clooptrace_createDispatcher; + this->init = &Name::cloopinitDispatcher; + this->startSession = &Name::cloopstartSessionDispatcher; + this->flush = &Name::cloopflushDispatcher; } } vTable; this->cloopVTable = &vTable; } - static ISC_UINT64 CLOOP_CARG clooptrace_needsDispatcher(ITraceFactory* self) throw() + static void CLOOP_CARG cloopinitDispatcher(IProfilerPlugin* self, IStatus* status, IAttachment* attachment, ISC_UINT64 ticksFrequency) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - return static_cast(self)->Name::trace_needs(); + static_cast(self)->Name::init(&status2, attachment, ticksFrequency); } catch (...) { - StatusType::catchException(0); - return static_cast(0); + StatusType::catchException(&status2); } } - static ITracePlugin* CLOOP_CARG clooptrace_createDispatcher(ITraceFactory* self, IStatus* status, ITraceInitInfo* init_info) throw() + static IProfilerSession* CLOOP_CARG cloopstartSessionDispatcher(IProfilerPlugin* self, IStatus* status, const char* description, const char* options, ISC_TIMESTAMP_TZ timestamp) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::trace_create(&status2, init_info); + return static_cast(self)->Name::startSession(&status2, description, options, timestamp); + } + catch (...) + { + StatusType::catchException(&status2); + return static_cast(0); + } + } + + static void CLOOP_CARG cloopflushDispatcher(IProfilerPlugin* self, IStatus* status) CLOOP_NOEXCEPT + { + StatusType status2(status); + + try + { + static_cast(self)->Name::flush(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) throw() + static void CLOOP_CARG cloopsetOwnerDispatcher(IPluginBase* self, IReferenceCounted* r) CLOOP_NOEXCEPT { try { @@ -15542,7 +20978,7 @@ namespace Firebird } } - static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) throw() + static IReferenceCounted* CLOOP_CARG cloopgetOwnerDispatcher(IPluginBase* self) CLOOP_NOEXCEPT { try { @@ -15555,7 +20991,7 @@ namespace Firebird } } - static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) throw() + static void CLOOP_CARG cloopaddRefDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -15567,7 +21003,7 @@ namespace Firebird } } - static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) throw() + static int CLOOP_CARG cloopreleaseDispatcher(IReferenceCounted* self) CLOOP_NOEXCEPT { try { @@ -15581,30 +21017,31 @@ namespace Firebird } }; - template > > > > > > - class ITraceFactoryImpl : public ITraceFactoryBaseImpl + template > > > > > > + class IProfilerPluginImpl : public IProfilerPluginBaseImpl { protected: - ITraceFactoryImpl(DoNotInherit = DoNotInherit()) + IProfilerPluginImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~ITraceFactoryImpl() + virtual ~IProfilerPluginImpl() { } - virtual ISC_UINT64 trace_needs() = 0; - virtual ITracePlugin* trace_create(StatusType* status, ITraceInitInfo* init_info) = 0; + virtual void init(StatusType* status, IAttachment* attachment, ISC_UINT64 ticksFrequency) = 0; + virtual IProfilerSession* startSession(StatusType* status, const char* description, const char* options, ISC_TIMESTAMP_TZ timestamp) = 0; + virtual void flush(StatusType* status) = 0; }; template - class IUdrFunctionFactoryBaseImpl : public Base + class IProfilerSessionBaseImpl : public Base { public: - typedef IUdrFunctionFactory Declaration; + typedef IProfilerSession Declaration; - IUdrFunctionFactoryBaseImpl(DoNotInherit = DoNotInherit()) + IProfilerSessionBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { @@ -15612,102 +21049,126 @@ namespace Firebird { this->version = Base::VERSION; this->dispose = &Name::cloopdisposeDispatcher; - this->setup = &Name::cloopsetupDispatcher; - this->newItem = &Name::cloopnewItemDispatcher; + this->getId = &Name::cloopgetIdDispatcher; + this->getFlags = &Name::cloopgetFlagsDispatcher; + this->cancel = &Name::cloopcancelDispatcher; + this->finish = &Name::cloopfinishDispatcher; + this->defineStatement = &Name::cloopdefineStatementDispatcher; + this->defineCursor = &Name::cloopdefineCursorDispatcher; + this->defineRecordSource = &Name::cloopdefineRecordSourceDispatcher; + this->onRequestStart = &Name::clooponRequestStartDispatcher; + this->onRequestFinish = &Name::clooponRequestFinishDispatcher; + this->beforePsqlLineColumn = &Name::cloopbeforePsqlLineColumnDispatcher; + this->afterPsqlLineColumn = &Name::cloopafterPsqlLineColumnDispatcher; + this->beforeRecordSourceOpen = &Name::cloopbeforeRecordSourceOpenDispatcher; + this->afterRecordSourceOpen = &Name::cloopafterRecordSourceOpenDispatcher; + this->beforeRecordSourceGetRecord = &Name::cloopbeforeRecordSourceGetRecordDispatcher; + this->afterRecordSourceGetRecord = &Name::cloopafterRecordSourceGetRecordDispatcher; } } vTable; this->cloopVTable = &vTable; } - static void CLOOP_CARG cloopsetupDispatcher(IUdrFunctionFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw() + static ISC_INT64 CLOOP_CARG cloopgetIdDispatcher(IProfilerSession* self) CLOOP_NOEXCEPT { - StatusType status2(status); + try + { + return static_cast(self)->Name::getId(); + } + catch (...) + { + StatusType::catchException(0); + return static_cast(0); + } + } + static unsigned CLOOP_CARG cloopgetFlagsDispatcher(IProfilerSession* self) CLOOP_NOEXCEPT + { try { - static_cast(self)->Name::setup(&status2, context, metadata, inBuilder, outBuilder); + return static_cast(self)->Name::getFlags(); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); + return static_cast(0); } } - static IExternalFunction* CLOOP_CARG cloopnewItemDispatcher(IUdrFunctionFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) throw() + static void CLOOP_CARG cloopcancelDispatcher(IProfilerSession* self, IStatus* status) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::newItem(&status2, context, metadata); + static_cast(self)->Name::cancel(&status2); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + static void CLOOP_CARG cloopfinishDispatcher(IProfilerSession* self, IStatus* status, ISC_TIMESTAMP_TZ timestamp) CLOOP_NOEXCEPT { + StatusType status2(status); + try { - static_cast(self)->Name::dispose(); + static_cast(self)->Name::finish(&status2, timestamp); } catch (...) { - StatusType::catchException(0); + StatusType::catchException(&status2); } } - }; - template > > > > - class IUdrFunctionFactoryImpl : public IUdrFunctionFactoryBaseImpl - { - protected: - IUdrFunctionFactoryImpl(DoNotInherit = DoNotInherit()) + static void CLOOP_CARG cloopdefineStatementDispatcher(IProfilerSession* self, IStatus* status, ISC_INT64 statementId, ISC_INT64 parentStatementId, const char* type, const char* packageName, const char* routineName, const char* sqlText) CLOOP_NOEXCEPT { + StatusType status2(status); + + try + { + static_cast(self)->Name::defineStatement(&status2, statementId, parentStatementId, type, packageName, routineName, sqlText); + } + catch (...) + { + StatusType::catchException(&status2); + } } - public: - virtual ~IUdrFunctionFactoryImpl() + static void CLOOP_CARG cloopdefineCursorDispatcher(IProfilerSession* self, ISC_INT64 statementId, unsigned cursorId, const char* name, unsigned line, unsigned column) CLOOP_NOEXCEPT { + try + { + static_cast(self)->Name::defineCursor(statementId, cursorId, name, line, column); + } + catch (...) + { + StatusType::catchException(0); + } } - virtual void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; - virtual IExternalFunction* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) = 0; - }; - - template - class IUdrProcedureFactoryBaseImpl : public Base - { - public: - typedef IUdrProcedureFactory Declaration; - - IUdrProcedureFactoryBaseImpl(DoNotInherit = DoNotInherit()) + static void CLOOP_CARG cloopdefineRecordSourceDispatcher(IProfilerSession* self, ISC_INT64 statementId, unsigned cursorId, unsigned recSourceId, unsigned level, const char* accessPath, unsigned parentRecSourceId) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable + try { - VTableImpl() - { - this->version = Base::VERSION; - this->dispose = &Name::cloopdisposeDispatcher; - this->setup = &Name::cloopsetupDispatcher; - this->newItem = &Name::cloopnewItemDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; + static_cast(self)->Name::defineRecordSource(statementId, cursorId, recSourceId, level, accessPath, parentRecSourceId); + } + catch (...) + { + StatusType::catchException(0); + } } - static void CLOOP_CARG cloopsetupDispatcher(IUdrProcedureFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) throw() + static void CLOOP_CARG clooponRequestStartDispatcher(IProfilerSession* self, IStatus* status, ISC_INT64 statementId, ISC_INT64 requestId, ISC_INT64 callerStatementId, ISC_INT64 callerRequestId, ISC_TIMESTAMP_TZ timestamp) CLOOP_NOEXCEPT { StatusType status2(status); try { - static_cast(self)->Name::setup(&status2, context, metadata, inBuilder, outBuilder); + static_cast(self)->Name::onRequestStart(&status2, statementId, requestId, callerStatementId, callerRequestId, timestamp); } catch (...) { @@ -15715,103 +21176,93 @@ namespace Firebird } } - static IExternalProcedure* CLOOP_CARG cloopnewItemDispatcher(IUdrProcedureFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) throw() + static void CLOOP_CARG clooponRequestFinishDispatcher(IProfilerSession* self, IStatus* status, ISC_INT64 statementId, ISC_INT64 requestId, ISC_TIMESTAMP_TZ timestamp, IProfilerStats* stats) CLOOP_NOEXCEPT { StatusType status2(status); try { - return static_cast(self)->Name::newItem(&status2, context, metadata); + static_cast(self)->Name::onRequestFinish(&status2, statementId, requestId, timestamp, stats); } catch (...) { StatusType::catchException(&status2); - return static_cast(0); } } - static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + static void CLOOP_CARG cloopbeforePsqlLineColumnDispatcher(IProfilerSession* self, ISC_INT64 statementId, ISC_INT64 requestId, unsigned line, unsigned column) CLOOP_NOEXCEPT { try { - static_cast(self)->Name::dispose(); + static_cast(self)->Name::beforePsqlLineColumn(statementId, requestId, line, column); } catch (...) { StatusType::catchException(0); } } - }; - template > > > > - class IUdrProcedureFactoryImpl : public IUdrProcedureFactoryBaseImpl - { - protected: - IUdrProcedureFactoryImpl(DoNotInherit = DoNotInherit()) + static void CLOOP_CARG cloopafterPsqlLineColumnDispatcher(IProfilerSession* self, ISC_INT64 statementId, ISC_INT64 requestId, unsigned line, unsigned column, IProfilerStats* stats) CLOOP_NOEXCEPT { + try + { + static_cast(self)->Name::afterPsqlLineColumn(statementId, requestId, line, column, stats); + } + catch (...) + { + StatusType::catchException(0); + } } - public: - virtual ~IUdrProcedureFactoryImpl() + static void CLOOP_CARG cloopbeforeRecordSourceOpenDispatcher(IProfilerSession* self, ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId) CLOOP_NOEXCEPT { + try + { + static_cast(self)->Name::beforeRecordSourceOpen(statementId, requestId, cursorId, recSourceId); + } + catch (...) + { + StatusType::catchException(0); + } } - virtual void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* inBuilder, IMetadataBuilder* outBuilder) = 0; - virtual IExternalProcedure* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) = 0; - }; - - template - class IUdrTriggerFactoryBaseImpl : public Base - { - public: - typedef IUdrTriggerFactory Declaration; - - IUdrTriggerFactoryBaseImpl(DoNotInherit = DoNotInherit()) + static void CLOOP_CARG cloopafterRecordSourceOpenDispatcher(IProfilerSession* self, ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId, IProfilerStats* stats) CLOOP_NOEXCEPT { - static struct VTableImpl : Base::VTable + try { - VTableImpl() - { - this->version = Base::VERSION; - this->dispose = &Name::cloopdisposeDispatcher; - this->setup = &Name::cloopsetupDispatcher; - this->newItem = &Name::cloopnewItemDispatcher; - } - } vTable; - - this->cloopVTable = &vTable; + static_cast(self)->Name::afterRecordSourceOpen(statementId, requestId, cursorId, recSourceId, stats); + } + catch (...) + { + StatusType::catchException(0); + } } - static void CLOOP_CARG cloopsetupDispatcher(IUdrTriggerFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) throw() + static void CLOOP_CARG cloopbeforeRecordSourceGetRecordDispatcher(IProfilerSession* self, ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - static_cast(self)->Name::setup(&status2, context, metadata, fieldsBuilder); + static_cast(self)->Name::beforeRecordSourceGetRecord(statementId, requestId, cursorId, recSourceId); } catch (...) { - StatusType::catchException(&status2); + StatusType::catchException(0); } } - static IExternalTrigger* CLOOP_CARG cloopnewItemDispatcher(IUdrTriggerFactory* self, IStatus* status, IExternalContext* context, IRoutineMetadata* metadata) throw() + static void CLOOP_CARG cloopafterRecordSourceGetRecordDispatcher(IProfilerSession* self, ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId, IProfilerStats* stats) CLOOP_NOEXCEPT { - StatusType status2(status); - try { - return static_cast(self)->Name::newItem(&status2, context, metadata); + static_cast(self)->Name::afterRecordSourceGetRecord(statementId, requestId, cursorId, recSourceId, stats); } catch (...) { - StatusType::catchException(&status2); - return static_cast(0); + StatusType::catchException(0); } } - static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) throw() + static void CLOOP_CARG cloopdisposeDispatcher(IDisposable* self) CLOOP_NOEXCEPT { try { @@ -15824,119 +21275,84 @@ namespace Firebird } }; - template > > > > - class IUdrTriggerFactoryImpl : public IUdrTriggerFactoryBaseImpl + template > > > > + class IProfilerSessionImpl : public IProfilerSessionBaseImpl { protected: - IUdrTriggerFactoryImpl(DoNotInherit = DoNotInherit()) + IProfilerSessionImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IUdrTriggerFactoryImpl() + virtual ~IProfilerSessionImpl() { } - virtual void setup(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata, IMetadataBuilder* fieldsBuilder) = 0; - virtual IExternalTrigger* newItem(StatusType* status, IExternalContext* context, IRoutineMetadata* metadata) = 0; + virtual ISC_INT64 getId() = 0; + virtual unsigned getFlags() = 0; + virtual void cancel(StatusType* status) = 0; + virtual void finish(StatusType* status, ISC_TIMESTAMP_TZ timestamp) = 0; + virtual void defineStatement(StatusType* status, ISC_INT64 statementId, ISC_INT64 parentStatementId, const char* type, const char* packageName, const char* routineName, const char* sqlText) = 0; + virtual void defineCursor(ISC_INT64 statementId, unsigned cursorId, const char* name, unsigned line, unsigned column) = 0; + virtual void defineRecordSource(ISC_INT64 statementId, unsigned cursorId, unsigned recSourceId, unsigned level, const char* accessPath, unsigned parentRecSourceId) = 0; + virtual void onRequestStart(StatusType* status, ISC_INT64 statementId, ISC_INT64 requestId, ISC_INT64 callerStatementId, ISC_INT64 callerRequestId, ISC_TIMESTAMP_TZ timestamp) = 0; + virtual void onRequestFinish(StatusType* status, ISC_INT64 statementId, ISC_INT64 requestId, ISC_TIMESTAMP_TZ timestamp, IProfilerStats* stats) = 0; + virtual void beforePsqlLineColumn(ISC_INT64 statementId, ISC_INT64 requestId, unsigned line, unsigned column) = 0; + virtual void afterPsqlLineColumn(ISC_INT64 statementId, ISC_INT64 requestId, unsigned line, unsigned column, IProfilerStats* stats) = 0; + virtual void beforeRecordSourceOpen(ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId) = 0; + virtual void afterRecordSourceOpen(ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId, IProfilerStats* stats) = 0; + virtual void beforeRecordSourceGetRecord(ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId) = 0; + virtual void afterRecordSourceGetRecord(ISC_INT64 statementId, ISC_INT64 requestId, unsigned cursorId, unsigned recSourceId, IProfilerStats* stats) = 0; }; template - class IUdrPluginBaseImpl : public Base + class IProfilerStatsBaseImpl : public Base { public: - typedef IUdrPlugin Declaration; + typedef IProfilerStats Declaration; - IUdrPluginBaseImpl(DoNotInherit = DoNotInherit()) + IProfilerStatsBaseImpl(DoNotInherit = DoNotInherit()) { static struct VTableImpl : Base::VTable { VTableImpl() { this->version = Base::VERSION; - this->getMaster = &Name::cloopgetMasterDispatcher; - this->registerFunction = &Name::cloopregisterFunctionDispatcher; - this->registerProcedure = &Name::cloopregisterProcedureDispatcher; - this->registerTrigger = &Name::cloopregisterTriggerDispatcher; + this->getElapsedTicks = &Name::cloopgetElapsedTicksDispatcher; } } vTable; this->cloopVTable = &vTable; } - static IMaster* CLOOP_CARG cloopgetMasterDispatcher(IUdrPlugin* self) throw() + static ISC_UINT64 CLOOP_CARG cloopgetElapsedTicksDispatcher(IProfilerStats* self) CLOOP_NOEXCEPT { try { - return static_cast(self)->Name::getMaster(); + return static_cast(self)->Name::getElapsedTicks(); } catch (...) { StatusType::catchException(0); - return static_cast(0); - } - } - - static void CLOOP_CARG cloopregisterFunctionDispatcher(IUdrPlugin* self, IStatus* status, const char* name, IUdrFunctionFactory* factory) throw() - { - StatusType status2(status); - - try - { - static_cast(self)->Name::registerFunction(&status2, name, factory); - } - catch (...) - { - StatusType::catchException(&status2); - } - } - - static void CLOOP_CARG cloopregisterProcedureDispatcher(IUdrPlugin* self, IStatus* status, const char* name, IUdrProcedureFactory* factory) throw() - { - StatusType status2(status); - - try - { - static_cast(self)->Name::registerProcedure(&status2, name, factory); - } - catch (...) - { - StatusType::catchException(&status2); - } - } - - static void CLOOP_CARG cloopregisterTriggerDispatcher(IUdrPlugin* self, IStatus* status, const char* name, IUdrTriggerFactory* factory) throw() - { - StatusType status2(status); - - try - { - static_cast(self)->Name::registerTrigger(&status2, name, factory); - } - catch (...) - { - StatusType::catchException(&status2); + return static_cast(0); } } }; - template > > - class IUdrPluginImpl : public IUdrPluginBaseImpl + template > > + class IProfilerStatsImpl : public IProfilerStatsBaseImpl { protected: - IUdrPluginImpl(DoNotInherit = DoNotInherit()) + IProfilerStatsImpl(DoNotInherit = DoNotInherit()) { } public: - virtual ~IUdrPluginImpl() + virtual ~IProfilerStatsImpl() { } - virtual IMaster* getMaster() = 0; - virtual void registerFunction(StatusType* status, const char* name, IUdrFunctionFactory* factory) = 0; - virtual void registerProcedure(StatusType* status, const char* name, IUdrProcedureFactory* factory) = 0; - virtual void registerTrigger(StatusType* status, const char* name, IUdrTriggerFactory* factory) = 0; + virtual ISC_UINT64 getElapsedTicks() = 0; }; }; diff --git a/packages/node-firebird-native-api/src/native/include/firebird/Interface.h b/packages/node-firebird-native-api/src/native/include/firebird/Interface.h index 57f0a90..5af60dc 100644 --- a/packages/node-firebird-native-api/src/native/include/firebird/Interface.h +++ b/packages/node-firebird-native-api/src/native/include/firebird/Interface.h @@ -37,7 +37,78 @@ #endif struct dsc; -struct PerformanceInfo; + +namespace Firebird +{ + +// Performance counters for individual table +typedef int ntrace_relation_t; +struct TraceCounts +{ + // Per-table performance counters, must correspond to RuntimeStatistics::StatType + // between RECORD_FIRST_ITEM and RECORD_LAST_ITEM + enum RecordCounters + { + SEQ_READS = 0, + IDX_READS, + UPDATES, + INSERTS, + DELETES, + BACKOUTS, + PURGES, + EXPUNGES, + LOCKS, + WAITS, + CONFLICTS, + BACKVERSION_READS, + FRAGMENT_READS, + RPT_READS, + IMGC + }; + + ntrace_relation_t trc_relation_id; // Relation ID + const char* trc_relation_name; // Relation name + const ISC_INT64* trc_counters; // Pointer to allow easy addition of new counters +}; + +// Performance statistics for operation +struct PerformanceInfo +{ + // IO performance counters, must correspond to RuntimeStatistics::StatType + // between PAGE_FETCHES and (not including) RECORD_FIRST_ITEM + enum PageCounters + { + FETCHES = 0, + READS, + MARKS, + WRITES + }; + + ISC_INT64 pin_time; // Total operation time in milliseconds + ISC_INT64* pin_counters; // Pointer to allow easy addition of new counters + + size_t pin_count; // Number of relations involved in analysis + struct TraceCounts* pin_tables; // Pointer to array with table stats + + ISC_INT64 pin_records_fetched; // records fetched from statement/procedure +}; + +inline const intptr_t* stubError() +{ + static const intptr_t codes[] = { + isc_arg_gds, isc_random, + isc_arg_string, (intptr_t) "Unrecognized exception in Status interface", + isc_arg_end + }; + + return codes; +} + +} // namespace Firebird + +#ifndef FB_UsedInYValve +#define FB_UsedInYValve false +#endif #include "IdlFbInterfaces.h" @@ -154,6 +225,11 @@ namespace Firebird return !hasData(); } + bool isSuccess() const + { + return isEmpty(); + } + static void setVersionError(IStatus* status, const char* interfaceName, unsigned currentVersion, unsigned expectedVersion) { @@ -248,7 +324,7 @@ namespace Firebird } public: - static void checkException(CheckStatusWrapper* status) + static void checkException(CheckStatusWrapper* /* status */) { } }; diff --git a/packages/node-firebird-native-api/src/native/include/firebird/Message.h b/packages/node-firebird-native-api/src/native/include/firebird/Message.h index 7d529d7..30e980d 100644 --- a/packages/node-firebird-native-api/src/native/include/firebird/Message.h +++ b/packages/node-firebird-native-api/src/native/include/firebird/Message.h @@ -29,6 +29,12 @@ #include #include +#if defined(__linux__) && defined(__i386__) +#define FB__INT64_ALIGNAS alignas(8) +#else +#define FB__INT64_ALIGNAS +#endif + #define FB_MESSAGE(name, statusType, fields) \ FB__MESSAGE_I(name, statusType, 2, FB_BOOST_PP_CAT(FB__MESSAGE_X fields, 0), ) @@ -125,6 +131,11 @@ builder->setLength(status, index, sizeof(ISC_INT64)); \ builder->setScale(status, index, scale); +#define FB__META_FB_SCALED_INT128(scale) \ + builder->setType(status, index, SQL_INT128); \ + builder->setLength(status, index, sizeof(FB_I128)); \ + builder->setScale(status, index, scale); + #define FB__META_FB_FLOAT \ builder->setType(status, index, SQL_FLOAT); \ builder->setLength(status, index, sizeof(float)); @@ -133,25 +144,49 @@ builder->setType(status, index, SQL_DOUBLE); \ builder->setLength(status, index, sizeof(double)); +#define FB__META_FB_DECFLOAT16 \ + builder->setType(status, index, SQL_DEC16); \ + builder->setLength(status, index, sizeof(FB_DEC16)); + +#define FB__META_FB_DECFLOAT34 \ + builder->setType(status, index, SQL_DEC34); \ + builder->setLength(status, index, sizeof(FB_DEC34)); + #define FB__META_FB_BLOB \ builder->setType(status, index, SQL_BLOB); \ builder->setLength(status, index, sizeof(ISC_QUAD)); #define FB__META_FB_BOOLEAN \ builder->setType(status, index, SQL_BOOLEAN); \ - builder->setLength(status, index, sizeof(ISC_BOOLEAN)); + builder->setLength(status, index, sizeof(FB_BOOLEAN)); #define FB__META_FB_DATE \ builder->setType(status, index, SQL_DATE); \ - builder->setLength(status, index, sizeof(FbDate)); + builder->setLength(status, index, sizeof(::Firebird::FbDate)); #define FB__META_FB_TIME \ builder->setType(status, index, SQL_TIME); \ - builder->setLength(status, index, sizeof(FbTime)); + builder->setLength(status, index, sizeof(::Firebird::FbTime)); + +#define FB__META_FB_TIME_TZ \ + builder->setType(status, index, SQL_TIME_TZ); \ + builder->setLength(status, index, sizeof(::Firebird::FbTimeTz)); + +#define FB__META_FB_TIME_TZ_EX \ + builder->setType(status, index, SQL_TIME_TZ_EX); \ + builder->setLength(status, index, sizeof(::Firebird::FbTimeTzEx)); #define FB__META_FB_TIMESTAMP \ builder->setType(status, index, SQL_TIMESTAMP); \ - builder->setLength(status, index, sizeof(FbTimestamp)); + builder->setLength(status, index, sizeof(::Firebird::FbTimestamp)); + +#define FB__META_FB_TIMESTAMP_TZ \ + builder->setType(status, index, SQL_TIMESTAMP_TZ); \ + builder->setLength(status, index, sizeof(::Firebird::FbTimestampTz)); + +#define FB__META_FB_TIMESTAMP_TZ_EX \ + builder->setType(status, index, SQL_TIMESTAMP_TZ_EX); \ + builder->setLength(status, index, sizeof(::Firebird::FbTimestampTzEx)); #define FB__META_FB_CHAR(len) \ builder->setType(status, index, SQL_TEXT); \ @@ -174,22 +209,31 @@ #define FB__META_FB_SMALLINT FB__META_FB_SCALED_SMALLINT(0) #define FB__META_FB_INTEGER FB__META_FB_SCALED_INTEGER(0) #define FB__META_FB_BIGINT FB__META_FB_SCALED_BIGINT(0) +#define FB__META_FB_INT128 FB__META_FB_SCALED_INT128(0) // Types - struct #define FB__TYPE_FB_SCALED_SMALLINT(x) ISC_SHORT #define FB__TYPE_FB_SCALED_INTEGER(x) ISC_LONG -#define FB__TYPE_FB_SCALED_BIGINT(x) ISC_INT64 +#define FB__TYPE_FB_SCALED_BIGINT(x) FB__INT64_ALIGNAS ISC_INT64 +#define FB__TYPE_FB_SCALED_INT128(x) FB__INT64_ALIGNAS FB_I128 #define FB__TYPE_FB_SMALLINT ISC_SHORT #define FB__TYPE_FB_INTEGER ISC_LONG -#define FB__TYPE_FB_BIGINT ISC_INT64 +#define FB__TYPE_FB_BIGINT FB__INT64_ALIGNAS ISC_INT64 +#define FB__TYPE_FB_INT128 FB__INT64_ALIGNAS FB_I128 #define FB__TYPE_FB_FLOAT float #define FB__TYPE_FB_DOUBLE double +#define FB__TYPE_FB_DECFLOAT16 FB__INT64_ALIGNAS FB_DEC16 +#define FB__TYPE_FB_DECFLOAT34 FB__INT64_ALIGNAS FB_DEC34 #define FB__TYPE_FB_BLOB ISC_QUAD #define FB__TYPE_FB_BOOLEAN ISC_UCHAR #define FB__TYPE_FB_DATE ::Firebird::FbDate #define FB__TYPE_FB_TIME ::Firebird::FbTime +#define FB__TYPE_FB_TIME_TZ ::Firebird::FbTimeTz +#define FB__TYPE_FB_TIME_TZ_EX ::Firebird::FbTimeTzEx #define FB__TYPE_FB_TIMESTAMP ::Firebird::FbTimestamp +#define FB__TYPE_FB_TIMESTAMP_TZ ::Firebird::FbTimestampTz +#define FB__TYPE_FB_TIMESTAMP_TZ_EX ::Firebird::FbTimestampTzEx #define FB__TYPE_FB_CHAR(len) ::Firebird::FbChar<(len)> #define FB__TYPE_FB_VARCHAR(len) ::Firebird::FbVarChar<(len)> #define FB__TYPE_FB_INTL_CHAR(len, charSet) ::Firebird::FbChar<(len)> @@ -229,8 +273,16 @@ struct FbVarChar void set(const char* s) { - length = strlen(s); - assert(length <= N); + size_t len = strlen(s); + assert(len <= N); + length = (ISC_USHORT) (len <= N ? len : N); + memcpy(str, s, length); + } + + void set(const char* s, unsigned len) + { + assert(len <= N); + length = (ISC_USHORT) (len <= N ? len : N); memcpy(str, s, length); } }; @@ -270,6 +322,23 @@ class FbDate value = util->encodeDate(year, month, day); } +public: + FbDate& operator=(const ISC_DATE& val) + { + *(this) = *(const FbDate*) &val; + return *this; + } + + operator ISC_DATE&() + { + return *(ISC_DATE*) this; + } + + operator const ISC_DATE&() const + { + return *(ISC_DATE*) this; + } + public: ISC_DATE value; }; @@ -317,18 +386,154 @@ class FbTime value = util->encodeTime(hours, minutes, seconds, fractions); } +public: + FbTime& operator=(const ISC_TIME& val) + { + *(this) = *(const FbTime*) &val; + return *this; + } + + operator ISC_TIME&() + { + return *(ISC_TIME*) this; + } + + operator const ISC_TIME&() const + { + return *(ISC_TIME*) this; + } + public: ISC_TIME value; }; +// This class has memory layout identical to ISC_TIME_TZ. +class FbTimeTz +{ +public: + FbTimeTz& operator=(const ISC_TIME_TZ& val) + { + *(this) = *(const FbTimeTz*) &val; + return *this; + } + + operator ISC_TIME_TZ&() + { + return *(ISC_TIME_TZ*) this; + } + + operator const ISC_TIME_TZ&() const + { + return *(ISC_TIME_TZ*) this; + } + +public: + FbTime utcTime; + ISC_USHORT timeZone; +}; + +// This class has memory layout identical to ISC_TIME_TZ_EX. +class FbTimeTzEx +{ +public: + FbTimeTzEx& operator=(const ISC_TIME_TZ_EX& val) + { + *(this) = *(const FbTimeTzEx*) &val; + return *this; + } + + operator ISC_TIME_TZ_EX&() + { + return *(ISC_TIME_TZ_EX*) this; + } + + operator const ISC_TIME_TZ_EX&() const + { + return *(ISC_TIME_TZ_EX*) this; + } + +public: + FbTime utcTime; + ISC_USHORT timeZone; + ISC_SHORT extOffset; +}; + // This class has memory layout identical to ISC_TIMESTAMP. class FbTimestamp { +public: + FbTimestamp& operator=(const ISC_TIMESTAMP& val) + { + *(this) = *(const FbTimestamp*) &val; + return *this; + } + + operator ISC_TIMESTAMP&() + { + return *(ISC_TIMESTAMP*) this; + } + + operator const ISC_TIMESTAMP&() const + { + return *(ISC_TIMESTAMP*) this; + } + public: FbDate date; FbTime time; }; +// This class has memory layout identical to ISC_TIMESTAMP_TZ. +class FbTimestampTz +{ +public: + FbTimestampTz& operator=(const ISC_TIMESTAMP_TZ& val) + { + *(this) = *(const FbTimestampTz*) &val; + return *this; + } + + operator ISC_TIMESTAMP_TZ&() + { + return *(ISC_TIMESTAMP_TZ*) this; + } + + operator const ISC_TIMESTAMP_TZ&() const + { + return *(ISC_TIMESTAMP_TZ*) this; + } + +public: + FbTimestamp utcTimestamp; + ISC_USHORT timeZone; +}; + +// This class has memory layout identical to ISC_TIMESTAMP_TZ_EX. +class FbTimestampTzEx +{ +public: + FbTimestampTzEx& operator=(const ISC_TIMESTAMP_TZ_EX& val) + { + *(this) = *(const FbTimestampTzEx*) &val; + return *this; + } + + operator ISC_TIMESTAMP_TZ_EX&() + { + return *(ISC_TIMESTAMP_TZ_EX*) this; + } + + operator const ISC_TIMESTAMP_TZ_EX&() const + { + return *(ISC_TIMESTAMP_TZ_EX*) this; + } + +public: + FbTimestamp utcTimestamp; + ISC_USHORT timeZone; + ISC_SHORT extOffset; +}; + class MessageDesc { public: diff --git a/packages/node-firebird-native-api/src/native/include/firebird/UdrCppEngine.h b/packages/node-firebird-native-api/src/native/include/firebird/UdrCppEngine.h index ce949bd..d9aac7e 100644 --- a/packages/node-firebird-native-api/src/native/include/firebird/UdrCppEngine.h +++ b/packages/node-firebird-native-api/src/native/include/firebird/UdrCppEngine.h @@ -43,7 +43,7 @@ } \ } \ \ - extern "C" FB_BOOLEAN* FB_UDR_PLUGIN_ENTRY_POINT(::Firebird::IStatus* status, \ + extern "C" FB_DLL_EXPORT FB_BOOLEAN* FB_UDR_PLUGIN_ENTRY_POINT(::Firebird::IStatus* status, \ FB_BOOLEAN* theirUnloadFlag, ::Firebird::IUdrPlugin* udrPlugin) \ { \ ::Firebird::Udr::FactoryRegistration::finish(status, udrPlugin); \ @@ -330,13 +330,13 @@ class FactoryRegistration { CheckStatusWrapper statusWrapper(status); - if (!run(&statusWrapper, plugin, &IUdrPlugin::registerFunction, regFunctions)) + if (!run(&statusWrapper, plugin, &IUdrPlugin::registerFunction, regFunctions)) return; - if (!run(&statusWrapper, plugin, &IUdrPlugin::registerProcedure, regProcedures)) + if (!run(&statusWrapper, plugin, &IUdrPlugin::registerProcedure, regProcedures)) return; - if (!run(&statusWrapper, plugin, &IUdrPlugin::registerTrigger, regTriggers)) + if (!run(&statusWrapper, plugin, &IUdrPlugin::registerTrigger, regTriggers)) return; } diff --git a/packages/node-firebird-native-api/src/native/include/firebird/ibase.h b/packages/node-firebird-native-api/src/native/include/firebird/ibase.h index df84d73..2be0f24 100644 --- a/packages/node-firebird-native-api/src/native/include/firebird/ibase.h +++ b/packages/node-firebird-native-api/src/native/include/firebird/ibase.h @@ -41,10 +41,10 @@ * */ -#ifndef JRD_IBASE_H -#define JRD_IBASE_H +#ifndef FIREBIRD_IBASE_H +#define FIREBIRD_IBASE_H -#define FB_API_VER 30 +#define FB_API_VER 50 #define isc_version4 #define ISC_TRUE 1 @@ -64,124 +64,24 @@ #define FB_API_DEPRECATED #endif - -#ifndef INCLUDE_TYPES_PUB_H -#define INCLUDE_TYPES_PUB_H - -#include - -#if defined(__GNUC__) || defined (__HP_cc) || defined (__HP_aCC) -#include -#else - -#if !defined(_INTPTR_T_DEFINED) -#if defined(_WIN64) -typedef __int64 intptr_t; -typedef unsigned __int64 uintptr_t; -#else -typedef long intptr_t; -typedef unsigned long uintptr_t; -#endif -#endif - -#endif - -#if defined(_LP64) || defined(__LP64__) || defined(__arch64__) || defined(_WIN64) -typedef unsigned int FB_API_HANDLE; -#else -typedef void* FB_API_HANDLE; -#endif - -#ifdef FB_USE_SIZE_T - -typedef size_t FB_SIZE_T; -typedef intptr_t FB_SSIZE_T; -#else - -typedef unsigned int FB_SIZE_T; -typedef int FB_SSIZE_T; -#endif - -typedef intptr_t ISC_STATUS; - -#define ISC_STATUS_LENGTH 20 -typedef ISC_STATUS ISC_STATUS_ARRAY[ISC_STATUS_LENGTH]; - -#define FB_SQLSTATE_LENGTH 5 -#define FB_SQLSTATE_SIZE (FB_SQLSTATE_LENGTH + 1) -typedef char FB_SQLSTATE_STRING[FB_SQLSTATE_SIZE]; - #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) - #define ISC_EXPORT __stdcall - #define ISC_EXPORT_VARARG __cdecl -#else - #define ISC_EXPORT - #define ISC_EXPORT_VARARG -#endif - -#if defined(_LP64) || defined(__LP64__) || defined(__arch64__) -typedef int ISC_LONG; -typedef unsigned int ISC_ULONG; +#define FB_DLL_EXPORT __declspec(dllexport) +#elif defined __has_attribute +#if __has_attribute (visibility) +#define FB_DLL_EXPORT __attribute__ ((visibility("default"))) #else -typedef signed long ISC_LONG; -typedef unsigned long ISC_ULONG; +#define FB_DLL_EXPORT #endif - -typedef signed short ISC_SHORT; -typedef unsigned short ISC_USHORT; - -typedef unsigned char ISC_UCHAR; -typedef char ISC_SCHAR; - -typedef ISC_UCHAR FB_BOOLEAN; -#define FB_FALSE '\0' -#define FB_TRUE '\1' - -#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) && !defined(__GNUC__) -typedef __int64 ISC_INT64; -typedef unsigned __int64 ISC_UINT64; #else -typedef long long int ISC_INT64; -typedef unsigned long long int ISC_UINT64; +#define FB_DLL_EXPORT #endif -#ifndef ISC_TIMESTAMP_DEFINED -typedef int ISC_DATE; -typedef unsigned int ISC_TIME; -typedef struct -{ - ISC_DATE timestamp_date; - ISC_TIME timestamp_time; -} ISC_TIMESTAMP; -#define ISC_TIMESTAMP_DEFINED -#endif - -struct GDS_QUAD_t { - ISC_LONG gds_quad_high; - ISC_ULONG gds_quad_low; -}; +#include "impl/types_pub.h" -typedef struct GDS_QUAD_t GDS_QUAD; -typedef struct GDS_QUAD_t ISC_QUAD; - -#define isc_quad_high gds_quad_high -#define isc_quad_low gds_quad_low - -typedef int (*FB_SHUTDOWN_CALLBACK)(const int reason, const int mask, void* arg); - -#endif - -/********************************/ -/* Firebird Handle Definitions */ -/********************************/ +/***********************/ +/* Firebird misc types */ +/***********************/ -typedef FB_API_HANDLE isc_att_handle; -typedef FB_API_HANDLE isc_blob_handle; -typedef FB_API_HANDLE isc_db_handle; -typedef FB_API_HANDLE isc_req_handle; -typedef FB_API_HANDLE isc_stmt_handle; -typedef FB_API_HANDLE isc_svc_handle; -typedef FB_API_HANDLE isc_tr_handle; typedef void (* isc_callback) (); typedef ISC_LONG isc_resv_handle; @@ -330,41 +230,7 @@ typedef struct paramvary { } PARAMVARY; #endif /* !defined(JRD_VAL_H) */ - -#ifndef JRD_DSC_PUB_H -#define JRD_DSC_PUB_H - -#define DSC_null 1 -#define DSC_no_subtype 2 -#define DSC_nullable 4 - -#define dtype_unknown 0 -#define dtype_text 1 -#define dtype_cstring 2 -#define dtype_varying 3 - -#define dtype_packed 6 -#define dtype_byte 7 -#define dtype_short 8 -#define dtype_long 9 -#define dtype_quad 10 -#define dtype_real 11 -#define dtype_double 12 -#define dtype_d_float 13 -#define dtype_sql_date 14 -#define dtype_sql_time 15 -#define dtype_timestamp 16 -#define dtype_blob 17 -#define dtype_array 18 -#define dtype_int64 19 -#define dtype_dbkey 20 -#define dtype_boolean 21 -#define DTYPE_TYPE_MAX 22 - -#define ISC_TIME_SECONDS_PRECISION 10000 -#define ISC_TIME_SECONDS_PRECISION_SCALE (-4) - -#endif +#include "impl/dsc_pub.h" #endif /* !defined(JRD_DSC_H) */ @@ -372,72 +238,7 @@ typedef struct paramvary { /* Dynamic SQL definitions */ /***************************/ - -#ifndef DSQL_SQLDA_PUB_H -#define DSQL_SQLDA_PUB_H - -#define DSQL_close 1 -#define DSQL_drop 2 -#define DSQL_unprepare 4 - -typedef struct -{ - ISC_SHORT sqltype; - ISC_SHORT sqlscale; - ISC_SHORT sqlsubtype; - ISC_SHORT sqllen; - ISC_SCHAR* sqldata; - ISC_SHORT* sqlind; - ISC_SHORT sqlname_length; - ISC_SCHAR sqlname[32]; - ISC_SHORT relname_length; - ISC_SCHAR relname[32]; - ISC_SHORT ownname_length; - ISC_SCHAR ownname[32]; - ISC_SHORT aliasname_length; - ISC_SCHAR aliasname[32]; -} XSQLVAR; - -#define SQLDA_VERSION1 1 - -typedef struct -{ - ISC_SHORT version; - ISC_SCHAR sqldaid[8]; - ISC_LONG sqldabc; - ISC_SHORT sqln; - ISC_SHORT sqld; - XSQLVAR sqlvar[1]; -} XSQLDA; - -#define XSQLDA_LENGTH(n) (sizeof (XSQLDA) + (n - 1) * sizeof (XSQLVAR)) - -#define SQL_TEXT 452 -#define SQL_VARYING 448 -#define SQL_SHORT 500 -#define SQL_LONG 496 -#define SQL_FLOAT 482 -#define SQL_DOUBLE 480 -#define SQL_D_FLOAT 530 -#define SQL_TIMESTAMP 510 -#define SQL_BLOB 520 -#define SQL_ARRAY 540 -#define SQL_QUAD 550 -#define SQL_TYPE_TIME 560 -#define SQL_TYPE_DATE 570 -#define SQL_INT64 580 -#define SQL_BOOLEAN 32764 -#define SQL_NULL 32766 - -#define SQL_DATE SQL_TIMESTAMP - -#define SQL_DIALECT_V5 1 -#define SQL_DIALECT_V6_TRANSITION 2 -#define SQL_DIALECT_V6 3 -#define SQL_DIALECT_CURRENT SQL_DIALECT_V6 - -#endif - +#include "impl/sqlda_pub.h" /***************************/ /* OSRI database functions */ @@ -563,12 +364,12 @@ ISC_STATUS ISC_EXPORT isc_create_blob2(ISC_STATUS*, const ISC_SCHAR*); ISC_STATUS ISC_EXPORT isc_create_database(ISC_STATUS*, - short, + unsigned short, const ISC_SCHAR*, isc_db_handle*, - short, + unsigned short, const ISC_SCHAR*, - short); + unsigned short); ISC_STATUS ISC_EXPORT isc_database_info(ISC_STATUS*, isc_db_handle*, @@ -679,6 +480,14 @@ ISC_STATUS ISC_EXPORT isc_dsql_sql_info(ISC_STATUS*, short, ISC_SCHAR*); +ISC_STATUS ISC_EXPORT fb_dsql_set_timeout(ISC_STATUS*, + isc_stmt_handle*, + ISC_ULONG); + +/*ISC_STATUS ISC_EXPORT fb_get_statement_interface(ISC_STATUS*, + FB_API_HANDLE*, + void**); + */ void ISC_EXPORT isc_encode_date(const void*, ISC_QUAD*); @@ -733,9 +542,9 @@ ISC_STATUS ISC_EXPORT isc_get_slice(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, ISC_QUAD*, - short, - const ISC_SCHAR*, - short, + unsigned short, + const ISC_UCHAR*, + unsigned short, const ISC_LONG*, ISC_LONG, void*, @@ -783,9 +592,9 @@ ISC_STATUS ISC_EXPORT isc_put_slice(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, ISC_QUAD*, - short, + unsigned short, const ISC_SCHAR*, - short, + unsigned short, const ISC_LONG*, ISC_LONG, void*); @@ -793,7 +602,7 @@ ISC_STATUS ISC_EXPORT isc_put_slice(ISC_STATUS*, ISC_STATUS ISC_EXPORT isc_que_events(ISC_STATUS*, isc_db_handle*, ISC_LONG*, - short, + unsigned short, const ISC_UCHAR*, ISC_EVENT_CALLBACK, void*); @@ -899,13 +708,13 @@ ISC_STATUS ISC_EXPORT isc_modify_user(ISC_STATUS*, const USER_SEC_DATA*); ISC_STATUS ISC_EXPORT isc_compile_request(ISC_STATUS*, isc_db_handle*, isc_req_handle*, - short, + ISC_USHORT, const ISC_SCHAR*); ISC_STATUS ISC_EXPORT isc_compile_request2(ISC_STATUS*, isc_db_handle*, isc_req_handle*, - short, + unsigned short, const ISC_SCHAR*); // This function always returns error since FB 3.0. @@ -921,15 +730,15 @@ ISC_STATUS ISC_EXPORT isc_prepare_transaction(ISC_STATUS*, ISC_STATUS ISC_EXPORT isc_receive(ISC_STATUS*, isc_req_handle*, - short, - short, + ISC_USHORT, + ISC_USHORT, void*, short); ISC_STATUS ISC_EXPORT isc_reconnect_transaction(ISC_STATUS*, isc_db_handle*, isc_tr_handle*, - short, + unsigned short, const ISC_SCHAR*); ISC_STATUS ISC_EXPORT isc_release_request(ISC_STATUS*, @@ -951,16 +760,16 @@ ISC_STATUS ISC_EXPORT isc_seek_blob(ISC_STATUS*, ISC_STATUS ISC_EXPORT isc_send(ISC_STATUS*, isc_req_handle*, - short, - short, + unsigned short, + unsigned short, const void*, short); ISC_STATUS ISC_EXPORT isc_start_and_send(ISC_STATUS*, isc_req_handle*, isc_tr_handle*, - short, - short, + ISC_USHORT, + ISC_USHORT, const void*, short); @@ -975,7 +784,7 @@ ISC_STATUS ISC_EXPORT isc_unwind_request(ISC_STATUS *, ISC_STATUS ISC_EXPORT isc_wait_for_event(ISC_STATUS*, isc_db_handle*, - short, + unsigned short, const ISC_UCHAR*, ISC_UCHAR*); @@ -1048,7 +857,7 @@ ISC_STATUS ISC_EXPORT isc_dsql_execute2_m(ISC_STATUS*, const ISC_SCHAR*, unsigned short, unsigned short, - ISC_SCHAR*, + const ISC_SCHAR*, unsigned short, ISC_SCHAR*, unsigned short, @@ -1067,23 +876,6 @@ ISC_STATUS ISC_EXPORT isc_dsql_execute_immediate_m(ISC_STATUS*, unsigned short, ISC_SCHAR*); -ISC_STATUS ISC_EXPORT isc_dsql_exec_immed3_m(ISC_STATUS*, - isc_db_handle*, - isc_tr_handle*, - unsigned short, - const ISC_SCHAR*, - unsigned short, - unsigned short, - ISC_SCHAR*, - unsigned short, - unsigned short, - const ISC_SCHAR*, - unsigned short, - ISC_SCHAR*, - unsigned short, - unsigned short, - ISC_SCHAR*); - ISC_STATUS ISC_EXPORT isc_dsql_fetch_m(ISC_STATUS*, isc_stmt_handle*, unsigned short, @@ -1356,6 +1148,8 @@ ISC_STATUS ISC_EXPORT fb_ping(ISC_STATUS*, isc_db_handle*); ISC_STATUS ISC_EXPORT fb_get_database_handle(ISC_STATUS*, isc_db_handle*, void*); ISC_STATUS ISC_EXPORT fb_get_transaction_handle(ISC_STATUS*, isc_tr_handle*, void*); +ISC_STATUS ISC_EXPORT fb_get_transaction_interface(ISC_STATUS*, void*, isc_tr_handle*); +ISC_STATUS ISC_EXPORT fb_get_statement_interface(ISC_STATUS*, void*, isc_stmt_handle*); /********************************/ /* Client information functions */ @@ -1393,1161 +1187,16 @@ ISC_STATUS ISC_EXPORT fb_database_crypt_callback(ISC_STATUS*, void*); /* Blr definitions */ /*******************/ +#include "impl/blr.h" -#ifndef JRD_BLR_H -#define JRD_BLR_H - -#define BLR_WORD(x) UCHAR(x), UCHAR((x) >> 8) - -#define blr_text (unsigned char)14 -#define blr_text2 (unsigned char)15 -#define blr_short (unsigned char)7 -#define blr_long (unsigned char)8 -#define blr_quad (unsigned char)9 -#define blr_float (unsigned char)10 -#define blr_double (unsigned char)27 -#define blr_d_float (unsigned char)11 -#define blr_timestamp (unsigned char)35 -#define blr_varying (unsigned char)37 -#define blr_varying2 (unsigned char)38 -#define blr_blob (unsigned short)261 -#define blr_cstring (unsigned char)40 -#define blr_cstring2 (unsigned char)41 -#define blr_blob_id (unsigned char)45 -#define blr_sql_date (unsigned char)12 -#define blr_sql_time (unsigned char)13 -#define blr_int64 (unsigned char)16 -#define blr_blob2 (unsigned char)17 -#define blr_domain_name (unsigned char)18 -#define blr_domain_name2 (unsigned char)19 -#define blr_not_nullable (unsigned char)20 -#define blr_column_name (unsigned char)21 -#define blr_column_name2 (unsigned char)22 -#define blr_bool (unsigned char)23 - -#define blr_domain_type_of (unsigned char)0 -#define blr_domain_full (unsigned char)1 - -#define blr_date blr_timestamp - -#define blr_inner (unsigned char)0 -#define blr_left (unsigned char)1 -#define blr_right (unsigned char)2 -#define blr_full (unsigned char)3 - -#define blr_gds_code (unsigned char)0 -#define blr_sql_code (unsigned char)1 -#define blr_exception (unsigned char)2 -#define blr_trigger_code (unsigned char)3 -#define blr_default_code (unsigned char)4 -#define blr_raise (unsigned char)5 -#define blr_exception_msg (unsigned char)6 -#define blr_exception_params (unsigned char)7 -#define blr_sql_state (unsigned char)8 - -#define blr_version4 (unsigned char)4 -#define blr_version5 (unsigned char)5 - -#define blr_eoc (unsigned char)76 -#define blr_end (unsigned char)255 - -#define blr_assignment (unsigned char)1 -#define blr_begin (unsigned char)2 -#define blr_dcl_variable (unsigned char)3 -#define blr_message (unsigned char)4 -#define blr_erase (unsigned char)5 -#define blr_fetch (unsigned char)6 -#define blr_for (unsigned char)7 -#define blr_if (unsigned char)8 -#define blr_loop (unsigned char)9 -#define blr_modify (unsigned char)10 -#define blr_handler (unsigned char)11 -#define blr_receive (unsigned char)12 -#define blr_select (unsigned char)13 -#define blr_send (unsigned char)14 -#define blr_store (unsigned char)15 -#define blr_label (unsigned char)17 -#define blr_leave (unsigned char)18 -#define blr_store2 (unsigned char)19 -#define blr_post (unsigned char)20 -#define blr_literal (unsigned char)21 -#define blr_dbkey (unsigned char)22 -#define blr_field (unsigned char)23 -#define blr_fid (unsigned char)24 -#define blr_parameter (unsigned char)25 -#define blr_variable (unsigned char)26 -#define blr_average (unsigned char)27 -#define blr_count (unsigned char)28 -#define blr_maximum (unsigned char)29 -#define blr_minimum (unsigned char)30 -#define blr_total (unsigned char)31 - -#define blr_add (unsigned char)34 -#define blr_subtract (unsigned char)35 -#define blr_multiply (unsigned char)36 -#define blr_divide (unsigned char)37 -#define blr_negate (unsigned char)38 -#define blr_concatenate (unsigned char)39 -#define blr_substring (unsigned char)40 -#define blr_parameter2 (unsigned char)41 -#define blr_from (unsigned char)42 -#define blr_via (unsigned char)43 -#define blr_user_name (unsigned char)44 -#define blr_null (unsigned char)45 - -#define blr_equiv (unsigned char)46 -#define blr_eql (unsigned char)47 -#define blr_neq (unsigned char)48 -#define blr_gtr (unsigned char)49 -#define blr_geq (unsigned char)50 -#define blr_lss (unsigned char)51 -#define blr_leq (unsigned char)52 -#define blr_containing (unsigned char)53 -#define blr_matching (unsigned char)54 -#define blr_starting (unsigned char)55 -#define blr_between (unsigned char)56 -#define blr_or (unsigned char)57 -#define blr_and (unsigned char)58 -#define blr_not (unsigned char)59 -#define blr_any (unsigned char)60 -#define blr_missing (unsigned char)61 -#define blr_unique (unsigned char)62 -#define blr_like (unsigned char)63 - -#define blr_rse (unsigned char)67 -#define blr_first (unsigned char)68 -#define blr_project (unsigned char)69 -#define blr_sort (unsigned char)70 -#define blr_boolean (unsigned char)71 -#define blr_ascending (unsigned char)72 -#define blr_descending (unsigned char)73 -#define blr_relation (unsigned char)74 -#define blr_rid (unsigned char)75 -#define blr_union (unsigned char)76 -#define blr_map (unsigned char)77 -#define blr_group_by (unsigned char)78 -#define blr_aggregate (unsigned char)79 -#define blr_join_type (unsigned char)80 - -#define blr_agg_count (unsigned char)83 -#define blr_agg_max (unsigned char)84 -#define blr_agg_min (unsigned char)85 -#define blr_agg_total (unsigned char)86 -#define blr_agg_average (unsigned char)87 -#define blr_parameter3 (unsigned char)88 - -#define blr_agg_count2 (unsigned char)93 -#define blr_agg_count_distinct (unsigned char)94 -#define blr_agg_total_distinct (unsigned char)95 -#define blr_agg_average_distinct (unsigned char)96 - -#define blr_function (unsigned char)100 -#define blr_gen_id (unsigned char)101 - -#define blr_upcase (unsigned char)103 - -#define blr_value_if (unsigned char)105 -#define blr_matching2 (unsigned char)106 -#define blr_index (unsigned char)107 -#define blr_ansi_like (unsigned char)108 -#define blr_scrollable (unsigned char) 109 - -#define blr_run_count (unsigned char)118 -#define blr_rs_stream (unsigned char)119 -#define blr_exec_proc (unsigned char)120 - -#define blr_procedure (unsigned char)124 -#define blr_pid (unsigned char)125 -#define blr_exec_pid (unsigned char)126 -#define blr_singular (unsigned char)127 -#define blr_abort (unsigned char)128 -#define blr_block (unsigned char)129 -#define blr_error_handler (unsigned char)130 - -#define blr_cast (unsigned char)131 - -#define blr_pid2 (unsigned char)132 -#define blr_procedure2 (unsigned char)133 - -#define blr_start_savepoint (unsigned char)134 -#define blr_end_savepoint (unsigned char)135 - -#define blr_plan (unsigned char)139 -#define blr_merge (unsigned char)140 -#define blr_join (unsigned char)141 -#define blr_sequential (unsigned char)142 -#define blr_navigational (unsigned char)143 -#define blr_indices (unsigned char)144 -#define blr_retrieve (unsigned char)145 - -#define blr_relation2 (unsigned char)146 -#define blr_rid2 (unsigned char)147 - -#define blr_set_generator (unsigned char)150 - -#define blr_ansi_any (unsigned char)151 -#define blr_exists (unsigned char)152 - -#define blr_record_version (unsigned char)154 -#define blr_stall (unsigned char)155 - -#define blr_ansi_all (unsigned char)158 - -#define blr_extract (unsigned char)159 - -#define blr_extract_year (unsigned char)0 -#define blr_extract_month (unsigned char)1 -#define blr_extract_day (unsigned char)2 -#define blr_extract_hour (unsigned char)3 -#define blr_extract_minute (unsigned char)4 -#define blr_extract_second (unsigned char)5 -#define blr_extract_weekday (unsigned char)6 -#define blr_extract_yearday (unsigned char)7 -#define blr_extract_millisecond (unsigned char)8 -#define blr_extract_week (unsigned char)9 - -#define blr_current_date (unsigned char)160 -#define blr_current_timestamp (unsigned char)161 -#define blr_current_time (unsigned char)162 - -#define blr_post_arg (unsigned char)163 -#define blr_exec_into (unsigned char)164 -#define blr_user_savepoint (unsigned char)165 -#define blr_dcl_cursor (unsigned char)166 -#define blr_cursor_stmt (unsigned char)167 -#define blr_current_timestamp2 (unsigned char)168 -#define blr_current_time2 (unsigned char)169 -#define blr_agg_list (unsigned char)170 -#define blr_agg_list_distinct (unsigned char)171 -#define blr_modify2 (unsigned char)172 - -#define blr_current_role (unsigned char)174 -#define blr_skip (unsigned char)175 - -#define blr_exec_sql (unsigned char)176 -#define blr_internal_info (unsigned char)177 -#define blr_nullsfirst (unsigned char)178 -#define blr_writelock (unsigned char)179 -#define blr_nullslast (unsigned char)180 - -#define blr_lowcase (unsigned char)181 -#define blr_strlen (unsigned char)182 - -#define blr_strlen_bit (unsigned char)0 -#define blr_strlen_char (unsigned char)1 -#define blr_strlen_octet (unsigned char)2 - -#define blr_trim (unsigned char)183 - -#define blr_trim_both (unsigned char)0 -#define blr_trim_leading (unsigned char)1 -#define blr_trim_trailing (unsigned char)2 - -#define blr_trim_spaces (unsigned char)0 -#define blr_trim_characters (unsigned char)1 - -#define blr_savepoint_set (unsigned char)0 -#define blr_savepoint_release (unsigned char)1 -#define blr_savepoint_undo (unsigned char)2 -#define blr_savepoint_release_single (unsigned char)3 - -#define blr_cursor_open (unsigned char)0 -#define blr_cursor_close (unsigned char)1 -#define blr_cursor_fetch (unsigned char)2 -#define blr_cursor_fetch_scroll (unsigned char)3 - -#define blr_scroll_forward (unsigned char)0 -#define blr_scroll_backward (unsigned char)1 -#define blr_scroll_bof (unsigned char)2 -#define blr_scroll_eof (unsigned char)3 -#define blr_scroll_absolute (unsigned char)4 -#define blr_scroll_relative (unsigned char)5 - -#define blr_init_variable (unsigned char)184 -#define blr_recurse (unsigned char)185 -#define blr_sys_function (unsigned char)186 - -#define blr_auto_trans (unsigned char)187 -#define blr_similar (unsigned char)188 -#define blr_exec_stmt (unsigned char)189 - -#define blr_exec_stmt_inputs (unsigned char) 1 -#define blr_exec_stmt_outputs (unsigned char) 2 -#define blr_exec_stmt_sql (unsigned char) 3 -#define blr_exec_stmt_proc_block (unsigned char) 4 -#define blr_exec_stmt_data_src (unsigned char) 5 -#define blr_exec_stmt_user (unsigned char) 6 -#define blr_exec_stmt_pwd (unsigned char) 7 -#define blr_exec_stmt_tran (unsigned char) 8 -#define blr_exec_stmt_tran_clone (unsigned char) 9 -#define blr_exec_stmt_privs (unsigned char) 10 -#define blr_exec_stmt_in_params (unsigned char) 11 -#define blr_exec_stmt_in_params2 (unsigned char) 12 -#define blr_exec_stmt_out_params (unsigned char) 13 -#define blr_exec_stmt_role (unsigned char) 14 - -#define blr_stmt_expr (unsigned char) 190 -#define blr_derived_expr (unsigned char) 191 - -#define blr_procedure3 (unsigned char) 192 -#define blr_exec_proc2 (unsigned char) 193 -#define blr_function2 (unsigned char) 194 -#define blr_window (unsigned char) 195 -#define blr_partition_by (unsigned char) 196 -#define blr_continue_loop (unsigned char) 197 -#define blr_procedure4 (unsigned char) 198 -#define blr_agg_function (unsigned char) 199 -#define blr_substring_similar (unsigned char) 200 -#define blr_bool_as_value (unsigned char) 201 -#define blr_coalesce (unsigned char) 202 -#define blr_decode (unsigned char) 203 -#define blr_exec_subproc (unsigned char) 204 -#define blr_subproc_decl (unsigned char) 205 -#define blr_subproc (unsigned char) 206 -#define blr_subfunc_decl (unsigned char) 207 -#define blr_subfunc (unsigned char) 208 -#define blr_record_version2 (unsigned char) 209 -#define blr_gen_id2 (unsigned char) 210 - -#endif - - -#ifndef INCLUDE_CONSTS_PUB_H -#define INCLUDE_CONSTS_PUB_H - -#define isc_dpb_version1 1 -#define isc_dpb_version2 2 - -#define isc_dpb_cdd_pathname 1 -#define isc_dpb_allocation 2 -#define isc_dpb_journal 3 -#define isc_dpb_page_size 4 -#define isc_dpb_num_buffers 5 -#define isc_dpb_buffer_length 6 -#define isc_dpb_debug 7 -#define isc_dpb_garbage_collect 8 -#define isc_dpb_verify 9 -#define isc_dpb_sweep 10 -#define isc_dpb_enable_journal 11 -#define isc_dpb_disable_journal 12 -#define isc_dpb_dbkey_scope 13 -#define isc_dpb_number_of_users 14 -#define isc_dpb_trace 15 -#define isc_dpb_no_garbage_collect 16 -#define isc_dpb_damaged 17 -#define isc_dpb_license 18 -#define isc_dpb_sys_user_name 19 -#define isc_dpb_encrypt_key 20 -#define isc_dpb_activate_shadow 21 -#define isc_dpb_sweep_interval 22 -#define isc_dpb_delete_shadow 23 -#define isc_dpb_force_write 24 -#define isc_dpb_begin_log 25 -#define isc_dpb_quit_log 26 -#define isc_dpb_no_reserve 27 -#define isc_dpb_user_name 28 -#define isc_dpb_password 29 -#define isc_dpb_password_enc 30 -#define isc_dpb_sys_user_name_enc 31 -#define isc_dpb_interp 32 -#define isc_dpb_online_dump 33 -#define isc_dpb_old_file_size 34 -#define isc_dpb_old_num_files 35 -#define isc_dpb_old_file 36 -#define isc_dpb_old_start_page 37 -#define isc_dpb_old_start_seqno 38 -#define isc_dpb_old_start_file 39 -#define isc_dpb_drop_walfile 40 -#define isc_dpb_old_dump_id 41 -#define isc_dpb_wal_backup_dir 42 -#define isc_dpb_wal_chkptlen 43 -#define isc_dpb_wal_numbufs 44 -#define isc_dpb_wal_bufsize 45 -#define isc_dpb_wal_grp_cmt_wait 46 -#define isc_dpb_lc_messages 47 -#define isc_dpb_lc_ctype 48 -#define isc_dpb_cache_manager 49 -#define isc_dpb_shutdown 50 -#define isc_dpb_online 51 -#define isc_dpb_shutdown_delay 52 -#define isc_dpb_reserved 53 -#define isc_dpb_overwrite 54 -#define isc_dpb_sec_attach 55 -#define isc_dpb_disable_wal 56 -#define isc_dpb_connect_timeout 57 -#define isc_dpb_dummy_packet_interval 58 -#define isc_dpb_gbak_attach 59 -#define isc_dpb_sql_role_name 60 -#define isc_dpb_set_page_buffers 61 -#define isc_dpb_working_directory 62 -#define isc_dpb_sql_dialect 63 -#define isc_dpb_set_db_readonly 64 -#define isc_dpb_set_db_sql_dialect 65 -#define isc_dpb_gfix_attach 66 -#define isc_dpb_gstat_attach 67 -#define isc_dpb_set_db_charset 68 -#define isc_dpb_gsec_attach 69 -#define isc_dpb_address_path 70 -#define isc_dpb_process_id 71 -#define isc_dpb_no_db_triggers 72 -#define isc_dpb_trusted_auth 73 -#define isc_dpb_process_name 74 -#define isc_dpb_trusted_role 75 -#define isc_dpb_org_filename 76 -#define isc_dpb_utf8_filename 77 -#define isc_dpb_ext_call_depth 78 -#define isc_dpb_auth_block 79 -#define isc_dpb_client_version 80 -#define isc_dpb_remote_protocol 81 -#define isc_dpb_host_name 82 -#define isc_dpb_os_user 83 -#define isc_dpb_specific_auth_data 84 -#define isc_dpb_auth_plugin_list 85 -#define isc_dpb_auth_plugin_name 86 -#define isc_dpb_config 87 -#define isc_dpb_nolinger 88 -#define isc_dpb_reset_icu 89 -#define isc_dpb_map_attach 90 - -#define isc_dpb_address 1 - -#define isc_dpb_addr_protocol 1 -#define isc_dpb_addr_endpoint 2 - -#define isc_dpb_pages 1 -#define isc_dpb_records 2 -#define isc_dpb_indices 4 -#define isc_dpb_transactions 8 -#define isc_dpb_no_update 16 -#define isc_dpb_repair 32 -#define isc_dpb_ignore 64 - -#define isc_dpb_shut_cache 0x1 -#define isc_dpb_shut_attachment 0x2 -#define isc_dpb_shut_transaction 0x4 -#define isc_dpb_shut_force 0x8 -#define isc_dpb_shut_mode_mask 0x70 - -#define isc_dpb_shut_default 0x0 -#define isc_dpb_shut_normal 0x10 -#define isc_dpb_shut_multi 0x20 -#define isc_dpb_shut_single 0x30 -#define isc_dpb_shut_full 0x40 - -#define RDB_system 1 -#define RDB_id_assigned 2 - -#define isc_tpb_version1 1 -#define isc_tpb_version3 3 -#define isc_tpb_consistency 1 -#define isc_tpb_concurrency 2 -#define isc_tpb_shared 3 -#define isc_tpb_protected 4 -#define isc_tpb_exclusive 5 -#define isc_tpb_wait 6 -#define isc_tpb_nowait 7 -#define isc_tpb_read 8 -#define isc_tpb_write 9 -#define isc_tpb_lock_read 10 -#define isc_tpb_lock_write 11 -#define isc_tpb_verb_time 12 -#define isc_tpb_commit_time 13 -#define isc_tpb_ignore_limbo 14 -#define isc_tpb_read_committed 15 -#define isc_tpb_autocommit 16 -#define isc_tpb_rec_version 17 -#define isc_tpb_no_rec_version 18 -#define isc_tpb_restart_requests 19 -#define isc_tpb_no_auto_undo 20 -#define isc_tpb_lock_timeout 21 - -#define isc_bpb_version1 1 -#define isc_bpb_source_type 1 -#define isc_bpb_target_type 2 -#define isc_bpb_type 3 -#define isc_bpb_source_interp 4 -#define isc_bpb_target_interp 5 -#define isc_bpb_filter_parameter 6 -#define isc_bpb_storage 7 - -#define isc_bpb_type_segmented 0x0 -#define isc_bpb_type_stream 0x1 -#define isc_bpb_storage_main 0x0 -#define isc_bpb_storage_temp 0x2 - -#define isc_spb_version1 1 -#define isc_spb_current_version 2 -#define isc_spb_version isc_spb_current_version -#define isc_spb_version3 3 -#define isc_spb_user_name isc_dpb_user_name -#define isc_spb_sys_user_name isc_dpb_sys_user_name -#define isc_spb_sys_user_name_enc isc_dpb_sys_user_name_enc -#define isc_spb_password isc_dpb_password -#define isc_spb_password_enc isc_dpb_password_enc -#define isc_spb_command_line 105 -#define isc_spb_dbname 106 -#define isc_spb_verbose 107 -#define isc_spb_options 108 -#define isc_spb_address_path 109 -#define isc_spb_process_id 110 -#define isc_spb_trusted_auth 111 -#define isc_spb_process_name 112 -#define isc_spb_trusted_role 113 -#define isc_spb_verbint 114 -#define isc_spb_auth_block 115 -#define isc_spb_auth_plugin_name 116 -#define isc_spb_auth_plugin_list 117 -#define isc_spb_utf8_filename 118 -#define isc_spb_client_version 119 -#define isc_spb_remote_protocol 120 -#define isc_spb_host_name 121 -#define isc_spb_os_user 122 -#define isc_spb_config 123 -#define isc_spb_expected_db 124 - -#define isc_spb_connect_timeout isc_dpb_connect_timeout -#define isc_spb_dummy_packet_interval isc_dpb_dummy_packet_interval -#define isc_spb_sql_role_name isc_dpb_sql_role_name - -#define isc_spb_specific_auth_data isc_spb_trusted_auth - -#define isc_action_svc_backup 1 -#define isc_action_svc_restore 2 -#define isc_action_svc_repair 3 -#define isc_action_svc_add_user 4 -#define isc_action_svc_delete_user 5 -#define isc_action_svc_modify_user 6 -#define isc_action_svc_display_user 7 -#define isc_action_svc_properties 8 -#define isc_action_svc_add_license 9 -#define isc_action_svc_remove_license 10 -#define isc_action_svc_db_stats 11 -#define isc_action_svc_get_ib_log 12 -#define isc_action_svc_get_fb_log 12 -#define isc_action_svc_nbak 20 -#define isc_action_svc_nrest 21 -#define isc_action_svc_trace_start 22 -#define isc_action_svc_trace_stop 23 -#define isc_action_svc_trace_suspend 24 -#define isc_action_svc_trace_resume 25 -#define isc_action_svc_trace_list 26 -#define isc_action_svc_set_mapping 27 -#define isc_action_svc_drop_mapping 28 -#define isc_action_svc_display_user_adm 29 -#define isc_action_svc_validate 30 -#define isc_action_svc_last 31 - -#define isc_info_svc_svr_db_info 50 -#define isc_info_svc_get_license 51 -#define isc_info_svc_get_license_mask 52 -#define isc_info_svc_get_config 53 -#define isc_info_svc_version 54 -#define isc_info_svc_server_version 55 -#define isc_info_svc_implementation 56 -#define isc_info_svc_capabilities 57 -#define isc_info_svc_user_dbpath 58 -#define isc_info_svc_get_env 59 -#define isc_info_svc_get_env_lock 60 -#define isc_info_svc_get_env_msg 61 -#define isc_info_svc_line 62 -#define isc_info_svc_to_eof 63 -#define isc_info_svc_timeout 64 -#define isc_info_svc_get_licensed_users 65 -#define isc_info_svc_limbo_trans 66 -#define isc_info_svc_running 67 -#define isc_info_svc_get_users 68 -#define isc_info_svc_auth_block 69 -#define isc_info_svc_stdin 78 - -#define isc_spb_sec_userid 5 -#define isc_spb_sec_groupid 6 -#define isc_spb_sec_username 7 -#define isc_spb_sec_password 8 -#define isc_spb_sec_groupname 9 -#define isc_spb_sec_firstname 10 -#define isc_spb_sec_middlename 11 -#define isc_spb_sec_lastname 12 -#define isc_spb_sec_admin 13 - -#define isc_spb_lic_key 5 -#define isc_spb_lic_id 6 -#define isc_spb_lic_desc 7 - -#define isc_spb_bkp_file 5 -#define isc_spb_bkp_factor 6 -#define isc_spb_bkp_length 7 -#define isc_spb_bkp_skip_data 8 -#define isc_spb_bkp_stat 15 -#define isc_spb_bkp_ignore_checksums 0x01 -#define isc_spb_bkp_ignore_limbo 0x02 -#define isc_spb_bkp_metadata_only 0x04 -#define isc_spb_bkp_no_garbage_collect 0x08 -#define isc_spb_bkp_old_descriptions 0x10 -#define isc_spb_bkp_non_transportable 0x20 -#define isc_spb_bkp_convert 0x40 -#define isc_spb_bkp_expand 0x80 -#define isc_spb_bkp_no_triggers 0x8000 - -#define isc_spb_prp_page_buffers 5 -#define isc_spb_prp_sweep_interval 6 -#define isc_spb_prp_shutdown_db 7 -#define isc_spb_prp_deny_new_attachments 9 -#define isc_spb_prp_deny_new_transactions 10 -#define isc_spb_prp_reserve_space 11 -#define isc_spb_prp_write_mode 12 -#define isc_spb_prp_access_mode 13 -#define isc_spb_prp_set_sql_dialect 14 -#define isc_spb_prp_activate 0x0100 -#define isc_spb_prp_db_online 0x0200 -#define isc_spb_prp_nolinger 0x0400 -#define isc_spb_prp_force_shutdown 41 -#define isc_spb_prp_attachments_shutdown 42 -#define isc_spb_prp_transactions_shutdown 43 -#define isc_spb_prp_shutdown_mode 44 -#define isc_spb_prp_online_mode 45 - -#define isc_spb_prp_sm_normal 0 -#define isc_spb_prp_sm_multi 1 -#define isc_spb_prp_sm_single 2 -#define isc_spb_prp_sm_full 3 - -#define isc_spb_prp_res_use_full 35 -#define isc_spb_prp_res 36 - -#define isc_spb_prp_wm_async 37 -#define isc_spb_prp_wm_sync 38 - -#define isc_spb_prp_am_readonly 39 -#define isc_spb_prp_am_readwrite 40 - -#define isc_spb_rpr_commit_trans 15 -#define isc_spb_rpr_rollback_trans 34 -#define isc_spb_rpr_recover_two_phase 17 -#define isc_spb_tra_id 18 -#define isc_spb_single_tra_id 19 -#define isc_spb_multi_tra_id 20 -#define isc_spb_tra_state 21 -#define isc_spb_tra_state_limbo 22 -#define isc_spb_tra_state_commit 23 -#define isc_spb_tra_state_rollback 24 -#define isc_spb_tra_state_unknown 25 -#define isc_spb_tra_host_site 26 -#define isc_spb_tra_remote_site 27 -#define isc_spb_tra_db_path 28 -#define isc_spb_tra_advise 29 -#define isc_spb_tra_advise_commit 30 -#define isc_spb_tra_advise_rollback 31 -#define isc_spb_tra_advise_unknown 33 -#define isc_spb_tra_id_64 46 -#define isc_spb_single_tra_id_64 47 -#define isc_spb_multi_tra_id_64 48 -#define isc_spb_rpr_commit_trans_64 49 -#define isc_spb_rpr_rollback_trans_64 50 -#define isc_spb_rpr_recover_two_phase_64 51 - -#define isc_spb_rpr_validate_db 0x01 -#define isc_spb_rpr_sweep_db 0x02 -#define isc_spb_rpr_mend_db 0x04 -#define isc_spb_rpr_list_limbo_trans 0x08 -#define isc_spb_rpr_check_db 0x10 -#define isc_spb_rpr_ignore_checksum 0x20 -#define isc_spb_rpr_kill_shadows 0x40 -#define isc_spb_rpr_full 0x80 -#define isc_spb_rpr_icu 0x0800 - -#define isc_spb_res_skip_data isc_spb_bkp_skip_data -#define isc_spb_res_buffers 9 -#define isc_spb_res_page_size 10 -#define isc_spb_res_length 11 -#define isc_spb_res_access_mode 12 -#define isc_spb_res_fix_fss_data 13 -#define isc_spb_res_fix_fss_metadata 14 -#define isc_spb_res_stat isc_spb_bkp_stat -#define isc_spb_res_metadata_only isc_spb_bkp_metadata_only -#define isc_spb_res_deactivate_idx 0x0100 -#define isc_spb_res_no_shadow 0x0200 -#define isc_spb_res_no_validity 0x0400 -#define isc_spb_res_one_at_a_time 0x0800 -#define isc_spb_res_replace 0x1000 -#define isc_spb_res_create 0x2000 -#define isc_spb_res_use_all_space 0x4000 - -#define isc_spb_val_tab_incl 1 -#define isc_spb_val_tab_excl 2 -#define isc_spb_val_idx_incl 3 -#define isc_spb_val_idx_excl 4 -#define isc_spb_val_lock_timeout 5 - -#define isc_spb_res_am_readonly isc_spb_prp_am_readonly -#define isc_spb_res_am_readwrite isc_spb_prp_am_readwrite - -#define isc_spb_num_att 5 -#define isc_spb_num_db 6 - -#define isc_spb_sts_table 64 - -#define isc_spb_sts_data_pages 0x01 -#define isc_spb_sts_db_log 0x02 -#define isc_spb_sts_hdr_pages 0x04 -#define isc_spb_sts_idx_pages 0x08 -#define isc_spb_sts_sys_relations 0x10 -#define isc_spb_sts_record_versions 0x20 - -#define isc_spb_sts_nocreation 0x80 -#define isc_spb_sts_encryption 0x100 - -#define isc_spb_nbk_level 5 -#define isc_spb_nbk_file 6 -#define isc_spb_nbk_direct 7 -#define isc_spb_nbk_no_triggers 0x01 - -#define isc_spb_trc_id 1 -#define isc_spb_trc_name 2 -#define isc_spb_trc_cfg 3 - -#define isc_sdl_version1 1 -#define isc_sdl_eoc 255 -#define isc_sdl_relation 2 -#define isc_sdl_rid 3 -#define isc_sdl_field 4 -#define isc_sdl_fid 5 -#define isc_sdl_struct 6 -#define isc_sdl_variable 7 -#define isc_sdl_scalar 8 -#define isc_sdl_tiny_integer 9 -#define isc_sdl_short_integer 10 -#define isc_sdl_long_integer 11 - -#define isc_sdl_add 13 -#define isc_sdl_subtract 14 -#define isc_sdl_multiply 15 -#define isc_sdl_divide 16 -#define isc_sdl_negate 17 - -#define isc_sdl_begin 31 -#define isc_sdl_end 32 -#define isc_sdl_do3 33 -#define isc_sdl_do2 34 -#define isc_sdl_do1 35 -#define isc_sdl_element 36 - -#define isc_blob_untyped 0 - -#define isc_blob_text 1 -#define isc_blob_blr 2 -#define isc_blob_acl 3 -#define isc_blob_ranges 4 -#define isc_blob_summary 5 -#define isc_blob_format 6 -#define isc_blob_tra 7 -#define isc_blob_extfile 8 -#define isc_blob_debug_info 9 -#define isc_blob_max_predefined_subtype 10 - -#define fb_shut_confirmation 1 -#define fb_shut_preproviders 2 -#define fb_shut_postproviders 4 -#define fb_shut_finish 8 -#define fb_shut_exit 16 - -#define fb_shutrsn_svc_stopped -1 -#define fb_shutrsn_no_connection -2 -#define fb_shutrsn_app_stopped -3 - -#define fb_shutrsn_signal -5 -#define fb_shutrsn_services -6 -#define fb_shutrsn_exit_called -7 - -#define fb_cancel_disable 1 -#define fb_cancel_enable 2 -#define fb_cancel_raise 3 -#define fb_cancel_abort 4 - -#define fb_dbg_version 1 -#define fb_dbg_end 255 -#define fb_dbg_map_src2blr 2 -#define fb_dbg_map_varname 3 -#define fb_dbg_map_argument 4 -#define fb_dbg_subproc 5 -#define fb_dbg_subfunc 6 -#define fb_dbg_map_curname 7 - -#define fb_dbg_arg_input 0 -#define fb_dbg_arg_output 1 - -#endif +#include "impl/consts_pub.h" /*********************************/ /* Information call declarations */ /*********************************/ - -#ifndef JRD_INF_PUB_H -#define JRD_INF_PUB_H - -#define isc_info_end 1 -#define isc_info_truncated 2 -#define isc_info_error 3 -#define isc_info_data_not_ready 4 -#define isc_info_length 126 -#define isc_info_flag_end 127 - -enum db_info_types -{ - isc_info_db_id = 4, - isc_info_reads = 5, - isc_info_writes = 6, - isc_info_fetches = 7, - isc_info_marks = 8, - - isc_info_implementation = 11, - isc_info_isc_version = 12, - isc_info_base_level = 13, - isc_info_page_size = 14, - isc_info_num_buffers = 15, - isc_info_limbo = 16, - isc_info_current_memory = 17, - isc_info_max_memory = 18, - isc_info_window_turns = 19, - isc_info_license = 20, - - isc_info_allocation = 21, - isc_info_attachment_id = 22, - isc_info_read_seq_count = 23, - isc_info_read_idx_count = 24, - isc_info_insert_count = 25, - isc_info_update_count = 26, - isc_info_delete_count = 27, - isc_info_backout_count = 28, - isc_info_purge_count = 29, - isc_info_expunge_count = 30, - - isc_info_sweep_interval = 31, - isc_info_ods_version = 32, - isc_info_ods_minor_version = 33, - isc_info_no_reserve = 34, - - isc_info_logfile = 35, - isc_info_cur_logfile_name = 36, - isc_info_cur_log_part_offset = 37, - isc_info_num_wal_buffers = 38, - isc_info_wal_buffer_size = 39, - isc_info_wal_ckpt_length = 40, - - isc_info_wal_cur_ckpt_interval = 41, - isc_info_wal_prv_ckpt_fname = 42, - isc_info_wal_prv_ckpt_poffset = 43, - isc_info_wal_recv_ckpt_fname = 44, - isc_info_wal_recv_ckpt_poffset = 45, - isc_info_wal_grpc_wait_usecs = 47, - isc_info_wal_num_io = 48, - isc_info_wal_avg_io_size = 49, - isc_info_wal_num_commits = 50, - isc_info_wal_avg_grpc_size = 51, - - isc_info_forced_writes = 52, - isc_info_user_names = 53, - isc_info_page_errors = 54, - isc_info_record_errors = 55, - isc_info_bpage_errors = 56, - isc_info_dpage_errors = 57, - isc_info_ipage_errors = 58, - isc_info_ppage_errors = 59, - isc_info_tpage_errors = 60, - - isc_info_set_page_buffers = 61, - isc_info_db_sql_dialect = 62, - isc_info_db_read_only = 63, - isc_info_db_size_in_pages = 64, - - frb_info_att_charset = 101, - isc_info_db_class = 102, - isc_info_firebird_version = 103, - isc_info_oldest_transaction = 104, - isc_info_oldest_active = 105, - isc_info_oldest_snapshot = 106, - isc_info_next_transaction = 107, - isc_info_db_provider = 108, - isc_info_active_transactions = 109, - isc_info_active_tran_count = 110, - isc_info_creation_date = 111, - isc_info_db_file_size = 112, - fb_info_page_contents = 113, - - fb_info_implementation = 114, - - fb_info_page_warns = 115, - fb_info_record_warns = 116, - fb_info_bpage_warns = 117, - fb_info_dpage_warns = 118, - fb_info_ipage_warns = 119, - fb_info_ppage_warns = 120, - fb_info_tpage_warns = 121, - fb_info_pip_errors = 122, - fb_info_pip_warns = 123, - - fb_info_pages_used = 124, - fb_info_pages_free = 125, - - fb_info_crypt_state = 126, - - isc_info_db_last_value -}; - -enum db_info_crypt -{ - fb_info_crypt_encrypted = 0x01, - fb_info_crypt_process = 0x02 -}; - -#define isc_info_version isc_info_isc_version - -enum info_db_implementations -{ - isc_info_db_impl_rdb_vms = 1, - isc_info_db_impl_rdb_eln = 2, - isc_info_db_impl_rdb_eln_dev = 3, - isc_info_db_impl_rdb_vms_y = 4, - isc_info_db_impl_rdb_eln_y = 5, - isc_info_db_impl_jri = 6, - isc_info_db_impl_jsv = 7, - - isc_info_db_impl_isc_apl_68K = 25, - isc_info_db_impl_isc_vax_ultr = 26, - isc_info_db_impl_isc_vms = 27, - isc_info_db_impl_isc_sun_68k = 28, - isc_info_db_impl_isc_os2 = 29, - isc_info_db_impl_isc_sun4 = 30, - - isc_info_db_impl_isc_hp_ux = 31, - isc_info_db_impl_isc_sun_386i = 32, - isc_info_db_impl_isc_vms_orcl = 33, - isc_info_db_impl_isc_mac_aux = 34, - isc_info_db_impl_isc_rt_aix = 35, - isc_info_db_impl_isc_mips_ult = 36, - isc_info_db_impl_isc_xenix = 37, - isc_info_db_impl_isc_dg = 38, - isc_info_db_impl_isc_hp_mpexl = 39, - isc_info_db_impl_isc_hp_ux68K = 40, - - isc_info_db_impl_isc_sgi = 41, - isc_info_db_impl_isc_sco_unix = 42, - isc_info_db_impl_isc_cray = 43, - isc_info_db_impl_isc_imp = 44, - isc_info_db_impl_isc_delta = 45, - isc_info_db_impl_isc_next = 46, - isc_info_db_impl_isc_dos = 47, - isc_info_db_impl_m88K = 48, - isc_info_db_impl_unixware = 49, - isc_info_db_impl_isc_winnt_x86 = 50, - - isc_info_db_impl_isc_epson = 51, - isc_info_db_impl_alpha_osf = 52, - isc_info_db_impl_alpha_vms = 53, - isc_info_db_impl_netware_386 = 54, - isc_info_db_impl_win_only = 55, - isc_info_db_impl_ncr_3000 = 56, - isc_info_db_impl_winnt_ppc = 57, - isc_info_db_impl_dg_x86 = 58, - isc_info_db_impl_sco_ev = 59, - isc_info_db_impl_i386 = 60, - - isc_info_db_impl_freebsd = 61, - isc_info_db_impl_netbsd = 62, - isc_info_db_impl_darwin_ppc = 63, - isc_info_db_impl_sinixz = 64, - - isc_info_db_impl_linux_sparc = 65, - isc_info_db_impl_linux_amd64 = 66, - - isc_info_db_impl_freebsd_amd64 = 67, - - isc_info_db_impl_winnt_amd64 = 68, - - isc_info_db_impl_linux_ppc = 69, - isc_info_db_impl_darwin_x86 = 70, - isc_info_db_impl_linux_mipsel = 71, - isc_info_db_impl_linux_mips = 72, - isc_info_db_impl_darwin_x64 = 73, - isc_info_db_impl_sun_amd64 = 74, - - isc_info_db_impl_linux_arm = 75, - isc_info_db_impl_linux_ia64 = 76, - - isc_info_db_impl_darwin_ppc64 = 77, - isc_info_db_impl_linux_s390x = 78, - isc_info_db_impl_linux_s390 = 79, - - isc_info_db_impl_linux_sh = 80, - isc_info_db_impl_linux_sheb = 81, - isc_info_db_impl_linux_hppa = 82, - isc_info_db_impl_linux_alpha = 83, - isc_info_db_impl_linux_arm64 = 84, - isc_info_db_impl_linux_ppc64el = 85, - isc_info_db_impl_linux_ppc64 = 86, - isc_info_db_impl_linux_m68k = 87, - - isc_info_db_impl_last_value -}; - -enum info_db_class -{ - isc_info_db_class_access = 1, - isc_info_db_class_y_valve = 2, - isc_info_db_class_rem_int = 3, - isc_info_db_class_rem_srvr = 4, - isc_info_db_class_pipe_int = 7, - isc_info_db_class_pipe_srvr = 8, - isc_info_db_class_sam_int = 9, - isc_info_db_class_sam_srvr = 10, - isc_info_db_class_gateway = 11, - isc_info_db_class_cache = 12, - isc_info_db_class_classic_access = 13, - isc_info_db_class_server_access = 14, - - isc_info_db_class_last_value -}; - -enum info_db_provider -{ - isc_info_db_code_rdb_eln = 1, - isc_info_db_code_rdb_vms = 2, - isc_info_db_code_interbase = 3, - isc_info_db_code_firebird = 4, - - isc_info_db_code_last_value -}; - -#define isc_info_number_messages 4 -#define isc_info_max_message 5 -#define isc_info_max_send 6 -#define isc_info_max_receive 7 -#define isc_info_state 8 -#define isc_info_message_number 9 -#define isc_info_message_size 10 -#define isc_info_request_cost 11 -#define isc_info_access_path 12 -#define isc_info_req_select_count 13 -#define isc_info_req_insert_count 14 -#define isc_info_req_update_count 15 -#define isc_info_req_delete_count 16 - -#define isc_info_rsb_end 0 -#define isc_info_rsb_begin 1 -#define isc_info_rsb_type 2 -#define isc_info_rsb_relation 3 -#define isc_info_rsb_plan 4 - -#define isc_info_rsb_unknown 1 -#define isc_info_rsb_indexed 2 -#define isc_info_rsb_navigate 3 -#define isc_info_rsb_sequential 4 -#define isc_info_rsb_cross 5 -#define isc_info_rsb_sort 6 -#define isc_info_rsb_first 7 -#define isc_info_rsb_boolean 8 -#define isc_info_rsb_union 9 -#define isc_info_rsb_aggregate 10 -#define isc_info_rsb_merge 11 -#define isc_info_rsb_ext_sequential 12 -#define isc_info_rsb_ext_indexed 13 -#define isc_info_rsb_ext_dbkey 14 -#define isc_info_rsb_left_cross 15 -#define isc_info_rsb_select 16 -#define isc_info_rsb_sql_join 17 -#define isc_info_rsb_simulate 18 -#define isc_info_rsb_sim_cross 19 -#define isc_info_rsb_once 20 -#define isc_info_rsb_procedure 21 -#define isc_info_rsb_skip 22 -#define isc_info_rsb_virt_sequential 23 -#define isc_info_rsb_recursive 24 -#define isc_info_rsb_window 25 -#define isc_info_rsb_singular 26 -#define isc_info_rsb_writelock 27 -#define isc_info_rsb_buffer 28 -#define isc_info_rsb_hash 29 - -#define isc_info_rsb_and 1 -#define isc_info_rsb_or 2 -#define isc_info_rsb_dbkey 3 -#define isc_info_rsb_index 4 - -#define isc_info_req_active 2 -#define isc_info_req_inactive 3 -#define isc_info_req_send 4 -#define isc_info_req_receive 5 -#define isc_info_req_select 6 -#define isc_info_req_sql_stall 7 - -#define isc_info_blob_num_segments 4 -#define isc_info_blob_max_segment 5 -#define isc_info_blob_total_length 6 -#define isc_info_blob_type 7 - -#define isc_info_tra_id 4 -#define isc_info_tra_oldest_interesting 5 -#define isc_info_tra_oldest_snapshot 6 -#define isc_info_tra_oldest_active 7 -#define isc_info_tra_isolation 8 -#define isc_info_tra_access 9 -#define isc_info_tra_lock_timeout 10 -#define fb_info_tra_dbpath 11 - -#define isc_info_tra_consistency 1 -#define isc_info_tra_concurrency 2 -#define isc_info_tra_read_committed 3 - -#define isc_info_tra_no_rec_version 0 -#define isc_info_tra_rec_version 1 - -#define isc_info_tra_readonly 0 -#define isc_info_tra_readwrite 1 - -#define isc_info_sql_select 4 -#define isc_info_sql_bind 5 -#define isc_info_sql_num_variables 6 -#define isc_info_sql_describe_vars 7 -#define isc_info_sql_describe_end 8 -#define isc_info_sql_sqlda_seq 9 -#define isc_info_sql_message_seq 10 -#define isc_info_sql_type 11 -#define isc_info_sql_sub_type 12 -#define isc_info_sql_scale 13 -#define isc_info_sql_length 14 -#define isc_info_sql_null_ind 15 -#define isc_info_sql_field 16 -#define isc_info_sql_relation 17 -#define isc_info_sql_owner 18 -#define isc_info_sql_alias 19 -#define isc_info_sql_sqlda_start 20 -#define isc_info_sql_stmt_type 21 -#define isc_info_sql_get_plan 22 -#define isc_info_sql_records 23 -#define isc_info_sql_batch_fetch 24 -#define isc_info_sql_relation_alias 25 -#define isc_info_sql_explain_plan 26 -#define isc_info_sql_stmt_flags 27 - -#define isc_info_sql_stmt_select 1 -#define isc_info_sql_stmt_insert 2 -#define isc_info_sql_stmt_update 3 -#define isc_info_sql_stmt_delete 4 -#define isc_info_sql_stmt_ddl 5 -#define isc_info_sql_stmt_get_segment 6 -#define isc_info_sql_stmt_put_segment 7 -#define isc_info_sql_stmt_exec_procedure 8 -#define isc_info_sql_stmt_start_trans 9 -#define isc_info_sql_stmt_commit 10 -#define isc_info_sql_stmt_rollback 11 -#define isc_info_sql_stmt_select_for_upd 12 -#define isc_info_sql_stmt_set_generator 13 -#define isc_info_sql_stmt_savepoint 14 - -#endif - +#include "impl/inf_pub.h" #include "iberror.h" -#endif /* JRD_IBASE_H */ - +#endif /* FIREBIRD_IBASE_H */ diff --git a/packages/node-firebird-native-api/src/native/include/firebird/iberror.h b/packages/node-firebird-native-api/src/native/include/firebird/iberror.h index d003018..5e6446f 100644 --- a/packages/node-firebird-native-api/src/native/include/firebird/iberror.h +++ b/packages/node-firebird-native-api/src/native/include/firebird/iberror.h @@ -1,6 +1,3 @@ - -#ifndef JRD_GEN_IBERROR_H -#define JRD_GEN_IBERROR_H /* * The contents of this file are subject to the Interbase Public * License Version 1.0 (the "License"); you may not use this file @@ -11,42 +8,28 @@ * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express * or implied. See the License for the specific language governing * rights and limitations under the License. - * - * The content of this file was generated by the Firebird project - * using the program src/misc/codes.epp - */ -/* - * - * *** WARNING *** - This file is automatically generated by codes.epp - do not edit! - * */ -/* - * MODULE: iberror.h - * DESCRIPTION: ISC error codes - * - */ - +#ifndef FIREBIRD_IBERROR_H +#define FIREBIRD_IBERROR_H -/***********************/ -/* ISC Error Codes */ -/***********************/ - +#include "impl/msg_helper.h" #ifdef __cplusplus /* c++ definitions */ -const ISC_STATUS isc_facility = 20; -const ISC_STATUS isc_base = 335544320L; +const ISC_STATUS isc_facility = 20; +const ISC_STATUS isc_base = isc_facility << 24; const ISC_STATUS isc_factor = 1; + const ISC_STATUS isc_arg_end = 0; // end of argument list const ISC_STATUS isc_arg_gds = 1; // generic DSRI status value -const ISC_STATUS isc_arg_string = 2; // string argument +const ISC_STATUS isc_arg_string = 2; // string argument const ISC_STATUS isc_arg_cstring = 3; // count & string argument -const ISC_STATUS isc_arg_number = 4; // numeric argument (long) +const ISC_STATUS isc_arg_number = 4; // numeric argument (long) const ISC_STATUS isc_arg_interpreted = 5; // interpreted status code (string) const ISC_STATUS isc_arg_vms = 6; // VAX/VMS status code (long) const ISC_STATUS isc_arg_unix = 7; // UNIX error code -const ISC_STATUS isc_arg_domain = 8; // Apollo/Domain error code +const ISC_STATUS isc_arg_domain = 8; // Apollo/Domain error code const ISC_STATUS isc_arg_dos = 9; // MSDOS/OS2 error code const ISC_STATUS isc_arg_mpexl = 10; // HP MPE/XL error code const ISC_STATUS isc_arg_mpexl_ipc = 11; // HP MPE/XL IPC error code @@ -56,2552 +39,59 @@ const ISC_STATUS isc_arg_win32 = 17; // Win32 error code const ISC_STATUS isc_arg_warning = 18; // warning argument const ISC_STATUS isc_arg_sql_state = 19; // SQLSTATE -const ISC_STATUS isc_arith_except = 335544321L; -const ISC_STATUS isc_bad_dbkey = 335544322L; -const ISC_STATUS isc_bad_db_format = 335544323L; -const ISC_STATUS isc_bad_db_handle = 335544324L; -const ISC_STATUS isc_bad_dpb_content = 335544325L; -const ISC_STATUS isc_bad_dpb_form = 335544326L; -const ISC_STATUS isc_bad_req_handle = 335544327L; -const ISC_STATUS isc_bad_segstr_handle = 335544328L; -const ISC_STATUS isc_bad_segstr_id = 335544329L; -const ISC_STATUS isc_bad_tpb_content = 335544330L; -const ISC_STATUS isc_bad_tpb_form = 335544331L; -const ISC_STATUS isc_bad_trans_handle = 335544332L; -const ISC_STATUS isc_bug_check = 335544333L; -const ISC_STATUS isc_convert_error = 335544334L; -const ISC_STATUS isc_db_corrupt = 335544335L; -const ISC_STATUS isc_deadlock = 335544336L; -const ISC_STATUS isc_excess_trans = 335544337L; -const ISC_STATUS isc_from_no_match = 335544338L; -const ISC_STATUS isc_infinap = 335544339L; -const ISC_STATUS isc_infona = 335544340L; -const ISC_STATUS isc_infunk = 335544341L; -const ISC_STATUS isc_integ_fail = 335544342L; -const ISC_STATUS isc_invalid_blr = 335544343L; -const ISC_STATUS isc_io_error = 335544344L; -const ISC_STATUS isc_lock_conflict = 335544345L; -const ISC_STATUS isc_metadata_corrupt = 335544346L; -const ISC_STATUS isc_not_valid = 335544347L; -const ISC_STATUS isc_no_cur_rec = 335544348L; -const ISC_STATUS isc_no_dup = 335544349L; -const ISC_STATUS isc_no_finish = 335544350L; -const ISC_STATUS isc_no_meta_update = 335544351L; -const ISC_STATUS isc_no_priv = 335544352L; -const ISC_STATUS isc_no_recon = 335544353L; -const ISC_STATUS isc_no_record = 335544354L; -const ISC_STATUS isc_no_segstr_close = 335544355L; -const ISC_STATUS isc_obsolete_metadata = 335544356L; -const ISC_STATUS isc_open_trans = 335544357L; -const ISC_STATUS isc_port_len = 335544358L; -const ISC_STATUS isc_read_only_field = 335544359L; -const ISC_STATUS isc_read_only_rel = 335544360L; -const ISC_STATUS isc_read_only_trans = 335544361L; -const ISC_STATUS isc_read_only_view = 335544362L; -const ISC_STATUS isc_req_no_trans = 335544363L; -const ISC_STATUS isc_req_sync = 335544364L; -const ISC_STATUS isc_req_wrong_db = 335544365L; -const ISC_STATUS isc_segment = 335544366L; -const ISC_STATUS isc_segstr_eof = 335544367L; -const ISC_STATUS isc_segstr_no_op = 335544368L; -const ISC_STATUS isc_segstr_no_read = 335544369L; -const ISC_STATUS isc_segstr_no_trans = 335544370L; -const ISC_STATUS isc_segstr_no_write = 335544371L; -const ISC_STATUS isc_segstr_wrong_db = 335544372L; -const ISC_STATUS isc_sys_request = 335544373L; -const ISC_STATUS isc_stream_eof = 335544374L; -const ISC_STATUS isc_unavailable = 335544375L; -const ISC_STATUS isc_unres_rel = 335544376L; -const ISC_STATUS isc_uns_ext = 335544377L; -const ISC_STATUS isc_wish_list = 335544378L; -const ISC_STATUS isc_wrong_ods = 335544379L; -const ISC_STATUS isc_wronumarg = 335544380L; -const ISC_STATUS isc_imp_exc = 335544381L; -const ISC_STATUS isc_random = 335544382L; -const ISC_STATUS isc_fatal_conflict = 335544383L; -const ISC_STATUS isc_badblk = 335544384L; -const ISC_STATUS isc_invpoolcl = 335544385L; -const ISC_STATUS isc_nopoolids = 335544386L; -const ISC_STATUS isc_relbadblk = 335544387L; -const ISC_STATUS isc_blktoobig = 335544388L; -const ISC_STATUS isc_bufexh = 335544389L; -const ISC_STATUS isc_syntaxerr = 335544390L; -const ISC_STATUS isc_bufinuse = 335544391L; -const ISC_STATUS isc_bdbincon = 335544392L; -const ISC_STATUS isc_reqinuse = 335544393L; -const ISC_STATUS isc_badodsver = 335544394L; -const ISC_STATUS isc_relnotdef = 335544395L; -const ISC_STATUS isc_fldnotdef = 335544396L; -const ISC_STATUS isc_dirtypage = 335544397L; -const ISC_STATUS isc_waifortra = 335544398L; -const ISC_STATUS isc_doubleloc = 335544399L; -const ISC_STATUS isc_nodnotfnd = 335544400L; -const ISC_STATUS isc_dupnodfnd = 335544401L; -const ISC_STATUS isc_locnotmar = 335544402L; -const ISC_STATUS isc_badpagtyp = 335544403L; -const ISC_STATUS isc_corrupt = 335544404L; -const ISC_STATUS isc_badpage = 335544405L; -const ISC_STATUS isc_badindex = 335544406L; -const ISC_STATUS isc_dbbnotzer = 335544407L; -const ISC_STATUS isc_tranotzer = 335544408L; -const ISC_STATUS isc_trareqmis = 335544409L; -const ISC_STATUS isc_badhndcnt = 335544410L; -const ISC_STATUS isc_wrotpbver = 335544411L; -const ISC_STATUS isc_wroblrver = 335544412L; -const ISC_STATUS isc_wrodpbver = 335544413L; -const ISC_STATUS isc_blobnotsup = 335544414L; -const ISC_STATUS isc_badrelation = 335544415L; -const ISC_STATUS isc_nodetach = 335544416L; -const ISC_STATUS isc_notremote = 335544417L; -const ISC_STATUS isc_trainlim = 335544418L; -const ISC_STATUS isc_notinlim = 335544419L; -const ISC_STATUS isc_traoutsta = 335544420L; -const ISC_STATUS isc_connect_reject = 335544421L; -const ISC_STATUS isc_dbfile = 335544422L; -const ISC_STATUS isc_orphan = 335544423L; -const ISC_STATUS isc_no_lock_mgr = 335544424L; -const ISC_STATUS isc_ctxinuse = 335544425L; -const ISC_STATUS isc_ctxnotdef = 335544426L; -const ISC_STATUS isc_datnotsup = 335544427L; -const ISC_STATUS isc_badmsgnum = 335544428L; -const ISC_STATUS isc_badparnum = 335544429L; -const ISC_STATUS isc_virmemexh = 335544430L; -const ISC_STATUS isc_blocking_signal = 335544431L; -const ISC_STATUS isc_lockmanerr = 335544432L; -const ISC_STATUS isc_journerr = 335544433L; -const ISC_STATUS isc_keytoobig = 335544434L; -const ISC_STATUS isc_nullsegkey = 335544435L; -const ISC_STATUS isc_sqlerr = 335544436L; -const ISC_STATUS isc_wrodynver = 335544437L; -const ISC_STATUS isc_funnotdef = 335544438L; -const ISC_STATUS isc_funmismat = 335544439L; -const ISC_STATUS isc_bad_msg_vec = 335544440L; -const ISC_STATUS isc_bad_detach = 335544441L; -const ISC_STATUS isc_noargacc_read = 335544442L; -const ISC_STATUS isc_noargacc_write = 335544443L; -const ISC_STATUS isc_read_only = 335544444L; -const ISC_STATUS isc_ext_err = 335544445L; -const ISC_STATUS isc_non_updatable = 335544446L; -const ISC_STATUS isc_no_rollback = 335544447L; -const ISC_STATUS isc_bad_sec_info = 335544448L; -const ISC_STATUS isc_invalid_sec_info = 335544449L; -const ISC_STATUS isc_misc_interpreted = 335544450L; -const ISC_STATUS isc_update_conflict = 335544451L; -const ISC_STATUS isc_unlicensed = 335544452L; -const ISC_STATUS isc_obj_in_use = 335544453L; -const ISC_STATUS isc_nofilter = 335544454L; -const ISC_STATUS isc_shadow_accessed = 335544455L; -const ISC_STATUS isc_invalid_sdl = 335544456L; -const ISC_STATUS isc_out_of_bounds = 335544457L; -const ISC_STATUS isc_invalid_dimension = 335544458L; -const ISC_STATUS isc_rec_in_limbo = 335544459L; -const ISC_STATUS isc_shadow_missing = 335544460L; -const ISC_STATUS isc_cant_validate = 335544461L; -const ISC_STATUS isc_cant_start_journal = 335544462L; -const ISC_STATUS isc_gennotdef = 335544463L; -const ISC_STATUS isc_cant_start_logging = 335544464L; -const ISC_STATUS isc_bad_segstr_type = 335544465L; -const ISC_STATUS isc_foreign_key = 335544466L; -const ISC_STATUS isc_high_minor = 335544467L; -const ISC_STATUS isc_tra_state = 335544468L; -const ISC_STATUS isc_trans_invalid = 335544469L; -const ISC_STATUS isc_buf_invalid = 335544470L; -const ISC_STATUS isc_indexnotdefined = 335544471L; -const ISC_STATUS isc_login = 335544472L; -const ISC_STATUS isc_invalid_bookmark = 335544473L; -const ISC_STATUS isc_bad_lock_level = 335544474L; -const ISC_STATUS isc_relation_lock = 335544475L; -const ISC_STATUS isc_record_lock = 335544476L; -const ISC_STATUS isc_max_idx = 335544477L; -const ISC_STATUS isc_jrn_enable = 335544478L; -const ISC_STATUS isc_old_failure = 335544479L; -const ISC_STATUS isc_old_in_progress = 335544480L; -const ISC_STATUS isc_old_no_space = 335544481L; -const ISC_STATUS isc_no_wal_no_jrn = 335544482L; -const ISC_STATUS isc_num_old_files = 335544483L; -const ISC_STATUS isc_wal_file_open = 335544484L; -const ISC_STATUS isc_bad_stmt_handle = 335544485L; -const ISC_STATUS isc_wal_failure = 335544486L; -const ISC_STATUS isc_walw_err = 335544487L; -const ISC_STATUS isc_logh_small = 335544488L; -const ISC_STATUS isc_logh_inv_version = 335544489L; -const ISC_STATUS isc_logh_open_flag = 335544490L; -const ISC_STATUS isc_logh_open_flag2 = 335544491L; -const ISC_STATUS isc_logh_diff_dbname = 335544492L; -const ISC_STATUS isc_logf_unexpected_eof = 335544493L; -const ISC_STATUS isc_logr_incomplete = 335544494L; -const ISC_STATUS isc_logr_header_small = 335544495L; -const ISC_STATUS isc_logb_small = 335544496L; -const ISC_STATUS isc_wal_illegal_attach = 335544497L; -const ISC_STATUS isc_wal_invalid_wpb = 335544498L; -const ISC_STATUS isc_wal_err_rollover = 335544499L; -const ISC_STATUS isc_no_wal = 335544500L; -const ISC_STATUS isc_drop_wal = 335544501L; -const ISC_STATUS isc_stream_not_defined = 335544502L; -const ISC_STATUS isc_wal_subsys_error = 335544503L; -const ISC_STATUS isc_wal_subsys_corrupt = 335544504L; -const ISC_STATUS isc_no_archive = 335544505L; -const ISC_STATUS isc_shutinprog = 335544506L; -const ISC_STATUS isc_range_in_use = 335544507L; -const ISC_STATUS isc_range_not_found = 335544508L; -const ISC_STATUS isc_charset_not_found = 335544509L; -const ISC_STATUS isc_lock_timeout = 335544510L; -const ISC_STATUS isc_prcnotdef = 335544511L; -const ISC_STATUS isc_prcmismat = 335544512L; -const ISC_STATUS isc_wal_bugcheck = 335544513L; -const ISC_STATUS isc_wal_cant_expand = 335544514L; -const ISC_STATUS isc_codnotdef = 335544515L; -const ISC_STATUS isc_xcpnotdef = 335544516L; -const ISC_STATUS isc_except = 335544517L; -const ISC_STATUS isc_cache_restart = 335544518L; -const ISC_STATUS isc_bad_lock_handle = 335544519L; -const ISC_STATUS isc_jrn_present = 335544520L; -const ISC_STATUS isc_wal_err_rollover2 = 335544521L; -const ISC_STATUS isc_wal_err_logwrite = 335544522L; -const ISC_STATUS isc_wal_err_jrn_comm = 335544523L; -const ISC_STATUS isc_wal_err_expansion = 335544524L; -const ISC_STATUS isc_wal_err_setup = 335544525L; -const ISC_STATUS isc_wal_err_ww_sync = 335544526L; -const ISC_STATUS isc_wal_err_ww_start = 335544527L; -const ISC_STATUS isc_shutdown = 335544528L; -const ISC_STATUS isc_existing_priv_mod = 335544529L; -const ISC_STATUS isc_primary_key_ref = 335544530L; -const ISC_STATUS isc_primary_key_notnull = 335544531L; -const ISC_STATUS isc_ref_cnstrnt_notfound = 335544532L; -const ISC_STATUS isc_foreign_key_notfound = 335544533L; -const ISC_STATUS isc_ref_cnstrnt_update = 335544534L; -const ISC_STATUS isc_check_cnstrnt_update = 335544535L; -const ISC_STATUS isc_check_cnstrnt_del = 335544536L; -const ISC_STATUS isc_integ_index_seg_del = 335544537L; -const ISC_STATUS isc_integ_index_seg_mod = 335544538L; -const ISC_STATUS isc_integ_index_del = 335544539L; -const ISC_STATUS isc_integ_index_mod = 335544540L; -const ISC_STATUS isc_check_trig_del = 335544541L; -const ISC_STATUS isc_check_trig_update = 335544542L; -const ISC_STATUS isc_cnstrnt_fld_del = 335544543L; -const ISC_STATUS isc_cnstrnt_fld_rename = 335544544L; -const ISC_STATUS isc_rel_cnstrnt_update = 335544545L; -const ISC_STATUS isc_constaint_on_view = 335544546L; -const ISC_STATUS isc_invld_cnstrnt_type = 335544547L; -const ISC_STATUS isc_primary_key_exists = 335544548L; -const ISC_STATUS isc_systrig_update = 335544549L; -const ISC_STATUS isc_not_rel_owner = 335544550L; -const ISC_STATUS isc_grant_obj_notfound = 335544551L; -const ISC_STATUS isc_grant_fld_notfound = 335544552L; -const ISC_STATUS isc_grant_nopriv = 335544553L; -const ISC_STATUS isc_nonsql_security_rel = 335544554L; -const ISC_STATUS isc_nonsql_security_fld = 335544555L; -const ISC_STATUS isc_wal_cache_err = 335544556L; -const ISC_STATUS isc_shutfail = 335544557L; -const ISC_STATUS isc_check_constraint = 335544558L; -const ISC_STATUS isc_bad_svc_handle = 335544559L; -const ISC_STATUS isc_shutwarn = 335544560L; -const ISC_STATUS isc_wrospbver = 335544561L; -const ISC_STATUS isc_bad_spb_form = 335544562L; -const ISC_STATUS isc_svcnotdef = 335544563L; -const ISC_STATUS isc_no_jrn = 335544564L; -const ISC_STATUS isc_transliteration_failed = 335544565L; -const ISC_STATUS isc_start_cm_for_wal = 335544566L; -const ISC_STATUS isc_wal_ovflow_log_required = 335544567L; -const ISC_STATUS isc_text_subtype = 335544568L; -const ISC_STATUS isc_dsql_error = 335544569L; -const ISC_STATUS isc_dsql_command_err = 335544570L; -const ISC_STATUS isc_dsql_constant_err = 335544571L; -const ISC_STATUS isc_dsql_cursor_err = 335544572L; -const ISC_STATUS isc_dsql_datatype_err = 335544573L; -const ISC_STATUS isc_dsql_decl_err = 335544574L; -const ISC_STATUS isc_dsql_cursor_update_err = 335544575L; -const ISC_STATUS isc_dsql_cursor_open_err = 335544576L; -const ISC_STATUS isc_dsql_cursor_close_err = 335544577L; -const ISC_STATUS isc_dsql_field_err = 335544578L; -const ISC_STATUS isc_dsql_internal_err = 335544579L; -const ISC_STATUS isc_dsql_relation_err = 335544580L; -const ISC_STATUS isc_dsql_procedure_err = 335544581L; -const ISC_STATUS isc_dsql_request_err = 335544582L; -const ISC_STATUS isc_dsql_sqlda_err = 335544583L; -const ISC_STATUS isc_dsql_var_count_err = 335544584L; -const ISC_STATUS isc_dsql_stmt_handle = 335544585L; -const ISC_STATUS isc_dsql_function_err = 335544586L; -const ISC_STATUS isc_dsql_blob_err = 335544587L; -const ISC_STATUS isc_collation_not_found = 335544588L; -const ISC_STATUS isc_collation_not_for_charset = 335544589L; -const ISC_STATUS isc_dsql_dup_option = 335544590L; -const ISC_STATUS isc_dsql_tran_err = 335544591L; -const ISC_STATUS isc_dsql_invalid_array = 335544592L; -const ISC_STATUS isc_dsql_max_arr_dim_exceeded = 335544593L; -const ISC_STATUS isc_dsql_arr_range_error = 335544594L; -const ISC_STATUS isc_dsql_trigger_err = 335544595L; -const ISC_STATUS isc_dsql_subselect_err = 335544596L; -const ISC_STATUS isc_dsql_crdb_prepare_err = 335544597L; -const ISC_STATUS isc_specify_field_err = 335544598L; -const ISC_STATUS isc_num_field_err = 335544599L; -const ISC_STATUS isc_col_name_err = 335544600L; -const ISC_STATUS isc_where_err = 335544601L; -const ISC_STATUS isc_table_view_err = 335544602L; -const ISC_STATUS isc_distinct_err = 335544603L; -const ISC_STATUS isc_key_field_count_err = 335544604L; -const ISC_STATUS isc_subquery_err = 335544605L; -const ISC_STATUS isc_expression_eval_err = 335544606L; -const ISC_STATUS isc_node_err = 335544607L; -const ISC_STATUS isc_command_end_err = 335544608L; -const ISC_STATUS isc_index_name = 335544609L; -const ISC_STATUS isc_exception_name = 335544610L; -const ISC_STATUS isc_field_name = 335544611L; -const ISC_STATUS isc_token_err = 335544612L; -const ISC_STATUS isc_union_err = 335544613L; -const ISC_STATUS isc_dsql_construct_err = 335544614L; -const ISC_STATUS isc_field_aggregate_err = 335544615L; -const ISC_STATUS isc_field_ref_err = 335544616L; -const ISC_STATUS isc_order_by_err = 335544617L; -const ISC_STATUS isc_return_mode_err = 335544618L; -const ISC_STATUS isc_extern_func_err = 335544619L; -const ISC_STATUS isc_alias_conflict_err = 335544620L; -const ISC_STATUS isc_procedure_conflict_error = 335544621L; -const ISC_STATUS isc_relation_conflict_err = 335544622L; -const ISC_STATUS isc_dsql_domain_err = 335544623L; -const ISC_STATUS isc_idx_seg_err = 335544624L; -const ISC_STATUS isc_node_name_err = 335544625L; -const ISC_STATUS isc_table_name = 335544626L; -const ISC_STATUS isc_proc_name = 335544627L; -const ISC_STATUS isc_idx_create_err = 335544628L; -const ISC_STATUS isc_wal_shadow_err = 335544629L; -const ISC_STATUS isc_dependency = 335544630L; -const ISC_STATUS isc_idx_key_err = 335544631L; -const ISC_STATUS isc_dsql_file_length_err = 335544632L; -const ISC_STATUS isc_dsql_shadow_number_err = 335544633L; -const ISC_STATUS isc_dsql_token_unk_err = 335544634L; -const ISC_STATUS isc_dsql_no_relation_alias = 335544635L; -const ISC_STATUS isc_indexname = 335544636L; -const ISC_STATUS isc_no_stream_plan = 335544637L; -const ISC_STATUS isc_stream_twice = 335544638L; -const ISC_STATUS isc_stream_not_found = 335544639L; -const ISC_STATUS isc_collation_requires_text = 335544640L; -const ISC_STATUS isc_dsql_domain_not_found = 335544641L; -const ISC_STATUS isc_index_unused = 335544642L; -const ISC_STATUS isc_dsql_self_join = 335544643L; -const ISC_STATUS isc_stream_bof = 335544644L; -const ISC_STATUS isc_stream_crack = 335544645L; -const ISC_STATUS isc_db_or_file_exists = 335544646L; -const ISC_STATUS isc_invalid_operator = 335544647L; -const ISC_STATUS isc_conn_lost = 335544648L; -const ISC_STATUS isc_bad_checksum = 335544649L; -const ISC_STATUS isc_page_type_err = 335544650L; -const ISC_STATUS isc_ext_readonly_err = 335544651L; -const ISC_STATUS isc_sing_select_err = 335544652L; -const ISC_STATUS isc_psw_attach = 335544653L; -const ISC_STATUS isc_psw_start_trans = 335544654L; -const ISC_STATUS isc_invalid_direction = 335544655L; -const ISC_STATUS isc_dsql_var_conflict = 335544656L; -const ISC_STATUS isc_dsql_no_blob_array = 335544657L; -const ISC_STATUS isc_dsql_base_table = 335544658L; -const ISC_STATUS isc_duplicate_base_table = 335544659L; -const ISC_STATUS isc_view_alias = 335544660L; -const ISC_STATUS isc_index_root_page_full = 335544661L; -const ISC_STATUS isc_dsql_blob_type_unknown = 335544662L; -const ISC_STATUS isc_req_max_clones_exceeded = 335544663L; -const ISC_STATUS isc_dsql_duplicate_spec = 335544664L; -const ISC_STATUS isc_unique_key_violation = 335544665L; -const ISC_STATUS isc_srvr_version_too_old = 335544666L; -const ISC_STATUS isc_drdb_completed_with_errs = 335544667L; -const ISC_STATUS isc_dsql_procedure_use_err = 335544668L; -const ISC_STATUS isc_dsql_count_mismatch = 335544669L; -const ISC_STATUS isc_blob_idx_err = 335544670L; -const ISC_STATUS isc_array_idx_err = 335544671L; -const ISC_STATUS isc_key_field_err = 335544672L; -const ISC_STATUS isc_no_delete = 335544673L; -const ISC_STATUS isc_del_last_field = 335544674L; -const ISC_STATUS isc_sort_err = 335544675L; -const ISC_STATUS isc_sort_mem_err = 335544676L; -const ISC_STATUS isc_version_err = 335544677L; -const ISC_STATUS isc_inval_key_posn = 335544678L; -const ISC_STATUS isc_no_segments_err = 335544679L; -const ISC_STATUS isc_crrp_data_err = 335544680L; -const ISC_STATUS isc_rec_size_err = 335544681L; -const ISC_STATUS isc_dsql_field_ref = 335544682L; -const ISC_STATUS isc_req_depth_exceeded = 335544683L; -const ISC_STATUS isc_no_field_access = 335544684L; -const ISC_STATUS isc_no_dbkey = 335544685L; -const ISC_STATUS isc_jrn_format_err = 335544686L; -const ISC_STATUS isc_jrn_file_full = 335544687L; -const ISC_STATUS isc_dsql_open_cursor_request = 335544688L; -const ISC_STATUS isc_ib_error = 335544689L; -const ISC_STATUS isc_cache_redef = 335544690L; -const ISC_STATUS isc_cache_too_small = 335544691L; -const ISC_STATUS isc_log_redef = 335544692L; -const ISC_STATUS isc_log_too_small = 335544693L; -const ISC_STATUS isc_partition_too_small = 335544694L; -const ISC_STATUS isc_partition_not_supp = 335544695L; -const ISC_STATUS isc_log_length_spec = 335544696L; -const ISC_STATUS isc_precision_err = 335544697L; -const ISC_STATUS isc_scale_nogt = 335544698L; -const ISC_STATUS isc_expec_short = 335544699L; -const ISC_STATUS isc_expec_long = 335544700L; -const ISC_STATUS isc_expec_ushort = 335544701L; -const ISC_STATUS isc_escape_invalid = 335544702L; -const ISC_STATUS isc_svcnoexe = 335544703L; -const ISC_STATUS isc_net_lookup_err = 335544704L; -const ISC_STATUS isc_service_unknown = 335544705L; -const ISC_STATUS isc_host_unknown = 335544706L; -const ISC_STATUS isc_grant_nopriv_on_base = 335544707L; -const ISC_STATUS isc_dyn_fld_ambiguous = 335544708L; -const ISC_STATUS isc_dsql_agg_ref_err = 335544709L; -const ISC_STATUS isc_complex_view = 335544710L; -const ISC_STATUS isc_unprepared_stmt = 335544711L; -const ISC_STATUS isc_expec_positive = 335544712L; -const ISC_STATUS isc_dsql_sqlda_value_err = 335544713L; -const ISC_STATUS isc_invalid_array_id = 335544714L; -const ISC_STATUS isc_extfile_uns_op = 335544715L; -const ISC_STATUS isc_svc_in_use = 335544716L; -const ISC_STATUS isc_err_stack_limit = 335544717L; -const ISC_STATUS isc_invalid_key = 335544718L; -const ISC_STATUS isc_net_init_error = 335544719L; -const ISC_STATUS isc_loadlib_failure = 335544720L; -const ISC_STATUS isc_network_error = 335544721L; -const ISC_STATUS isc_net_connect_err = 335544722L; -const ISC_STATUS isc_net_connect_listen_err = 335544723L; -const ISC_STATUS isc_net_event_connect_err = 335544724L; -const ISC_STATUS isc_net_event_listen_err = 335544725L; -const ISC_STATUS isc_net_read_err = 335544726L; -const ISC_STATUS isc_net_write_err = 335544727L; -const ISC_STATUS isc_integ_index_deactivate = 335544728L; -const ISC_STATUS isc_integ_deactivate_primary = 335544729L; -const ISC_STATUS isc_cse_not_supported = 335544730L; -const ISC_STATUS isc_tra_must_sweep = 335544731L; -const ISC_STATUS isc_unsupported_network_drive = 335544732L; -const ISC_STATUS isc_io_create_err = 335544733L; -const ISC_STATUS isc_io_open_err = 335544734L; -const ISC_STATUS isc_io_close_err = 335544735L; -const ISC_STATUS isc_io_read_err = 335544736L; -const ISC_STATUS isc_io_write_err = 335544737L; -const ISC_STATUS isc_io_delete_err = 335544738L; -const ISC_STATUS isc_io_access_err = 335544739L; -const ISC_STATUS isc_udf_exception = 335544740L; -const ISC_STATUS isc_lost_db_connection = 335544741L; -const ISC_STATUS isc_no_write_user_priv = 335544742L; -const ISC_STATUS isc_token_too_long = 335544743L; -const ISC_STATUS isc_max_att_exceeded = 335544744L; -const ISC_STATUS isc_login_same_as_role_name = 335544745L; -const ISC_STATUS isc_reftable_requires_pk = 335544746L; -const ISC_STATUS isc_usrname_too_long = 335544747L; -const ISC_STATUS isc_password_too_long = 335544748L; -const ISC_STATUS isc_usrname_required = 335544749L; -const ISC_STATUS isc_password_required = 335544750L; -const ISC_STATUS isc_bad_protocol = 335544751L; -const ISC_STATUS isc_dup_usrname_found = 335544752L; -const ISC_STATUS isc_usrname_not_found = 335544753L; -const ISC_STATUS isc_error_adding_sec_record = 335544754L; -const ISC_STATUS isc_error_modifying_sec_record = 335544755L; -const ISC_STATUS isc_error_deleting_sec_record = 335544756L; -const ISC_STATUS isc_error_updating_sec_db = 335544757L; -const ISC_STATUS isc_sort_rec_size_err = 335544758L; -const ISC_STATUS isc_bad_default_value = 335544759L; -const ISC_STATUS isc_invalid_clause = 335544760L; -const ISC_STATUS isc_too_many_handles = 335544761L; -const ISC_STATUS isc_optimizer_blk_exc = 335544762L; -const ISC_STATUS isc_invalid_string_constant = 335544763L; -const ISC_STATUS isc_transitional_date = 335544764L; -const ISC_STATUS isc_read_only_database = 335544765L; -const ISC_STATUS isc_must_be_dialect_2_and_up = 335544766L; -const ISC_STATUS isc_blob_filter_exception = 335544767L; -const ISC_STATUS isc_exception_access_violation = 335544768L; -const ISC_STATUS isc_exception_datatype_missalignment = 335544769L; -const ISC_STATUS isc_exception_array_bounds_exceeded = 335544770L; -const ISC_STATUS isc_exception_float_denormal_operand = 335544771L; -const ISC_STATUS isc_exception_float_divide_by_zero = 335544772L; -const ISC_STATUS isc_exception_float_inexact_result = 335544773L; -const ISC_STATUS isc_exception_float_invalid_operand = 335544774L; -const ISC_STATUS isc_exception_float_overflow = 335544775L; -const ISC_STATUS isc_exception_float_stack_check = 335544776L; -const ISC_STATUS isc_exception_float_underflow = 335544777L; -const ISC_STATUS isc_exception_integer_divide_by_zero = 335544778L; -const ISC_STATUS isc_exception_integer_overflow = 335544779L; -const ISC_STATUS isc_exception_unknown = 335544780L; -const ISC_STATUS isc_exception_stack_overflow = 335544781L; -const ISC_STATUS isc_exception_sigsegv = 335544782L; -const ISC_STATUS isc_exception_sigill = 335544783L; -const ISC_STATUS isc_exception_sigbus = 335544784L; -const ISC_STATUS isc_exception_sigfpe = 335544785L; -const ISC_STATUS isc_ext_file_delete = 335544786L; -const ISC_STATUS isc_ext_file_modify = 335544787L; -const ISC_STATUS isc_adm_task_denied = 335544788L; -const ISC_STATUS isc_extract_input_mismatch = 335544789L; -const ISC_STATUS isc_insufficient_svc_privileges = 335544790L; -const ISC_STATUS isc_file_in_use = 335544791L; -const ISC_STATUS isc_service_att_err = 335544792L; -const ISC_STATUS isc_ddl_not_allowed_by_db_sql_dial = 335544793L; -const ISC_STATUS isc_cancelled = 335544794L; -const ISC_STATUS isc_unexp_spb_form = 335544795L; -const ISC_STATUS isc_sql_dialect_datatype_unsupport = 335544796L; -const ISC_STATUS isc_svcnouser = 335544797L; -const ISC_STATUS isc_depend_on_uncommitted_rel = 335544798L; -const ISC_STATUS isc_svc_name_missing = 335544799L; -const ISC_STATUS isc_too_many_contexts = 335544800L; -const ISC_STATUS isc_datype_notsup = 335544801L; -const ISC_STATUS isc_dialect_reset_warning = 335544802L; -const ISC_STATUS isc_dialect_not_changed = 335544803L; -const ISC_STATUS isc_database_create_failed = 335544804L; -const ISC_STATUS isc_inv_dialect_specified = 335544805L; -const ISC_STATUS isc_valid_db_dialects = 335544806L; -const ISC_STATUS isc_sqlwarn = 335544807L; -const ISC_STATUS isc_dtype_renamed = 335544808L; -const ISC_STATUS isc_extern_func_dir_error = 335544809L; -const ISC_STATUS isc_date_range_exceeded = 335544810L; -const ISC_STATUS isc_inv_client_dialect_specified = 335544811L; -const ISC_STATUS isc_valid_client_dialects = 335544812L; -const ISC_STATUS isc_optimizer_between_err = 335544813L; -const ISC_STATUS isc_service_not_supported = 335544814L; -const ISC_STATUS isc_generator_name = 335544815L; -const ISC_STATUS isc_udf_name = 335544816L; -const ISC_STATUS isc_bad_limit_param = 335544817L; -const ISC_STATUS isc_bad_skip_param = 335544818L; -const ISC_STATUS isc_io_32bit_exceeded_err = 335544819L; -const ISC_STATUS isc_invalid_savepoint = 335544820L; -const ISC_STATUS isc_dsql_column_pos_err = 335544821L; -const ISC_STATUS isc_dsql_agg_where_err = 335544822L; -const ISC_STATUS isc_dsql_agg_group_err = 335544823L; -const ISC_STATUS isc_dsql_agg_column_err = 335544824L; -const ISC_STATUS isc_dsql_agg_having_err = 335544825L; -const ISC_STATUS isc_dsql_agg_nested_err = 335544826L; -const ISC_STATUS isc_exec_sql_invalid_arg = 335544827L; -const ISC_STATUS isc_exec_sql_invalid_req = 335544828L; -const ISC_STATUS isc_exec_sql_invalid_var = 335544829L; -const ISC_STATUS isc_exec_sql_max_call_exceeded = 335544830L; -const ISC_STATUS isc_conf_access_denied = 335544831L; -const ISC_STATUS isc_wrong_backup_state = 335544832L; -const ISC_STATUS isc_wal_backup_err = 335544833L; -const ISC_STATUS isc_cursor_not_open = 335544834L; -const ISC_STATUS isc_bad_shutdown_mode = 335544835L; -const ISC_STATUS isc_concat_overflow = 335544836L; -const ISC_STATUS isc_bad_substring_offset = 335544837L; -const ISC_STATUS isc_foreign_key_target_doesnt_exist = 335544838L; -const ISC_STATUS isc_foreign_key_references_present = 335544839L; -const ISC_STATUS isc_no_update = 335544840L; -const ISC_STATUS isc_cursor_already_open = 335544841L; -const ISC_STATUS isc_stack_trace = 335544842L; -const ISC_STATUS isc_ctx_var_not_found = 335544843L; -const ISC_STATUS isc_ctx_namespace_invalid = 335544844L; -const ISC_STATUS isc_ctx_too_big = 335544845L; -const ISC_STATUS isc_ctx_bad_argument = 335544846L; -const ISC_STATUS isc_identifier_too_long = 335544847L; -const ISC_STATUS isc_except2 = 335544848L; -const ISC_STATUS isc_malformed_string = 335544849L; -const ISC_STATUS isc_prc_out_param_mismatch = 335544850L; -const ISC_STATUS isc_command_end_err2 = 335544851L; -const ISC_STATUS isc_partner_idx_incompat_type = 335544852L; -const ISC_STATUS isc_bad_substring_length = 335544853L; -const ISC_STATUS isc_charset_not_installed = 335544854L; -const ISC_STATUS isc_collation_not_installed = 335544855L; -const ISC_STATUS isc_att_shutdown = 335544856L; -const ISC_STATUS isc_blobtoobig = 335544857L; -const ISC_STATUS isc_must_have_phys_field = 335544858L; -const ISC_STATUS isc_invalid_time_precision = 335544859L; -const ISC_STATUS isc_blob_convert_error = 335544860L; -const ISC_STATUS isc_array_convert_error = 335544861L; -const ISC_STATUS isc_record_lock_not_supp = 335544862L; -const ISC_STATUS isc_partner_idx_not_found = 335544863L; -const ISC_STATUS isc_tra_num_exc = 335544864L; -const ISC_STATUS isc_field_disappeared = 335544865L; -const ISC_STATUS isc_met_wrong_gtt_scope = 335544866L; -const ISC_STATUS isc_subtype_for_internal_use = 335544867L; -const ISC_STATUS isc_illegal_prc_type = 335544868L; -const ISC_STATUS isc_invalid_sort_datatype = 335544869L; -const ISC_STATUS isc_collation_name = 335544870L; -const ISC_STATUS isc_domain_name = 335544871L; -const ISC_STATUS isc_domnotdef = 335544872L; -const ISC_STATUS isc_array_max_dimensions = 335544873L; -const ISC_STATUS isc_max_db_per_trans_allowed = 335544874L; -const ISC_STATUS isc_bad_debug_format = 335544875L; -const ISC_STATUS isc_bad_proc_BLR = 335544876L; -const ISC_STATUS isc_key_too_big = 335544877L; -const ISC_STATUS isc_concurrent_transaction = 335544878L; -const ISC_STATUS isc_not_valid_for_var = 335544879L; -const ISC_STATUS isc_not_valid_for = 335544880L; -const ISC_STATUS isc_need_difference = 335544881L; -const ISC_STATUS isc_long_login = 335544882L; -const ISC_STATUS isc_fldnotdef2 = 335544883L; -const ISC_STATUS isc_invalid_similar_pattern = 335544884L; -const ISC_STATUS isc_bad_teb_form = 335544885L; -const ISC_STATUS isc_tpb_multiple_txn_isolation = 335544886L; -const ISC_STATUS isc_tpb_reserv_before_table = 335544887L; -const ISC_STATUS isc_tpb_multiple_spec = 335544888L; -const ISC_STATUS isc_tpb_option_without_rc = 335544889L; -const ISC_STATUS isc_tpb_conflicting_options = 335544890L; -const ISC_STATUS isc_tpb_reserv_missing_tlen = 335544891L; -const ISC_STATUS isc_tpb_reserv_long_tlen = 335544892L; -const ISC_STATUS isc_tpb_reserv_missing_tname = 335544893L; -const ISC_STATUS isc_tpb_reserv_corrup_tlen = 335544894L; -const ISC_STATUS isc_tpb_reserv_null_tlen = 335544895L; -const ISC_STATUS isc_tpb_reserv_relnotfound = 335544896L; -const ISC_STATUS isc_tpb_reserv_baserelnotfound = 335544897L; -const ISC_STATUS isc_tpb_missing_len = 335544898L; -const ISC_STATUS isc_tpb_missing_value = 335544899L; -const ISC_STATUS isc_tpb_corrupt_len = 335544900L; -const ISC_STATUS isc_tpb_null_len = 335544901L; -const ISC_STATUS isc_tpb_overflow_len = 335544902L; -const ISC_STATUS isc_tpb_invalid_value = 335544903L; -const ISC_STATUS isc_tpb_reserv_stronger_wng = 335544904L; -const ISC_STATUS isc_tpb_reserv_stronger = 335544905L; -const ISC_STATUS isc_tpb_reserv_max_recursion = 335544906L; -const ISC_STATUS isc_tpb_reserv_virtualtbl = 335544907L; -const ISC_STATUS isc_tpb_reserv_systbl = 335544908L; -const ISC_STATUS isc_tpb_reserv_temptbl = 335544909L; -const ISC_STATUS isc_tpb_readtxn_after_writelock = 335544910L; -const ISC_STATUS isc_tpb_writelock_after_readtxn = 335544911L; -const ISC_STATUS isc_time_range_exceeded = 335544912L; -const ISC_STATUS isc_datetime_range_exceeded = 335544913L; -const ISC_STATUS isc_string_truncation = 335544914L; -const ISC_STATUS isc_blob_truncation = 335544915L; -const ISC_STATUS isc_numeric_out_of_range = 335544916L; -const ISC_STATUS isc_shutdown_timeout = 335544917L; -const ISC_STATUS isc_att_handle_busy = 335544918L; -const ISC_STATUS isc_bad_udf_freeit = 335544919L; -const ISC_STATUS isc_eds_provider_not_found = 335544920L; -const ISC_STATUS isc_eds_connection = 335544921L; -const ISC_STATUS isc_eds_preprocess = 335544922L; -const ISC_STATUS isc_eds_stmt_expected = 335544923L; -const ISC_STATUS isc_eds_prm_name_expected = 335544924L; -const ISC_STATUS isc_eds_unclosed_comment = 335544925L; -const ISC_STATUS isc_eds_statement = 335544926L; -const ISC_STATUS isc_eds_input_prm_mismatch = 335544927L; -const ISC_STATUS isc_eds_output_prm_mismatch = 335544928L; -const ISC_STATUS isc_eds_input_prm_not_set = 335544929L; -const ISC_STATUS isc_too_big_blr = 335544930L; -const ISC_STATUS isc_montabexh = 335544931L; -const ISC_STATUS isc_modnotfound = 335544932L; -const ISC_STATUS isc_nothing_to_cancel = 335544933L; -const ISC_STATUS isc_ibutil_not_loaded = 335544934L; -const ISC_STATUS isc_circular_computed = 335544935L; -const ISC_STATUS isc_psw_db_error = 335544936L; -const ISC_STATUS isc_invalid_type_datetime_op = 335544937L; -const ISC_STATUS isc_onlycan_add_timetodate = 335544938L; -const ISC_STATUS isc_onlycan_add_datetotime = 335544939L; -const ISC_STATUS isc_onlycansub_tstampfromtstamp = 335544940L; -const ISC_STATUS isc_onlyoneop_mustbe_tstamp = 335544941L; -const ISC_STATUS isc_invalid_extractpart_time = 335544942L; -const ISC_STATUS isc_invalid_extractpart_date = 335544943L; -const ISC_STATUS isc_invalidarg_extract = 335544944L; -const ISC_STATUS isc_sysf_argmustbe_exact = 335544945L; -const ISC_STATUS isc_sysf_argmustbe_exact_or_fp = 335544946L; -const ISC_STATUS isc_sysf_argviolates_uuidtype = 335544947L; -const ISC_STATUS isc_sysf_argviolates_uuidlen = 335544948L; -const ISC_STATUS isc_sysf_argviolates_uuidfmt = 335544949L; -const ISC_STATUS isc_sysf_argviolates_guidigits = 335544950L; -const ISC_STATUS isc_sysf_invalid_addpart_time = 335544951L; -const ISC_STATUS isc_sysf_invalid_add_datetime = 335544952L; -const ISC_STATUS isc_sysf_invalid_addpart_dtime = 335544953L; -const ISC_STATUS isc_sysf_invalid_add_dtime_rc = 335544954L; -const ISC_STATUS isc_sysf_invalid_diff_dtime = 335544955L; -const ISC_STATUS isc_sysf_invalid_timediff = 335544956L; -const ISC_STATUS isc_sysf_invalid_tstamptimediff = 335544957L; -const ISC_STATUS isc_sysf_invalid_datetimediff = 335544958L; -const ISC_STATUS isc_sysf_invalid_diffpart = 335544959L; -const ISC_STATUS isc_sysf_argmustbe_positive = 335544960L; -const ISC_STATUS isc_sysf_basemustbe_positive = 335544961L; -const ISC_STATUS isc_sysf_argnmustbe_nonneg = 335544962L; -const ISC_STATUS isc_sysf_argnmustbe_positive = 335544963L; -const ISC_STATUS isc_sysf_invalid_zeropowneg = 335544964L; -const ISC_STATUS isc_sysf_invalid_negpowfp = 335544965L; -const ISC_STATUS isc_sysf_invalid_scale = 335544966L; -const ISC_STATUS isc_sysf_argmustbe_nonneg = 335544967L; -const ISC_STATUS isc_sysf_binuuid_mustbe_str = 335544968L; -const ISC_STATUS isc_sysf_binuuid_wrongsize = 335544969L; -const ISC_STATUS isc_missing_required_spb = 335544970L; -const ISC_STATUS isc_net_server_shutdown = 335544971L; -const ISC_STATUS isc_bad_conn_str = 335544972L; -const ISC_STATUS isc_bad_epb_form = 335544973L; -const ISC_STATUS isc_no_threads = 335544974L; -const ISC_STATUS isc_net_event_connect_timeout = 335544975L; -const ISC_STATUS isc_sysf_argmustbe_nonzero = 335544976L; -const ISC_STATUS isc_sysf_argmustbe_range_inc1_1 = 335544977L; -const ISC_STATUS isc_sysf_argmustbe_gteq_one = 335544978L; -const ISC_STATUS isc_sysf_argmustbe_range_exc1_1 = 335544979L; -const ISC_STATUS isc_internal_rejected_params = 335544980L; -const ISC_STATUS isc_sysf_fp_overflow = 335544981L; -const ISC_STATUS isc_udf_fp_overflow = 335544982L; -const ISC_STATUS isc_udf_fp_nan = 335544983L; -const ISC_STATUS isc_instance_conflict = 335544984L; -const ISC_STATUS isc_out_of_temp_space = 335544985L; -const ISC_STATUS isc_eds_expl_tran_ctrl = 335544986L; -const ISC_STATUS isc_no_trusted_spb = 335544987L; -const ISC_STATUS isc_package_name = 335544988L; -const ISC_STATUS isc_cannot_make_not_null = 335544989L; -const ISC_STATUS isc_feature_removed = 335544990L; -const ISC_STATUS isc_view_name = 335544991L; -const ISC_STATUS isc_lock_dir_access = 335544992L; -const ISC_STATUS isc_invalid_fetch_option = 335544993L; -const ISC_STATUS isc_bad_fun_BLR = 335544994L; -const ISC_STATUS isc_func_pack_not_implemented = 335544995L; -const ISC_STATUS isc_proc_pack_not_implemented = 335544996L; -const ISC_STATUS isc_eem_func_not_returned = 335544997L; -const ISC_STATUS isc_eem_proc_not_returned = 335544998L; -const ISC_STATUS isc_eem_trig_not_returned = 335544999L; -const ISC_STATUS isc_eem_bad_plugin_ver = 335545000L; -const ISC_STATUS isc_eem_engine_notfound = 335545001L; -const ISC_STATUS isc_attachment_in_use = 335545002L; -const ISC_STATUS isc_transaction_in_use = 335545003L; -const ISC_STATUS isc_pman_cannot_load_plugin = 335545004L; -const ISC_STATUS isc_pman_module_notfound = 335545005L; -const ISC_STATUS isc_pman_entrypoint_notfound = 335545006L; -const ISC_STATUS isc_pman_module_bad = 335545007L; -const ISC_STATUS isc_pman_plugin_notfound = 335545008L; -const ISC_STATUS isc_sysf_invalid_trig_namespace = 335545009L; -const ISC_STATUS isc_unexpected_null = 335545010L; -const ISC_STATUS isc_type_notcompat_blob = 335545011L; -const ISC_STATUS isc_invalid_date_val = 335545012L; -const ISC_STATUS isc_invalid_time_val = 335545013L; -const ISC_STATUS isc_invalid_timestamp_val = 335545014L; -const ISC_STATUS isc_invalid_index_val = 335545015L; -const ISC_STATUS isc_formatted_exception = 335545016L; -const ISC_STATUS isc_async_active = 335545017L; -const ISC_STATUS isc_private_function = 335545018L; -const ISC_STATUS isc_private_procedure = 335545019L; -const ISC_STATUS isc_request_outdated = 335545020L; -const ISC_STATUS isc_bad_events_handle = 335545021L; -const ISC_STATUS isc_cannot_copy_stmt = 335545022L; -const ISC_STATUS isc_invalid_boolean_usage = 335545023L; -const ISC_STATUS isc_sysf_argscant_both_be_zero = 335545024L; -const ISC_STATUS isc_spb_no_id = 335545025L; -const ISC_STATUS isc_ee_blr_mismatch_null = 335545026L; -const ISC_STATUS isc_ee_blr_mismatch_length = 335545027L; -const ISC_STATUS isc_ss_out_of_bounds = 335545028L; -const ISC_STATUS isc_missing_data_structures = 335545029L; -const ISC_STATUS isc_protect_sys_tab = 335545030L; -const ISC_STATUS isc_libtommath_generic = 335545031L; -const ISC_STATUS isc_wroblrver2 = 335545032L; -const ISC_STATUS isc_trunc_limits = 335545033L; -const ISC_STATUS isc_info_access = 335545034L; -const ISC_STATUS isc_svc_no_stdin = 335545035L; -const ISC_STATUS isc_svc_start_failed = 335545036L; -const ISC_STATUS isc_svc_no_switches = 335545037L; -const ISC_STATUS isc_svc_bad_size = 335545038L; -const ISC_STATUS isc_no_crypt_plugin = 335545039L; -const ISC_STATUS isc_cp_name_too_long = 335545040L; -const ISC_STATUS isc_cp_process_active = 335545041L; -const ISC_STATUS isc_cp_already_crypted = 335545042L; -const ISC_STATUS isc_decrypt_error = 335545043L; -const ISC_STATUS isc_no_providers = 335545044L; -const ISC_STATUS isc_null_spb = 335545045L; -const ISC_STATUS isc_max_args_exceeded = 335545046L; -const ISC_STATUS isc_ee_blr_mismatch_names_count = 335545047L; -const ISC_STATUS isc_ee_blr_mismatch_name_not_found = 335545048L; -const ISC_STATUS isc_bad_result_set = 335545049L; -const ISC_STATUS isc_wrong_message_length = 335545050L; -const ISC_STATUS isc_no_output_format = 335545051L; -const ISC_STATUS isc_item_finish = 335545052L; -const ISC_STATUS isc_miss_config = 335545053L; -const ISC_STATUS isc_conf_line = 335545054L; -const ISC_STATUS isc_conf_include = 335545055L; -const ISC_STATUS isc_include_depth = 335545056L; -const ISC_STATUS isc_include_miss = 335545057L; -const ISC_STATUS isc_protect_ownership = 335545058L; -const ISC_STATUS isc_badvarnum = 335545059L; -const ISC_STATUS isc_sec_context = 335545060L; -const ISC_STATUS isc_multi_segment = 335545061L; -const ISC_STATUS isc_login_changed = 335545062L; -const ISC_STATUS isc_auth_handshake_limit = 335545063L; -const ISC_STATUS isc_wirecrypt_incompatible = 335545064L; -const ISC_STATUS isc_miss_wirecrypt = 335545065L; -const ISC_STATUS isc_wirecrypt_key = 335545066L; -const ISC_STATUS isc_wirecrypt_plugin = 335545067L; -const ISC_STATUS isc_secdb_name = 335545068L; -const ISC_STATUS isc_auth_data = 335545069L; -const ISC_STATUS isc_auth_datalength = 335545070L; -const ISC_STATUS isc_info_unprepared_stmt = 335545071L; -const ISC_STATUS isc_idx_key_value = 335545072L; -const ISC_STATUS isc_forupdate_virtualtbl = 335545073L; -const ISC_STATUS isc_forupdate_systbl = 335545074L; -const ISC_STATUS isc_forupdate_temptbl = 335545075L; -const ISC_STATUS isc_cant_modify_sysobj = 335545076L; -const ISC_STATUS isc_server_misconfigured = 335545077L; -const ISC_STATUS isc_alter_role = 335545078L; -const ISC_STATUS isc_map_already_exists = 335545079L; -const ISC_STATUS isc_map_not_exists = 335545080L; -const ISC_STATUS isc_map_load = 335545081L; -const ISC_STATUS isc_map_aster = 335545082L; -const ISC_STATUS isc_map_multi = 335545083L; -const ISC_STATUS isc_map_undefined = 335545084L; -const ISC_STATUS isc_baddpb_damaged_mode = 335545085L; -const ISC_STATUS isc_baddpb_buffers_range = 335545086L; -const ISC_STATUS isc_baddpb_temp_buffers = 335545087L; -const ISC_STATUS isc_map_nodb = 335545088L; -const ISC_STATUS isc_map_notable = 335545089L; -const ISC_STATUS isc_miss_trusted_role = 335545090L; -const ISC_STATUS isc_set_invalid_role = 335545091L; -const ISC_STATUS isc_cursor_not_positioned = 335545092L; -const ISC_STATUS isc_dup_attribute = 335545093L; -const ISC_STATUS isc_dyn_no_priv = 335545094L; -const ISC_STATUS isc_dsql_cant_grant_option = 335545095L; -const ISC_STATUS isc_read_conflict = 335545096L; -const ISC_STATUS isc_crdb_load = 335545097L; -const ISC_STATUS isc_crdb_nodb = 335545098L; -const ISC_STATUS isc_crdb_notable = 335545099L; -const ISC_STATUS isc_interface_version_too_old = 335545100L; -const ISC_STATUS isc_fun_param_mismatch = 335545101L; -const ISC_STATUS isc_savepoint_backout_err = 335545102L; -const ISC_STATUS isc_domain_primary_key_notnull = 335545103L; -const ISC_STATUS isc_invalid_attachment_charset = 335545104L; -const ISC_STATUS isc_map_down = 335545105L; -const ISC_STATUS isc_login_error = 335545106L; -const ISC_STATUS isc_already_opened = 335545107L; -const ISC_STATUS isc_bad_crypt_key = 335545108L; -const ISC_STATUS isc_encrypt_error = 335545109L; -const ISC_STATUS isc_gfix_db_name = 335740929L; -const ISC_STATUS isc_gfix_invalid_sw = 335740930L; -const ISC_STATUS isc_gfix_incmp_sw = 335740932L; -const ISC_STATUS isc_gfix_replay_req = 335740933L; -const ISC_STATUS isc_gfix_pgbuf_req = 335740934L; -const ISC_STATUS isc_gfix_val_req = 335740935L; -const ISC_STATUS isc_gfix_pval_req = 335740936L; -const ISC_STATUS isc_gfix_trn_req = 335740937L; -const ISC_STATUS isc_gfix_full_req = 335740940L; -const ISC_STATUS isc_gfix_usrname_req = 335740941L; -const ISC_STATUS isc_gfix_pass_req = 335740942L; -const ISC_STATUS isc_gfix_subs_name = 335740943L; -const ISC_STATUS isc_gfix_wal_req = 335740944L; -const ISC_STATUS isc_gfix_sec_req = 335740945L; -const ISC_STATUS isc_gfix_nval_req = 335740946L; -const ISC_STATUS isc_gfix_type_shut = 335740947L; -const ISC_STATUS isc_gfix_retry = 335740948L; -const ISC_STATUS isc_gfix_retry_db = 335740951L; -const ISC_STATUS isc_gfix_exceed_max = 335740991L; -const ISC_STATUS isc_gfix_corrupt_pool = 335740992L; -const ISC_STATUS isc_gfix_mem_exhausted = 335740993L; -const ISC_STATUS isc_gfix_bad_pool = 335740994L; -const ISC_STATUS isc_gfix_trn_not_valid = 335740995L; -const ISC_STATUS isc_gfix_unexp_eoi = 335741012L; -const ISC_STATUS isc_gfix_recon_fail = 335741018L; -const ISC_STATUS isc_gfix_trn_unknown = 335741036L; -const ISC_STATUS isc_gfix_mode_req = 335741038L; -const ISC_STATUS isc_gfix_pzval_req = 335741042L; -const ISC_STATUS isc_dsql_dbkey_from_non_table = 336003074L; -const ISC_STATUS isc_dsql_transitional_numeric = 336003075L; -const ISC_STATUS isc_dsql_dialect_warning_expr = 336003076L; -const ISC_STATUS isc_sql_db_dialect_dtype_unsupport = 336003077L; -const ISC_STATUS isc_sql_dialect_conflict_num = 336003079L; -const ISC_STATUS isc_dsql_warning_number_ambiguous = 336003080L; -const ISC_STATUS isc_dsql_warning_number_ambiguous1 = 336003081L; -const ISC_STATUS isc_dsql_warn_precision_ambiguous = 336003082L; -const ISC_STATUS isc_dsql_warn_precision_ambiguous1 = 336003083L; -const ISC_STATUS isc_dsql_warn_precision_ambiguous2 = 336003084L; -const ISC_STATUS isc_dsql_ambiguous_field_name = 336003085L; -const ISC_STATUS isc_dsql_udf_return_pos_err = 336003086L; -const ISC_STATUS isc_dsql_invalid_label = 336003087L; -const ISC_STATUS isc_dsql_datatypes_not_comparable = 336003088L; -const ISC_STATUS isc_dsql_cursor_invalid = 336003089L; -const ISC_STATUS isc_dsql_cursor_redefined = 336003090L; -const ISC_STATUS isc_dsql_cursor_not_found = 336003091L; -const ISC_STATUS isc_dsql_cursor_exists = 336003092L; -const ISC_STATUS isc_dsql_cursor_rel_ambiguous = 336003093L; -const ISC_STATUS isc_dsql_cursor_rel_not_found = 336003094L; -const ISC_STATUS isc_dsql_cursor_not_open = 336003095L; -const ISC_STATUS isc_dsql_type_not_supp_ext_tab = 336003096L; -const ISC_STATUS isc_dsql_feature_not_supported_ods = 336003097L; -const ISC_STATUS isc_primary_key_required = 336003098L; -const ISC_STATUS isc_upd_ins_doesnt_match_pk = 336003099L; -const ISC_STATUS isc_upd_ins_doesnt_match_matching = 336003100L; -const ISC_STATUS isc_upd_ins_with_complex_view = 336003101L; -const ISC_STATUS isc_dsql_incompatible_trigger_type = 336003102L; -const ISC_STATUS isc_dsql_db_trigger_type_cant_change = 336003103L; -const ISC_STATUS isc_dsql_record_version_table = 336003104L; -const ISC_STATUS isc_dsql_invalid_sqlda_version = 336003105L; -const ISC_STATUS isc_dsql_sqlvar_index = 336003106L; -const ISC_STATUS isc_dsql_no_sqlind = 336003107L; -const ISC_STATUS isc_dsql_no_sqldata = 336003108L; -const ISC_STATUS isc_dsql_no_input_sqlda = 336003109L; -const ISC_STATUS isc_dsql_no_output_sqlda = 336003110L; -const ISC_STATUS isc_dsql_wrong_param_num = 336003111L; -const ISC_STATUS isc_dyn_filter_not_found = 336068645L; -const ISC_STATUS isc_dyn_func_not_found = 336068649L; -const ISC_STATUS isc_dyn_index_not_found = 336068656L; -const ISC_STATUS isc_dyn_view_not_found = 336068662L; -const ISC_STATUS isc_dyn_domain_not_found = 336068697L; -const ISC_STATUS isc_dyn_cant_modify_auto_trig = 336068717L; -const ISC_STATUS isc_dyn_dup_table = 336068740L; -const ISC_STATUS isc_dyn_proc_not_found = 336068748L; -const ISC_STATUS isc_dyn_exception_not_found = 336068752L; -const ISC_STATUS isc_dyn_proc_param_not_found = 336068754L; -const ISC_STATUS isc_dyn_trig_not_found = 336068755L; -const ISC_STATUS isc_dyn_charset_not_found = 336068759L; -const ISC_STATUS isc_dyn_collation_not_found = 336068760L; -const ISC_STATUS isc_dyn_role_not_found = 336068763L; -const ISC_STATUS isc_dyn_name_longer = 336068767L; -const ISC_STATUS isc_dyn_column_does_not_exist = 336068784L; -const ISC_STATUS isc_dyn_role_does_not_exist = 336068796L; -const ISC_STATUS isc_dyn_no_grant_admin_opt = 336068797L; -const ISC_STATUS isc_dyn_user_not_role_member = 336068798L; -const ISC_STATUS isc_dyn_delete_role_failed = 336068799L; -const ISC_STATUS isc_dyn_grant_role_to_user = 336068800L; -const ISC_STATUS isc_dyn_inv_sql_role_name = 336068801L; -const ISC_STATUS isc_dyn_dup_sql_role = 336068802L; -const ISC_STATUS isc_dyn_kywd_spec_for_role = 336068803L; -const ISC_STATUS isc_dyn_roles_not_supported = 336068804L; -const ISC_STATUS isc_dyn_domain_name_exists = 336068812L; -const ISC_STATUS isc_dyn_field_name_exists = 336068813L; -const ISC_STATUS isc_dyn_dependency_exists = 336068814L; -const ISC_STATUS isc_dyn_dtype_invalid = 336068815L; -const ISC_STATUS isc_dyn_char_fld_too_small = 336068816L; -const ISC_STATUS isc_dyn_invalid_dtype_conversion = 336068817L; -const ISC_STATUS isc_dyn_dtype_conv_invalid = 336068818L; -const ISC_STATUS isc_dyn_zero_len_id = 336068820L; -const ISC_STATUS isc_dyn_gen_not_found = 336068822L; -const ISC_STATUS isc_max_coll_per_charset = 336068829L; -const ISC_STATUS isc_invalid_coll_attr = 336068830L; -const ISC_STATUS isc_dyn_wrong_gtt_scope = 336068840L; -const ISC_STATUS isc_dyn_coll_used_table = 336068843L; -const ISC_STATUS isc_dyn_coll_used_domain = 336068844L; -const ISC_STATUS isc_dyn_cannot_del_syscoll = 336068845L; -const ISC_STATUS isc_dyn_cannot_del_def_coll = 336068846L; -const ISC_STATUS isc_dyn_table_not_found = 336068849L; -const ISC_STATUS isc_dyn_coll_used_procedure = 336068851L; -const ISC_STATUS isc_dyn_scale_too_big = 336068852L; -const ISC_STATUS isc_dyn_precision_too_small = 336068853L; -const ISC_STATUS isc_dyn_miss_priv_warning = 336068855L; -const ISC_STATUS isc_dyn_ods_not_supp_feature = 336068856L; -const ISC_STATUS isc_dyn_cannot_addrem_computed = 336068857L; -const ISC_STATUS isc_dyn_no_empty_pw = 336068858L; -const ISC_STATUS isc_dyn_dup_index = 336068859L; -const ISC_STATUS isc_dyn_package_not_found = 336068864L; -const ISC_STATUS isc_dyn_schema_not_found = 336068865L; -const ISC_STATUS isc_dyn_cannot_mod_sysproc = 336068866L; -const ISC_STATUS isc_dyn_cannot_mod_systrig = 336068867L; -const ISC_STATUS isc_dyn_cannot_mod_sysfunc = 336068868L; -const ISC_STATUS isc_dyn_invalid_ddl_proc = 336068869L; -const ISC_STATUS isc_dyn_invalid_ddl_trig = 336068870L; -const ISC_STATUS isc_dyn_funcnotdef_package = 336068871L; -const ISC_STATUS isc_dyn_procnotdef_package = 336068872L; -const ISC_STATUS isc_dyn_funcsignat_package = 336068873L; -const ISC_STATUS isc_dyn_procsignat_package = 336068874L; -const ISC_STATUS isc_dyn_defvaldecl_package_proc = 336068875L; -const ISC_STATUS isc_dyn_package_body_exists = 336068877L; -const ISC_STATUS isc_dyn_invalid_ddl_func = 336068878L; -const ISC_STATUS isc_dyn_newfc_oldsyntax = 336068879L; -const ISC_STATUS isc_dyn_func_param_not_found = 336068886L; -const ISC_STATUS isc_dyn_routine_param_not_found = 336068887L; -const ISC_STATUS isc_dyn_routine_param_ambiguous = 336068888L; -const ISC_STATUS isc_dyn_coll_used_function = 336068889L; -const ISC_STATUS isc_dyn_domain_used_function = 336068890L; -const ISC_STATUS isc_dyn_alter_user_no_clause = 336068891L; -const ISC_STATUS isc_dyn_duplicate_package_item = 336068894L; -const ISC_STATUS isc_dyn_cant_modify_sysobj = 336068895L; -const ISC_STATUS isc_dyn_cant_use_zero_increment = 336068896L; -const ISC_STATUS isc_dyn_cant_use_in_foreignkey = 336068897L; -const ISC_STATUS isc_dyn_defvaldecl_package_func = 336068898L; -const ISC_STATUS isc_gbak_unknown_switch = 336330753L; -const ISC_STATUS isc_gbak_page_size_missing = 336330754L; -const ISC_STATUS isc_gbak_page_size_toobig = 336330755L; -const ISC_STATUS isc_gbak_redir_ouput_missing = 336330756L; -const ISC_STATUS isc_gbak_switches_conflict = 336330757L; -const ISC_STATUS isc_gbak_unknown_device = 336330758L; -const ISC_STATUS isc_gbak_no_protection = 336330759L; -const ISC_STATUS isc_gbak_page_size_not_allowed = 336330760L; -const ISC_STATUS isc_gbak_multi_source_dest = 336330761L; -const ISC_STATUS isc_gbak_filename_missing = 336330762L; -const ISC_STATUS isc_gbak_dup_inout_names = 336330763L; -const ISC_STATUS isc_gbak_inv_page_size = 336330764L; -const ISC_STATUS isc_gbak_db_specified = 336330765L; -const ISC_STATUS isc_gbak_db_exists = 336330766L; -const ISC_STATUS isc_gbak_unk_device = 336330767L; -const ISC_STATUS isc_gbak_blob_info_failed = 336330772L; -const ISC_STATUS isc_gbak_unk_blob_item = 336330773L; -const ISC_STATUS isc_gbak_get_seg_failed = 336330774L; -const ISC_STATUS isc_gbak_close_blob_failed = 336330775L; -const ISC_STATUS isc_gbak_open_blob_failed = 336330776L; -const ISC_STATUS isc_gbak_put_blr_gen_id_failed = 336330777L; -const ISC_STATUS isc_gbak_unk_type = 336330778L; -const ISC_STATUS isc_gbak_comp_req_failed = 336330779L; -const ISC_STATUS isc_gbak_start_req_failed = 336330780L; -const ISC_STATUS isc_gbak_rec_failed = 336330781L; -const ISC_STATUS isc_gbak_rel_req_failed = 336330782L; -const ISC_STATUS isc_gbak_db_info_failed = 336330783L; -const ISC_STATUS isc_gbak_no_db_desc = 336330784L; -const ISC_STATUS isc_gbak_db_create_failed = 336330785L; -const ISC_STATUS isc_gbak_decomp_len_error = 336330786L; -const ISC_STATUS isc_gbak_tbl_missing = 336330787L; -const ISC_STATUS isc_gbak_blob_col_missing = 336330788L; -const ISC_STATUS isc_gbak_create_blob_failed = 336330789L; -const ISC_STATUS isc_gbak_put_seg_failed = 336330790L; -const ISC_STATUS isc_gbak_rec_len_exp = 336330791L; -const ISC_STATUS isc_gbak_inv_rec_len = 336330792L; -const ISC_STATUS isc_gbak_exp_data_type = 336330793L; -const ISC_STATUS isc_gbak_gen_id_failed = 336330794L; -const ISC_STATUS isc_gbak_unk_rec_type = 336330795L; -const ISC_STATUS isc_gbak_inv_bkup_ver = 336330796L; -const ISC_STATUS isc_gbak_missing_bkup_desc = 336330797L; -const ISC_STATUS isc_gbak_string_trunc = 336330798L; -const ISC_STATUS isc_gbak_cant_rest_record = 336330799L; -const ISC_STATUS isc_gbak_send_failed = 336330800L; -const ISC_STATUS isc_gbak_no_tbl_name = 336330801L; -const ISC_STATUS isc_gbak_unexp_eof = 336330802L; -const ISC_STATUS isc_gbak_db_format_too_old = 336330803L; -const ISC_STATUS isc_gbak_inv_array_dim = 336330804L; -const ISC_STATUS isc_gbak_xdr_len_expected = 336330807L; -const ISC_STATUS isc_gbak_open_bkup_error = 336330817L; -const ISC_STATUS isc_gbak_open_error = 336330818L; -const ISC_STATUS isc_gbak_missing_block_fac = 336330934L; -const ISC_STATUS isc_gbak_inv_block_fac = 336330935L; -const ISC_STATUS isc_gbak_block_fac_specified = 336330936L; -const ISC_STATUS isc_gbak_missing_username = 336330940L; -const ISC_STATUS isc_gbak_missing_password = 336330941L; -const ISC_STATUS isc_gbak_missing_skipped_bytes = 336330952L; -const ISC_STATUS isc_gbak_inv_skipped_bytes = 336330953L; -const ISC_STATUS isc_gbak_err_restore_charset = 336330965L; -const ISC_STATUS isc_gbak_err_restore_collation = 336330967L; -const ISC_STATUS isc_gbak_read_error = 336330972L; -const ISC_STATUS isc_gbak_write_error = 336330973L; -const ISC_STATUS isc_gbak_db_in_use = 336330985L; -const ISC_STATUS isc_gbak_sysmemex = 336330990L; -const ISC_STATUS isc_gbak_restore_role_failed = 336331002L; -const ISC_STATUS isc_gbak_role_op_missing = 336331005L; -const ISC_STATUS isc_gbak_page_buffers_missing = 336331010L; -const ISC_STATUS isc_gbak_page_buffers_wrong_param = 336331011L; -const ISC_STATUS isc_gbak_page_buffers_restore = 336331012L; -const ISC_STATUS isc_gbak_inv_size = 336331014L; -const ISC_STATUS isc_gbak_file_outof_sequence = 336331015L; -const ISC_STATUS isc_gbak_join_file_missing = 336331016L; -const ISC_STATUS isc_gbak_stdin_not_supptd = 336331017L; -const ISC_STATUS isc_gbak_stdout_not_supptd = 336331018L; -const ISC_STATUS isc_gbak_bkup_corrupt = 336331019L; -const ISC_STATUS isc_gbak_unk_db_file_spec = 336331020L; -const ISC_STATUS isc_gbak_hdr_write_failed = 336331021L; -const ISC_STATUS isc_gbak_disk_space_ex = 336331022L; -const ISC_STATUS isc_gbak_size_lt_min = 336331023L; -const ISC_STATUS isc_gbak_svc_name_missing = 336331025L; -const ISC_STATUS isc_gbak_not_ownr = 336331026L; -const ISC_STATUS isc_gbak_mode_req = 336331031L; -const ISC_STATUS isc_gbak_just_data = 336331033L; -const ISC_STATUS isc_gbak_data_only = 336331034L; -const ISC_STATUS isc_gbak_missing_interval = 336331078L; -const ISC_STATUS isc_gbak_wrong_interval = 336331079L; -const ISC_STATUS isc_gbak_verify_verbint = 336331081L; -const ISC_STATUS isc_gbak_option_only_restore = 336331082L; -const ISC_STATUS isc_gbak_option_only_backup = 336331083L; -const ISC_STATUS isc_gbak_option_conflict = 336331084L; -const ISC_STATUS isc_gbak_param_conflict = 336331085L; -const ISC_STATUS isc_gbak_option_repeated = 336331086L; -const ISC_STATUS isc_gbak_max_dbkey_recursion = 336331091L; -const ISC_STATUS isc_gbak_max_dbkey_length = 336331092L; -const ISC_STATUS isc_gbak_invalid_metadata = 336331093L; -const ISC_STATUS isc_gbak_invalid_data = 336331094L; -const ISC_STATUS isc_gbak_inv_bkup_ver2 = 336331096L; -const ISC_STATUS isc_gbak_db_format_too_old2 = 336331100L; -const ISC_STATUS isc_dsql_too_old_ods = 336397205L; -const ISC_STATUS isc_dsql_table_not_found = 336397206L; -const ISC_STATUS isc_dsql_view_not_found = 336397207L; -const ISC_STATUS isc_dsql_line_col_error = 336397208L; -const ISC_STATUS isc_dsql_unknown_pos = 336397209L; -const ISC_STATUS isc_dsql_no_dup_name = 336397210L; -const ISC_STATUS isc_dsql_too_many_values = 336397211L; -const ISC_STATUS isc_dsql_no_array_computed = 336397212L; -const ISC_STATUS isc_dsql_implicit_domain_name = 336397213L; -const ISC_STATUS isc_dsql_only_can_subscript_array = 336397214L; -const ISC_STATUS isc_dsql_max_sort_items = 336397215L; -const ISC_STATUS isc_dsql_max_group_items = 336397216L; -const ISC_STATUS isc_dsql_conflicting_sort_field = 336397217L; -const ISC_STATUS isc_dsql_derived_table_more_columns = 336397218L; -const ISC_STATUS isc_dsql_derived_table_less_columns = 336397219L; -const ISC_STATUS isc_dsql_derived_field_unnamed = 336397220L; -const ISC_STATUS isc_dsql_derived_field_dup_name = 336397221L; -const ISC_STATUS isc_dsql_derived_alias_select = 336397222L; -const ISC_STATUS isc_dsql_derived_alias_field = 336397223L; -const ISC_STATUS isc_dsql_auto_field_bad_pos = 336397224L; -const ISC_STATUS isc_dsql_cte_wrong_reference = 336397225L; -const ISC_STATUS isc_dsql_cte_cycle = 336397226L; -const ISC_STATUS isc_dsql_cte_outer_join = 336397227L; -const ISC_STATUS isc_dsql_cte_mult_references = 336397228L; -const ISC_STATUS isc_dsql_cte_not_a_union = 336397229L; -const ISC_STATUS isc_dsql_cte_nonrecurs_after_recurs = 336397230L; -const ISC_STATUS isc_dsql_cte_wrong_clause = 336397231L; -const ISC_STATUS isc_dsql_cte_union_all = 336397232L; -const ISC_STATUS isc_dsql_cte_miss_nonrecursive = 336397233L; -const ISC_STATUS isc_dsql_cte_nested_with = 336397234L; -const ISC_STATUS isc_dsql_col_more_than_once_using = 336397235L; -const ISC_STATUS isc_dsql_unsupp_feature_dialect = 336397236L; -const ISC_STATUS isc_dsql_cte_not_used = 336397237L; -const ISC_STATUS isc_dsql_col_more_than_once_view = 336397238L; -const ISC_STATUS isc_dsql_unsupported_in_auto_trans = 336397239L; -const ISC_STATUS isc_dsql_eval_unknode = 336397240L; -const ISC_STATUS isc_dsql_agg_wrongarg = 336397241L; -const ISC_STATUS isc_dsql_agg2_wrongarg = 336397242L; -const ISC_STATUS isc_dsql_nodateortime_pm_string = 336397243L; -const ISC_STATUS isc_dsql_invalid_datetime_subtract = 336397244L; -const ISC_STATUS isc_dsql_invalid_dateortime_add = 336397245L; -const ISC_STATUS isc_dsql_invalid_type_minus_date = 336397246L; -const ISC_STATUS isc_dsql_nostring_addsub_dial3 = 336397247L; -const ISC_STATUS isc_dsql_invalid_type_addsub_dial3 = 336397248L; -const ISC_STATUS isc_dsql_invalid_type_multip_dial1 = 336397249L; -const ISC_STATUS isc_dsql_nostring_multip_dial3 = 336397250L; -const ISC_STATUS isc_dsql_invalid_type_multip_dial3 = 336397251L; -const ISC_STATUS isc_dsql_mustuse_numeric_div_dial1 = 336397252L; -const ISC_STATUS isc_dsql_nostring_div_dial3 = 336397253L; -const ISC_STATUS isc_dsql_invalid_type_div_dial3 = 336397254L; -const ISC_STATUS isc_dsql_nostring_neg_dial3 = 336397255L; -const ISC_STATUS isc_dsql_invalid_type_neg = 336397256L; -const ISC_STATUS isc_dsql_max_distinct_items = 336397257L; -const ISC_STATUS isc_dsql_alter_charset_failed = 336397258L; -const ISC_STATUS isc_dsql_comment_on_failed = 336397259L; -const ISC_STATUS isc_dsql_create_func_failed = 336397260L; -const ISC_STATUS isc_dsql_alter_func_failed = 336397261L; -const ISC_STATUS isc_dsql_create_alter_func_failed = 336397262L; -const ISC_STATUS isc_dsql_drop_func_failed = 336397263L; -const ISC_STATUS isc_dsql_recreate_func_failed = 336397264L; -const ISC_STATUS isc_dsql_create_proc_failed = 336397265L; -const ISC_STATUS isc_dsql_alter_proc_failed = 336397266L; -const ISC_STATUS isc_dsql_create_alter_proc_failed = 336397267L; -const ISC_STATUS isc_dsql_drop_proc_failed = 336397268L; -const ISC_STATUS isc_dsql_recreate_proc_failed = 336397269L; -const ISC_STATUS isc_dsql_create_trigger_failed = 336397270L; -const ISC_STATUS isc_dsql_alter_trigger_failed = 336397271L; -const ISC_STATUS isc_dsql_create_alter_trigger_failed = 336397272L; -const ISC_STATUS isc_dsql_drop_trigger_failed = 336397273L; -const ISC_STATUS isc_dsql_recreate_trigger_failed = 336397274L; -const ISC_STATUS isc_dsql_create_collation_failed = 336397275L; -const ISC_STATUS isc_dsql_drop_collation_failed = 336397276L; -const ISC_STATUS isc_dsql_create_domain_failed = 336397277L; -const ISC_STATUS isc_dsql_alter_domain_failed = 336397278L; -const ISC_STATUS isc_dsql_drop_domain_failed = 336397279L; -const ISC_STATUS isc_dsql_create_except_failed = 336397280L; -const ISC_STATUS isc_dsql_alter_except_failed = 336397281L; -const ISC_STATUS isc_dsql_create_alter_except_failed = 336397282L; -const ISC_STATUS isc_dsql_recreate_except_failed = 336397283L; -const ISC_STATUS isc_dsql_drop_except_failed = 336397284L; -const ISC_STATUS isc_dsql_create_sequence_failed = 336397285L; -const ISC_STATUS isc_dsql_create_table_failed = 336397286L; -const ISC_STATUS isc_dsql_alter_table_failed = 336397287L; -const ISC_STATUS isc_dsql_drop_table_failed = 336397288L; -const ISC_STATUS isc_dsql_recreate_table_failed = 336397289L; -const ISC_STATUS isc_dsql_create_pack_failed = 336397290L; -const ISC_STATUS isc_dsql_alter_pack_failed = 336397291L; -const ISC_STATUS isc_dsql_create_alter_pack_failed = 336397292L; -const ISC_STATUS isc_dsql_drop_pack_failed = 336397293L; -const ISC_STATUS isc_dsql_recreate_pack_failed = 336397294L; -const ISC_STATUS isc_dsql_create_pack_body_failed = 336397295L; -const ISC_STATUS isc_dsql_drop_pack_body_failed = 336397296L; -const ISC_STATUS isc_dsql_recreate_pack_body_failed = 336397297L; -const ISC_STATUS isc_dsql_create_view_failed = 336397298L; -const ISC_STATUS isc_dsql_alter_view_failed = 336397299L; -const ISC_STATUS isc_dsql_create_alter_view_failed = 336397300L; -const ISC_STATUS isc_dsql_recreate_view_failed = 336397301L; -const ISC_STATUS isc_dsql_drop_view_failed = 336397302L; -const ISC_STATUS isc_dsql_drop_sequence_failed = 336397303L; -const ISC_STATUS isc_dsql_recreate_sequence_failed = 336397304L; -const ISC_STATUS isc_dsql_drop_index_failed = 336397305L; -const ISC_STATUS isc_dsql_drop_filter_failed = 336397306L; -const ISC_STATUS isc_dsql_drop_shadow_failed = 336397307L; -const ISC_STATUS isc_dsql_drop_role_failed = 336397308L; -const ISC_STATUS isc_dsql_drop_user_failed = 336397309L; -const ISC_STATUS isc_dsql_create_role_failed = 336397310L; -const ISC_STATUS isc_dsql_alter_role_failed = 336397311L; -const ISC_STATUS isc_dsql_alter_index_failed = 336397312L; -const ISC_STATUS isc_dsql_alter_database_failed = 336397313L; -const ISC_STATUS isc_dsql_create_shadow_failed = 336397314L; -const ISC_STATUS isc_dsql_create_filter_failed = 336397315L; -const ISC_STATUS isc_dsql_create_index_failed = 336397316L; -const ISC_STATUS isc_dsql_create_user_failed = 336397317L; -const ISC_STATUS isc_dsql_alter_user_failed = 336397318L; -const ISC_STATUS isc_dsql_grant_failed = 336397319L; -const ISC_STATUS isc_dsql_revoke_failed = 336397320L; -const ISC_STATUS isc_dsql_cte_recursive_aggregate = 336397321L; -const ISC_STATUS isc_dsql_mapping_failed = 336397322L; -const ISC_STATUS isc_dsql_alter_sequence_failed = 336397323L; -const ISC_STATUS isc_dsql_create_generator_failed = 336397324L; -const ISC_STATUS isc_dsql_set_generator_failed = 336397325L; -const ISC_STATUS isc_dsql_wlock_simple = 336397326L; -const ISC_STATUS isc_dsql_firstskip_rows = 336397327L; -const ISC_STATUS isc_dsql_wlock_aggregates = 336397328L; -const ISC_STATUS isc_dsql_wlock_conflict = 336397329L; -const ISC_STATUS isc_dsql_max_exception_arguments = 336397330L; -const ISC_STATUS isc_dsql_string_byte_length = 336397331L; -const ISC_STATUS isc_dsql_string_char_length = 336397332L; -const ISC_STATUS isc_dsql_max_nesting = 336397333L; -const ISC_STATUS isc_gsec_cant_open_db = 336723983L; -const ISC_STATUS isc_gsec_switches_error = 336723984L; -const ISC_STATUS isc_gsec_no_op_spec = 336723985L; -const ISC_STATUS isc_gsec_no_usr_name = 336723986L; -const ISC_STATUS isc_gsec_err_add = 336723987L; -const ISC_STATUS isc_gsec_err_modify = 336723988L; -const ISC_STATUS isc_gsec_err_find_mod = 336723989L; -const ISC_STATUS isc_gsec_err_rec_not_found = 336723990L; -const ISC_STATUS isc_gsec_err_delete = 336723991L; -const ISC_STATUS isc_gsec_err_find_del = 336723992L; -const ISC_STATUS isc_gsec_err_find_disp = 336723996L; -const ISC_STATUS isc_gsec_inv_param = 336723997L; -const ISC_STATUS isc_gsec_op_specified = 336723998L; -const ISC_STATUS isc_gsec_pw_specified = 336723999L; -const ISC_STATUS isc_gsec_uid_specified = 336724000L; -const ISC_STATUS isc_gsec_gid_specified = 336724001L; -const ISC_STATUS isc_gsec_proj_specified = 336724002L; -const ISC_STATUS isc_gsec_org_specified = 336724003L; -const ISC_STATUS isc_gsec_fname_specified = 336724004L; -const ISC_STATUS isc_gsec_mname_specified = 336724005L; -const ISC_STATUS isc_gsec_lname_specified = 336724006L; -const ISC_STATUS isc_gsec_inv_switch = 336724008L; -const ISC_STATUS isc_gsec_amb_switch = 336724009L; -const ISC_STATUS isc_gsec_no_op_specified = 336724010L; -const ISC_STATUS isc_gsec_params_not_allowed = 336724011L; -const ISC_STATUS isc_gsec_incompat_switch = 336724012L; -const ISC_STATUS isc_gsec_inv_username = 336724044L; -const ISC_STATUS isc_gsec_inv_pw_length = 336724045L; -const ISC_STATUS isc_gsec_db_specified = 336724046L; -const ISC_STATUS isc_gsec_db_admin_specified = 336724047L; -const ISC_STATUS isc_gsec_db_admin_pw_specified = 336724048L; -const ISC_STATUS isc_gsec_sql_role_specified = 336724049L; -const ISC_STATUS isc_gstat_unknown_switch = 336920577L; -const ISC_STATUS isc_gstat_retry = 336920578L; -const ISC_STATUS isc_gstat_wrong_ods = 336920579L; -const ISC_STATUS isc_gstat_unexpected_eof = 336920580L; -const ISC_STATUS isc_gstat_open_err = 336920605L; -const ISC_STATUS isc_gstat_read_err = 336920606L; -const ISC_STATUS isc_gstat_sysmemex = 336920607L; -const ISC_STATUS isc_fbsvcmgr_bad_am = 336986113L; -const ISC_STATUS isc_fbsvcmgr_bad_wm = 336986114L; -const ISC_STATUS isc_fbsvcmgr_bad_rs = 336986115L; -const ISC_STATUS isc_fbsvcmgr_info_err = 336986116L; -const ISC_STATUS isc_fbsvcmgr_query_err = 336986117L; -const ISC_STATUS isc_fbsvcmgr_switch_unknown = 336986118L; -const ISC_STATUS isc_fbsvcmgr_bad_sm = 336986159L; -const ISC_STATUS isc_fbsvcmgr_fp_open = 336986160L; -const ISC_STATUS isc_fbsvcmgr_fp_read = 336986161L; -const ISC_STATUS isc_fbsvcmgr_fp_empty = 336986162L; -const ISC_STATUS isc_fbsvcmgr_bad_arg = 336986164L; -const ISC_STATUS isc_utl_trusted_switch = 337051649L; -const ISC_STATUS isc_nbackup_missing_param = 337117213L; -const ISC_STATUS isc_nbackup_allowed_switches = 337117214L; -const ISC_STATUS isc_nbackup_unknown_param = 337117215L; -const ISC_STATUS isc_nbackup_unknown_switch = 337117216L; -const ISC_STATUS isc_nbackup_nofetchpw_svc = 337117217L; -const ISC_STATUS isc_nbackup_pwfile_error = 337117218L; -const ISC_STATUS isc_nbackup_size_with_lock = 337117219L; -const ISC_STATUS isc_nbackup_no_switch = 337117220L; -const ISC_STATUS isc_nbackup_err_read = 337117223L; -const ISC_STATUS isc_nbackup_err_write = 337117224L; -const ISC_STATUS isc_nbackup_err_seek = 337117225L; -const ISC_STATUS isc_nbackup_err_opendb = 337117226L; -const ISC_STATUS isc_nbackup_err_fadvice = 337117227L; -const ISC_STATUS isc_nbackup_err_createdb = 337117228L; -const ISC_STATUS isc_nbackup_err_openbk = 337117229L; -const ISC_STATUS isc_nbackup_err_createbk = 337117230L; -const ISC_STATUS isc_nbackup_err_eofdb = 337117231L; -const ISC_STATUS isc_nbackup_fixup_wrongstate = 337117232L; -const ISC_STATUS isc_nbackup_err_db = 337117233L; -const ISC_STATUS isc_nbackup_userpw_toolong = 337117234L; -const ISC_STATUS isc_nbackup_lostrec_db = 337117235L; -const ISC_STATUS isc_nbackup_lostguid_db = 337117236L; -const ISC_STATUS isc_nbackup_err_eofhdrdb = 337117237L; -const ISC_STATUS isc_nbackup_db_notlock = 337117238L; -const ISC_STATUS isc_nbackup_lostguid_bk = 337117239L; -const ISC_STATUS isc_nbackup_page_changed = 337117240L; -const ISC_STATUS isc_nbackup_dbsize_inconsistent = 337117241L; -const ISC_STATUS isc_nbackup_failed_lzbk = 337117242L; -const ISC_STATUS isc_nbackup_err_eofhdrbk = 337117243L; -const ISC_STATUS isc_nbackup_invalid_incbk = 337117244L; -const ISC_STATUS isc_nbackup_unsupvers_incbk = 337117245L; -const ISC_STATUS isc_nbackup_invlevel_incbk = 337117246L; -const ISC_STATUS isc_nbackup_wrong_orderbk = 337117247L; -const ISC_STATUS isc_nbackup_err_eofbk = 337117248L; -const ISC_STATUS isc_nbackup_err_copy = 337117249L; -const ISC_STATUS isc_nbackup_err_eofhdr_restdb = 337117250L; -const ISC_STATUS isc_nbackup_lostguid_l0bk = 337117251L; -const ISC_STATUS isc_nbackup_switchd_parameter = 337117255L; -const ISC_STATUS isc_nbackup_user_stop = 337117257L; -const ISC_STATUS isc_nbackup_deco_parse = 337117259L; -const ISC_STATUS isc_trace_conflict_acts = 337182750L; -const ISC_STATUS isc_trace_act_notfound = 337182751L; -const ISC_STATUS isc_trace_switch_once = 337182752L; -const ISC_STATUS isc_trace_param_val_miss = 337182753L; -const ISC_STATUS isc_trace_param_invalid = 337182754L; -const ISC_STATUS isc_trace_switch_unknown = 337182755L; -const ISC_STATUS isc_trace_switch_svc_only = 337182756L; -const ISC_STATUS isc_trace_switch_user_only = 337182757L; -const ISC_STATUS isc_trace_switch_param_miss = 337182758L; -const ISC_STATUS isc_trace_param_act_notcompat = 337182759L; -const ISC_STATUS isc_trace_mandatory_switch_miss = 337182760L; -const ISC_STATUS isc_err_max = 1259; +#define FB_IMPL_MSG_NO_SYMBOL(facility, number, text) + +#define FB_IMPL_MSG_SYMBOL(facility, number, symbol, text) \ + const ISC_STATUS isc_##symbol = FB_IMPL_MSG_ENCODE(number, FB_IMPL_MSG_FACILITY_##facility); + +#define FB_IMPL_MSG(facility, number, symbol, sqlCode, sqlClass, sqlSubClass, text) \ + FB_IMPL_MSG_SYMBOL(facility, number, symbol, text) + +#include "impl/msg/all.h" + +#undef FB_IMPL_MSG_NO_SYMBOL +#undef FB_IMPL_MSG_SYMBOL +#undef FB_IMPL_MSG + +const ISC_STATUS isc_err_max = 0 + #define FB_IMPL_MSG_NO_SYMBOL(facility, number, text) + #define FB_IMPL_MSG_SYMBOL(facility, number, symbol, text) + #define FB_IMPL_MSG(facility, number, symbol, sqlCode, sqlClass, sqlSubClass, text) + 1 + + #include "impl/msg/all.h" + + #undef FB_IMPL_MSG_NO_SYMBOL + #undef FB_IMPL_MSG_SYMBOL + #undef FB_IMPL_MSG + ; + #else /* c definitions */ #define isc_facility 20 -#define isc_base 335544320L +#define isc_base (isc_facility << 24) #define isc_factor 1 -#define isc_arg_end 0 /* end of argument list */ -#define isc_arg_gds 1 /* generic DSRI status value */ +#define isc_arg_end 0 /* end of argument list */ +#define isc_arg_gds 1 /* generic DSRI status value */ #define isc_arg_string 2 /* string argument */ -#define isc_arg_cstring 3 /* count & string argument */ +#define isc_arg_cstring 3 /* count & string argument */ #define isc_arg_number 4 /* numeric argument (long) */ #define isc_arg_interpreted 5 /* interpreted status code (string) */ -#define isc_arg_vms 6 /* VAX/VMS status code (long) */ +#define isc_arg_vms 6 /* VAX/VMS status code (long) */ #define isc_arg_unix 7 /* UNIX error code */ #define isc_arg_domain 8 /* Apollo/Domain error code */ -#define isc_arg_dos 9 /* MSDOS/OS2 error code */ +#define isc_arg_dos 9 /* MSDOS/OS2 error code */ #define isc_arg_mpexl 10 /* HP MPE/XL error code */ #define isc_arg_mpexl_ipc 11 /* HP MPE/XL IPC error code */ #define isc_arg_next_mach 15 /* NeXT/Mach error code */ -#define isc_arg_netware 16 /* NetWare error code */ +#define isc_arg_netware 16 /* NetWare error code */ #define isc_arg_win32 17 /* Win32 error code */ -#define isc_arg_warning 18 /* warning argument */ +#define isc_arg_warning 18 /* warning argument */ #define isc_arg_sql_state 19 /* SQLSTATE */ -#define isc_arith_except 335544321L -#define isc_bad_dbkey 335544322L -#define isc_bad_db_format 335544323L -#define isc_bad_db_handle 335544324L -#define isc_bad_dpb_content 335544325L -#define isc_bad_dpb_form 335544326L -#define isc_bad_req_handle 335544327L -#define isc_bad_segstr_handle 335544328L -#define isc_bad_segstr_id 335544329L -#define isc_bad_tpb_content 335544330L -#define isc_bad_tpb_form 335544331L -#define isc_bad_trans_handle 335544332L -#define isc_bug_check 335544333L -#define isc_convert_error 335544334L -#define isc_db_corrupt 335544335L -#define isc_deadlock 335544336L -#define isc_excess_trans 335544337L -#define isc_from_no_match 335544338L -#define isc_infinap 335544339L -#define isc_infona 335544340L -#define isc_infunk 335544341L -#define isc_integ_fail 335544342L -#define isc_invalid_blr 335544343L -#define isc_io_error 335544344L -#define isc_lock_conflict 335544345L -#define isc_metadata_corrupt 335544346L -#define isc_not_valid 335544347L -#define isc_no_cur_rec 335544348L -#define isc_no_dup 335544349L -#define isc_no_finish 335544350L -#define isc_no_meta_update 335544351L -#define isc_no_priv 335544352L -#define isc_no_recon 335544353L -#define isc_no_record 335544354L -#define isc_no_segstr_close 335544355L -#define isc_obsolete_metadata 335544356L -#define isc_open_trans 335544357L -#define isc_port_len 335544358L -#define isc_read_only_field 335544359L -#define isc_read_only_rel 335544360L -#define isc_read_only_trans 335544361L -#define isc_read_only_view 335544362L -#define isc_req_no_trans 335544363L -#define isc_req_sync 335544364L -#define isc_req_wrong_db 335544365L -#define isc_segment 335544366L -#define isc_segstr_eof 335544367L -#define isc_segstr_no_op 335544368L -#define isc_segstr_no_read 335544369L -#define isc_segstr_no_trans 335544370L -#define isc_segstr_no_write 335544371L -#define isc_segstr_wrong_db 335544372L -#define isc_sys_request 335544373L -#define isc_stream_eof 335544374L -#define isc_unavailable 335544375L -#define isc_unres_rel 335544376L -#define isc_uns_ext 335544377L -#define isc_wish_list 335544378L -#define isc_wrong_ods 335544379L -#define isc_wronumarg 335544380L -#define isc_imp_exc 335544381L -#define isc_random 335544382L -#define isc_fatal_conflict 335544383L -#define isc_badblk 335544384L -#define isc_invpoolcl 335544385L -#define isc_nopoolids 335544386L -#define isc_relbadblk 335544387L -#define isc_blktoobig 335544388L -#define isc_bufexh 335544389L -#define isc_syntaxerr 335544390L -#define isc_bufinuse 335544391L -#define isc_bdbincon 335544392L -#define isc_reqinuse 335544393L -#define isc_badodsver 335544394L -#define isc_relnotdef 335544395L -#define isc_fldnotdef 335544396L -#define isc_dirtypage 335544397L -#define isc_waifortra 335544398L -#define isc_doubleloc 335544399L -#define isc_nodnotfnd 335544400L -#define isc_dupnodfnd 335544401L -#define isc_locnotmar 335544402L -#define isc_badpagtyp 335544403L -#define isc_corrupt 335544404L -#define isc_badpage 335544405L -#define isc_badindex 335544406L -#define isc_dbbnotzer 335544407L -#define isc_tranotzer 335544408L -#define isc_trareqmis 335544409L -#define isc_badhndcnt 335544410L -#define isc_wrotpbver 335544411L -#define isc_wroblrver 335544412L -#define isc_wrodpbver 335544413L -#define isc_blobnotsup 335544414L -#define isc_badrelation 335544415L -#define isc_nodetach 335544416L -#define isc_notremote 335544417L -#define isc_trainlim 335544418L -#define isc_notinlim 335544419L -#define isc_traoutsta 335544420L -#define isc_connect_reject 335544421L -#define isc_dbfile 335544422L -#define isc_orphan 335544423L -#define isc_no_lock_mgr 335544424L -#define isc_ctxinuse 335544425L -#define isc_ctxnotdef 335544426L -#define isc_datnotsup 335544427L -#define isc_badmsgnum 335544428L -#define isc_badparnum 335544429L -#define isc_virmemexh 335544430L -#define isc_blocking_signal 335544431L -#define isc_lockmanerr 335544432L -#define isc_journerr 335544433L -#define isc_keytoobig 335544434L -#define isc_nullsegkey 335544435L -#define isc_sqlerr 335544436L -#define isc_wrodynver 335544437L -#define isc_funnotdef 335544438L -#define isc_funmismat 335544439L -#define isc_bad_msg_vec 335544440L -#define isc_bad_detach 335544441L -#define isc_noargacc_read 335544442L -#define isc_noargacc_write 335544443L -#define isc_read_only 335544444L -#define isc_ext_err 335544445L -#define isc_non_updatable 335544446L -#define isc_no_rollback 335544447L -#define isc_bad_sec_info 335544448L -#define isc_invalid_sec_info 335544449L -#define isc_misc_interpreted 335544450L -#define isc_update_conflict 335544451L -#define isc_unlicensed 335544452L -#define isc_obj_in_use 335544453L -#define isc_nofilter 335544454L -#define isc_shadow_accessed 335544455L -#define isc_invalid_sdl 335544456L -#define isc_out_of_bounds 335544457L -#define isc_invalid_dimension 335544458L -#define isc_rec_in_limbo 335544459L -#define isc_shadow_missing 335544460L -#define isc_cant_validate 335544461L -#define isc_cant_start_journal 335544462L -#define isc_gennotdef 335544463L -#define isc_cant_start_logging 335544464L -#define isc_bad_segstr_type 335544465L -#define isc_foreign_key 335544466L -#define isc_high_minor 335544467L -#define isc_tra_state 335544468L -#define isc_trans_invalid 335544469L -#define isc_buf_invalid 335544470L -#define isc_indexnotdefined 335544471L -#define isc_login 335544472L -#define isc_invalid_bookmark 335544473L -#define isc_bad_lock_level 335544474L -#define isc_relation_lock 335544475L -#define isc_record_lock 335544476L -#define isc_max_idx 335544477L -#define isc_jrn_enable 335544478L -#define isc_old_failure 335544479L -#define isc_old_in_progress 335544480L -#define isc_old_no_space 335544481L -#define isc_no_wal_no_jrn 335544482L -#define isc_num_old_files 335544483L -#define isc_wal_file_open 335544484L -#define isc_bad_stmt_handle 335544485L -#define isc_wal_failure 335544486L -#define isc_walw_err 335544487L -#define isc_logh_small 335544488L -#define isc_logh_inv_version 335544489L -#define isc_logh_open_flag 335544490L -#define isc_logh_open_flag2 335544491L -#define isc_logh_diff_dbname 335544492L -#define isc_logf_unexpected_eof 335544493L -#define isc_logr_incomplete 335544494L -#define isc_logr_header_small 335544495L -#define isc_logb_small 335544496L -#define isc_wal_illegal_attach 335544497L -#define isc_wal_invalid_wpb 335544498L -#define isc_wal_err_rollover 335544499L -#define isc_no_wal 335544500L -#define isc_drop_wal 335544501L -#define isc_stream_not_defined 335544502L -#define isc_wal_subsys_error 335544503L -#define isc_wal_subsys_corrupt 335544504L -#define isc_no_archive 335544505L -#define isc_shutinprog 335544506L -#define isc_range_in_use 335544507L -#define isc_range_not_found 335544508L -#define isc_charset_not_found 335544509L -#define isc_lock_timeout 335544510L -#define isc_prcnotdef 335544511L -#define isc_prcmismat 335544512L -#define isc_wal_bugcheck 335544513L -#define isc_wal_cant_expand 335544514L -#define isc_codnotdef 335544515L -#define isc_xcpnotdef 335544516L -#define isc_except 335544517L -#define isc_cache_restart 335544518L -#define isc_bad_lock_handle 335544519L -#define isc_jrn_present 335544520L -#define isc_wal_err_rollover2 335544521L -#define isc_wal_err_logwrite 335544522L -#define isc_wal_err_jrn_comm 335544523L -#define isc_wal_err_expansion 335544524L -#define isc_wal_err_setup 335544525L -#define isc_wal_err_ww_sync 335544526L -#define isc_wal_err_ww_start 335544527L -#define isc_shutdown 335544528L -#define isc_existing_priv_mod 335544529L -#define isc_primary_key_ref 335544530L -#define isc_primary_key_notnull 335544531L -#define isc_ref_cnstrnt_notfound 335544532L -#define isc_foreign_key_notfound 335544533L -#define isc_ref_cnstrnt_update 335544534L -#define isc_check_cnstrnt_update 335544535L -#define isc_check_cnstrnt_del 335544536L -#define isc_integ_index_seg_del 335544537L -#define isc_integ_index_seg_mod 335544538L -#define isc_integ_index_del 335544539L -#define isc_integ_index_mod 335544540L -#define isc_check_trig_del 335544541L -#define isc_check_trig_update 335544542L -#define isc_cnstrnt_fld_del 335544543L -#define isc_cnstrnt_fld_rename 335544544L -#define isc_rel_cnstrnt_update 335544545L -#define isc_constaint_on_view 335544546L -#define isc_invld_cnstrnt_type 335544547L -#define isc_primary_key_exists 335544548L -#define isc_systrig_update 335544549L -#define isc_not_rel_owner 335544550L -#define isc_grant_obj_notfound 335544551L -#define isc_grant_fld_notfound 335544552L -#define isc_grant_nopriv 335544553L -#define isc_nonsql_security_rel 335544554L -#define isc_nonsql_security_fld 335544555L -#define isc_wal_cache_err 335544556L -#define isc_shutfail 335544557L -#define isc_check_constraint 335544558L -#define isc_bad_svc_handle 335544559L -#define isc_shutwarn 335544560L -#define isc_wrospbver 335544561L -#define isc_bad_spb_form 335544562L -#define isc_svcnotdef 335544563L -#define isc_no_jrn 335544564L -#define isc_transliteration_failed 335544565L -#define isc_start_cm_for_wal 335544566L -#define isc_wal_ovflow_log_required 335544567L -#define isc_text_subtype 335544568L -#define isc_dsql_error 335544569L -#define isc_dsql_command_err 335544570L -#define isc_dsql_constant_err 335544571L -#define isc_dsql_cursor_err 335544572L -#define isc_dsql_datatype_err 335544573L -#define isc_dsql_decl_err 335544574L -#define isc_dsql_cursor_update_err 335544575L -#define isc_dsql_cursor_open_err 335544576L -#define isc_dsql_cursor_close_err 335544577L -#define isc_dsql_field_err 335544578L -#define isc_dsql_internal_err 335544579L -#define isc_dsql_relation_err 335544580L -#define isc_dsql_procedure_err 335544581L -#define isc_dsql_request_err 335544582L -#define isc_dsql_sqlda_err 335544583L -#define isc_dsql_var_count_err 335544584L -#define isc_dsql_stmt_handle 335544585L -#define isc_dsql_function_err 335544586L -#define isc_dsql_blob_err 335544587L -#define isc_collation_not_found 335544588L -#define isc_collation_not_for_charset 335544589L -#define isc_dsql_dup_option 335544590L -#define isc_dsql_tran_err 335544591L -#define isc_dsql_invalid_array 335544592L -#define isc_dsql_max_arr_dim_exceeded 335544593L -#define isc_dsql_arr_range_error 335544594L -#define isc_dsql_trigger_err 335544595L -#define isc_dsql_subselect_err 335544596L -#define isc_dsql_crdb_prepare_err 335544597L -#define isc_specify_field_err 335544598L -#define isc_num_field_err 335544599L -#define isc_col_name_err 335544600L -#define isc_where_err 335544601L -#define isc_table_view_err 335544602L -#define isc_distinct_err 335544603L -#define isc_key_field_count_err 335544604L -#define isc_subquery_err 335544605L -#define isc_expression_eval_err 335544606L -#define isc_node_err 335544607L -#define isc_command_end_err 335544608L -#define isc_index_name 335544609L -#define isc_exception_name 335544610L -#define isc_field_name 335544611L -#define isc_token_err 335544612L -#define isc_union_err 335544613L -#define isc_dsql_construct_err 335544614L -#define isc_field_aggregate_err 335544615L -#define isc_field_ref_err 335544616L -#define isc_order_by_err 335544617L -#define isc_return_mode_err 335544618L -#define isc_extern_func_err 335544619L -#define isc_alias_conflict_err 335544620L -#define isc_procedure_conflict_error 335544621L -#define isc_relation_conflict_err 335544622L -#define isc_dsql_domain_err 335544623L -#define isc_idx_seg_err 335544624L -#define isc_node_name_err 335544625L -#define isc_table_name 335544626L -#define isc_proc_name 335544627L -#define isc_idx_create_err 335544628L -#define isc_wal_shadow_err 335544629L -#define isc_dependency 335544630L -#define isc_idx_key_err 335544631L -#define isc_dsql_file_length_err 335544632L -#define isc_dsql_shadow_number_err 335544633L -#define isc_dsql_token_unk_err 335544634L -#define isc_dsql_no_relation_alias 335544635L -#define isc_indexname 335544636L -#define isc_no_stream_plan 335544637L -#define isc_stream_twice 335544638L -#define isc_stream_not_found 335544639L -#define isc_collation_requires_text 335544640L -#define isc_dsql_domain_not_found 335544641L -#define isc_index_unused 335544642L -#define isc_dsql_self_join 335544643L -#define isc_stream_bof 335544644L -#define isc_stream_crack 335544645L -#define isc_db_or_file_exists 335544646L -#define isc_invalid_operator 335544647L -#define isc_conn_lost 335544648L -#define isc_bad_checksum 335544649L -#define isc_page_type_err 335544650L -#define isc_ext_readonly_err 335544651L -#define isc_sing_select_err 335544652L -#define isc_psw_attach 335544653L -#define isc_psw_start_trans 335544654L -#define isc_invalid_direction 335544655L -#define isc_dsql_var_conflict 335544656L -#define isc_dsql_no_blob_array 335544657L -#define isc_dsql_base_table 335544658L -#define isc_duplicate_base_table 335544659L -#define isc_view_alias 335544660L -#define isc_index_root_page_full 335544661L -#define isc_dsql_blob_type_unknown 335544662L -#define isc_req_max_clones_exceeded 335544663L -#define isc_dsql_duplicate_spec 335544664L -#define isc_unique_key_violation 335544665L -#define isc_srvr_version_too_old 335544666L -#define isc_drdb_completed_with_errs 335544667L -#define isc_dsql_procedure_use_err 335544668L -#define isc_dsql_count_mismatch 335544669L -#define isc_blob_idx_err 335544670L -#define isc_array_idx_err 335544671L -#define isc_key_field_err 335544672L -#define isc_no_delete 335544673L -#define isc_del_last_field 335544674L -#define isc_sort_err 335544675L -#define isc_sort_mem_err 335544676L -#define isc_version_err 335544677L -#define isc_inval_key_posn 335544678L -#define isc_no_segments_err 335544679L -#define isc_crrp_data_err 335544680L -#define isc_rec_size_err 335544681L -#define isc_dsql_field_ref 335544682L -#define isc_req_depth_exceeded 335544683L -#define isc_no_field_access 335544684L -#define isc_no_dbkey 335544685L -#define isc_jrn_format_err 335544686L -#define isc_jrn_file_full 335544687L -#define isc_dsql_open_cursor_request 335544688L -#define isc_ib_error 335544689L -#define isc_cache_redef 335544690L -#define isc_cache_too_small 335544691L -#define isc_log_redef 335544692L -#define isc_log_too_small 335544693L -#define isc_partition_too_small 335544694L -#define isc_partition_not_supp 335544695L -#define isc_log_length_spec 335544696L -#define isc_precision_err 335544697L -#define isc_scale_nogt 335544698L -#define isc_expec_short 335544699L -#define isc_expec_long 335544700L -#define isc_expec_ushort 335544701L -#define isc_escape_invalid 335544702L -#define isc_svcnoexe 335544703L -#define isc_net_lookup_err 335544704L -#define isc_service_unknown 335544705L -#define isc_host_unknown 335544706L -#define isc_grant_nopriv_on_base 335544707L -#define isc_dyn_fld_ambiguous 335544708L -#define isc_dsql_agg_ref_err 335544709L -#define isc_complex_view 335544710L -#define isc_unprepared_stmt 335544711L -#define isc_expec_positive 335544712L -#define isc_dsql_sqlda_value_err 335544713L -#define isc_invalid_array_id 335544714L -#define isc_extfile_uns_op 335544715L -#define isc_svc_in_use 335544716L -#define isc_err_stack_limit 335544717L -#define isc_invalid_key 335544718L -#define isc_net_init_error 335544719L -#define isc_loadlib_failure 335544720L -#define isc_network_error 335544721L -#define isc_net_connect_err 335544722L -#define isc_net_connect_listen_err 335544723L -#define isc_net_event_connect_err 335544724L -#define isc_net_event_listen_err 335544725L -#define isc_net_read_err 335544726L -#define isc_net_write_err 335544727L -#define isc_integ_index_deactivate 335544728L -#define isc_integ_deactivate_primary 335544729L -#define isc_cse_not_supported 335544730L -#define isc_tra_must_sweep 335544731L -#define isc_unsupported_network_drive 335544732L -#define isc_io_create_err 335544733L -#define isc_io_open_err 335544734L -#define isc_io_close_err 335544735L -#define isc_io_read_err 335544736L -#define isc_io_write_err 335544737L -#define isc_io_delete_err 335544738L -#define isc_io_access_err 335544739L -#define isc_udf_exception 335544740L -#define isc_lost_db_connection 335544741L -#define isc_no_write_user_priv 335544742L -#define isc_token_too_long 335544743L -#define isc_max_att_exceeded 335544744L -#define isc_login_same_as_role_name 335544745L -#define isc_reftable_requires_pk 335544746L -#define isc_usrname_too_long 335544747L -#define isc_password_too_long 335544748L -#define isc_usrname_required 335544749L -#define isc_password_required 335544750L -#define isc_bad_protocol 335544751L -#define isc_dup_usrname_found 335544752L -#define isc_usrname_not_found 335544753L -#define isc_error_adding_sec_record 335544754L -#define isc_error_modifying_sec_record 335544755L -#define isc_error_deleting_sec_record 335544756L -#define isc_error_updating_sec_db 335544757L -#define isc_sort_rec_size_err 335544758L -#define isc_bad_default_value 335544759L -#define isc_invalid_clause 335544760L -#define isc_too_many_handles 335544761L -#define isc_optimizer_blk_exc 335544762L -#define isc_invalid_string_constant 335544763L -#define isc_transitional_date 335544764L -#define isc_read_only_database 335544765L -#define isc_must_be_dialect_2_and_up 335544766L -#define isc_blob_filter_exception 335544767L -#define isc_exception_access_violation 335544768L -#define isc_exception_datatype_missalignment 335544769L -#define isc_exception_array_bounds_exceeded 335544770L -#define isc_exception_float_denormal_operand 335544771L -#define isc_exception_float_divide_by_zero 335544772L -#define isc_exception_float_inexact_result 335544773L -#define isc_exception_float_invalid_operand 335544774L -#define isc_exception_float_overflow 335544775L -#define isc_exception_float_stack_check 335544776L -#define isc_exception_float_underflow 335544777L -#define isc_exception_integer_divide_by_zero 335544778L -#define isc_exception_integer_overflow 335544779L -#define isc_exception_unknown 335544780L -#define isc_exception_stack_overflow 335544781L -#define isc_exception_sigsegv 335544782L -#define isc_exception_sigill 335544783L -#define isc_exception_sigbus 335544784L -#define isc_exception_sigfpe 335544785L -#define isc_ext_file_delete 335544786L -#define isc_ext_file_modify 335544787L -#define isc_adm_task_denied 335544788L -#define isc_extract_input_mismatch 335544789L -#define isc_insufficient_svc_privileges 335544790L -#define isc_file_in_use 335544791L -#define isc_service_att_err 335544792L -#define isc_ddl_not_allowed_by_db_sql_dial 335544793L -#define isc_cancelled 335544794L -#define isc_unexp_spb_form 335544795L -#define isc_sql_dialect_datatype_unsupport 335544796L -#define isc_svcnouser 335544797L -#define isc_depend_on_uncommitted_rel 335544798L -#define isc_svc_name_missing 335544799L -#define isc_too_many_contexts 335544800L -#define isc_datype_notsup 335544801L -#define isc_dialect_reset_warning 335544802L -#define isc_dialect_not_changed 335544803L -#define isc_database_create_failed 335544804L -#define isc_inv_dialect_specified 335544805L -#define isc_valid_db_dialects 335544806L -#define isc_sqlwarn 335544807L -#define isc_dtype_renamed 335544808L -#define isc_extern_func_dir_error 335544809L -#define isc_date_range_exceeded 335544810L -#define isc_inv_client_dialect_specified 335544811L -#define isc_valid_client_dialects 335544812L -#define isc_optimizer_between_err 335544813L -#define isc_service_not_supported 335544814L -#define isc_generator_name 335544815L -#define isc_udf_name 335544816L -#define isc_bad_limit_param 335544817L -#define isc_bad_skip_param 335544818L -#define isc_io_32bit_exceeded_err 335544819L -#define isc_invalid_savepoint 335544820L -#define isc_dsql_column_pos_err 335544821L -#define isc_dsql_agg_where_err 335544822L -#define isc_dsql_agg_group_err 335544823L -#define isc_dsql_agg_column_err 335544824L -#define isc_dsql_agg_having_err 335544825L -#define isc_dsql_agg_nested_err 335544826L -#define isc_exec_sql_invalid_arg 335544827L -#define isc_exec_sql_invalid_req 335544828L -#define isc_exec_sql_invalid_var 335544829L -#define isc_exec_sql_max_call_exceeded 335544830L -#define isc_conf_access_denied 335544831L -#define isc_wrong_backup_state 335544832L -#define isc_wal_backup_err 335544833L -#define isc_cursor_not_open 335544834L -#define isc_bad_shutdown_mode 335544835L -#define isc_concat_overflow 335544836L -#define isc_bad_substring_offset 335544837L -#define isc_foreign_key_target_doesnt_exist 335544838L -#define isc_foreign_key_references_present 335544839L -#define isc_no_update 335544840L -#define isc_cursor_already_open 335544841L -#define isc_stack_trace 335544842L -#define isc_ctx_var_not_found 335544843L -#define isc_ctx_namespace_invalid 335544844L -#define isc_ctx_too_big 335544845L -#define isc_ctx_bad_argument 335544846L -#define isc_identifier_too_long 335544847L -#define isc_except2 335544848L -#define isc_malformed_string 335544849L -#define isc_prc_out_param_mismatch 335544850L -#define isc_command_end_err2 335544851L -#define isc_partner_idx_incompat_type 335544852L -#define isc_bad_substring_length 335544853L -#define isc_charset_not_installed 335544854L -#define isc_collation_not_installed 335544855L -#define isc_att_shutdown 335544856L -#define isc_blobtoobig 335544857L -#define isc_must_have_phys_field 335544858L -#define isc_invalid_time_precision 335544859L -#define isc_blob_convert_error 335544860L -#define isc_array_convert_error 335544861L -#define isc_record_lock_not_supp 335544862L -#define isc_partner_idx_not_found 335544863L -#define isc_tra_num_exc 335544864L -#define isc_field_disappeared 335544865L -#define isc_met_wrong_gtt_scope 335544866L -#define isc_subtype_for_internal_use 335544867L -#define isc_illegal_prc_type 335544868L -#define isc_invalid_sort_datatype 335544869L -#define isc_collation_name 335544870L -#define isc_domain_name 335544871L -#define isc_domnotdef 335544872L -#define isc_array_max_dimensions 335544873L -#define isc_max_db_per_trans_allowed 335544874L -#define isc_bad_debug_format 335544875L -#define isc_bad_proc_BLR 335544876L -#define isc_key_too_big 335544877L -#define isc_concurrent_transaction 335544878L -#define isc_not_valid_for_var 335544879L -#define isc_not_valid_for 335544880L -#define isc_need_difference 335544881L -#define isc_long_login 335544882L -#define isc_fldnotdef2 335544883L -#define isc_invalid_similar_pattern 335544884L -#define isc_bad_teb_form 335544885L -#define isc_tpb_multiple_txn_isolation 335544886L -#define isc_tpb_reserv_before_table 335544887L -#define isc_tpb_multiple_spec 335544888L -#define isc_tpb_option_without_rc 335544889L -#define isc_tpb_conflicting_options 335544890L -#define isc_tpb_reserv_missing_tlen 335544891L -#define isc_tpb_reserv_long_tlen 335544892L -#define isc_tpb_reserv_missing_tname 335544893L -#define isc_tpb_reserv_corrup_tlen 335544894L -#define isc_tpb_reserv_null_tlen 335544895L -#define isc_tpb_reserv_relnotfound 335544896L -#define isc_tpb_reserv_baserelnotfound 335544897L -#define isc_tpb_missing_len 335544898L -#define isc_tpb_missing_value 335544899L -#define isc_tpb_corrupt_len 335544900L -#define isc_tpb_null_len 335544901L -#define isc_tpb_overflow_len 335544902L -#define isc_tpb_invalid_value 335544903L -#define isc_tpb_reserv_stronger_wng 335544904L -#define isc_tpb_reserv_stronger 335544905L -#define isc_tpb_reserv_max_recursion 335544906L -#define isc_tpb_reserv_virtualtbl 335544907L -#define isc_tpb_reserv_systbl 335544908L -#define isc_tpb_reserv_temptbl 335544909L -#define isc_tpb_readtxn_after_writelock 335544910L -#define isc_tpb_writelock_after_readtxn 335544911L -#define isc_time_range_exceeded 335544912L -#define isc_datetime_range_exceeded 335544913L -#define isc_string_truncation 335544914L -#define isc_blob_truncation 335544915L -#define isc_numeric_out_of_range 335544916L -#define isc_shutdown_timeout 335544917L -#define isc_att_handle_busy 335544918L -#define isc_bad_udf_freeit 335544919L -#define isc_eds_provider_not_found 335544920L -#define isc_eds_connection 335544921L -#define isc_eds_preprocess 335544922L -#define isc_eds_stmt_expected 335544923L -#define isc_eds_prm_name_expected 335544924L -#define isc_eds_unclosed_comment 335544925L -#define isc_eds_statement 335544926L -#define isc_eds_input_prm_mismatch 335544927L -#define isc_eds_output_prm_mismatch 335544928L -#define isc_eds_input_prm_not_set 335544929L -#define isc_too_big_blr 335544930L -#define isc_montabexh 335544931L -#define isc_modnotfound 335544932L -#define isc_nothing_to_cancel 335544933L -#define isc_ibutil_not_loaded 335544934L -#define isc_circular_computed 335544935L -#define isc_psw_db_error 335544936L -#define isc_invalid_type_datetime_op 335544937L -#define isc_onlycan_add_timetodate 335544938L -#define isc_onlycan_add_datetotime 335544939L -#define isc_onlycansub_tstampfromtstamp 335544940L -#define isc_onlyoneop_mustbe_tstamp 335544941L -#define isc_invalid_extractpart_time 335544942L -#define isc_invalid_extractpart_date 335544943L -#define isc_invalidarg_extract 335544944L -#define isc_sysf_argmustbe_exact 335544945L -#define isc_sysf_argmustbe_exact_or_fp 335544946L -#define isc_sysf_argviolates_uuidtype 335544947L -#define isc_sysf_argviolates_uuidlen 335544948L -#define isc_sysf_argviolates_uuidfmt 335544949L -#define isc_sysf_argviolates_guidigits 335544950L -#define isc_sysf_invalid_addpart_time 335544951L -#define isc_sysf_invalid_add_datetime 335544952L -#define isc_sysf_invalid_addpart_dtime 335544953L -#define isc_sysf_invalid_add_dtime_rc 335544954L -#define isc_sysf_invalid_diff_dtime 335544955L -#define isc_sysf_invalid_timediff 335544956L -#define isc_sysf_invalid_tstamptimediff 335544957L -#define isc_sysf_invalid_datetimediff 335544958L -#define isc_sysf_invalid_diffpart 335544959L -#define isc_sysf_argmustbe_positive 335544960L -#define isc_sysf_basemustbe_positive 335544961L -#define isc_sysf_argnmustbe_nonneg 335544962L -#define isc_sysf_argnmustbe_positive 335544963L -#define isc_sysf_invalid_zeropowneg 335544964L -#define isc_sysf_invalid_negpowfp 335544965L -#define isc_sysf_invalid_scale 335544966L -#define isc_sysf_argmustbe_nonneg 335544967L -#define isc_sysf_binuuid_mustbe_str 335544968L -#define isc_sysf_binuuid_wrongsize 335544969L -#define isc_missing_required_spb 335544970L -#define isc_net_server_shutdown 335544971L -#define isc_bad_conn_str 335544972L -#define isc_bad_epb_form 335544973L -#define isc_no_threads 335544974L -#define isc_net_event_connect_timeout 335544975L -#define isc_sysf_argmustbe_nonzero 335544976L -#define isc_sysf_argmustbe_range_inc1_1 335544977L -#define isc_sysf_argmustbe_gteq_one 335544978L -#define isc_sysf_argmustbe_range_exc1_1 335544979L -#define isc_internal_rejected_params 335544980L -#define isc_sysf_fp_overflow 335544981L -#define isc_udf_fp_overflow 335544982L -#define isc_udf_fp_nan 335544983L -#define isc_instance_conflict 335544984L -#define isc_out_of_temp_space 335544985L -#define isc_eds_expl_tran_ctrl 335544986L -#define isc_no_trusted_spb 335544987L -#define isc_package_name 335544988L -#define isc_cannot_make_not_null 335544989L -#define isc_feature_removed 335544990L -#define isc_view_name 335544991L -#define isc_lock_dir_access 335544992L -#define isc_invalid_fetch_option 335544993L -#define isc_bad_fun_BLR 335544994L -#define isc_func_pack_not_implemented 335544995L -#define isc_proc_pack_not_implemented 335544996L -#define isc_eem_func_not_returned 335544997L -#define isc_eem_proc_not_returned 335544998L -#define isc_eem_trig_not_returned 335544999L -#define isc_eem_bad_plugin_ver 335545000L -#define isc_eem_engine_notfound 335545001L -#define isc_attachment_in_use 335545002L -#define isc_transaction_in_use 335545003L -#define isc_pman_cannot_load_plugin 335545004L -#define isc_pman_module_notfound 335545005L -#define isc_pman_entrypoint_notfound 335545006L -#define isc_pman_module_bad 335545007L -#define isc_pman_plugin_notfound 335545008L -#define isc_sysf_invalid_trig_namespace 335545009L -#define isc_unexpected_null 335545010L -#define isc_type_notcompat_blob 335545011L -#define isc_invalid_date_val 335545012L -#define isc_invalid_time_val 335545013L -#define isc_invalid_timestamp_val 335545014L -#define isc_invalid_index_val 335545015L -#define isc_formatted_exception 335545016L -#define isc_async_active 335545017L -#define isc_private_function 335545018L -#define isc_private_procedure 335545019L -#define isc_request_outdated 335545020L -#define isc_bad_events_handle 335545021L -#define isc_cannot_copy_stmt 335545022L -#define isc_invalid_boolean_usage 335545023L -#define isc_sysf_argscant_both_be_zero 335545024L -#define isc_spb_no_id 335545025L -#define isc_ee_blr_mismatch_null 335545026L -#define isc_ee_blr_mismatch_length 335545027L -#define isc_ss_out_of_bounds 335545028L -#define isc_missing_data_structures 335545029L -#define isc_protect_sys_tab 335545030L -#define isc_libtommath_generic 335545031L -#define isc_wroblrver2 335545032L -#define isc_trunc_limits 335545033L -#define isc_info_access 335545034L -#define isc_svc_no_stdin 335545035L -#define isc_svc_start_failed 335545036L -#define isc_svc_no_switches 335545037L -#define isc_svc_bad_size 335545038L -#define isc_no_crypt_plugin 335545039L -#define isc_cp_name_too_long 335545040L -#define isc_cp_process_active 335545041L -#define isc_cp_already_crypted 335545042L -#define isc_decrypt_error 335545043L -#define isc_no_providers 335545044L -#define isc_null_spb 335545045L -#define isc_max_args_exceeded 335545046L -#define isc_ee_blr_mismatch_names_count 335545047L -#define isc_ee_blr_mismatch_name_not_found 335545048L -#define isc_bad_result_set 335545049L -#define isc_wrong_message_length 335545050L -#define isc_no_output_format 335545051L -#define isc_item_finish 335545052L -#define isc_miss_config 335545053L -#define isc_conf_line 335545054L -#define isc_conf_include 335545055L -#define isc_include_depth 335545056L -#define isc_include_miss 335545057L -#define isc_protect_ownership 335545058L -#define isc_badvarnum 335545059L -#define isc_sec_context 335545060L -#define isc_multi_segment 335545061L -#define isc_login_changed 335545062L -#define isc_auth_handshake_limit 335545063L -#define isc_wirecrypt_incompatible 335545064L -#define isc_miss_wirecrypt 335545065L -#define isc_wirecrypt_key 335545066L -#define isc_wirecrypt_plugin 335545067L -#define isc_secdb_name 335545068L -#define isc_auth_data 335545069L -#define isc_auth_datalength 335545070L -#define isc_info_unprepared_stmt 335545071L -#define isc_idx_key_value 335545072L -#define isc_forupdate_virtualtbl 335545073L -#define isc_forupdate_systbl 335545074L -#define isc_forupdate_temptbl 335545075L -#define isc_cant_modify_sysobj 335545076L -#define isc_server_misconfigured 335545077L -#define isc_alter_role 335545078L -#define isc_map_already_exists 335545079L -#define isc_map_not_exists 335545080L -#define isc_map_load 335545081L -#define isc_map_aster 335545082L -#define isc_map_multi 335545083L -#define isc_map_undefined 335545084L -#define isc_baddpb_damaged_mode 335545085L -#define isc_baddpb_buffers_range 335545086L -#define isc_baddpb_temp_buffers 335545087L -#define isc_map_nodb 335545088L -#define isc_map_notable 335545089L -#define isc_miss_trusted_role 335545090L -#define isc_set_invalid_role 335545091L -#define isc_cursor_not_positioned 335545092L -#define isc_dup_attribute 335545093L -#define isc_dyn_no_priv 335545094L -#define isc_dsql_cant_grant_option 335545095L -#define isc_read_conflict 335545096L -#define isc_crdb_load 335545097L -#define isc_crdb_nodb 335545098L -#define isc_crdb_notable 335545099L -#define isc_interface_version_too_old 335545100L -#define isc_fun_param_mismatch 335545101L -#define isc_savepoint_backout_err 335545102L -#define isc_domain_primary_key_notnull 335545103L -#define isc_invalid_attachment_charset 335545104L -#define isc_map_down 335545105L -#define isc_login_error 335545106L -#define isc_already_opened 335545107L -#define isc_bad_crypt_key 335545108L -#define isc_encrypt_error 335545109L -#define isc_gfix_db_name 335740929L -#define isc_gfix_invalid_sw 335740930L -#define isc_gfix_incmp_sw 335740932L -#define isc_gfix_replay_req 335740933L -#define isc_gfix_pgbuf_req 335740934L -#define isc_gfix_val_req 335740935L -#define isc_gfix_pval_req 335740936L -#define isc_gfix_trn_req 335740937L -#define isc_gfix_full_req 335740940L -#define isc_gfix_usrname_req 335740941L -#define isc_gfix_pass_req 335740942L -#define isc_gfix_subs_name 335740943L -#define isc_gfix_wal_req 335740944L -#define isc_gfix_sec_req 335740945L -#define isc_gfix_nval_req 335740946L -#define isc_gfix_type_shut 335740947L -#define isc_gfix_retry 335740948L -#define isc_gfix_retry_db 335740951L -#define isc_gfix_exceed_max 335740991L -#define isc_gfix_corrupt_pool 335740992L -#define isc_gfix_mem_exhausted 335740993L -#define isc_gfix_bad_pool 335740994L -#define isc_gfix_trn_not_valid 335740995L -#define isc_gfix_unexp_eoi 335741012L -#define isc_gfix_recon_fail 335741018L -#define isc_gfix_trn_unknown 335741036L -#define isc_gfix_mode_req 335741038L -#define isc_gfix_pzval_req 335741042L -#define isc_dsql_dbkey_from_non_table 336003074L -#define isc_dsql_transitional_numeric 336003075L -#define isc_dsql_dialect_warning_expr 336003076L -#define isc_sql_db_dialect_dtype_unsupport 336003077L -#define isc_sql_dialect_conflict_num 336003079L -#define isc_dsql_warning_number_ambiguous 336003080L -#define isc_dsql_warning_number_ambiguous1 336003081L -#define isc_dsql_warn_precision_ambiguous 336003082L -#define isc_dsql_warn_precision_ambiguous1 336003083L -#define isc_dsql_warn_precision_ambiguous2 336003084L -#define isc_dsql_ambiguous_field_name 336003085L -#define isc_dsql_udf_return_pos_err 336003086L -#define isc_dsql_invalid_label 336003087L -#define isc_dsql_datatypes_not_comparable 336003088L -#define isc_dsql_cursor_invalid 336003089L -#define isc_dsql_cursor_redefined 336003090L -#define isc_dsql_cursor_not_found 336003091L -#define isc_dsql_cursor_exists 336003092L -#define isc_dsql_cursor_rel_ambiguous 336003093L -#define isc_dsql_cursor_rel_not_found 336003094L -#define isc_dsql_cursor_not_open 336003095L -#define isc_dsql_type_not_supp_ext_tab 336003096L -#define isc_dsql_feature_not_supported_ods 336003097L -#define isc_primary_key_required 336003098L -#define isc_upd_ins_doesnt_match_pk 336003099L -#define isc_upd_ins_doesnt_match_matching 336003100L -#define isc_upd_ins_with_complex_view 336003101L -#define isc_dsql_incompatible_trigger_type 336003102L -#define isc_dsql_db_trigger_type_cant_change 336003103L -#define isc_dsql_record_version_table 336003104L -#define isc_dsql_invalid_sqlda_version 336003105L -#define isc_dsql_sqlvar_index 336003106L -#define isc_dsql_no_sqlind 336003107L -#define isc_dsql_no_sqldata 336003108L -#define isc_dsql_no_input_sqlda 336003109L -#define isc_dsql_no_output_sqlda 336003110L -#define isc_dsql_wrong_param_num 336003111L -#define isc_dyn_filter_not_found 336068645L -#define isc_dyn_func_not_found 336068649L -#define isc_dyn_index_not_found 336068656L -#define isc_dyn_view_not_found 336068662L -#define isc_dyn_domain_not_found 336068697L -#define isc_dyn_cant_modify_auto_trig 336068717L -#define isc_dyn_dup_table 336068740L -#define isc_dyn_proc_not_found 336068748L -#define isc_dyn_exception_not_found 336068752L -#define isc_dyn_proc_param_not_found 336068754L -#define isc_dyn_trig_not_found 336068755L -#define isc_dyn_charset_not_found 336068759L -#define isc_dyn_collation_not_found 336068760L -#define isc_dyn_role_not_found 336068763L -#define isc_dyn_name_longer 336068767L -#define isc_dyn_column_does_not_exist 336068784L -#define isc_dyn_role_does_not_exist 336068796L -#define isc_dyn_no_grant_admin_opt 336068797L -#define isc_dyn_user_not_role_member 336068798L -#define isc_dyn_delete_role_failed 336068799L -#define isc_dyn_grant_role_to_user 336068800L -#define isc_dyn_inv_sql_role_name 336068801L -#define isc_dyn_dup_sql_role 336068802L -#define isc_dyn_kywd_spec_for_role 336068803L -#define isc_dyn_roles_not_supported 336068804L -#define isc_dyn_domain_name_exists 336068812L -#define isc_dyn_field_name_exists 336068813L -#define isc_dyn_dependency_exists 336068814L -#define isc_dyn_dtype_invalid 336068815L -#define isc_dyn_char_fld_too_small 336068816L -#define isc_dyn_invalid_dtype_conversion 336068817L -#define isc_dyn_dtype_conv_invalid 336068818L -#define isc_dyn_zero_len_id 336068820L -#define isc_dyn_gen_not_found 336068822L -#define isc_max_coll_per_charset 336068829L -#define isc_invalid_coll_attr 336068830L -#define isc_dyn_wrong_gtt_scope 336068840L -#define isc_dyn_coll_used_table 336068843L -#define isc_dyn_coll_used_domain 336068844L -#define isc_dyn_cannot_del_syscoll 336068845L -#define isc_dyn_cannot_del_def_coll 336068846L -#define isc_dyn_table_not_found 336068849L -#define isc_dyn_coll_used_procedure 336068851L -#define isc_dyn_scale_too_big 336068852L -#define isc_dyn_precision_too_small 336068853L -#define isc_dyn_miss_priv_warning 336068855L -#define isc_dyn_ods_not_supp_feature 336068856L -#define isc_dyn_cannot_addrem_computed 336068857L -#define isc_dyn_no_empty_pw 336068858L -#define isc_dyn_dup_index 336068859L -#define isc_dyn_package_not_found 336068864L -#define isc_dyn_schema_not_found 336068865L -#define isc_dyn_cannot_mod_sysproc 336068866L -#define isc_dyn_cannot_mod_systrig 336068867L -#define isc_dyn_cannot_mod_sysfunc 336068868L -#define isc_dyn_invalid_ddl_proc 336068869L -#define isc_dyn_invalid_ddl_trig 336068870L -#define isc_dyn_funcnotdef_package 336068871L -#define isc_dyn_procnotdef_package 336068872L -#define isc_dyn_funcsignat_package 336068873L -#define isc_dyn_procsignat_package 336068874L -#define isc_dyn_defvaldecl_package_proc 336068875L -#define isc_dyn_package_body_exists 336068877L -#define isc_dyn_invalid_ddl_func 336068878L -#define isc_dyn_newfc_oldsyntax 336068879L -#define isc_dyn_func_param_not_found 336068886L -#define isc_dyn_routine_param_not_found 336068887L -#define isc_dyn_routine_param_ambiguous 336068888L -#define isc_dyn_coll_used_function 336068889L -#define isc_dyn_domain_used_function 336068890L -#define isc_dyn_alter_user_no_clause 336068891L -#define isc_dyn_duplicate_package_item 336068894L -#define isc_dyn_cant_modify_sysobj 336068895L -#define isc_dyn_cant_use_zero_increment 336068896L -#define isc_dyn_cant_use_in_foreignkey 336068897L -#define isc_dyn_defvaldecl_package_func 336068898L -#define isc_gbak_unknown_switch 336330753L -#define isc_gbak_page_size_missing 336330754L -#define isc_gbak_page_size_toobig 336330755L -#define isc_gbak_redir_ouput_missing 336330756L -#define isc_gbak_switches_conflict 336330757L -#define isc_gbak_unknown_device 336330758L -#define isc_gbak_no_protection 336330759L -#define isc_gbak_page_size_not_allowed 336330760L -#define isc_gbak_multi_source_dest 336330761L -#define isc_gbak_filename_missing 336330762L -#define isc_gbak_dup_inout_names 336330763L -#define isc_gbak_inv_page_size 336330764L -#define isc_gbak_db_specified 336330765L -#define isc_gbak_db_exists 336330766L -#define isc_gbak_unk_device 336330767L -#define isc_gbak_blob_info_failed 336330772L -#define isc_gbak_unk_blob_item 336330773L -#define isc_gbak_get_seg_failed 336330774L -#define isc_gbak_close_blob_failed 336330775L -#define isc_gbak_open_blob_failed 336330776L -#define isc_gbak_put_blr_gen_id_failed 336330777L -#define isc_gbak_unk_type 336330778L -#define isc_gbak_comp_req_failed 336330779L -#define isc_gbak_start_req_failed 336330780L -#define isc_gbak_rec_failed 336330781L -#define isc_gbak_rel_req_failed 336330782L -#define isc_gbak_db_info_failed 336330783L -#define isc_gbak_no_db_desc 336330784L -#define isc_gbak_db_create_failed 336330785L -#define isc_gbak_decomp_len_error 336330786L -#define isc_gbak_tbl_missing 336330787L -#define isc_gbak_blob_col_missing 336330788L -#define isc_gbak_create_blob_failed 336330789L -#define isc_gbak_put_seg_failed 336330790L -#define isc_gbak_rec_len_exp 336330791L -#define isc_gbak_inv_rec_len 336330792L -#define isc_gbak_exp_data_type 336330793L -#define isc_gbak_gen_id_failed 336330794L -#define isc_gbak_unk_rec_type 336330795L -#define isc_gbak_inv_bkup_ver 336330796L -#define isc_gbak_missing_bkup_desc 336330797L -#define isc_gbak_string_trunc 336330798L -#define isc_gbak_cant_rest_record 336330799L -#define isc_gbak_send_failed 336330800L -#define isc_gbak_no_tbl_name 336330801L -#define isc_gbak_unexp_eof 336330802L -#define isc_gbak_db_format_too_old 336330803L -#define isc_gbak_inv_array_dim 336330804L -#define isc_gbak_xdr_len_expected 336330807L -#define isc_gbak_open_bkup_error 336330817L -#define isc_gbak_open_error 336330818L -#define isc_gbak_missing_block_fac 336330934L -#define isc_gbak_inv_block_fac 336330935L -#define isc_gbak_block_fac_specified 336330936L -#define isc_gbak_missing_username 336330940L -#define isc_gbak_missing_password 336330941L -#define isc_gbak_missing_skipped_bytes 336330952L -#define isc_gbak_inv_skipped_bytes 336330953L -#define isc_gbak_err_restore_charset 336330965L -#define isc_gbak_err_restore_collation 336330967L -#define isc_gbak_read_error 336330972L -#define isc_gbak_write_error 336330973L -#define isc_gbak_db_in_use 336330985L -#define isc_gbak_sysmemex 336330990L -#define isc_gbak_restore_role_failed 336331002L -#define isc_gbak_role_op_missing 336331005L -#define isc_gbak_page_buffers_missing 336331010L -#define isc_gbak_page_buffers_wrong_param 336331011L -#define isc_gbak_page_buffers_restore 336331012L -#define isc_gbak_inv_size 336331014L -#define isc_gbak_file_outof_sequence 336331015L -#define isc_gbak_join_file_missing 336331016L -#define isc_gbak_stdin_not_supptd 336331017L -#define isc_gbak_stdout_not_supptd 336331018L -#define isc_gbak_bkup_corrupt 336331019L -#define isc_gbak_unk_db_file_spec 336331020L -#define isc_gbak_hdr_write_failed 336331021L -#define isc_gbak_disk_space_ex 336331022L -#define isc_gbak_size_lt_min 336331023L -#define isc_gbak_svc_name_missing 336331025L -#define isc_gbak_not_ownr 336331026L -#define isc_gbak_mode_req 336331031L -#define isc_gbak_just_data 336331033L -#define isc_gbak_data_only 336331034L -#define isc_gbak_missing_interval 336331078L -#define isc_gbak_wrong_interval 336331079L -#define isc_gbak_verify_verbint 336331081L -#define isc_gbak_option_only_restore 336331082L -#define isc_gbak_option_only_backup 336331083L -#define isc_gbak_option_conflict 336331084L -#define isc_gbak_param_conflict 336331085L -#define isc_gbak_option_repeated 336331086L -#define isc_gbak_max_dbkey_recursion 336331091L -#define isc_gbak_max_dbkey_length 336331092L -#define isc_gbak_invalid_metadata 336331093L -#define isc_gbak_invalid_data 336331094L -#define isc_gbak_inv_bkup_ver2 336331096L -#define isc_gbak_db_format_too_old2 336331100L -#define isc_dsql_too_old_ods 336397205L -#define isc_dsql_table_not_found 336397206L -#define isc_dsql_view_not_found 336397207L -#define isc_dsql_line_col_error 336397208L -#define isc_dsql_unknown_pos 336397209L -#define isc_dsql_no_dup_name 336397210L -#define isc_dsql_too_many_values 336397211L -#define isc_dsql_no_array_computed 336397212L -#define isc_dsql_implicit_domain_name 336397213L -#define isc_dsql_only_can_subscript_array 336397214L -#define isc_dsql_max_sort_items 336397215L -#define isc_dsql_max_group_items 336397216L -#define isc_dsql_conflicting_sort_field 336397217L -#define isc_dsql_derived_table_more_columns 336397218L -#define isc_dsql_derived_table_less_columns 336397219L -#define isc_dsql_derived_field_unnamed 336397220L -#define isc_dsql_derived_field_dup_name 336397221L -#define isc_dsql_derived_alias_select 336397222L -#define isc_dsql_derived_alias_field 336397223L -#define isc_dsql_auto_field_bad_pos 336397224L -#define isc_dsql_cte_wrong_reference 336397225L -#define isc_dsql_cte_cycle 336397226L -#define isc_dsql_cte_outer_join 336397227L -#define isc_dsql_cte_mult_references 336397228L -#define isc_dsql_cte_not_a_union 336397229L -#define isc_dsql_cte_nonrecurs_after_recurs 336397230L -#define isc_dsql_cte_wrong_clause 336397231L -#define isc_dsql_cte_union_all 336397232L -#define isc_dsql_cte_miss_nonrecursive 336397233L -#define isc_dsql_cte_nested_with 336397234L -#define isc_dsql_col_more_than_once_using 336397235L -#define isc_dsql_unsupp_feature_dialect 336397236L -#define isc_dsql_cte_not_used 336397237L -#define isc_dsql_col_more_than_once_view 336397238L -#define isc_dsql_unsupported_in_auto_trans 336397239L -#define isc_dsql_eval_unknode 336397240L -#define isc_dsql_agg_wrongarg 336397241L -#define isc_dsql_agg2_wrongarg 336397242L -#define isc_dsql_nodateortime_pm_string 336397243L -#define isc_dsql_invalid_datetime_subtract 336397244L -#define isc_dsql_invalid_dateortime_add 336397245L -#define isc_dsql_invalid_type_minus_date 336397246L -#define isc_dsql_nostring_addsub_dial3 336397247L -#define isc_dsql_invalid_type_addsub_dial3 336397248L -#define isc_dsql_invalid_type_multip_dial1 336397249L -#define isc_dsql_nostring_multip_dial3 336397250L -#define isc_dsql_invalid_type_multip_dial3 336397251L -#define isc_dsql_mustuse_numeric_div_dial1 336397252L -#define isc_dsql_nostring_div_dial3 336397253L -#define isc_dsql_invalid_type_div_dial3 336397254L -#define isc_dsql_nostring_neg_dial3 336397255L -#define isc_dsql_invalid_type_neg 336397256L -#define isc_dsql_max_distinct_items 336397257L -#define isc_dsql_alter_charset_failed 336397258L -#define isc_dsql_comment_on_failed 336397259L -#define isc_dsql_create_func_failed 336397260L -#define isc_dsql_alter_func_failed 336397261L -#define isc_dsql_create_alter_func_failed 336397262L -#define isc_dsql_drop_func_failed 336397263L -#define isc_dsql_recreate_func_failed 336397264L -#define isc_dsql_create_proc_failed 336397265L -#define isc_dsql_alter_proc_failed 336397266L -#define isc_dsql_create_alter_proc_failed 336397267L -#define isc_dsql_drop_proc_failed 336397268L -#define isc_dsql_recreate_proc_failed 336397269L -#define isc_dsql_create_trigger_failed 336397270L -#define isc_dsql_alter_trigger_failed 336397271L -#define isc_dsql_create_alter_trigger_failed 336397272L -#define isc_dsql_drop_trigger_failed 336397273L -#define isc_dsql_recreate_trigger_failed 336397274L -#define isc_dsql_create_collation_failed 336397275L -#define isc_dsql_drop_collation_failed 336397276L -#define isc_dsql_create_domain_failed 336397277L -#define isc_dsql_alter_domain_failed 336397278L -#define isc_dsql_drop_domain_failed 336397279L -#define isc_dsql_create_except_failed 336397280L -#define isc_dsql_alter_except_failed 336397281L -#define isc_dsql_create_alter_except_failed 336397282L -#define isc_dsql_recreate_except_failed 336397283L -#define isc_dsql_drop_except_failed 336397284L -#define isc_dsql_create_sequence_failed 336397285L -#define isc_dsql_create_table_failed 336397286L -#define isc_dsql_alter_table_failed 336397287L -#define isc_dsql_drop_table_failed 336397288L -#define isc_dsql_recreate_table_failed 336397289L -#define isc_dsql_create_pack_failed 336397290L -#define isc_dsql_alter_pack_failed 336397291L -#define isc_dsql_create_alter_pack_failed 336397292L -#define isc_dsql_drop_pack_failed 336397293L -#define isc_dsql_recreate_pack_failed 336397294L -#define isc_dsql_create_pack_body_failed 336397295L -#define isc_dsql_drop_pack_body_failed 336397296L -#define isc_dsql_recreate_pack_body_failed 336397297L -#define isc_dsql_create_view_failed 336397298L -#define isc_dsql_alter_view_failed 336397299L -#define isc_dsql_create_alter_view_failed 336397300L -#define isc_dsql_recreate_view_failed 336397301L -#define isc_dsql_drop_view_failed 336397302L -#define isc_dsql_drop_sequence_failed 336397303L -#define isc_dsql_recreate_sequence_failed 336397304L -#define isc_dsql_drop_index_failed 336397305L -#define isc_dsql_drop_filter_failed 336397306L -#define isc_dsql_drop_shadow_failed 336397307L -#define isc_dsql_drop_role_failed 336397308L -#define isc_dsql_drop_user_failed 336397309L -#define isc_dsql_create_role_failed 336397310L -#define isc_dsql_alter_role_failed 336397311L -#define isc_dsql_alter_index_failed 336397312L -#define isc_dsql_alter_database_failed 336397313L -#define isc_dsql_create_shadow_failed 336397314L -#define isc_dsql_create_filter_failed 336397315L -#define isc_dsql_create_index_failed 336397316L -#define isc_dsql_create_user_failed 336397317L -#define isc_dsql_alter_user_failed 336397318L -#define isc_dsql_grant_failed 336397319L -#define isc_dsql_revoke_failed 336397320L -#define isc_dsql_cte_recursive_aggregate 336397321L -#define isc_dsql_mapping_failed 336397322L -#define isc_dsql_alter_sequence_failed 336397323L -#define isc_dsql_create_generator_failed 336397324L -#define isc_dsql_set_generator_failed 336397325L -#define isc_dsql_wlock_simple 336397326L -#define isc_dsql_firstskip_rows 336397327L -#define isc_dsql_wlock_aggregates 336397328L -#define isc_dsql_wlock_conflict 336397329L -#define isc_dsql_max_exception_arguments 336397330L -#define isc_dsql_string_byte_length 336397331L -#define isc_dsql_string_char_length 336397332L -#define isc_dsql_max_nesting 336397333L -#define isc_gsec_cant_open_db 336723983L -#define isc_gsec_switches_error 336723984L -#define isc_gsec_no_op_spec 336723985L -#define isc_gsec_no_usr_name 336723986L -#define isc_gsec_err_add 336723987L -#define isc_gsec_err_modify 336723988L -#define isc_gsec_err_find_mod 336723989L -#define isc_gsec_err_rec_not_found 336723990L -#define isc_gsec_err_delete 336723991L -#define isc_gsec_err_find_del 336723992L -#define isc_gsec_err_find_disp 336723996L -#define isc_gsec_inv_param 336723997L -#define isc_gsec_op_specified 336723998L -#define isc_gsec_pw_specified 336723999L -#define isc_gsec_uid_specified 336724000L -#define isc_gsec_gid_specified 336724001L -#define isc_gsec_proj_specified 336724002L -#define isc_gsec_org_specified 336724003L -#define isc_gsec_fname_specified 336724004L -#define isc_gsec_mname_specified 336724005L -#define isc_gsec_lname_specified 336724006L -#define isc_gsec_inv_switch 336724008L -#define isc_gsec_amb_switch 336724009L -#define isc_gsec_no_op_specified 336724010L -#define isc_gsec_params_not_allowed 336724011L -#define isc_gsec_incompat_switch 336724012L -#define isc_gsec_inv_username 336724044L -#define isc_gsec_inv_pw_length 336724045L -#define isc_gsec_db_specified 336724046L -#define isc_gsec_db_admin_specified 336724047L -#define isc_gsec_db_admin_pw_specified 336724048L -#define isc_gsec_sql_role_specified 336724049L -#define isc_gstat_unknown_switch 336920577L -#define isc_gstat_retry 336920578L -#define isc_gstat_wrong_ods 336920579L -#define isc_gstat_unexpected_eof 336920580L -#define isc_gstat_open_err 336920605L -#define isc_gstat_read_err 336920606L -#define isc_gstat_sysmemex 336920607L -#define isc_fbsvcmgr_bad_am 336986113L -#define isc_fbsvcmgr_bad_wm 336986114L -#define isc_fbsvcmgr_bad_rs 336986115L -#define isc_fbsvcmgr_info_err 336986116L -#define isc_fbsvcmgr_query_err 336986117L -#define isc_fbsvcmgr_switch_unknown 336986118L -#define isc_fbsvcmgr_bad_sm 336986159L -#define isc_fbsvcmgr_fp_open 336986160L -#define isc_fbsvcmgr_fp_read 336986161L -#define isc_fbsvcmgr_fp_empty 336986162L -#define isc_fbsvcmgr_bad_arg 336986164L -#define isc_utl_trusted_switch 337051649L -#define isc_nbackup_missing_param 337117213L -#define isc_nbackup_allowed_switches 337117214L -#define isc_nbackup_unknown_param 337117215L -#define isc_nbackup_unknown_switch 337117216L -#define isc_nbackup_nofetchpw_svc 337117217L -#define isc_nbackup_pwfile_error 337117218L -#define isc_nbackup_size_with_lock 337117219L -#define isc_nbackup_no_switch 337117220L -#define isc_nbackup_err_read 337117223L -#define isc_nbackup_err_write 337117224L -#define isc_nbackup_err_seek 337117225L -#define isc_nbackup_err_opendb 337117226L -#define isc_nbackup_err_fadvice 337117227L -#define isc_nbackup_err_createdb 337117228L -#define isc_nbackup_err_openbk 337117229L -#define isc_nbackup_err_createbk 337117230L -#define isc_nbackup_err_eofdb 337117231L -#define isc_nbackup_fixup_wrongstate 337117232L -#define isc_nbackup_err_db 337117233L -#define isc_nbackup_userpw_toolong 337117234L -#define isc_nbackup_lostrec_db 337117235L -#define isc_nbackup_lostguid_db 337117236L -#define isc_nbackup_err_eofhdrdb 337117237L -#define isc_nbackup_db_notlock 337117238L -#define isc_nbackup_lostguid_bk 337117239L -#define isc_nbackup_page_changed 337117240L -#define isc_nbackup_dbsize_inconsistent 337117241L -#define isc_nbackup_failed_lzbk 337117242L -#define isc_nbackup_err_eofhdrbk 337117243L -#define isc_nbackup_invalid_incbk 337117244L -#define isc_nbackup_unsupvers_incbk 337117245L -#define isc_nbackup_invlevel_incbk 337117246L -#define isc_nbackup_wrong_orderbk 337117247L -#define isc_nbackup_err_eofbk 337117248L -#define isc_nbackup_err_copy 337117249L -#define isc_nbackup_err_eofhdr_restdb 337117250L -#define isc_nbackup_lostguid_l0bk 337117251L -#define isc_nbackup_switchd_parameter 337117255L -#define isc_nbackup_user_stop 337117257L -#define isc_nbackup_deco_parse 337117259L -#define isc_trace_conflict_acts 337182750L -#define isc_trace_act_notfound 337182751L -#define isc_trace_switch_once 337182752L -#define isc_trace_param_val_miss 337182753L -#define isc_trace_param_invalid 337182754L -#define isc_trace_switch_unknown 337182755L -#define isc_trace_switch_svc_only 337182756L -#define isc_trace_switch_user_only 337182757L -#define isc_trace_switch_param_miss 337182758L -#define isc_trace_param_act_notcompat 337182759L -#define isc_trace_mandatory_switch_miss 337182760L -#define isc_err_max 1259 +#include "impl/iberror_c.h" #endif -#endif /* JRD_GEN_IBERROR_H */ +#endif /* FIREBIRD_IBERROR_H */ diff --git a/packages/node-firebird-native-api/src/native/include/firebird/impl/blr.h b/packages/node-firebird-native-api/src/native/include/firebird/impl/blr.h new file mode 100644 index 0000000..0f666cc --- /dev/null +++ b/packages/node-firebird-native-api/src/native/include/firebird/impl/blr.h @@ -0,0 +1,469 @@ +/* + * PROGRAM: C preprocessor + * MODULE: blr.h + * DESCRIPTION: BLR constants + * + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + * + * Claudio Valderrama: 2001.6.18: Add blr_current_role. + * 2002.09.28 Dmitry Yemanov: Reworked internal_info stuff, enhanced + * exception handling in SPs/triggers, + * implemented ROWS_AFFECTED system variable + * 2002.10.21 Nickolay Samofatov: Added support for explicit pessimistic locks + * 2002.10.29 Nickolay Samofatov: Added support for savepoints + * 2003.10.05 Dmitry Yemanov: Added support for explicit cursors in PSQL + * Adriano dos Santos Fernandes + */ + +#ifndef FIREBIRD_IMPL_BLR_H +#define FIREBIRD_IMPL_BLR_H + +#define BLR_WORD(x) UCHAR(x), UCHAR((x) >> 8) + +/* WARNING: if you add a new BLR representing a data type, and the value + * is greater than the numerically greatest value which now + * represents a data type, you must change the define for + * DTYPE_BLR_MAX in jrd/align.h, and add the necessary entries + * to all the arrays in that file. + */ + +#define blr_text (unsigned char)14 +#define blr_text2 (unsigned char)15 /* added in 3.2 JPN */ +#define blr_short (unsigned char)7 +#define blr_long (unsigned char)8 +#define blr_quad (unsigned char)9 +#define blr_float (unsigned char)10 +#define blr_double (unsigned char)27 +#define blr_d_float (unsigned char)11 +#define blr_timestamp (unsigned char)35 +#define blr_varying (unsigned char)37 +#define blr_varying2 (unsigned char)38 /* added in 3.2 JPN */ +#define blr_blob (unsigned short)261 +#define blr_cstring (unsigned char)40 +#define blr_cstring2 (unsigned char)41 /* added in 3.2 JPN */ +#define blr_blob_id (unsigned char)45 +#define blr_sql_date (unsigned char)12 +#define blr_sql_time (unsigned char)13 +#define blr_int64 (unsigned char)16 +#define blr_blob2 (unsigned char)17 +#define blr_domain_name (unsigned char)18 +#define blr_domain_name2 (unsigned char)19 +#define blr_not_nullable (unsigned char)20 +#define blr_column_name (unsigned char)21 +#define blr_column_name2 (unsigned char)22 +#define blr_bool (unsigned char)23 +#define blr_dec64 (unsigned char)24 +#define blr_dec128 (unsigned char)25 +#define blr_int128 (unsigned char)26 +#define blr_sql_time_tz (unsigned char)28 +#define blr_timestamp_tz (unsigned char)29 +#define blr_ex_time_tz (unsigned char)30 +#define blr_ex_timestamp_tz (unsigned char)31 + +// first sub parameter for blr_domain_name[2] +#define blr_domain_type_of (unsigned char)0 +#define blr_domain_full (unsigned char)1 + +/* Historical alias for pre V6 applications */ +#define blr_date blr_timestamp + +#define blr_inner (unsigned char)0 +#define blr_left (unsigned char)1 +#define blr_right (unsigned char)2 +#define blr_full (unsigned char)3 + +#define blr_gds_code (unsigned char)0 +#define blr_sql_code (unsigned char)1 +#define blr_exception (unsigned char)2 +#define blr_trigger_code (unsigned char)3 +#define blr_default_code (unsigned char)4 +#define blr_raise (unsigned char)5 +#define blr_exception_msg (unsigned char)6 +#define blr_exception_params (unsigned char)7 +#define blr_sql_state (unsigned char)8 + +#define blr_version4 (unsigned char)4 +#define blr_version5 (unsigned char)5 +//#define blr_version6 (unsigned char)6 +#define blr_eoc (unsigned char)76 +#define blr_end (unsigned char)255 + +#define blr_assignment (unsigned char)1 +#define blr_begin (unsigned char)2 +#define blr_dcl_variable (unsigned char)3 +#define blr_message (unsigned char)4 +#define blr_erase (unsigned char)5 +//#define blr_fetch (unsigned char)6 +#define blr_for (unsigned char)7 +#define blr_if (unsigned char)8 +#define blr_loop (unsigned char)9 +#define blr_modify (unsigned char)10 +#define blr_handler (unsigned char)11 +#define blr_receive (unsigned char)12 +#define blr_select (unsigned char)13 +#define blr_send (unsigned char)14 +#define blr_store (unsigned char)15 +#define blr_label (unsigned char)17 +#define blr_leave (unsigned char)18 +#define blr_store2 (unsigned char)19 +#define blr_post (unsigned char)20 +#define blr_literal (unsigned char)21 +#define blr_dbkey (unsigned char)22 +#define blr_field (unsigned char)23 +#define blr_fid (unsigned char)24 +#define blr_parameter (unsigned char)25 +#define blr_variable (unsigned char)26 +#define blr_average (unsigned char)27 +#define blr_count (unsigned char)28 +#define blr_maximum (unsigned char)29 +#define blr_minimum (unsigned char)30 +#define blr_total (unsigned char)31 +#define blr_receive_batch (unsigned char)32 + +// unused code: 33 + +#define blr_add (unsigned char)34 +#define blr_subtract (unsigned char)35 +#define blr_multiply (unsigned char)36 +#define blr_divide (unsigned char)37 +#define blr_negate (unsigned char)38 +#define blr_concatenate (unsigned char)39 +#define blr_substring (unsigned char)40 +#define blr_parameter2 (unsigned char)41 +#define blr_from (unsigned char)42 +#define blr_via (unsigned char)43 +#define blr_user_name (unsigned char)44 +#define blr_null (unsigned char)45 + +#define blr_equiv (unsigned char)46 +#define blr_eql (unsigned char)47 +#define blr_neq (unsigned char)48 +#define blr_gtr (unsigned char)49 +#define blr_geq (unsigned char)50 +#define blr_lss (unsigned char)51 +#define blr_leq (unsigned char)52 +#define blr_containing (unsigned char)53 +#define blr_matching (unsigned char)54 +#define blr_starting (unsigned char)55 +#define blr_between (unsigned char)56 +#define blr_or (unsigned char)57 +#define blr_and (unsigned char)58 +#define blr_not (unsigned char)59 +#define blr_any (unsigned char)60 +#define blr_missing (unsigned char)61 +#define blr_unique (unsigned char)62 +#define blr_like (unsigned char)63 +#define blr_in_list (unsigned char)64 + +// unused codes: 65..66 + +#define blr_rse (unsigned char)67 +#define blr_first (unsigned char)68 +#define blr_project (unsigned char)69 +#define blr_sort (unsigned char)70 +#define blr_boolean (unsigned char)71 +#define blr_ascending (unsigned char)72 +#define blr_descending (unsigned char)73 +#define blr_relation (unsigned char)74 +#define blr_rid (unsigned char)75 +#define blr_union (unsigned char)76 +#define blr_map (unsigned char)77 +#define blr_group_by (unsigned char)78 +#define blr_aggregate (unsigned char)79 +#define blr_join_type (unsigned char)80 + +// unused codes: 81..82 + +#define blr_agg_count (unsigned char)83 +#define blr_agg_max (unsigned char)84 +#define blr_agg_min (unsigned char)85 +#define blr_agg_total (unsigned char)86 +#define blr_agg_average (unsigned char)87 +/* unsupported +#define blr_parameter3 (unsigned char)88 +#define blr_run_max (unsigned char)89 +#define blr_run_min (unsigned char)90 +#define blr_run_total (unsigned char)91 +#define blr_run_average (unsigned char)92 +*/ +#define blr_agg_count2 (unsigned char)93 +#define blr_agg_count_distinct (unsigned char)94 +#define blr_agg_total_distinct (unsigned char)95 +#define blr_agg_average_distinct (unsigned char)96 + +// unused codes: 97..99 + +#define blr_function (unsigned char)100 +#define blr_gen_id (unsigned char)101 +///#define blr_prot_mask (unsigned char)102 +#define blr_upcase (unsigned char)103 +///#define blr_lock_state (unsigned char)104 +#define blr_value_if (unsigned char)105 +#define blr_matching2 (unsigned char)106 +#define blr_index (unsigned char)107 +#define blr_ansi_like (unsigned char)108 +#define blr_scrollable (unsigned char) 109 +#define blr_lateral_rse (unsigned char) 110 +#define blr_optimize (unsigned char) 111 + +// unused codes: 112..117 + +///#define blr_run_count (unsigned char)118 +#define blr_rs_stream (unsigned char)119 +#define blr_exec_proc (unsigned char)120 + +// unused codes: 121..123 + +#define blr_procedure (unsigned char)124 +#define blr_pid (unsigned char)125 +#define blr_exec_pid (unsigned char)126 +#define blr_singular (unsigned char)127 +#define blr_abort (unsigned char)128 +#define blr_block (unsigned char)129 +#define blr_error_handler (unsigned char)130 + +#define blr_cast (unsigned char)131 + +#define blr_pid2 (unsigned char)132 +#define blr_procedure2 (unsigned char)133 + +#define blr_start_savepoint (unsigned char)134 +#define blr_end_savepoint (unsigned char)135 + +// unused codes: 136..138 + +#define blr_plan (unsigned char)139 /* access plan items */ +#define blr_merge (unsigned char)140 +#define blr_join (unsigned char)141 +#define blr_sequential (unsigned char)142 +#define blr_navigational (unsigned char)143 +#define blr_indices (unsigned char)144 +#define blr_retrieve (unsigned char)145 + +#define blr_relation2 (unsigned char)146 +#define blr_rid2 (unsigned char)147 + +// unused codes: 148..149 + +#define blr_set_generator (unsigned char)150 + +#define blr_ansi_any (unsigned char)151 /* required for NULL handling */ +#define blr_exists (unsigned char)152 /* required for NULL handling */ + +// unused codes: 153 + +#define blr_record_version (unsigned char)154 /* get tid of record */ +#define blr_stall (unsigned char)155 /* fake server stall */ + +// unused codes: 156..157 + +#define blr_ansi_all (unsigned char)158 /* required for NULL handling */ + +#define blr_extract (unsigned char)159 + +/* sub parameters for blr_extract */ + +#define blr_extract_year (unsigned char)0 +#define blr_extract_month (unsigned char)1 +#define blr_extract_day (unsigned char)2 +#define blr_extract_hour (unsigned char)3 +#define blr_extract_minute (unsigned char)4 +#define blr_extract_second (unsigned char)5 +#define blr_extract_weekday (unsigned char)6 +#define blr_extract_yearday (unsigned char)7 +#define blr_extract_millisecond (unsigned char)8 +#define blr_extract_week (unsigned char)9 +#define blr_extract_timezone_hour (unsigned char)10 +#define blr_extract_timezone_minute (unsigned char)11 +#define blr_extract_timezone_name (unsigned char)12 +#define blr_extract_quarter (unsigned char)13 + +#define blr_current_date (unsigned char)160 +#define blr_current_timestamp (unsigned char)161 +#define blr_current_time (unsigned char)162 + +/* These codes reuse BLR code space */ + +#define blr_post_arg (unsigned char)163 +#define blr_exec_into (unsigned char)164 +//#define blr_user_savepoint (unsigned char)165 +#define blr_dcl_cursor (unsigned char)166 +#define blr_cursor_stmt (unsigned char)167 +#define blr_current_timestamp2 (unsigned char)168 +#define blr_current_time2 (unsigned char)169 +#define blr_agg_list (unsigned char)170 +#define blr_agg_list_distinct (unsigned char)171 +#define blr_modify2 (unsigned char)172 +#define blr_erase2 (unsigned char)173 + +/* FB 1.0 specific BLR */ + +#define blr_current_role (unsigned char)174 +#define blr_skip (unsigned char)175 + +/* FB 1.5 specific BLR */ + +#define blr_exec_sql (unsigned char)176 +#define blr_internal_info (unsigned char)177 +#define blr_nullsfirst (unsigned char)178 +#define blr_writelock (unsigned char)179 +#define blr_nullslast (unsigned char)180 + + +/* FB 2.0 specific BLR */ + +#define blr_lowcase (unsigned char)181 +#define blr_strlen (unsigned char)182 + +/* sub parameter for blr_strlen */ +#define blr_strlen_bit (unsigned char)0 +#define blr_strlen_char (unsigned char)1 +#define blr_strlen_octet (unsigned char)2 + +#define blr_trim (unsigned char)183 + +/* first sub parameter for blr_trim */ +#define blr_trim_both (unsigned char)0 +#define blr_trim_leading (unsigned char)1 +#define blr_trim_trailing (unsigned char)2 + +/* second sub parameter for blr_trim */ +#define blr_trim_spaces (unsigned char)0 +#define blr_trim_characters (unsigned char)1 + +/* These codes are actions for cursors */ + +#define blr_cursor_open (unsigned char)0 +#define blr_cursor_close (unsigned char)1 +#define blr_cursor_fetch (unsigned char)2 +#define blr_cursor_fetch_scroll (unsigned char)3 + +/* scroll options */ + +#define blr_scroll_forward (unsigned char)0 +#define blr_scroll_backward (unsigned char)1 +#define blr_scroll_bof (unsigned char)2 +#define blr_scroll_eof (unsigned char)3 +#define blr_scroll_absolute (unsigned char)4 +#define blr_scroll_relative (unsigned char)5 + +/* FB 2.1 specific BLR */ + +#define blr_init_variable (unsigned char)184 +#define blr_recurse (unsigned char)185 +#define blr_sys_function (unsigned char)186 + +// FB 2.5 specific BLR + +#define blr_auto_trans (unsigned char)187 +#define blr_similar (unsigned char)188 +#define blr_exec_stmt (unsigned char)189 + +// subcodes of blr_exec_stmt +#define blr_exec_stmt_inputs (unsigned char) 1 // input parameters count +#define blr_exec_stmt_outputs (unsigned char) 2 // output parameters count +#define blr_exec_stmt_sql (unsigned char) 3 +#define blr_exec_stmt_proc_block (unsigned char) 4 +#define blr_exec_stmt_data_src (unsigned char) 5 +#define blr_exec_stmt_user (unsigned char) 6 +#define blr_exec_stmt_pwd (unsigned char) 7 +#define blr_exec_stmt_tran (unsigned char) 8 // not implemented yet +#define blr_exec_stmt_tran_clone (unsigned char) 9 // make transaction parameters equal to current transaction +#define blr_exec_stmt_privs (unsigned char) 10 +#define blr_exec_stmt_in_params (unsigned char) 11 // not named input parameters +#define blr_exec_stmt_in_params2 (unsigned char) 12 // named input parameters +#define blr_exec_stmt_out_params (unsigned char) 13 // output parameters +#define blr_exec_stmt_role (unsigned char) 14 +#define blr_exec_stmt_in_excess (unsigned char) 15 // excess input params numbers + +#define blr_stmt_expr (unsigned char) 190 +#define blr_derived_expr (unsigned char) 191 + +// FB 3.0 specific BLR + +#define blr_procedure3 (unsigned char) 192 +#define blr_exec_proc2 (unsigned char) 193 +#define blr_function2 (unsigned char) 194 +#define blr_window (unsigned char) 195 +#define blr_partition_by (unsigned char) 196 +#define blr_continue_loop (unsigned char) 197 +#define blr_procedure4 (unsigned char) 198 +#define blr_agg_function (unsigned char) 199 +#define blr_substring_similar (unsigned char) 200 +#define blr_bool_as_value (unsigned char) 201 +#define blr_coalesce (unsigned char) 202 +#define blr_decode (unsigned char) 203 +#define blr_exec_subproc (unsigned char) 204 +#define blr_subproc_decl (unsigned char) 205 +#define blr_subproc (unsigned char) 206 +#define blr_subfunc_decl (unsigned char) 207 +#define blr_subfunc (unsigned char) 208 +#define blr_record_version2 (unsigned char) 209 +#define blr_gen_id2 (unsigned char) 210 // NEXT VALUE FOR generator + +// FB 4.0 specific BLR + +#define blr_window_win (unsigned char) 211 + +// subcodes of blr_window_win +#define blr_window_win_partition (unsigned char) 1 +#define blr_window_win_order (unsigned char) 2 +#define blr_window_win_map (unsigned char) 3 +#define blr_window_win_extent_unit (unsigned char) 4 +#define blr_window_win_extent_frame_bound (unsigned char) 5 +#define blr_window_win_extent_frame_value (unsigned char) 6 +#define blr_window_win_exclusion (unsigned char) 7 + +#define blr_default (unsigned char) 212 +#define blr_store3 (unsigned char) 213 + +// subcodes of blr_store3 +#define blr_store_override_user (unsigned char) 1 +#define blr_store_override_system (unsigned char) 2 + +#define blr_local_timestamp (unsigned char) 214 +#define blr_local_time (unsigned char) 215 + +#define blr_at (unsigned char) 216 + +// subcodes of blr_at +#define blr_at_local (unsigned char) 0 +#define blr_at_zone (unsigned char) 1 + +#define blr_marks (unsigned char) 217 // mark some blr code with specific flags + +// FB 5.0 specific BLR + +#define blr_dcl_local_table (unsigned char) 218 + +// subcodes of blr_dcl_local_table +#define blr_dcl_local_table_format (unsigned char) 1 + +#define blr_local_table_truncate (unsigned char) 219 +#define blr_local_table_id (unsigned char) 220 + +#define blr_outer_map (unsigned char) 221 +#define blr_outer_map_message (unsigned char) 1 +#define blr_outer_map_variable (unsigned char) 2 + +// json functions (reserved) +#define blr_json_function (unsigned char) 222 + +#define blr_skip_locked (unsigned char) 223 + +#endif // FIREBIRD_IMPL_BLR_H diff --git a/packages/node-firebird-native-api/src/native/include/firebird/impl/consts_pub.h b/packages/node-firebird-native-api/src/native/include/firebird/impl/consts_pub.h new file mode 100644 index 0000000..6c6f8a0 --- /dev/null +++ b/packages/node-firebird-native-api/src/native/include/firebird/impl/consts_pub.h @@ -0,0 +1,794 @@ +/* + * MODULE: consts_pub.h + * DESCRIPTION: Public constants' definitions + * + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + * + * 18.08.2006 Dimitry Sibiryakov: Extracted it from ibase.h + * + */ + +#ifndef FIREBIRD_IMPL_CONSTS_PUB_H +#define FIREBIRD_IMPL_CONSTS_PUB_H + +/**********************************/ +/* Database parameter block stuff */ +/**********************************/ + +#define isc_dpb_version1 1 +#define isc_dpb_version2 2 + +#define isc_dpb_cdd_pathname 1 +#define isc_dpb_allocation 2 +#define isc_dpb_journal 3 +#define isc_dpb_page_size 4 +#define isc_dpb_num_buffers 5 +#define isc_dpb_buffer_length 6 +#define isc_dpb_debug 7 +#define isc_dpb_garbage_collect 8 +#define isc_dpb_verify 9 +#define isc_dpb_sweep 10 +#define isc_dpb_enable_journal 11 +#define isc_dpb_disable_journal 12 +#define isc_dpb_dbkey_scope 13 +#define isc_dpb_number_of_users 14 +#define isc_dpb_trace 15 +#define isc_dpb_no_garbage_collect 16 +#define isc_dpb_damaged 17 +#define isc_dpb_license 18 +#define isc_dpb_sys_user_name 19 +#define isc_dpb_encrypt_key 20 +#define isc_dpb_activate_shadow 21 +#define isc_dpb_sweep_interval 22 +#define isc_dpb_delete_shadow 23 +#define isc_dpb_force_write 24 +#define isc_dpb_begin_log 25 +#define isc_dpb_quit_log 26 +#define isc_dpb_no_reserve 27 +#define isc_dpb_user_name 28 +#define isc_dpb_password 29 +#define isc_dpb_password_enc 30 +#define isc_dpb_sys_user_name_enc 31 +#define isc_dpb_interp 32 +#define isc_dpb_online_dump 33 +#define isc_dpb_old_file_size 34 +#define isc_dpb_old_num_files 35 +#define isc_dpb_old_file 36 +#define isc_dpb_old_start_page 37 +#define isc_dpb_old_start_seqno 38 +#define isc_dpb_old_start_file 39 +#define isc_dpb_drop_walfile 40 +#define isc_dpb_old_dump_id 41 +#define isc_dpb_wal_backup_dir 42 +#define isc_dpb_wal_chkptlen 43 +#define isc_dpb_wal_numbufs 44 +#define isc_dpb_wal_bufsize 45 +#define isc_dpb_wal_grp_cmt_wait 46 +#define isc_dpb_lc_messages 47 +#define isc_dpb_lc_ctype 48 +#define isc_dpb_cache_manager 49 +#define isc_dpb_shutdown 50 +#define isc_dpb_online 51 +#define isc_dpb_shutdown_delay 52 +#define isc_dpb_reserved 53 +#define isc_dpb_overwrite 54 +#define isc_dpb_sec_attach 55 +#define isc_dpb_disable_wal 56 +#define isc_dpb_connect_timeout 57 +#define isc_dpb_dummy_packet_interval 58 +#define isc_dpb_gbak_attach 59 +#define isc_dpb_sql_role_name 60 +#define isc_dpb_set_page_buffers 61 +#define isc_dpb_working_directory 62 +#define isc_dpb_sql_dialect 63 +#define isc_dpb_set_db_readonly 64 +#define isc_dpb_set_db_sql_dialect 65 +#define isc_dpb_gfix_attach 66 +#define isc_dpb_gstat_attach 67 +#define isc_dpb_set_db_charset 68 +#define isc_dpb_gsec_attach 69 /* deprecated */ +#define isc_dpb_address_path 70 +#define isc_dpb_process_id 71 +#define isc_dpb_no_db_triggers 72 +#define isc_dpb_trusted_auth 73 +#define isc_dpb_process_name 74 +#define isc_dpb_trusted_role 75 +#define isc_dpb_org_filename 76 +#define isc_dpb_utf8_filename 77 +#define isc_dpb_ext_call_depth 78 +#define isc_dpb_auth_block 79 +#define isc_dpb_client_version 80 +#define isc_dpb_remote_protocol 81 +#define isc_dpb_host_name 82 +#define isc_dpb_os_user 83 +#define isc_dpb_specific_auth_data 84 +#define isc_dpb_auth_plugin_list 85 +#define isc_dpb_auth_plugin_name 86 +#define isc_dpb_config 87 +#define isc_dpb_nolinger 88 +#define isc_dpb_reset_icu 89 +#define isc_dpb_map_attach 90 +#define isc_dpb_session_time_zone 91 +#define isc_dpb_set_db_replica 92 +#define isc_dpb_set_bind 93 +#define isc_dpb_decfloat_round 94 +#define isc_dpb_decfloat_traps 95 +#define isc_dpb_clear_map 96 +#define isc_dpb_upgrade_db 97 +#define isc_dpb_parallel_workers 100 +#define isc_dpb_worker_attach 101 +#define isc_dpb_max_blob_cache_size 103 +#define isc_dpb_max_inline_blob_size 104 + + +/**************************************************/ +/* clumplet tags used inside isc_dpb_address_path */ +/* and isc_spb_address_path */ +/**************************************************/ + +/* Format of this clumplet is the following: + + ::= + isc_dpb_address_path + + ::= + | + + + ::= + isc_dpb_address + + ::= + | + + + ::= + isc_dpb_addr_protocol | + isc_dpb_addr_endpoint | + isc_dpb_addr_flags | + isc_dpb_addr_crypt + + ::= + "TCPv4" | + "TCPv6" | + "XNET" + .... + + ::= + "Arc4" | + "ChaCha" | + .... + + ::= + | // such as "172.20.1.1" + | // such as "2001:0:13FF:09FF::1" + | // such as "17864" + ... + + ::= + bitmask of possible flags +*/ + +#define isc_dpb_address 1 + +#define isc_dpb_addr_protocol 1 +#define isc_dpb_addr_endpoint 2 +#define isc_dpb_addr_flags 3 +#define isc_dpb_addr_crypt 4 + +/* possible addr flags */ +#define isc_dpb_addr_flag_conn_compressed 0x01 +#define isc_dpb_addr_flag_conn_encrypted 0x02 + +/*********************************/ +/* isc_dpb_verify specific flags */ +/*********************************/ + +#define isc_dpb_pages 1 +#define isc_dpb_records 2 +#define isc_dpb_indices 4 +#define isc_dpb_transactions 8 +#define isc_dpb_no_update 16 +#define isc_dpb_repair 32 +#define isc_dpb_ignore 64 + +/***********************************/ +/* isc_dpb_shutdown specific flags */ +/***********************************/ + +#define isc_dpb_shut_cache 0x1 +#define isc_dpb_shut_attachment 0x2 +#define isc_dpb_shut_transaction 0x4 +#define isc_dpb_shut_force 0x8 +#define isc_dpb_shut_mode_mask 0x70 + +#define isc_dpb_shut_default 0x0 +#define isc_dpb_shut_normal 0x10 +#define isc_dpb_shut_multi 0x20 +#define isc_dpb_shut_single 0x30 +#define isc_dpb_shut_full 0x40 + +/*****************************************/ +/* isc_dpb_set_db_replica specific flags */ +/*****************************************/ + +#define isc_dpb_replica_none 0 +#define isc_dpb_replica_read_only 1 +#define isc_dpb_replica_read_write 2 + +/**************************************/ +/* Bit assignments in RDB$SYSTEM_FLAG */ +/**************************************/ + +#define RDB_system 1 +#define RDB_id_assigned 2 +/* 2 is for QLI. See jrd/constants.h for more Firebird-specific values. */ + + +/*************************************/ +/* Transaction parameter block stuff */ +/*************************************/ + +#define isc_tpb_version1 1 +#define isc_tpb_version3 3 +#define isc_tpb_consistency 1 +#define isc_tpb_concurrency 2 +#define isc_tpb_shared 3 +#define isc_tpb_protected 4 +#define isc_tpb_exclusive 5 +#define isc_tpb_wait 6 +#define isc_tpb_nowait 7 +#define isc_tpb_read 8 +#define isc_tpb_write 9 +#define isc_tpb_lock_read 10 +#define isc_tpb_lock_write 11 +#define isc_tpb_verb_time 12 +#define isc_tpb_commit_time 13 +#define isc_tpb_ignore_limbo 14 +#define isc_tpb_read_committed 15 +#define isc_tpb_autocommit 16 +#define isc_tpb_rec_version 17 +#define isc_tpb_no_rec_version 18 +#define isc_tpb_restart_requests 19 +#define isc_tpb_no_auto_undo 20 +#define isc_tpb_lock_timeout 21 +#define isc_tpb_read_consistency 22 +#define isc_tpb_at_snapshot_number 23 +#define isc_tpb_auto_release_temp_blobid 24 + + +/************************/ +/* Blob Parameter Block */ +/************************/ + +#define isc_bpb_version1 1 +#define isc_bpb_source_type 1 +#define isc_bpb_target_type 2 +#define isc_bpb_type 3 +#define isc_bpb_source_interp 4 +#define isc_bpb_target_interp 5 +#define isc_bpb_filter_parameter 6 +#define isc_bpb_storage 7 + +#define isc_bpb_type_segmented 0x0 +#define isc_bpb_type_stream 0x1 +#define isc_bpb_storage_main 0x0 +#define isc_bpb_storage_temp 0x2 + + +/*********************************/ +/* Service parameter block stuff */ +/*********************************/ + +#define isc_spb_version1 1 +#define isc_spb_current_version 2 +#define isc_spb_version isc_spb_current_version +#define isc_spb_version3 3 +#define isc_spb_user_name isc_dpb_user_name +#define isc_spb_sys_user_name isc_dpb_sys_user_name +#define isc_spb_sys_user_name_enc isc_dpb_sys_user_name_enc +#define isc_spb_password isc_dpb_password +#define isc_spb_password_enc isc_dpb_password_enc +#define isc_spb_command_line 105 +#define isc_spb_dbname 106 +#define isc_spb_verbose 107 +#define isc_spb_options 108 +#define isc_spb_address_path 109 +#define isc_spb_process_id 110 +#define isc_spb_trusted_auth 111 +#define isc_spb_process_name 112 +#define isc_spb_trusted_role 113 +#define isc_spb_verbint 114 +#define isc_spb_auth_block 115 +#define isc_spb_auth_plugin_name 116 +#define isc_spb_auth_plugin_list 117 +#define isc_spb_utf8_filename 118 +#define isc_spb_client_version 119 +#define isc_spb_remote_protocol 120 +#define isc_spb_host_name 121 +#define isc_spb_os_user 122 +#define isc_spb_config 123 +#define isc_spb_expected_db 124 + +#define isc_spb_connect_timeout isc_dpb_connect_timeout +#define isc_spb_dummy_packet_interval isc_dpb_dummy_packet_interval +#define isc_spb_sql_role_name isc_dpb_sql_role_name + +// This will not be used in protocol 13, therefore may be reused +#define isc_spb_specific_auth_data isc_spb_trusted_auth + +/***************************** + * Service action items * + *****************************/ + +#define isc_action_svc_backup 1 /* Starts database backup process on the server */ +#define isc_action_svc_restore 2 /* Starts database restore process on the server */ +#define isc_action_svc_repair 3 /* Starts database repair process on the server */ +#define isc_action_svc_add_user 4 /* Adds a new user to the security database */ +#define isc_action_svc_delete_user 5 /* Deletes a user record from the security database */ +#define isc_action_svc_modify_user 6 /* Modifies a user record in the security database */ +#define isc_action_svc_display_user 7 /* Displays a user record from the security database */ +#define isc_action_svc_properties 8 /* Sets database properties */ +#define isc_action_svc_add_license 9 /* Adds a license to the license file */ +#define isc_action_svc_remove_license 10 /* Removes a license from the license file */ +#define isc_action_svc_db_stats 11 /* Retrieves database statistics */ +#define isc_action_svc_get_ib_log 12 /* Retrieves the InterBase log file from the server */ +#define isc_action_svc_get_fb_log 12 /* Retrieves the Firebird log file from the server */ +#define isc_action_svc_nbak 20 /* Incremental nbackup */ +#define isc_action_svc_nrest 21 /* Incremental database restore */ +#define isc_action_svc_trace_start 22 // Start trace session +#define isc_action_svc_trace_stop 23 // Stop trace session +#define isc_action_svc_trace_suspend 24 // Suspend trace session +#define isc_action_svc_trace_resume 25 // Resume trace session +#define isc_action_svc_trace_list 26 // List existing sessions +#define isc_action_svc_set_mapping 27 // Set auto admins mapping in security database +#define isc_action_svc_drop_mapping 28 // Drop auto admins mapping in security database +#define isc_action_svc_display_user_adm 29 // Displays user(s) from security database with admin info +#define isc_action_svc_validate 30 // Starts database online validation +#define isc_action_svc_nfix 31 // Fixup database after file system copy +#define isc_action_svc_last 32 // keep it last ! + +/***************************** + * Service information items * + *****************************/ + +#define isc_info_svc_svr_db_info 50 /* Retrieves the number of attachments and databases */ +#define isc_info_svc_get_license 51 /* Retrieves all license keys and IDs from the license file */ +#define isc_info_svc_get_license_mask 52 /* Retrieves a bitmask representing licensed options on the server */ +#define isc_info_svc_get_config 53 /* Retrieves the parameters and values for IB_CONFIG */ +#define isc_info_svc_version 54 /* Retrieves the version of the services manager */ +#define isc_info_svc_server_version 55 /* Retrieves the version of the Firebird server */ +#define isc_info_svc_implementation 56 /* Retrieves the implementation of the Firebird server */ +#define isc_info_svc_capabilities 57 /* Retrieves a bitmask representing the server's capabilities */ +#define isc_info_svc_user_dbpath 58 /* Retrieves the path to the security database in use by the server */ +#define isc_info_svc_get_env 59 /* Retrieves the setting of $FIREBIRD */ +#define isc_info_svc_get_env_lock 60 /* Retrieves the setting of $FIREBIRD_LOCK */ +#define isc_info_svc_get_env_msg 61 /* Retrieves the setting of $FIREBIRD_MSG */ +#define isc_info_svc_line 62 /* Retrieves 1 line of service output per call */ +#define isc_info_svc_to_eof 63 /* Retrieves as much of the server output as will fit in the supplied buffer */ +#define isc_info_svc_timeout 64 /* Sets / signifies a timeout value for reading service information */ +#define isc_info_svc_get_licensed_users 65 /* Retrieves the number of users licensed for accessing the server */ +#define isc_info_svc_limbo_trans 66 /* Retrieve the limbo transactions */ +#define isc_info_svc_running 67 /* Checks to see if a service is running on an attachment */ +#define isc_info_svc_get_users 68 /* Returns the user information from isc_action_svc_display_users */ +#define isc_info_svc_auth_block 69 /* Sets authentication block for service query() call */ +#define isc_info_svc_stdin 78 /* Returns maximum size of data, needed as stdin for service */ + + +/****************************************************** + * Parameters for isc_action_{add|del|mod|disp)_user * + ******************************************************/ + +#define isc_spb_sec_userid 5 +#define isc_spb_sec_groupid 6 +#define isc_spb_sec_username 7 +#define isc_spb_sec_password 8 +#define isc_spb_sec_groupname 9 +#define isc_spb_sec_firstname 10 +#define isc_spb_sec_middlename 11 +#define isc_spb_sec_lastname 12 +#define isc_spb_sec_admin 13 + +/******************************************************* + * Parameters for isc_action_svc_(add|remove)_license, * + * isc_info_svc_get_license * + *******************************************************/ + +#define isc_spb_lic_key 5 +#define isc_spb_lic_id 6 +#define isc_spb_lic_desc 7 + + +/***************************************** + * Parameters for isc_action_svc_backup * + *****************************************/ + +#define isc_spb_bkp_file 5 +#define isc_spb_bkp_factor 6 +#define isc_spb_bkp_length 7 +#define isc_spb_bkp_skip_data 8 +#define isc_spb_bkp_stat 15 +#define isc_spb_bkp_keyholder 16 +#define isc_spb_bkp_keyname 17 +#define isc_spb_bkp_crypt 18 +#define isc_spb_bkp_include_data 19 +#define isc_spb_bkp_parallel_workers 21 +#define isc_spb_bkp_ignore_checksums 0x01 +#define isc_spb_bkp_ignore_limbo 0x02 +#define isc_spb_bkp_metadata_only 0x04 +#define isc_spb_bkp_no_garbage_collect 0x08 +#define isc_spb_bkp_old_descriptions 0x10 +#define isc_spb_bkp_non_transportable 0x20 +#define isc_spb_bkp_convert 0x40 +#define isc_spb_bkp_expand 0x80 +#define isc_spb_bkp_no_triggers 0x8000 +#define isc_spb_bkp_zip 0x010000 +#define isc_spb_bkp_direct_io 0x020000 + +/******************************************** + * Parameters for isc_action_svc_properties * + ********************************************/ + +#define isc_spb_prp_page_buffers 5 +#define isc_spb_prp_sweep_interval 6 +#define isc_spb_prp_shutdown_db 7 +#define isc_spb_prp_deny_new_attachments 9 +#define isc_spb_prp_deny_new_transactions 10 +#define isc_spb_prp_reserve_space 11 +#define isc_spb_prp_write_mode 12 +#define isc_spb_prp_access_mode 13 +#define isc_spb_prp_set_sql_dialect 14 +#define isc_spb_prp_activate 0x0100 +#define isc_spb_prp_db_online 0x0200 +#define isc_spb_prp_nolinger 0x0400 +#define isc_spb_prp_force_shutdown 41 +#define isc_spb_prp_attachments_shutdown 42 +#define isc_spb_prp_transactions_shutdown 43 +#define isc_spb_prp_shutdown_mode 44 +#define isc_spb_prp_online_mode 45 +#define isc_spb_prp_replica_mode 46 + +/******************************************** + * Parameters for isc_spb_prp_shutdown_mode * + * and isc_spb_prp_online_mode * + ********************************************/ +#define isc_spb_prp_sm_normal 0 +#define isc_spb_prp_sm_multi 1 +#define isc_spb_prp_sm_single 2 +#define isc_spb_prp_sm_full 3 + +/******************************************** + * Parameters for isc_spb_prp_reserve_space * + ********************************************/ + +#define isc_spb_prp_res_use_full 35 +#define isc_spb_prp_res 36 + +/****************************************** + * Parameters for isc_spb_prp_write_mode * + ******************************************/ + +#define isc_spb_prp_wm_async 37 +#define isc_spb_prp_wm_sync 38 + +/****************************************** + * Parameters for isc_spb_prp_access_mode * + ******************************************/ + +#define isc_spb_prp_am_readonly 39 +#define isc_spb_prp_am_readwrite 40 + +/******************************************* + * Parameters for isc_spb_prp_replica_mode * + *******************************************/ + +#define isc_spb_prp_rm_none 0 +#define isc_spb_prp_rm_readonly 1 +#define isc_spb_prp_rm_readwrite 2 + +/***************************************** + * Parameters for isc_action_svc_repair * + *****************************************/ + +#define isc_spb_rpr_commit_trans 15 +#define isc_spb_rpr_rollback_trans 34 +#define isc_spb_rpr_recover_two_phase 17 +#define isc_spb_tra_id 18 +#define isc_spb_single_tra_id 19 +#define isc_spb_multi_tra_id 20 +#define isc_spb_tra_state 21 +#define isc_spb_tra_state_limbo 22 +#define isc_spb_tra_state_commit 23 +#define isc_spb_tra_state_rollback 24 +#define isc_spb_tra_state_unknown 25 +#define isc_spb_tra_host_site 26 +#define isc_spb_tra_remote_site 27 +#define isc_spb_tra_db_path 28 +#define isc_spb_tra_advise 29 +#define isc_spb_tra_advise_commit 30 +#define isc_spb_tra_advise_rollback 31 +#define isc_spb_tra_advise_unknown 33 +#define isc_spb_tra_id_64 46 +#define isc_spb_single_tra_id_64 47 +#define isc_spb_multi_tra_id_64 48 +#define isc_spb_rpr_commit_trans_64 49 +#define isc_spb_rpr_rollback_trans_64 50 +#define isc_spb_rpr_recover_two_phase_64 51 +#define isc_spb_rpr_par_workers 52 + +#define isc_spb_rpr_validate_db 0x01 +#define isc_spb_rpr_sweep_db 0x02 +#define isc_spb_rpr_mend_db 0x04 +#define isc_spb_rpr_list_limbo_trans 0x08 +#define isc_spb_rpr_check_db 0x10 +#define isc_spb_rpr_ignore_checksum 0x20 +#define isc_spb_rpr_kill_shadows 0x40 +#define isc_spb_rpr_full 0x80 +#define isc_spb_rpr_icu 0x0800 +#define isc_spb_rpr_upgrade_db 0x1000 + +/***************************************** + * Parameters for isc_action_svc_restore * + *****************************************/ + +#define isc_spb_res_skip_data isc_spb_bkp_skip_data +#define isc_spb_res_include_data isc_spb_bkp_include_data +#define isc_spb_res_buffers 9 +#define isc_spb_res_page_size 10 +#define isc_spb_res_length 11 +#define isc_spb_res_access_mode 12 +#define isc_spb_res_fix_fss_data 13 +#define isc_spb_res_fix_fss_metadata 14 +#define isc_spb_res_keyholder isc_spb_bkp_keyholder +#define isc_spb_res_keyname isc_spb_bkp_keyname +#define isc_spb_res_crypt isc_spb_bkp_crypt +#define isc_spb_res_stat isc_spb_bkp_stat +#define isc_spb_res_parallel_workers isc_spb_bkp_parallel_workers +#define isc_spb_res_metadata_only isc_spb_bkp_metadata_only +#define isc_spb_res_deactivate_idx 0x0100 +#define isc_spb_res_no_shadow 0x0200 +#define isc_spb_res_no_validity 0x0400 +#define isc_spb_res_one_at_a_time 0x0800 +#define isc_spb_res_replace 0x1000 +#define isc_spb_res_create 0x2000 +#define isc_spb_res_use_all_space 0x4000 +#define isc_spb_res_direct_io isc_spb_bkp_direct_io +#define isc_spb_res_replica_mode 20 + +/***************************************** + * Parameters for isc_action_svc_validate * + *****************************************/ + +#define isc_spb_val_tab_incl 1 // include filter based on regular expression +#define isc_spb_val_tab_excl 2 // exclude filter based on regular expression +#define isc_spb_val_idx_incl 3 // regexp of indices to validate +#define isc_spb_val_idx_excl 4 // regexp of indices to NOT validate +#define isc_spb_val_lock_timeout 5 // how long to wait for table lock + +/****************************************** + * Parameters for isc_spb_res_access_mode * + ******************************************/ + +#define isc_spb_res_am_readonly isc_spb_prp_am_readonly +#define isc_spb_res_am_readwrite isc_spb_prp_am_readwrite + +/******************************************* + * Parameters for isc_spb_res_replica_mode * + *******************************************/ + +#define isc_spb_res_rm_none isc_spb_prp_rm_none +#define isc_spb_res_rm_readonly isc_spb_prp_rm_readonly +#define isc_spb_res_rm_readwrite isc_spb_prp_rm_readwrite + +/******************************************* + * Parameters for isc_info_svc_svr_db_info * + *******************************************/ + +#define isc_spb_num_att 5 +#define isc_spb_num_db 6 + +/***************************************** + * Parameters for isc_info_svc_db_stats * + *****************************************/ + +#define isc_spb_sts_table 64 + +#define isc_spb_sts_data_pages 0x01 +#define isc_spb_sts_db_log 0x02 +#define isc_spb_sts_hdr_pages 0x04 +#define isc_spb_sts_idx_pages 0x08 +#define isc_spb_sts_sys_relations 0x10 +#define isc_spb_sts_record_versions 0x20 +//#define isc_spb_sts_table 0x40 +#define isc_spb_sts_nocreation 0x80 +#define isc_spb_sts_encryption 0x100 + +/***********************************/ +/* Server configuration key values */ +/***********************************/ + +/* Not available in Firebird 1.5 */ + +/*************************************** + * Parameters for isc_action_svc_nbak * + ***************************************/ + +#define isc_spb_nbk_level 5 +#define isc_spb_nbk_file 6 +#define isc_spb_nbk_direct 7 +#define isc_spb_nbk_guid 8 +#define isc_spb_nbk_clean_history 9 +#define isc_spb_nbk_keep_days 10 +#define isc_spb_nbk_keep_rows 11 +#define isc_spb_nbk_no_triggers 0x01 +#define isc_spb_nbk_inplace 0x02 +#define isc_spb_nbk_sequence 0x04 + +/*************************************** + * Parameters for isc_action_svc_trace * + ***************************************/ + +#define isc_spb_trc_id 1 +#define isc_spb_trc_name 2 +#define isc_spb_trc_cfg 3 + +/******************************************/ +/* Array slice description language (SDL) */ +/******************************************/ + +#define isc_sdl_version1 1 +#define isc_sdl_eoc 255 +#define isc_sdl_relation 2 +#define isc_sdl_rid 3 +#define isc_sdl_field 4 +#define isc_sdl_fid 5 +#define isc_sdl_struct 6 +#define isc_sdl_variable 7 +#define isc_sdl_scalar 8 +#define isc_sdl_tiny_integer 9 +#define isc_sdl_short_integer 10 +#define isc_sdl_long_integer 11 +//#define isc_sdl_literal 12 +#define isc_sdl_add 13 +#define isc_sdl_subtract 14 +#define isc_sdl_multiply 15 +#define isc_sdl_divide 16 +#define isc_sdl_negate 17 // only used in pretty.cpp; nobody generates it +//#define isc_sdl_eql 18 +//#define isc_sdl_neq 19 +//#define isc_sdl_gtr 20 +//#define isc_sdl_geq 21 +//#define isc_sdl_lss 22 +//#define isc_sdl_leq 23 +//#define isc_sdl_and 24 +//#define isc_sdl_or 25 +//#define isc_sdl_not 26 +//#define isc_sdl_while 27 +//#define isc_sdl_assignment 28 +//#define isc_sdl_label 29 +//#define isc_sdl_leave 30 +#define isc_sdl_begin 31 // only used in pretty.cpp; nobody generates it +#define isc_sdl_end 32 +#define isc_sdl_do3 33 +#define isc_sdl_do2 34 +#define isc_sdl_do1 35 +#define isc_sdl_element 36 + +/********************************************/ +/* International text interpretation values */ +/********************************************/ + +//#define isc_interp_eng_ascii 0 +//#define isc_interp_jpn_sjis 5 +//#define isc_interp_jpn_euc 6 + +/*****************/ +/* Blob Subtypes */ +/*****************/ + +/* types less than zero are reserved for customer use */ + +#define isc_blob_untyped 0 + +/* internal subtypes */ + +#define isc_blob_text 1 +#define isc_blob_blr 2 +#define isc_blob_acl 3 +#define isc_blob_ranges 4 +#define isc_blob_summary 5 +#define isc_blob_format 6 +#define isc_blob_tra 7 +#define isc_blob_extfile 8 +#define isc_blob_debug_info 9 +#define isc_blob_max_predefined_subtype 10 + +/* the range 20-30 is reserved for dBASE and Paradox types */ + +//#define isc_blob_formatted_memo 20 +//#define isc_blob_paradox_ole 21 +//#define isc_blob_graphic 22 +//#define isc_blob_dbase_ole 23 +//#define isc_blob_typed_binary 24 + +/*****************/ +/* Text Subtypes */ +/*****************/ + +#define fb_text_subtype_text 0 +#define fb_text_subtype_binary 1 + +/* Deprecated definitions maintained for compatibility only */ + +//#define isc_info_db_SQL_dialect 62 +//#define isc_dpb_SQL_dialect 63 +//#define isc_dpb_set_db_SQL_dialect 65 + +/***********************************/ +/* Masks for fb_shutdown_callback */ +/***********************************/ + +#define fb_shut_confirmation 1 +#define fb_shut_preproviders 2 +#define fb_shut_postproviders 4 +#define fb_shut_finish 8 +#define fb_shut_exit 16 + +/****************************************/ +/* Shutdown reasons, used by engine */ +/* Users should provide positive values */ +/****************************************/ + +#define fb_shutrsn_svc_stopped -1 +#define fb_shutrsn_no_connection -2 +#define fb_shutrsn_app_stopped -3 +//#define fb_shutrsn_device_removed -4 +#define fb_shutrsn_signal -5 +#define fb_shutrsn_services -6 +#define fb_shutrsn_exit_called -7 +#define fb_shutrsn_emergency -8 + +/****************************************/ +/* Cancel types for fb_cancel_operation */ +/****************************************/ + +#define fb_cancel_disable 1 +#define fb_cancel_enable 2 +#define fb_cancel_raise 3 +#define fb_cancel_abort 4 + +/********************************************/ +/* Debug information items */ +/********************************************/ + +#define fb_dbg_version 1 +#define fb_dbg_end 255 +#define fb_dbg_map_src2blr 2 +#define fb_dbg_map_varname 3 +#define fb_dbg_map_argument 4 +#define fb_dbg_subproc 5 +#define fb_dbg_subfunc 6 +#define fb_dbg_map_curname 7 /* declared cursor */ +#define fb_dbg_map_for_curname 8 /* FOR cursor */ +//// TODO: LocalTable name. + +// sub code for fb_dbg_map_argument +#define fb_dbg_arg_input 0 +#define fb_dbg_arg_output 1 + +#endif // ifndef FIREBIRD_IMPL_CONSTS_PUB_H diff --git a/packages/node-firebird-native-api/src/native/include/firebird/impl/dsc_pub.h b/packages/node-firebird-native-api/src/native/include/firebird/impl/dsc_pub.h new file mode 100644 index 0000000..39e8ff9 --- /dev/null +++ b/packages/node-firebird-native-api/src/native/include/firebird/impl/dsc_pub.h @@ -0,0 +1,76 @@ +/* + * PROGRAM: JRD access method + * MODULE: dsc.h + * DESCRIPTION: Definitions associated with descriptors + * + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + * 2002.04.16 Paul Beach - HP10 Define changed from -4 to (-4) to make it + * compatible with the HP Compiler + */ + +#ifndef FIREBIRD_IMPL_DSC_PUB_H +#define FIREBIRD_IMPL_DSC_PUB_H + + +/* + * The following flags are used in an internal structure dsc (dsc.h) or in the external one paramdsc (ibase.h) + */ + +/* values for dsc_flags + * Note: DSC_null is only reliably set for local variables (blr_variable) + */ +#define DSC_null 1 +#define DSC_no_subtype 2 /* dsc has no sub type specified */ +#define DSC_nullable 4 /* not stored. instead, is derived + from metadata primarily to flag + SQLDA (in DSQL) */ + +#define dtype_unknown 0 +#define dtype_text 1 +#define dtype_cstring 2 +#define dtype_varying 3 + +#define dtype_packed 6 +#define dtype_byte 7 +#define dtype_short 8 +#define dtype_long 9 +#define dtype_quad 10 +#define dtype_real 11 +#define dtype_double 12 +#define dtype_d_float 13 +#define dtype_sql_date 14 +#define dtype_sql_time 15 +#define dtype_timestamp 16 +#define dtype_blob 17 +#define dtype_array 18 +#define dtype_int64 19 +#define dtype_dbkey 20 +#define dtype_boolean 21 +#define dtype_dec64 22 +#define dtype_dec128 23 +#define dtype_int128 24 +#define dtype_sql_time_tz 25 +#define dtype_timestamp_tz 26 +#define dtype_ex_time_tz 27 +#define dtype_ex_timestamp_tz 28 +#define DTYPE_TYPE_MAX 29 + +#define ISC_TIME_SECONDS_PRECISION 10000 +#define ISC_TIME_SECONDS_PRECISION_SCALE (-4) + +#endif /* FIREBIRD_IMPL_DSC_PUB_H */ diff --git a/packages/node-firebird-native-api/src/native/include/firebird/impl/iberror_c.h b/packages/node-firebird-native-api/src/native/include/firebird/impl/iberror_c.h new file mode 100644 index 0000000..388bf61 --- /dev/null +++ b/packages/node-firebird-native-api/src/native/include/firebird/impl/iberror_c.h @@ -0,0 +1,1485 @@ +/* + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * *** WARNING *** - This file is automatically generated + */ + +#define isc_arith_except 335544321L +#define isc_bad_dbkey 335544322L +#define isc_bad_db_format 335544323L +#define isc_bad_db_handle 335544324L +#define isc_bad_dpb_content 335544325L +#define isc_bad_dpb_form 335544326L +#define isc_bad_req_handle 335544327L +#define isc_bad_segstr_handle 335544328L +#define isc_bad_segstr_id 335544329L +#define isc_bad_tpb_content 335544330L +#define isc_bad_tpb_form 335544331L +#define isc_bad_trans_handle 335544332L +#define isc_bug_check 335544333L +#define isc_convert_error 335544334L +#define isc_db_corrupt 335544335L +#define isc_deadlock 335544336L +#define isc_excess_trans 335544337L +#define isc_from_no_match 335544338L +#define isc_infinap 335544339L +#define isc_infona 335544340L +#define isc_infunk 335544341L +#define isc_integ_fail 335544342L +#define isc_invalid_blr 335544343L +#define isc_io_error 335544344L +#define isc_lock_conflict 335544345L +#define isc_metadata_corrupt 335544346L +#define isc_not_valid 335544347L +#define isc_no_cur_rec 335544348L +#define isc_no_dup 335544349L +#define isc_no_finish 335544350L +#define isc_no_meta_update 335544351L +#define isc_no_priv 335544352L +#define isc_no_recon 335544353L +#define isc_no_record 335544354L +#define isc_no_segstr_close 335544355L +#define isc_obsolete_metadata 335544356L +#define isc_open_trans 335544357L +#define isc_port_len 335544358L +#define isc_read_only_field 335544359L +#define isc_read_only_rel 335544360L +#define isc_read_only_trans 335544361L +#define isc_read_only_view 335544362L +#define isc_req_no_trans 335544363L +#define isc_req_sync 335544364L +#define isc_req_wrong_db 335544365L +#define isc_segment 335544366L +#define isc_segstr_eof 335544367L +#define isc_segstr_no_op 335544368L +#define isc_segstr_no_read 335544369L +#define isc_segstr_no_trans 335544370L +#define isc_segstr_no_write 335544371L +#define isc_segstr_wrong_db 335544372L +#define isc_sys_request 335544373L +#define isc_stream_eof 335544374L +#define isc_unavailable 335544375L +#define isc_unres_rel 335544376L +#define isc_uns_ext 335544377L +#define isc_wish_list 335544378L +#define isc_wrong_ods 335544379L +#define isc_wronumarg 335544380L +#define isc_imp_exc 335544381L +#define isc_random 335544382L +#define isc_fatal_conflict 335544383L +#define isc_badblk 335544384L +#define isc_invpoolcl 335544385L +#define isc_nopoolids 335544386L +#define isc_relbadblk 335544387L +#define isc_blktoobig 335544388L +#define isc_bufexh 335544389L +#define isc_syntaxerr 335544390L +#define isc_bufinuse 335544391L +#define isc_bdbincon 335544392L +#define isc_reqinuse 335544393L +#define isc_badodsver 335544394L +#define isc_relnotdef 335544395L +#define isc_fldnotdef 335544396L +#define isc_dirtypage 335544397L +#define isc_waifortra 335544398L +#define isc_doubleloc 335544399L +#define isc_nodnotfnd 335544400L +#define isc_dupnodfnd 335544401L +#define isc_locnotmar 335544402L +#define isc_badpagtyp 335544403L +#define isc_corrupt 335544404L +#define isc_badpage 335544405L +#define isc_badindex 335544406L +#define isc_dbbnotzer 335544407L +#define isc_tranotzer 335544408L +#define isc_trareqmis 335544409L +#define isc_badhndcnt 335544410L +#define isc_wrotpbver 335544411L +#define isc_wroblrver 335544412L +#define isc_wrodpbver 335544413L +#define isc_blobnotsup 335544414L +#define isc_badrelation 335544415L +#define isc_nodetach 335544416L +#define isc_notremote 335544417L +#define isc_trainlim 335544418L +#define isc_notinlim 335544419L +#define isc_traoutsta 335544420L +#define isc_connect_reject 335544421L +#define isc_dbfile 335544422L +#define isc_orphan 335544423L +#define isc_no_lock_mgr 335544424L +#define isc_ctxinuse 335544425L +#define isc_ctxnotdef 335544426L +#define isc_datnotsup 335544427L +#define isc_badmsgnum 335544428L +#define isc_badparnum 335544429L +#define isc_virmemexh 335544430L +#define isc_blocking_signal 335544431L +#define isc_lockmanerr 335544432L +#define isc_journerr 335544433L +#define isc_keytoobig 335544434L +#define isc_nullsegkey 335544435L +#define isc_sqlerr 335544436L +#define isc_wrodynver 335544437L +#define isc_funnotdef 335544438L +#define isc_funmismat 335544439L +#define isc_bad_msg_vec 335544440L +#define isc_bad_detach 335544441L +#define isc_noargacc_read 335544442L +#define isc_noargacc_write 335544443L +#define isc_read_only 335544444L +#define isc_ext_err 335544445L +#define isc_non_updatable 335544446L +#define isc_no_rollback 335544447L +#define isc_bad_sec_info 335544448L +#define isc_invalid_sec_info 335544449L +#define isc_misc_interpreted 335544450L +#define isc_update_conflict 335544451L +#define isc_unlicensed 335544452L +#define isc_obj_in_use 335544453L +#define isc_nofilter 335544454L +#define isc_shadow_accessed 335544455L +#define isc_invalid_sdl 335544456L +#define isc_out_of_bounds 335544457L +#define isc_invalid_dimension 335544458L +#define isc_rec_in_limbo 335544459L +#define isc_shadow_missing 335544460L +#define isc_cant_validate 335544461L +#define isc_cant_start_journal 335544462L +#define isc_gennotdef 335544463L +#define isc_cant_start_logging 335544464L +#define isc_bad_segstr_type 335544465L +#define isc_foreign_key 335544466L +#define isc_high_minor 335544467L +#define isc_tra_state 335544468L +#define isc_trans_invalid 335544469L +#define isc_buf_invalid 335544470L +#define isc_indexnotdefined 335544471L +#define isc_login 335544472L +#define isc_invalid_bookmark 335544473L +#define isc_bad_lock_level 335544474L +#define isc_relation_lock 335544475L +#define isc_record_lock 335544476L +#define isc_max_idx 335544477L +#define isc_jrn_enable 335544478L +#define isc_old_failure 335544479L +#define isc_old_in_progress 335544480L +#define isc_old_no_space 335544481L +#define isc_no_wal_no_jrn 335544482L +#define isc_num_old_files 335544483L +#define isc_wal_file_open 335544484L +#define isc_bad_stmt_handle 335544485L +#define isc_wal_failure 335544486L +#define isc_walw_err 335544487L +#define isc_logh_small 335544488L +#define isc_logh_inv_version 335544489L +#define isc_logh_open_flag 335544490L +#define isc_logh_open_flag2 335544491L +#define isc_logh_diff_dbname 335544492L +#define isc_logf_unexpected_eof 335544493L +#define isc_logr_incomplete 335544494L +#define isc_logr_header_small 335544495L +#define isc_logb_small 335544496L +#define isc_wal_illegal_attach 335544497L +#define isc_wal_invalid_wpb 335544498L +#define isc_wal_err_rollover 335544499L +#define isc_no_wal 335544500L +#define isc_drop_wal 335544501L +#define isc_stream_not_defined 335544502L +#define isc_wal_subsys_error 335544503L +#define isc_wal_subsys_corrupt 335544504L +#define isc_no_archive 335544505L +#define isc_shutinprog 335544506L +#define isc_range_in_use 335544507L +#define isc_range_not_found 335544508L +#define isc_charset_not_found 335544509L +#define isc_lock_timeout 335544510L +#define isc_prcnotdef 335544511L +#define isc_prcmismat 335544512L +#define isc_wal_bugcheck 335544513L +#define isc_wal_cant_expand 335544514L +#define isc_codnotdef 335544515L +#define isc_xcpnotdef 335544516L +#define isc_except 335544517L +#define isc_cache_restart 335544518L +#define isc_bad_lock_handle 335544519L +#define isc_jrn_present 335544520L +#define isc_wal_err_rollover2 335544521L +#define isc_wal_err_logwrite 335544522L +#define isc_wal_err_jrn_comm 335544523L +#define isc_wal_err_expansion 335544524L +#define isc_wal_err_setup 335544525L +#define isc_wal_err_ww_sync 335544526L +#define isc_wal_err_ww_start 335544527L +#define isc_shutdown 335544528L +#define isc_existing_priv_mod 335544529L +#define isc_primary_key_ref 335544530L +#define isc_primary_key_notnull 335544531L +#define isc_ref_cnstrnt_notfound 335544532L +#define isc_foreign_key_notfound 335544533L +#define isc_ref_cnstrnt_update 335544534L +#define isc_check_cnstrnt_update 335544535L +#define isc_check_cnstrnt_del 335544536L +#define isc_integ_index_seg_del 335544537L +#define isc_integ_index_seg_mod 335544538L +#define isc_integ_index_del 335544539L +#define isc_integ_index_mod 335544540L +#define isc_check_trig_del 335544541L +#define isc_check_trig_update 335544542L +#define isc_cnstrnt_fld_del 335544543L +#define isc_cnstrnt_fld_rename 335544544L +#define isc_rel_cnstrnt_update 335544545L +#define isc_constaint_on_view 335544546L +#define isc_invld_cnstrnt_type 335544547L +#define isc_primary_key_exists 335544548L +#define isc_systrig_update 335544549L +#define isc_not_rel_owner 335544550L +#define isc_grant_obj_notfound 335544551L +#define isc_grant_fld_notfound 335544552L +#define isc_grant_nopriv 335544553L +#define isc_nonsql_security_rel 335544554L +#define isc_nonsql_security_fld 335544555L +#define isc_wal_cache_err 335544556L +#define isc_shutfail 335544557L +#define isc_check_constraint 335544558L +#define isc_bad_svc_handle 335544559L +#define isc_shutwarn 335544560L +#define isc_wrospbver 335544561L +#define isc_bad_spb_form 335544562L +#define isc_svcnotdef 335544563L +#define isc_no_jrn 335544564L +#define isc_transliteration_failed 335544565L +#define isc_start_cm_for_wal 335544566L +#define isc_wal_ovflow_log_required 335544567L +#define isc_text_subtype 335544568L +#define isc_dsql_error 335544569L +#define isc_dsql_command_err 335544570L +#define isc_dsql_constant_err 335544571L +#define isc_dsql_cursor_err 335544572L +#define isc_dsql_datatype_err 335544573L +#define isc_dsql_decl_err 335544574L +#define isc_dsql_cursor_update_err 335544575L +#define isc_dsql_cursor_open_err 335544576L +#define isc_dsql_cursor_close_err 335544577L +#define isc_dsql_field_err 335544578L +#define isc_dsql_internal_err 335544579L +#define isc_dsql_relation_err 335544580L +#define isc_dsql_procedure_err 335544581L +#define isc_dsql_request_err 335544582L +#define isc_dsql_sqlda_err 335544583L +#define isc_dsql_var_count_err 335544584L +#define isc_dsql_stmt_handle 335544585L +#define isc_dsql_function_err 335544586L +#define isc_dsql_blob_err 335544587L +#define isc_collation_not_found 335544588L +#define isc_collation_not_for_charset 335544589L +#define isc_dsql_dup_option 335544590L +#define isc_dsql_tran_err 335544591L +#define isc_dsql_invalid_array 335544592L +#define isc_dsql_max_arr_dim_exceeded 335544593L +#define isc_dsql_arr_range_error 335544594L +#define isc_dsql_trigger_err 335544595L +#define isc_dsql_subselect_err 335544596L +#define isc_dsql_crdb_prepare_err 335544597L +#define isc_specify_field_err 335544598L +#define isc_num_field_err 335544599L +#define isc_col_name_err 335544600L +#define isc_where_err 335544601L +#define isc_table_view_err 335544602L +#define isc_distinct_err 335544603L +#define isc_key_field_count_err 335544604L +#define isc_subquery_err 335544605L +#define isc_expression_eval_err 335544606L +#define isc_node_err 335544607L +#define isc_command_end_err 335544608L +#define isc_index_name 335544609L +#define isc_exception_name 335544610L +#define isc_field_name 335544611L +#define isc_token_err 335544612L +#define isc_union_err 335544613L +#define isc_dsql_construct_err 335544614L +#define isc_field_aggregate_err 335544615L +#define isc_field_ref_err 335544616L +#define isc_order_by_err 335544617L +#define isc_return_mode_err 335544618L +#define isc_extern_func_err 335544619L +#define isc_alias_conflict_err 335544620L +#define isc_procedure_conflict_error 335544621L +#define isc_relation_conflict_err 335544622L +#define isc_dsql_domain_err 335544623L +#define isc_idx_seg_err 335544624L +#define isc_node_name_err 335544625L +#define isc_table_name 335544626L +#define isc_proc_name 335544627L +#define isc_idx_create_err 335544628L +#define isc_wal_shadow_err 335544629L +#define isc_dependency 335544630L +#define isc_idx_key_err 335544631L +#define isc_dsql_file_length_err 335544632L +#define isc_dsql_shadow_number_err 335544633L +#define isc_dsql_token_unk_err 335544634L +#define isc_dsql_no_relation_alias 335544635L +#define isc_indexname 335544636L +#define isc_no_stream_plan 335544637L +#define isc_stream_twice 335544638L +#define isc_stream_not_found 335544639L +#define isc_collation_requires_text 335544640L +#define isc_dsql_domain_not_found 335544641L +#define isc_index_unused 335544642L +#define isc_dsql_self_join 335544643L +#define isc_stream_bof 335544644L +#define isc_stream_crack 335544645L +#define isc_db_or_file_exists 335544646L +#define isc_invalid_operator 335544647L +#define isc_conn_lost 335544648L +#define isc_bad_checksum 335544649L +#define isc_page_type_err 335544650L +#define isc_ext_readonly_err 335544651L +#define isc_sing_select_err 335544652L +#define isc_psw_attach 335544653L +#define isc_psw_start_trans 335544654L +#define isc_invalid_direction 335544655L +#define isc_dsql_var_conflict 335544656L +#define isc_dsql_no_blob_array 335544657L +#define isc_dsql_base_table 335544658L +#define isc_duplicate_base_table 335544659L +#define isc_view_alias 335544660L +#define isc_index_root_page_full 335544661L +#define isc_dsql_blob_type_unknown 335544662L +#define isc_req_max_clones_exceeded 335544663L +#define isc_dsql_duplicate_spec 335544664L +#define isc_unique_key_violation 335544665L +#define isc_srvr_version_too_old 335544666L +#define isc_drdb_completed_with_errs 335544667L +#define isc_dsql_procedure_use_err 335544668L +#define isc_dsql_count_mismatch 335544669L +#define isc_blob_idx_err 335544670L +#define isc_array_idx_err 335544671L +#define isc_key_field_err 335544672L +#define isc_no_delete 335544673L +#define isc_del_last_field 335544674L +#define isc_sort_err 335544675L +#define isc_sort_mem_err 335544676L +#define isc_version_err 335544677L +#define isc_inval_key_posn 335544678L +#define isc_no_segments_err 335544679L +#define isc_crrp_data_err 335544680L +#define isc_rec_size_err 335544681L +#define isc_dsql_field_ref 335544682L +#define isc_req_depth_exceeded 335544683L +#define isc_no_field_access 335544684L +#define isc_no_dbkey 335544685L +#define isc_jrn_format_err 335544686L +#define isc_jrn_file_full 335544687L +#define isc_dsql_open_cursor_request 335544688L +#define isc_ib_error 335544689L +#define isc_cache_redef 335544690L +#define isc_cache_too_small 335544691L +#define isc_log_redef 335544692L +#define isc_log_too_small 335544693L +#define isc_partition_too_small 335544694L +#define isc_partition_not_supp 335544695L +#define isc_log_length_spec 335544696L +#define isc_precision_err 335544697L +#define isc_scale_nogt 335544698L +#define isc_expec_short 335544699L +#define isc_expec_long 335544700L +#define isc_expec_ushort 335544701L +#define isc_escape_invalid 335544702L +#define isc_svcnoexe 335544703L +#define isc_net_lookup_err 335544704L +#define isc_service_unknown 335544705L +#define isc_host_unknown 335544706L +#define isc_grant_nopriv_on_base 335544707L +#define isc_dyn_fld_ambiguous 335544708L +#define isc_dsql_agg_ref_err 335544709L +#define isc_complex_view 335544710L +#define isc_unprepared_stmt 335544711L +#define isc_expec_positive 335544712L +#define isc_dsql_sqlda_value_err 335544713L +#define isc_invalid_array_id 335544714L +#define isc_extfile_uns_op 335544715L +#define isc_svc_in_use 335544716L +#define isc_err_stack_limit 335544717L +#define isc_invalid_key 335544718L +#define isc_net_init_error 335544719L +#define isc_loadlib_failure 335544720L +#define isc_network_error 335544721L +#define isc_net_connect_err 335544722L +#define isc_net_connect_listen_err 335544723L +#define isc_net_event_connect_err 335544724L +#define isc_net_event_listen_err 335544725L +#define isc_net_read_err 335544726L +#define isc_net_write_err 335544727L +#define isc_integ_index_deactivate 335544728L +#define isc_integ_deactivate_primary 335544729L +#define isc_cse_not_supported 335544730L +#define isc_tra_must_sweep 335544731L +#define isc_unsupported_network_drive 335544732L +#define isc_io_create_err 335544733L +#define isc_io_open_err 335544734L +#define isc_io_close_err 335544735L +#define isc_io_read_err 335544736L +#define isc_io_write_err 335544737L +#define isc_io_delete_err 335544738L +#define isc_io_access_err 335544739L +#define isc_udf_exception 335544740L +#define isc_lost_db_connection 335544741L +#define isc_no_write_user_priv 335544742L +#define isc_token_too_long 335544743L +#define isc_max_att_exceeded 335544744L +#define isc_login_same_as_role_name 335544745L +#define isc_reftable_requires_pk 335544746L +#define isc_usrname_too_long 335544747L +#define isc_password_too_long 335544748L +#define isc_usrname_required 335544749L +#define isc_password_required 335544750L +#define isc_bad_protocol 335544751L +#define isc_dup_usrname_found 335544752L +#define isc_usrname_not_found 335544753L +#define isc_error_adding_sec_record 335544754L +#define isc_error_modifying_sec_record 335544755L +#define isc_error_deleting_sec_record 335544756L +#define isc_error_updating_sec_db 335544757L +#define isc_sort_rec_size_err 335544758L +#define isc_bad_default_value 335544759L +#define isc_invalid_clause 335544760L +#define isc_too_many_handles 335544761L +#define isc_optimizer_blk_exc 335544762L +#define isc_invalid_string_constant 335544763L +#define isc_transitional_date 335544764L +#define isc_read_only_database 335544765L +#define isc_must_be_dialect_2_and_up 335544766L +#define isc_blob_filter_exception 335544767L +#define isc_exception_access_violation 335544768L +#define isc_exception_datatype_missalignment 335544769L +#define isc_exception_array_bounds_exceeded 335544770L +#define isc_exception_float_denormal_operand 335544771L +#define isc_exception_float_divide_by_zero 335544772L +#define isc_exception_float_inexact_result 335544773L +#define isc_exception_float_invalid_operand 335544774L +#define isc_exception_float_overflow 335544775L +#define isc_exception_float_stack_check 335544776L +#define isc_exception_float_underflow 335544777L +#define isc_exception_integer_divide_by_zero 335544778L +#define isc_exception_integer_overflow 335544779L +#define isc_exception_unknown 335544780L +#define isc_exception_stack_overflow 335544781L +#define isc_exception_sigsegv 335544782L +#define isc_exception_sigill 335544783L +#define isc_exception_sigbus 335544784L +#define isc_exception_sigfpe 335544785L +#define isc_ext_file_delete 335544786L +#define isc_ext_file_modify 335544787L +#define isc_adm_task_denied 335544788L +#define isc_extract_input_mismatch 335544789L +#define isc_insufficient_svc_privileges 335544790L +#define isc_file_in_use 335544791L +#define isc_service_att_err 335544792L +#define isc_ddl_not_allowed_by_db_sql_dial 335544793L +#define isc_cancelled 335544794L +#define isc_unexp_spb_form 335544795L +#define isc_sql_dialect_datatype_unsupport 335544796L +#define isc_svcnouser 335544797L +#define isc_depend_on_uncommitted_rel 335544798L +#define isc_svc_name_missing 335544799L +#define isc_too_many_contexts 335544800L +#define isc_datype_notsup 335544801L +#define isc_dialect_reset_warning 335544802L +#define isc_dialect_not_changed 335544803L +#define isc_database_create_failed 335544804L +#define isc_inv_dialect_specified 335544805L +#define isc_valid_db_dialects 335544806L +#define isc_sqlwarn 335544807L +#define isc_dtype_renamed 335544808L +#define isc_extern_func_dir_error 335544809L +#define isc_date_range_exceeded 335544810L +#define isc_inv_client_dialect_specified 335544811L +#define isc_valid_client_dialects 335544812L +#define isc_optimizer_between_err 335544813L +#define isc_service_not_supported 335544814L +#define isc_generator_name 335544815L +#define isc_udf_name 335544816L +#define isc_bad_limit_param 335544817L +#define isc_bad_skip_param 335544818L +#define isc_io_32bit_exceeded_err 335544819L +#define isc_invalid_savepoint 335544820L +#define isc_dsql_column_pos_err 335544821L +#define isc_dsql_agg_where_err 335544822L +#define isc_dsql_agg_group_err 335544823L +#define isc_dsql_agg_column_err 335544824L +#define isc_dsql_agg_having_err 335544825L +#define isc_dsql_agg_nested_err 335544826L +#define isc_exec_sql_invalid_arg 335544827L +#define isc_exec_sql_invalid_req 335544828L +#define isc_exec_sql_invalid_var 335544829L +#define isc_exec_sql_max_call_exceeded 335544830L +#define isc_conf_access_denied 335544831L +#define isc_wrong_backup_state 335544832L +#define isc_wal_backup_err 335544833L +#define isc_cursor_not_open 335544834L +#define isc_bad_shutdown_mode 335544835L +#define isc_concat_overflow 335544836L +#define isc_bad_substring_offset 335544837L +#define isc_foreign_key_target_doesnt_exist 335544838L +#define isc_foreign_key_references_present 335544839L +#define isc_no_update 335544840L +#define isc_cursor_already_open 335544841L +#define isc_stack_trace 335544842L +#define isc_ctx_var_not_found 335544843L +#define isc_ctx_namespace_invalid 335544844L +#define isc_ctx_too_big 335544845L +#define isc_ctx_bad_argument 335544846L +#define isc_identifier_too_long 335544847L +#define isc_except2 335544848L +#define isc_malformed_string 335544849L +#define isc_prc_out_param_mismatch 335544850L +#define isc_command_end_err2 335544851L +#define isc_partner_idx_incompat_type 335544852L +#define isc_bad_substring_length 335544853L +#define isc_charset_not_installed 335544854L +#define isc_collation_not_installed 335544855L +#define isc_att_shutdown 335544856L +#define isc_blobtoobig 335544857L +#define isc_must_have_phys_field 335544858L +#define isc_invalid_time_precision 335544859L +#define isc_blob_convert_error 335544860L +#define isc_array_convert_error 335544861L +#define isc_record_lock_not_supp 335544862L +#define isc_partner_idx_not_found 335544863L +#define isc_tra_num_exc 335544864L +#define isc_field_disappeared 335544865L +#define isc_met_wrong_gtt_scope 335544866L +#define isc_subtype_for_internal_use 335544867L +#define isc_illegal_prc_type 335544868L +#define isc_invalid_sort_datatype 335544869L +#define isc_collation_name 335544870L +#define isc_domain_name 335544871L +#define isc_domnotdef 335544872L +#define isc_array_max_dimensions 335544873L +#define isc_max_db_per_trans_allowed 335544874L +#define isc_bad_debug_format 335544875L +#define isc_bad_proc_BLR 335544876L +#define isc_key_too_big 335544877L +#define isc_concurrent_transaction 335544878L +#define isc_not_valid_for_var 335544879L +#define isc_not_valid_for 335544880L +#define isc_need_difference 335544881L +#define isc_long_login 335544882L +#define isc_fldnotdef2 335544883L +#define isc_invalid_similar_pattern 335544884L +#define isc_bad_teb_form 335544885L +#define isc_tpb_multiple_txn_isolation 335544886L +#define isc_tpb_reserv_before_table 335544887L +#define isc_tpb_multiple_spec 335544888L +#define isc_tpb_option_without_rc 335544889L +#define isc_tpb_conflicting_options 335544890L +#define isc_tpb_reserv_missing_tlen 335544891L +#define isc_tpb_reserv_long_tlen 335544892L +#define isc_tpb_reserv_missing_tname 335544893L +#define isc_tpb_reserv_corrup_tlen 335544894L +#define isc_tpb_reserv_null_tlen 335544895L +#define isc_tpb_reserv_relnotfound 335544896L +#define isc_tpb_reserv_baserelnotfound 335544897L +#define isc_tpb_missing_len 335544898L +#define isc_tpb_missing_value 335544899L +#define isc_tpb_corrupt_len 335544900L +#define isc_tpb_null_len 335544901L +#define isc_tpb_overflow_len 335544902L +#define isc_tpb_invalid_value 335544903L +#define isc_tpb_reserv_stronger_wng 335544904L +#define isc_tpb_reserv_stronger 335544905L +#define isc_tpb_reserv_max_recursion 335544906L +#define isc_tpb_reserv_virtualtbl 335544907L +#define isc_tpb_reserv_systbl 335544908L +#define isc_tpb_reserv_temptbl 335544909L +#define isc_tpb_readtxn_after_writelock 335544910L +#define isc_tpb_writelock_after_readtxn 335544911L +#define isc_time_range_exceeded 335544912L +#define isc_datetime_range_exceeded 335544913L +#define isc_string_truncation 335544914L +#define isc_blob_truncation 335544915L +#define isc_numeric_out_of_range 335544916L +#define isc_shutdown_timeout 335544917L +#define isc_att_handle_busy 335544918L +#define isc_bad_udf_freeit 335544919L +#define isc_eds_provider_not_found 335544920L +#define isc_eds_connection 335544921L +#define isc_eds_preprocess 335544922L +#define isc_eds_stmt_expected 335544923L +#define isc_eds_prm_name_expected 335544924L +#define isc_eds_unclosed_comment 335544925L +#define isc_eds_statement 335544926L +#define isc_eds_input_prm_mismatch 335544927L +#define isc_eds_output_prm_mismatch 335544928L +#define isc_eds_input_prm_not_set 335544929L +#define isc_too_big_blr 335544930L +#define isc_montabexh 335544931L +#define isc_modnotfound 335544932L +#define isc_nothing_to_cancel 335544933L +#define isc_ibutil_not_loaded 335544934L +#define isc_circular_computed 335544935L +#define isc_psw_db_error 335544936L +#define isc_invalid_type_datetime_op 335544937L +#define isc_onlycan_add_timetodate 335544938L +#define isc_onlycan_add_datetotime 335544939L +#define isc_onlycansub_tstampfromtstamp 335544940L +#define isc_onlyoneop_mustbe_tstamp 335544941L +#define isc_invalid_extractpart_time 335544942L +#define isc_invalid_extractpart_date 335544943L +#define isc_invalidarg_extract 335544944L +#define isc_sysf_argmustbe_exact 335544945L +#define isc_sysf_argmustbe_exact_or_fp 335544946L +#define isc_sysf_argviolates_uuidtype 335544947L +#define isc_sysf_argviolates_uuidlen 335544948L +#define isc_sysf_argviolates_uuidfmt 335544949L +#define isc_sysf_argviolates_guidigits 335544950L +#define isc_sysf_invalid_addpart_time 335544951L +#define isc_sysf_invalid_add_datetime 335544952L +#define isc_sysf_invalid_addpart_dtime 335544953L +#define isc_sysf_invalid_add_dtime_rc 335544954L +#define isc_sysf_invalid_diff_dtime 335544955L +#define isc_sysf_invalid_timediff 335544956L +#define isc_sysf_invalid_tstamptimediff 335544957L +#define isc_sysf_invalid_datetimediff 335544958L +#define isc_sysf_invalid_diffpart 335544959L +#define isc_sysf_argmustbe_positive 335544960L +#define isc_sysf_basemustbe_positive 335544961L +#define isc_sysf_argnmustbe_nonneg 335544962L +#define isc_sysf_argnmustbe_positive 335544963L +#define isc_sysf_invalid_zeropowneg 335544964L +#define isc_sysf_invalid_negpowfp 335544965L +#define isc_sysf_invalid_scale 335544966L +#define isc_sysf_argmustbe_nonneg 335544967L +#define isc_sysf_binuuid_mustbe_str 335544968L +#define isc_sysf_binuuid_wrongsize 335544969L +#define isc_missing_required_spb 335544970L +#define isc_net_server_shutdown 335544971L +#define isc_bad_conn_str 335544972L +#define isc_bad_epb_form 335544973L +#define isc_no_threads 335544974L +#define isc_net_event_connect_timeout 335544975L +#define isc_sysf_argmustbe_nonzero 335544976L +#define isc_sysf_argmustbe_range_inc1_1 335544977L +#define isc_sysf_argmustbe_gteq_one 335544978L +#define isc_sysf_argmustbe_range_exc1_1 335544979L +#define isc_internal_rejected_params 335544980L +#define isc_sysf_fp_overflow 335544981L +#define isc_udf_fp_overflow 335544982L +#define isc_udf_fp_nan 335544983L +#define isc_instance_conflict 335544984L +#define isc_out_of_temp_space 335544985L +#define isc_eds_expl_tran_ctrl 335544986L +#define isc_no_trusted_spb 335544987L +#define isc_package_name 335544988L +#define isc_cannot_make_not_null 335544989L +#define isc_feature_removed 335544990L +#define isc_view_name 335544991L +#define isc_lock_dir_access 335544992L +#define isc_invalid_fetch_option 335544993L +#define isc_bad_fun_BLR 335544994L +#define isc_func_pack_not_implemented 335544995L +#define isc_proc_pack_not_implemented 335544996L +#define isc_eem_func_not_returned 335544997L +#define isc_eem_proc_not_returned 335544998L +#define isc_eem_trig_not_returned 335544999L +#define isc_eem_bad_plugin_ver 335545000L +#define isc_eem_engine_notfound 335545001L +#define isc_attachment_in_use 335545002L +#define isc_transaction_in_use 335545003L +#define isc_pman_cannot_load_plugin 335545004L +#define isc_pman_module_notfound 335545005L +#define isc_pman_entrypoint_notfound 335545006L +#define isc_pman_module_bad 335545007L +#define isc_pman_plugin_notfound 335545008L +#define isc_sysf_invalid_trig_namespace 335545009L +#define isc_unexpected_null 335545010L +#define isc_type_notcompat_blob 335545011L +#define isc_invalid_date_val 335545012L +#define isc_invalid_time_val 335545013L +#define isc_invalid_timestamp_val 335545014L +#define isc_invalid_index_val 335545015L +#define isc_formatted_exception 335545016L +#define isc_async_active 335545017L +#define isc_private_function 335545018L +#define isc_private_procedure 335545019L +#define isc_request_outdated 335545020L +#define isc_bad_events_handle 335545021L +#define isc_cannot_copy_stmt 335545022L +#define isc_invalid_boolean_usage 335545023L +#define isc_sysf_argscant_both_be_zero 335545024L +#define isc_spb_no_id 335545025L +#define isc_ee_blr_mismatch_null 335545026L +#define isc_ee_blr_mismatch_length 335545027L +#define isc_ss_out_of_bounds 335545028L +#define isc_missing_data_structures 335545029L +#define isc_protect_sys_tab 335545030L +#define isc_libtommath_generic 335545031L +#define isc_wroblrver2 335545032L +#define isc_trunc_limits 335545033L +#define isc_info_access 335545034L +#define isc_svc_no_stdin 335545035L +#define isc_svc_start_failed 335545036L +#define isc_svc_no_switches 335545037L +#define isc_svc_bad_size 335545038L +#define isc_no_crypt_plugin 335545039L +#define isc_cp_name_too_long 335545040L +#define isc_cp_process_active 335545041L +#define isc_cp_already_crypted 335545042L +#define isc_decrypt_error 335545043L +#define isc_no_providers 335545044L +#define isc_null_spb 335545045L +#define isc_max_args_exceeded 335545046L +#define isc_ee_blr_mismatch_names_count 335545047L +#define isc_ee_blr_mismatch_name_not_found 335545048L +#define isc_bad_result_set 335545049L +#define isc_wrong_message_length 335545050L +#define isc_no_output_format 335545051L +#define isc_item_finish 335545052L +#define isc_miss_config 335545053L +#define isc_conf_line 335545054L +#define isc_conf_include 335545055L +#define isc_include_depth 335545056L +#define isc_include_miss 335545057L +#define isc_protect_ownership 335545058L +#define isc_badvarnum 335545059L +#define isc_sec_context 335545060L +#define isc_multi_segment 335545061L +#define isc_login_changed 335545062L +#define isc_auth_handshake_limit 335545063L +#define isc_wirecrypt_incompatible 335545064L +#define isc_miss_wirecrypt 335545065L +#define isc_wirecrypt_key 335545066L +#define isc_wirecrypt_plugin 335545067L +#define isc_secdb_name 335545068L +#define isc_auth_data 335545069L +#define isc_auth_datalength 335545070L +#define isc_info_unprepared_stmt 335545071L +#define isc_idx_key_value 335545072L +#define isc_forupdate_virtualtbl 335545073L +#define isc_forupdate_systbl 335545074L +#define isc_forupdate_temptbl 335545075L +#define isc_cant_modify_sysobj 335545076L +#define isc_server_misconfigured 335545077L +#define isc_alter_role 335545078L +#define isc_map_already_exists 335545079L +#define isc_map_not_exists 335545080L +#define isc_map_load 335545081L +#define isc_map_aster 335545082L +#define isc_map_multi 335545083L +#define isc_map_undefined 335545084L +#define isc_baddpb_damaged_mode 335545085L +#define isc_baddpb_buffers_range 335545086L +#define isc_baddpb_temp_buffers 335545087L +#define isc_map_nodb 335545088L +#define isc_map_notable 335545089L +#define isc_miss_trusted_role 335545090L +#define isc_set_invalid_role 335545091L +#define isc_cursor_not_positioned 335545092L +#define isc_dup_attribute 335545093L +#define isc_dyn_no_priv 335545094L +#define isc_dsql_cant_grant_option 335545095L +#define isc_read_conflict 335545096L +#define isc_crdb_load 335545097L +#define isc_crdb_nodb 335545098L +#define isc_crdb_notable 335545099L +#define isc_interface_version_too_old 335545100L +#define isc_fun_param_mismatch 335545101L +#define isc_savepoint_backout_err 335545102L +#define isc_domain_primary_key_notnull 335545103L +#define isc_invalid_attachment_charset 335545104L +#define isc_map_down 335545105L +#define isc_login_error 335545106L +#define isc_already_opened 335545107L +#define isc_bad_crypt_key 335545108L +#define isc_encrypt_error 335545109L +#define isc_max_idx_depth 335545110L +#define isc_wrong_prvlg 335545111L +#define isc_miss_prvlg 335545112L +#define isc_crypt_checksum 335545113L +#define isc_not_dba 335545114L +#define isc_no_cursor 335545115L +#define isc_dsql_window_incompat_frames 335545116L +#define isc_dsql_window_range_multi_key 335545117L +#define isc_dsql_window_range_inv_key_type 335545118L +#define isc_dsql_window_frame_value_inv_type 335545119L +#define isc_window_frame_value_invalid 335545120L +#define isc_dsql_window_not_found 335545121L +#define isc_dsql_window_cant_overr_part 335545122L +#define isc_dsql_window_cant_overr_order 335545123L +#define isc_dsql_window_cant_overr_frame 335545124L +#define isc_dsql_window_duplicate 335545125L +#define isc_sql_too_long 335545126L +#define isc_cfg_stmt_timeout 335545127L +#define isc_att_stmt_timeout 335545128L +#define isc_req_stmt_timeout 335545129L +#define isc_att_shut_killed 335545130L +#define isc_att_shut_idle 335545131L +#define isc_att_shut_db_down 335545132L +#define isc_att_shut_engine 335545133L +#define isc_overriding_without_identity 335545134L +#define isc_overriding_system_invalid 335545135L +#define isc_overriding_user_invalid 335545136L +#define isc_overriding_missing 335545137L +#define isc_decprecision_err 335545138L +#define isc_decfloat_divide_by_zero 335545139L +#define isc_decfloat_inexact_result 335545140L +#define isc_decfloat_invalid_operation 335545141L +#define isc_decfloat_overflow 335545142L +#define isc_decfloat_underflow 335545143L +#define isc_subfunc_notdef 335545144L +#define isc_subproc_notdef 335545145L +#define isc_subfunc_signat 335545146L +#define isc_subproc_signat 335545147L +#define isc_subfunc_defvaldecl 335545148L +#define isc_subproc_defvaldecl 335545149L +#define isc_subfunc_not_impl 335545150L +#define isc_subproc_not_impl 335545151L +#define isc_sysf_invalid_hash_algorithm 335545152L +#define isc_expression_eval_index 335545153L +#define isc_invalid_decfloat_trap 335545154L +#define isc_invalid_decfloat_round 335545155L +#define isc_sysf_invalid_first_last_part 335545156L +#define isc_sysf_invalid_date_timestamp 335545157L +#define isc_precision_err2 335545158L +#define isc_bad_batch_handle 335545159L +#define isc_intl_char 335545160L +#define isc_null_block 335545161L +#define isc_mixed_info 335545162L +#define isc_unknown_info 335545163L +#define isc_bpb_version 335545164L +#define isc_user_manager 335545165L +#define isc_icu_entrypoint 335545166L +#define isc_icu_library 335545167L +#define isc_metadata_name 335545168L +#define isc_tokens_parse 335545169L +#define isc_iconv_open 335545170L +#define isc_batch_compl_range 335545171L +#define isc_batch_compl_detail 335545172L +#define isc_deflate_init 335545173L +#define isc_inflate_init 335545174L +#define isc_big_segment 335545175L +#define isc_batch_policy 335545176L +#define isc_batch_defbpb 335545177L +#define isc_batch_align 335545178L +#define isc_multi_segment_dup 335545179L +#define isc_non_plugin_protocol 335545180L +#define isc_message_format 335545181L +#define isc_batch_param_version 335545182L +#define isc_batch_msg_long 335545183L +#define isc_batch_open 335545184L +#define isc_batch_type 335545185L +#define isc_batch_param 335545186L +#define isc_batch_blobs 335545187L +#define isc_batch_blob_append 335545188L +#define isc_batch_stream_align 335545189L +#define isc_batch_rpt_blob 335545190L +#define isc_batch_blob_buf 335545191L +#define isc_batch_small_data 335545192L +#define isc_batch_cont_bpb 335545193L +#define isc_batch_big_bpb 335545194L +#define isc_batch_big_segment 335545195L +#define isc_batch_big_seg2 335545196L +#define isc_batch_blob_id 335545197L +#define isc_batch_too_big 335545198L +#define isc_num_literal 335545199L +#define isc_map_event 335545200L +#define isc_map_overflow 335545201L +#define isc_hdr_overflow 335545202L +#define isc_vld_plugins 335545203L +#define isc_db_crypt_key 335545204L +#define isc_no_keyholder_plugin 335545205L +#define isc_ses_reset_err 335545206L +#define isc_ses_reset_open_trans 335545207L +#define isc_ses_reset_warn 335545208L +#define isc_ses_reset_tran_rollback 335545209L +#define isc_plugin_name 335545210L +#define isc_parameter_name 335545211L +#define isc_file_starting_page_err 335545212L +#define isc_invalid_timezone_offset 335545213L +#define isc_invalid_timezone_region 335545214L +#define isc_invalid_timezone_id 335545215L +#define isc_tom_decode64len 335545216L +#define isc_tom_strblob 335545217L +#define isc_tom_reg 335545218L +#define isc_tom_algorithm 335545219L +#define isc_tom_mode_miss 335545220L +#define isc_tom_mode_bad 335545221L +#define isc_tom_no_mode 335545222L +#define isc_tom_iv_miss 335545223L +#define isc_tom_no_iv 335545224L +#define isc_tom_ctrtype_bad 335545225L +#define isc_tom_no_ctrtype 335545226L +#define isc_tom_ctr_big 335545227L +#define isc_tom_no_ctr 335545228L +#define isc_tom_iv_length 335545229L +#define isc_tom_error 335545230L +#define isc_tom_yarrow_start 335545231L +#define isc_tom_yarrow_setup 335545232L +#define isc_tom_init_mode 335545233L +#define isc_tom_crypt_mode 335545234L +#define isc_tom_decrypt_mode 335545235L +#define isc_tom_init_cip 335545236L +#define isc_tom_crypt_cip 335545237L +#define isc_tom_decrypt_cip 335545238L +#define isc_tom_setup_cip 335545239L +#define isc_tom_setup_chacha 335545240L +#define isc_tom_encode 335545241L +#define isc_tom_decode 335545242L +#define isc_tom_rsa_import 335545243L +#define isc_tom_oaep 335545244L +#define isc_tom_hash_bad 335545245L +#define isc_tom_rsa_make 335545246L +#define isc_tom_rsa_export 335545247L +#define isc_tom_rsa_sign 335545248L +#define isc_tom_rsa_verify 335545249L +#define isc_tom_chacha_key 335545250L +#define isc_bad_repl_handle 335545251L +#define isc_tra_snapshot_does_not_exist 335545252L +#define isc_eds_input_prm_not_used 335545253L +#define isc_effective_user 335545254L +#define isc_invalid_time_zone_bind 335545255L +#define isc_invalid_decfloat_bind 335545256L +#define isc_odd_hex_len 335545257L +#define isc_invalid_hex_digit 335545258L +#define isc_bind_err 335545259L +#define isc_bind_statement 335545260L +#define isc_bind_convert 335545261L +#define isc_cannot_update_old_blob 335545262L +#define isc_cannot_read_new_blob 335545263L +#define isc_dyn_no_create_priv 335545264L +#define isc_suspend_without_returns 335545265L +#define isc_truncate_warn 335545266L +#define isc_truncate_monitor 335545267L +#define isc_truncate_context 335545268L +#define isc_merge_dup_update 335545269L +#define isc_wrong_page 335545270L +#define isc_repl_error 335545271L +#define isc_ses_reset_failed 335545272L +#define isc_block_size 335545273L +#define isc_tom_key_length 335545274L +#define isc_inf_invalid_args 335545275L +#define isc_sysf_invalid_null_empty 335545276L +#define isc_bad_loctab_num 335545277L +#define isc_quoted_str_bad 335545278L +#define isc_quoted_str_miss 335545279L +#define isc_wrong_shmem_ver 335545280L +#define isc_wrong_shmem_bitness 335545281L +#define isc_wrong_proc_plan 335545282L +#define isc_invalid_blob_util_handle 335545283L +#define isc_bad_temp_blob_id 335545284L +#define isc_ods_upgrade_err 335545285L +#define isc_bad_par_workers 335545286L +#define isc_idx_expr_not_found 335545287L +#define isc_idx_cond_not_found 335545288L +#define isc_sweep_unable_to_run 335545308L +#define isc_sweep_concurrent_instance 335545309L +#define isc_sweep_read_only 335545310L +#define isc_sweep_attach_no_cleanup 335545311L +#define isc_no_user_att_while_restore 335545318L +#define isc_gfix_db_name 335740929L +#define isc_gfix_invalid_sw 335740930L +#define isc_gfix_incmp_sw 335740932L +#define isc_gfix_replay_req 335740933L +#define isc_gfix_pgbuf_req 335740934L +#define isc_gfix_val_req 335740935L +#define isc_gfix_pval_req 335740936L +#define isc_gfix_trn_req 335740937L +#define isc_gfix_full_req 335740940L +#define isc_gfix_usrname_req 335740941L +#define isc_gfix_pass_req 335740942L +#define isc_gfix_subs_name 335740943L +#define isc_gfix_wal_req 335740944L +#define isc_gfix_sec_req 335740945L +#define isc_gfix_nval_req 335740946L +#define isc_gfix_type_shut 335740947L +#define isc_gfix_retry 335740948L +#define isc_gfix_retry_db 335740951L +#define isc_gfix_exceed_max 335740991L +#define isc_gfix_corrupt_pool 335740992L +#define isc_gfix_mem_exhausted 335740993L +#define isc_gfix_bad_pool 335740994L +#define isc_gfix_trn_not_valid 335740995L +#define isc_gfix_unexp_eoi 335741012L +#define isc_gfix_recon_fail 335741018L +#define isc_gfix_trn_unknown 335741036L +#define isc_gfix_mode_req 335741038L +#define isc_gfix_pzval_req 335741042L +#define isc_dsql_dbkey_from_non_table 336003074L +#define isc_dsql_transitional_numeric 336003075L +#define isc_dsql_dialect_warning_expr 336003076L +#define isc_sql_db_dialect_dtype_unsupport 336003077L +#define isc_sql_dialect_conflict_num 336003079L +#define isc_dsql_warning_number_ambiguous 336003080L +#define isc_dsql_warning_number_ambiguous1 336003081L +#define isc_dsql_warn_precision_ambiguous 336003082L +#define isc_dsql_warn_precision_ambiguous1 336003083L +#define isc_dsql_warn_precision_ambiguous2 336003084L +#define isc_dsql_ambiguous_field_name 336003085L +#define isc_dsql_udf_return_pos_err 336003086L +#define isc_dsql_invalid_label 336003087L +#define isc_dsql_datatypes_not_comparable 336003088L +#define isc_dsql_cursor_invalid 336003089L +#define isc_dsql_cursor_redefined 336003090L +#define isc_dsql_cursor_not_found 336003091L +#define isc_dsql_cursor_exists 336003092L +#define isc_dsql_cursor_rel_ambiguous 336003093L +#define isc_dsql_cursor_rel_not_found 336003094L +#define isc_dsql_cursor_not_open 336003095L +#define isc_dsql_type_not_supp_ext_tab 336003096L +#define isc_dsql_feature_not_supported_ods 336003097L +#define isc_primary_key_required 336003098L +#define isc_upd_ins_doesnt_match_pk 336003099L +#define isc_upd_ins_doesnt_match_matching 336003100L +#define isc_upd_ins_with_complex_view 336003101L +#define isc_dsql_incompatible_trigger_type 336003102L +#define isc_dsql_db_trigger_type_cant_change 336003103L +#define isc_dsql_record_version_table 336003104L +#define isc_dsql_invalid_sqlda_version 336003105L +#define isc_dsql_sqlvar_index 336003106L +#define isc_dsql_no_sqlind 336003107L +#define isc_dsql_no_sqldata 336003108L +#define isc_dsql_no_input_sqlda 336003109L +#define isc_dsql_no_output_sqlda 336003110L +#define isc_dsql_wrong_param_num 336003111L +#define isc_dsql_invalid_drop_ss_clause 336003112L +#define isc_upd_ins_cannot_default 336003113L +#define isc_dyn_filter_not_found 336068645L +#define isc_dyn_func_not_found 336068649L +#define isc_dyn_index_not_found 336068656L +#define isc_dyn_view_not_found 336068662L +#define isc_dyn_domain_not_found 336068697L +#define isc_dyn_cant_modify_auto_trig 336068717L +#define isc_dyn_dup_table 336068740L +#define isc_dyn_proc_not_found 336068748L +#define isc_dyn_exception_not_found 336068752L +#define isc_dyn_proc_param_not_found 336068754L +#define isc_dyn_trig_not_found 336068755L +#define isc_dyn_charset_not_found 336068759L +#define isc_dyn_collation_not_found 336068760L +#define isc_dyn_role_not_found 336068763L +#define isc_dyn_name_longer 336068767L +#define isc_dyn_column_does_not_exist 336068784L +#define isc_dyn_role_does_not_exist 336068796L +#define isc_dyn_no_grant_admin_opt 336068797L +#define isc_dyn_user_not_role_member 336068798L +#define isc_dyn_delete_role_failed 336068799L +#define isc_dyn_grant_role_to_user 336068800L +#define isc_dyn_inv_sql_role_name 336068801L +#define isc_dyn_dup_sql_role 336068802L +#define isc_dyn_kywd_spec_for_role 336068803L +#define isc_dyn_roles_not_supported 336068804L +#define isc_dyn_domain_name_exists 336068812L +#define isc_dyn_field_name_exists 336068813L +#define isc_dyn_dependency_exists 336068814L +#define isc_dyn_dtype_invalid 336068815L +#define isc_dyn_char_fld_too_small 336068816L +#define isc_dyn_invalid_dtype_conversion 336068817L +#define isc_dyn_dtype_conv_invalid 336068818L +#define isc_dyn_zero_len_id 336068820L +#define isc_dyn_gen_not_found 336068822L +#define isc_max_coll_per_charset 336068829L +#define isc_invalid_coll_attr 336068830L +#define isc_dyn_wrong_gtt_scope 336068840L +#define isc_dyn_coll_used_table 336068843L +#define isc_dyn_coll_used_domain 336068844L +#define isc_dyn_cannot_del_syscoll 336068845L +#define isc_dyn_cannot_del_def_coll 336068846L +#define isc_dyn_table_not_found 336068849L +#define isc_dyn_coll_used_procedure 336068851L +#define isc_dyn_scale_too_big 336068852L +#define isc_dyn_precision_too_small 336068853L +#define isc_dyn_miss_priv_warning 336068855L +#define isc_dyn_ods_not_supp_feature 336068856L +#define isc_dyn_cannot_addrem_computed 336068857L +#define isc_dyn_no_empty_pw 336068858L +#define isc_dyn_dup_index 336068859L +#define isc_dyn_package_not_found 336068864L +#define isc_dyn_schema_not_found 336068865L +#define isc_dyn_cannot_mod_sysproc 336068866L +#define isc_dyn_cannot_mod_systrig 336068867L +#define isc_dyn_cannot_mod_sysfunc 336068868L +#define isc_dyn_invalid_ddl_proc 336068869L +#define isc_dyn_invalid_ddl_trig 336068870L +#define isc_dyn_funcnotdef_package 336068871L +#define isc_dyn_procnotdef_package 336068872L +#define isc_dyn_funcsignat_package 336068873L +#define isc_dyn_procsignat_package 336068874L +#define isc_dyn_defvaldecl_package_proc 336068875L +#define isc_dyn_package_body_exists 336068877L +#define isc_dyn_invalid_ddl_func 336068878L +#define isc_dyn_newfc_oldsyntax 336068879L +#define isc_dyn_func_param_not_found 336068886L +#define isc_dyn_routine_param_not_found 336068887L +#define isc_dyn_routine_param_ambiguous 336068888L +#define isc_dyn_coll_used_function 336068889L +#define isc_dyn_domain_used_function 336068890L +#define isc_dyn_alter_user_no_clause 336068891L +#define isc_dyn_duplicate_package_item 336068894L +#define isc_dyn_cant_modify_sysobj 336068895L +#define isc_dyn_cant_use_zero_increment 336068896L +#define isc_dyn_cant_use_in_foreignkey 336068897L +#define isc_dyn_defvaldecl_package_func 336068898L +#define isc_dyn_cyclic_role 336068900L +#define isc_dyn_cant_use_zero_inc_ident 336068904L +#define isc_dyn_no_ddl_grant_opt_priv 336068907L +#define isc_dyn_no_grant_opt_priv 336068908L +#define isc_dyn_func_not_exist 336068909L +#define isc_dyn_proc_not_exist 336068910L +#define isc_dyn_pack_not_exist 336068911L +#define isc_dyn_trig_not_exist 336068912L +#define isc_dyn_view_not_exist 336068913L +#define isc_dyn_rel_not_exist 336068914L +#define isc_dyn_exc_not_exist 336068915L +#define isc_dyn_gen_not_exist 336068916L +#define isc_dyn_fld_not_exist 336068917L +#define isc_gbak_unknown_switch 336330753L +#define isc_gbak_page_size_missing 336330754L +#define isc_gbak_page_size_toobig 336330755L +#define isc_gbak_redir_ouput_missing 336330756L +#define isc_gbak_switches_conflict 336330757L +#define isc_gbak_unknown_device 336330758L +#define isc_gbak_no_protection 336330759L +#define isc_gbak_page_size_not_allowed 336330760L +#define isc_gbak_multi_source_dest 336330761L +#define isc_gbak_filename_missing 336330762L +#define isc_gbak_dup_inout_names 336330763L +#define isc_gbak_inv_page_size 336330764L +#define isc_gbak_db_specified 336330765L +#define isc_gbak_db_exists 336330766L +#define isc_gbak_unk_device 336330767L +#define isc_gbak_blob_info_failed 336330772L +#define isc_gbak_unk_blob_item 336330773L +#define isc_gbak_get_seg_failed 336330774L +#define isc_gbak_close_blob_failed 336330775L +#define isc_gbak_open_blob_failed 336330776L +#define isc_gbak_put_blr_gen_id_failed 336330777L +#define isc_gbak_unk_type 336330778L +#define isc_gbak_comp_req_failed 336330779L +#define isc_gbak_start_req_failed 336330780L +#define isc_gbak_rec_failed 336330781L +#define isc_gbak_rel_req_failed 336330782L +#define isc_gbak_db_info_failed 336330783L +#define isc_gbak_no_db_desc 336330784L +#define isc_gbak_db_create_failed 336330785L +#define isc_gbak_decomp_len_error 336330786L +#define isc_gbak_tbl_missing 336330787L +#define isc_gbak_blob_col_missing 336330788L +#define isc_gbak_create_blob_failed 336330789L +#define isc_gbak_put_seg_failed 336330790L +#define isc_gbak_rec_len_exp 336330791L +#define isc_gbak_inv_rec_len 336330792L +#define isc_gbak_exp_data_type 336330793L +#define isc_gbak_gen_id_failed 336330794L +#define isc_gbak_unk_rec_type 336330795L +#define isc_gbak_inv_bkup_ver 336330796L +#define isc_gbak_missing_bkup_desc 336330797L +#define isc_gbak_string_trunc 336330798L +#define isc_gbak_cant_rest_record 336330799L +#define isc_gbak_send_failed 336330800L +#define isc_gbak_no_tbl_name 336330801L +#define isc_gbak_unexp_eof 336330802L +#define isc_gbak_db_format_too_old 336330803L +#define isc_gbak_inv_array_dim 336330804L +#define isc_gbak_xdr_len_expected 336330807L +#define isc_gbak_open_bkup_error 336330817L +#define isc_gbak_open_error 336330818L +#define isc_gbak_missing_block_fac 336330934L +#define isc_gbak_inv_block_fac 336330935L +#define isc_gbak_block_fac_specified 336330936L +#define isc_gbak_missing_username 336330940L +#define isc_gbak_missing_password 336330941L +#define isc_gbak_missing_skipped_bytes 336330952L +#define isc_gbak_inv_skipped_bytes 336330953L +#define isc_gbak_err_restore_charset 336330965L +#define isc_gbak_err_restore_collation 336330967L +#define isc_gbak_read_error 336330972L +#define isc_gbak_write_error 336330973L +#define isc_gbak_db_in_use 336330985L +#define isc_gbak_sysmemex 336330990L +#define isc_gbak_restore_role_failed 336331002L +#define isc_gbak_role_op_missing 336331005L +#define isc_gbak_page_buffers_missing 336331010L +#define isc_gbak_page_buffers_wrong_param 336331011L +#define isc_gbak_page_buffers_restore 336331012L +#define isc_gbak_inv_size 336331014L +#define isc_gbak_file_outof_sequence 336331015L +#define isc_gbak_join_file_missing 336331016L +#define isc_gbak_stdin_not_supptd 336331017L +#define isc_gbak_stdout_not_supptd 336331018L +#define isc_gbak_bkup_corrupt 336331019L +#define isc_gbak_unk_db_file_spec 336331020L +#define isc_gbak_hdr_write_failed 336331021L +#define isc_gbak_disk_space_ex 336331022L +#define isc_gbak_size_lt_min 336331023L +#define isc_gbak_svc_name_missing 336331025L +#define isc_gbak_not_ownr 336331026L +#define isc_gbak_mode_req 336331031L +#define isc_gbak_just_data 336331033L +#define isc_gbak_data_only 336331034L +#define isc_gbak_missing_interval 336331078L +#define isc_gbak_wrong_interval 336331079L +#define isc_gbak_verify_verbint 336331081L +#define isc_gbak_option_only_restore 336331082L +#define isc_gbak_option_only_backup 336331083L +#define isc_gbak_option_conflict 336331084L +#define isc_gbak_param_conflict 336331085L +#define isc_gbak_option_repeated 336331086L +#define isc_gbak_max_dbkey_recursion 336331091L +#define isc_gbak_max_dbkey_length 336331092L +#define isc_gbak_invalid_metadata 336331093L +#define isc_gbak_invalid_data 336331094L +#define isc_gbak_inv_bkup_ver2 336331096L +#define isc_gbak_db_format_too_old2 336331100L +#define isc_dsql_too_old_ods 336397205L +#define isc_dsql_table_not_found 336397206L +#define isc_dsql_view_not_found 336397207L +#define isc_dsql_line_col_error 336397208L +#define isc_dsql_unknown_pos 336397209L +#define isc_dsql_no_dup_name 336397210L +#define isc_dsql_too_many_values 336397211L +#define isc_dsql_no_array_computed 336397212L +#define isc_dsql_implicit_domain_name 336397213L +#define isc_dsql_only_can_subscript_array 336397214L +#define isc_dsql_max_sort_items 336397215L +#define isc_dsql_max_group_items 336397216L +#define isc_dsql_conflicting_sort_field 336397217L +#define isc_dsql_derived_table_more_columns 336397218L +#define isc_dsql_derived_table_less_columns 336397219L +#define isc_dsql_derived_field_unnamed 336397220L +#define isc_dsql_derived_field_dup_name 336397221L +#define isc_dsql_derived_alias_select 336397222L +#define isc_dsql_derived_alias_field 336397223L +#define isc_dsql_auto_field_bad_pos 336397224L +#define isc_dsql_cte_wrong_reference 336397225L +#define isc_dsql_cte_cycle 336397226L +#define isc_dsql_cte_outer_join 336397227L +#define isc_dsql_cte_mult_references 336397228L +#define isc_dsql_cte_not_a_union 336397229L +#define isc_dsql_cte_nonrecurs_after_recurs 336397230L +#define isc_dsql_cte_wrong_clause 336397231L +#define isc_dsql_cte_union_all 336397232L +#define isc_dsql_cte_miss_nonrecursive 336397233L +#define isc_dsql_cte_nested_with 336397234L +#define isc_dsql_col_more_than_once_using 336397235L +#define isc_dsql_unsupp_feature_dialect 336397236L +#define isc_dsql_cte_not_used 336397237L +#define isc_dsql_col_more_than_once_view 336397238L +#define isc_dsql_unsupported_in_auto_trans 336397239L +#define isc_dsql_eval_unknode 336397240L +#define isc_dsql_agg_wrongarg 336397241L +#define isc_dsql_agg2_wrongarg 336397242L +#define isc_dsql_nodateortime_pm_string 336397243L +#define isc_dsql_invalid_datetime_subtract 336397244L +#define isc_dsql_invalid_dateortime_add 336397245L +#define isc_dsql_invalid_type_minus_date 336397246L +#define isc_dsql_nostring_addsub_dial3 336397247L +#define isc_dsql_invalid_type_addsub_dial3 336397248L +#define isc_dsql_invalid_type_multip_dial1 336397249L +#define isc_dsql_nostring_multip_dial3 336397250L +#define isc_dsql_invalid_type_multip_dial3 336397251L +#define isc_dsql_mustuse_numeric_div_dial1 336397252L +#define isc_dsql_nostring_div_dial3 336397253L +#define isc_dsql_invalid_type_div_dial3 336397254L +#define isc_dsql_nostring_neg_dial3 336397255L +#define isc_dsql_invalid_type_neg 336397256L +#define isc_dsql_max_distinct_items 336397257L +#define isc_dsql_alter_charset_failed 336397258L +#define isc_dsql_comment_on_failed 336397259L +#define isc_dsql_create_func_failed 336397260L +#define isc_dsql_alter_func_failed 336397261L +#define isc_dsql_create_alter_func_failed 336397262L +#define isc_dsql_drop_func_failed 336397263L +#define isc_dsql_recreate_func_failed 336397264L +#define isc_dsql_create_proc_failed 336397265L +#define isc_dsql_alter_proc_failed 336397266L +#define isc_dsql_create_alter_proc_failed 336397267L +#define isc_dsql_drop_proc_failed 336397268L +#define isc_dsql_recreate_proc_failed 336397269L +#define isc_dsql_create_trigger_failed 336397270L +#define isc_dsql_alter_trigger_failed 336397271L +#define isc_dsql_create_alter_trigger_failed 336397272L +#define isc_dsql_drop_trigger_failed 336397273L +#define isc_dsql_recreate_trigger_failed 336397274L +#define isc_dsql_create_collation_failed 336397275L +#define isc_dsql_drop_collation_failed 336397276L +#define isc_dsql_create_domain_failed 336397277L +#define isc_dsql_alter_domain_failed 336397278L +#define isc_dsql_drop_domain_failed 336397279L +#define isc_dsql_create_except_failed 336397280L +#define isc_dsql_alter_except_failed 336397281L +#define isc_dsql_create_alter_except_failed 336397282L +#define isc_dsql_recreate_except_failed 336397283L +#define isc_dsql_drop_except_failed 336397284L +#define isc_dsql_create_sequence_failed 336397285L +#define isc_dsql_create_table_failed 336397286L +#define isc_dsql_alter_table_failed 336397287L +#define isc_dsql_drop_table_failed 336397288L +#define isc_dsql_recreate_table_failed 336397289L +#define isc_dsql_create_pack_failed 336397290L +#define isc_dsql_alter_pack_failed 336397291L +#define isc_dsql_create_alter_pack_failed 336397292L +#define isc_dsql_drop_pack_failed 336397293L +#define isc_dsql_recreate_pack_failed 336397294L +#define isc_dsql_create_pack_body_failed 336397295L +#define isc_dsql_drop_pack_body_failed 336397296L +#define isc_dsql_recreate_pack_body_failed 336397297L +#define isc_dsql_create_view_failed 336397298L +#define isc_dsql_alter_view_failed 336397299L +#define isc_dsql_create_alter_view_failed 336397300L +#define isc_dsql_recreate_view_failed 336397301L +#define isc_dsql_drop_view_failed 336397302L +#define isc_dsql_drop_sequence_failed 336397303L +#define isc_dsql_recreate_sequence_failed 336397304L +#define isc_dsql_drop_index_failed 336397305L +#define isc_dsql_drop_filter_failed 336397306L +#define isc_dsql_drop_shadow_failed 336397307L +#define isc_dsql_drop_role_failed 336397308L +#define isc_dsql_drop_user_failed 336397309L +#define isc_dsql_create_role_failed 336397310L +#define isc_dsql_alter_role_failed 336397311L +#define isc_dsql_alter_index_failed 336397312L +#define isc_dsql_alter_database_failed 336397313L +#define isc_dsql_create_shadow_failed 336397314L +#define isc_dsql_create_filter_failed 336397315L +#define isc_dsql_create_index_failed 336397316L +#define isc_dsql_create_user_failed 336397317L +#define isc_dsql_alter_user_failed 336397318L +#define isc_dsql_grant_failed 336397319L +#define isc_dsql_revoke_failed 336397320L +#define isc_dsql_cte_recursive_aggregate 336397321L +#define isc_dsql_mapping_failed 336397322L +#define isc_dsql_alter_sequence_failed 336397323L +#define isc_dsql_create_generator_failed 336397324L +#define isc_dsql_set_generator_failed 336397325L +#define isc_dsql_wlock_simple 336397326L +#define isc_dsql_firstskip_rows 336397327L +#define isc_dsql_wlock_aggregates 336397328L +#define isc_dsql_wlock_conflict 336397329L +#define isc_dsql_max_exception_arguments 336397330L +#define isc_dsql_string_byte_length 336397331L +#define isc_dsql_string_char_length 336397332L +#define isc_dsql_max_nesting 336397333L +#define isc_dsql_recreate_user_failed 336397334L +#define isc_gsec_cant_open_db 336723983L +#define isc_gsec_switches_error 336723984L +#define isc_gsec_no_op_spec 336723985L +#define isc_gsec_no_usr_name 336723986L +#define isc_gsec_err_add 336723987L +#define isc_gsec_err_modify 336723988L +#define isc_gsec_err_find_mod 336723989L +#define isc_gsec_err_rec_not_found 336723990L +#define isc_gsec_err_delete 336723991L +#define isc_gsec_err_find_del 336723992L +#define isc_gsec_err_find_disp 336723996L +#define isc_gsec_inv_param 336723997L +#define isc_gsec_op_specified 336723998L +#define isc_gsec_pw_specified 336723999L +#define isc_gsec_uid_specified 336724000L +#define isc_gsec_gid_specified 336724001L +#define isc_gsec_proj_specified 336724002L +#define isc_gsec_org_specified 336724003L +#define isc_gsec_fname_specified 336724004L +#define isc_gsec_mname_specified 336724005L +#define isc_gsec_lname_specified 336724006L +#define isc_gsec_inv_switch 336724008L +#define isc_gsec_amb_switch 336724009L +#define isc_gsec_no_op_specified 336724010L +#define isc_gsec_params_not_allowed 336724011L +#define isc_gsec_incompat_switch 336724012L +#define isc_gsec_inv_username 336724044L +#define isc_gsec_inv_pw_length 336724045L +#define isc_gsec_db_specified 336724046L +#define isc_gsec_db_admin_specified 336724047L +#define isc_gsec_db_admin_pw_specified 336724048L +#define isc_gsec_sql_role_specified 336724049L +#define isc_gstat_unknown_switch 336920577L +#define isc_gstat_retry 336920578L +#define isc_gstat_wrong_ods 336920579L +#define isc_gstat_unexpected_eof 336920580L +#define isc_gstat_open_err 336920605L +#define isc_gstat_read_err 336920606L +#define isc_gstat_sysmemex 336920607L +#define isc_fbsvcmgr_bad_am 336986113L +#define isc_fbsvcmgr_bad_wm 336986114L +#define isc_fbsvcmgr_bad_rs 336986115L +#define isc_fbsvcmgr_info_err 336986116L +#define isc_fbsvcmgr_query_err 336986117L +#define isc_fbsvcmgr_switch_unknown 336986118L +#define isc_fbsvcmgr_bad_sm 336986159L +#define isc_fbsvcmgr_fp_open 336986160L +#define isc_fbsvcmgr_fp_read 336986161L +#define isc_fbsvcmgr_fp_empty 336986162L +#define isc_fbsvcmgr_bad_arg 336986164L +#define isc_fbsvcmgr_info_limbo 336986170L +#define isc_fbsvcmgr_limbo_state 336986171L +#define isc_fbsvcmgr_limbo_advise 336986172L +#define isc_fbsvcmgr_bad_rm 336986173L +#define isc_utl_trusted_switch 337051649L +#define isc_nbackup_missing_param 337117213L +#define isc_nbackup_allowed_switches 337117214L +#define isc_nbackup_unknown_param 337117215L +#define isc_nbackup_unknown_switch 337117216L +#define isc_nbackup_nofetchpw_svc 337117217L +#define isc_nbackup_pwfile_error 337117218L +#define isc_nbackup_size_with_lock 337117219L +#define isc_nbackup_no_switch 337117220L +#define isc_nbackup_err_read 337117223L +#define isc_nbackup_err_write 337117224L +#define isc_nbackup_err_seek 337117225L +#define isc_nbackup_err_opendb 337117226L +#define isc_nbackup_err_fadvice 337117227L +#define isc_nbackup_err_createdb 337117228L +#define isc_nbackup_err_openbk 337117229L +#define isc_nbackup_err_createbk 337117230L +#define isc_nbackup_err_eofdb 337117231L +#define isc_nbackup_fixup_wrongstate 337117232L +#define isc_nbackup_err_db 337117233L +#define isc_nbackup_userpw_toolong 337117234L +#define isc_nbackup_lostrec_db 337117235L +#define isc_nbackup_lostguid_db 337117236L +#define isc_nbackup_err_eofhdrdb 337117237L +#define isc_nbackup_db_notlock 337117238L +#define isc_nbackup_lostguid_bk 337117239L +#define isc_nbackup_page_changed 337117240L +#define isc_nbackup_dbsize_inconsistent 337117241L +#define isc_nbackup_failed_lzbk 337117242L +#define isc_nbackup_err_eofhdrbk 337117243L +#define isc_nbackup_invalid_incbk 337117244L +#define isc_nbackup_unsupvers_incbk 337117245L +#define isc_nbackup_invlevel_incbk 337117246L +#define isc_nbackup_wrong_orderbk 337117247L +#define isc_nbackup_err_eofbk 337117248L +#define isc_nbackup_err_copy 337117249L +#define isc_nbackup_err_eofhdr_restdb 337117250L +#define isc_nbackup_lostguid_l0bk 337117251L +#define isc_nbackup_switchd_parameter 337117255L +#define isc_nbackup_user_stop 337117257L +#define isc_nbackup_deco_parse 337117259L +#define isc_nbackup_lostrec_guid_db 337117261L +#define isc_nbackup_seq_misuse 337117265L +#define isc_nbackup_wrong_param 337117268L +#define isc_nbackup_clean_hist_misuse 337117269L +#define isc_nbackup_clean_hist_missed 337117270L +#define isc_nbackup_keep_hist_missed 337117271L +#define isc_nbackup_second_keep_switch 337117272L +#define isc_trace_conflict_acts 337182750L +#define isc_trace_act_notfound 337182751L +#define isc_trace_switch_once 337182752L +#define isc_trace_param_val_miss 337182753L +#define isc_trace_param_invalid 337182754L +#define isc_trace_switch_unknown 337182755L +#define isc_trace_switch_svc_only 337182756L +#define isc_trace_switch_user_only 337182757L +#define isc_trace_switch_param_miss 337182758L +#define isc_trace_param_act_notcompat 337182759L +#define isc_trace_mandatory_switch_miss 337182760L +#define isc_err_max 1470 diff --git a/packages/node-firebird-native-api/src/native/include/firebird/impl/inf_pub.h b/packages/node-firebird-native-api/src/native/include/firebird/impl/inf_pub.h new file mode 100644 index 0000000..3815e26 --- /dev/null +++ b/packages/node-firebird-native-api/src/native/include/firebird/impl/inf_pub.h @@ -0,0 +1,526 @@ +/* + * PROGRAM: JRD Access Method + * MODULE: inf.h + * DESCRIPTION: Information call declarations. + * + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + * + * 2001.07.28: John Bellardo: Added isc_info_rsb_skip to support LIMIT. + */ + +#ifndef FIREBIRD_IMPL_INF_PUB_H +#define FIREBIRD_IMPL_INF_PUB_H + +/* Common, structural codes */ +/****************************/ + +#define isc_info_end 1 +#define isc_info_truncated 2 +#define isc_info_error 3 +#define isc_info_data_not_ready 4 +#define isc_info_length 126 +#define isc_info_flag_end 127 + +/******************************/ +/* Database information items */ +/******************************/ + +enum db_info_types +{ + isc_info_db_id = 4, + isc_info_reads = 5, + isc_info_writes = 6, + isc_info_fetches = 7, + isc_info_marks = 8, + + isc_info_implementation = 11, + isc_info_isc_version = 12, + isc_info_base_level = 13, + isc_info_page_size = 14, + isc_info_num_buffers = 15, + isc_info_limbo = 16, + isc_info_current_memory = 17, + isc_info_max_memory = 18, + isc_info_window_turns = 19, + isc_info_license = 20, + + isc_info_allocation = 21, + isc_info_attachment_id = 22, + isc_info_read_seq_count = 23, + isc_info_read_idx_count = 24, + isc_info_insert_count = 25, + isc_info_update_count = 26, + isc_info_delete_count = 27, + isc_info_backout_count = 28, + isc_info_purge_count = 29, + isc_info_expunge_count = 30, + + isc_info_sweep_interval = 31, + isc_info_ods_version = 32, + isc_info_ods_minor_version = 33, + isc_info_no_reserve = 34, + /* Begin deprecated WAL and JOURNAL items. */ + isc_info_logfile = 35, + isc_info_cur_logfile_name = 36, + isc_info_cur_log_part_offset = 37, + isc_info_num_wal_buffers = 38, + isc_info_wal_buffer_size = 39, + isc_info_wal_ckpt_length = 40, + + isc_info_wal_cur_ckpt_interval = 41, + isc_info_wal_prv_ckpt_fname = 42, + isc_info_wal_prv_ckpt_poffset = 43, + isc_info_wal_recv_ckpt_fname = 44, + isc_info_wal_recv_ckpt_poffset = 45, + isc_info_wal_grpc_wait_usecs = 47, + isc_info_wal_num_io = 48, + isc_info_wal_avg_io_size = 49, + isc_info_wal_num_commits = 50, + isc_info_wal_avg_grpc_size = 51, + /* End deprecated WAL and JOURNAL items. */ + + isc_info_forced_writes = 52, + isc_info_user_names = 53, + isc_info_page_errors = 54, + isc_info_record_errors = 55, + isc_info_bpage_errors = 56, + isc_info_dpage_errors = 57, + isc_info_ipage_errors = 58, + isc_info_ppage_errors = 59, + isc_info_tpage_errors = 60, + + isc_info_set_page_buffers = 61, + isc_info_db_sql_dialect = 62, + isc_info_db_read_only = 63, + isc_info_db_size_in_pages = 64, + + /* Values 65 -100 unused to avoid conflict with InterBase */ + + frb_info_att_charset = 101, + isc_info_db_class = 102, + isc_info_firebird_version = 103, + isc_info_oldest_transaction = 104, + isc_info_oldest_active = 105, + isc_info_oldest_snapshot = 106, + isc_info_next_transaction = 107, + isc_info_db_provider = 108, + isc_info_active_transactions = 109, + isc_info_active_tran_count = 110, + isc_info_creation_date = 111, + isc_info_db_file_size = 112, + fb_info_page_contents = 113, + + fb_info_implementation = 114, + + fb_info_page_warns = 115, + fb_info_record_warns = 116, + fb_info_bpage_warns = 117, + fb_info_dpage_warns = 118, + fb_info_ipage_warns = 119, + fb_info_ppage_warns = 120, + fb_info_tpage_warns = 121, + fb_info_pip_errors = 122, + fb_info_pip_warns = 123, + + fb_info_pages_used = 124, + fb_info_pages_free = 125, + + // codes 126 and 127 are used for special purposes + // do not use them here + + fb_info_ses_idle_timeout_db = 129, + fb_info_ses_idle_timeout_att = 130, + fb_info_ses_idle_timeout_run = 131, + + fb_info_conn_flags = 132, + + fb_info_crypt_key = 133, + fb_info_crypt_state = 134, + + fb_info_statement_timeout_db = 135, + fb_info_statement_timeout_att = 136, + + fb_info_protocol_version = 137, + fb_info_crypt_plugin = 138, + + fb_info_creation_timestamp_tz = 139, + + fb_info_wire_crypt = 140, + + // Return list of features supported by provider of current connection + fb_info_features = 141, + + fb_info_next_attachment = 142, + fb_info_next_statement = 143, + + fb_info_db_guid = 144, + fb_info_db_file_id = 145, + + fb_info_replica_mode = 146, + + fb_info_username = 147, + fb_info_sqlrole = 148, + + fb_info_parallel_workers = 149, + + // Wire stats items, implemented by Remote provider only + fb_info_wire_out_packets = 150, + fb_info_wire_in_packets = 151, + fb_info_wire_out_bytes = 152, + fb_info_wire_in_bytes = 153, + fb_info_wire_snd_packets = 154, + fb_info_wire_rcv_packets = 155, + fb_info_wire_snd_bytes = 156, + fb_info_wire_rcv_bytes = 157, + fb_info_wire_roundtrips = 158, + + fb_info_max_blob_cache_size = 159, + fb_info_max_inline_blob_size = 160, + + isc_info_db_last_value /* Leave this LAST! */ +}; + +enum db_info_crypt /* flags set in fb_info_crypt_state */ +{ + fb_info_crypt_encrypted = 0x01, + fb_info_crypt_process = 0x02 +}; + +enum info_features // response to fb_info_features +{ + fb_feature_multi_statements = 1, // Multiple prepared statements in single attachment + fb_feature_multi_transactions = 2, // Multiple concurrent transaction in single attachment + fb_feature_named_parameters = 3, // Query parameters can be named + fb_feature_session_reset = 4, // ALTER SESSION RESET is supported + fb_feature_read_consistency = 5, // Read consistency TIL is supported + fb_feature_statement_timeout = 6, // Statement timeout is supported + fb_feature_statement_long_life = 7, // Prepared statements are not dropped on transaction end + + fb_feature_max // Not really a feature. Keep this last. +}; + +enum replica_mode // response to fb_info_replica_mode +{ + fb_info_replica_none = 0, + fb_info_replica_read_only = 1, + fb_info_replica_read_write = 2 +}; + +#define isc_info_version isc_info_isc_version + + +/**************************************/ +/* Database information return values */ +/**************************************/ + +enum info_db_implementations +{ + isc_info_db_impl_rdb_vms = 1, + isc_info_db_impl_rdb_eln = 2, + isc_info_db_impl_rdb_eln_dev = 3, + isc_info_db_impl_rdb_vms_y = 4, + isc_info_db_impl_rdb_eln_y = 5, + isc_info_db_impl_jri = 6, + isc_info_db_impl_jsv = 7, + + isc_info_db_impl_isc_apl_68K = 25, + isc_info_db_impl_isc_vax_ultr = 26, + isc_info_db_impl_isc_vms = 27, + isc_info_db_impl_isc_sun_68k = 28, + isc_info_db_impl_isc_os2 = 29, + isc_info_db_impl_isc_sun4 = 30, + + isc_info_db_impl_isc_hp_ux = 31, + isc_info_db_impl_isc_sun_386i = 32, + isc_info_db_impl_isc_vms_orcl = 33, + isc_info_db_impl_isc_mac_aux = 34, + isc_info_db_impl_isc_rt_aix = 35, + isc_info_db_impl_isc_mips_ult = 36, + isc_info_db_impl_isc_xenix = 37, + isc_info_db_impl_isc_dg = 38, + isc_info_db_impl_isc_hp_mpexl = 39, + isc_info_db_impl_isc_hp_ux68K = 40, + + isc_info_db_impl_isc_sgi = 41, + isc_info_db_impl_isc_sco_unix = 42, + isc_info_db_impl_isc_cray = 43, + isc_info_db_impl_isc_imp = 44, + isc_info_db_impl_isc_delta = 45, + isc_info_db_impl_isc_next = 46, + isc_info_db_impl_isc_dos = 47, + isc_info_db_impl_m88K = 48, + isc_info_db_impl_unixware = 49, + isc_info_db_impl_isc_winnt_x86 = 50, + + isc_info_db_impl_isc_epson = 51, + isc_info_db_impl_alpha_osf = 52, + isc_info_db_impl_alpha_vms = 53, + isc_info_db_impl_netware_386 = 54, + isc_info_db_impl_win_only = 55, + isc_info_db_impl_ncr_3000 = 56, + isc_info_db_impl_winnt_ppc = 57, + isc_info_db_impl_dg_x86 = 58, + isc_info_db_impl_sco_ev = 59, + isc_info_db_impl_i386 = 60, + + isc_info_db_impl_freebsd = 61, + isc_info_db_impl_netbsd = 62, + isc_info_db_impl_darwin_ppc = 63, + isc_info_db_impl_sinixz = 64, + + isc_info_db_impl_linux_sparc = 65, + isc_info_db_impl_linux_amd64 = 66, + + isc_info_db_impl_freebsd_amd64 = 67, + + isc_info_db_impl_winnt_amd64 = 68, + + isc_info_db_impl_linux_ppc = 69, + isc_info_db_impl_darwin_x86 = 70, + isc_info_db_impl_linux_mipsel = 71, + isc_info_db_impl_linux_mips = 72, + isc_info_db_impl_darwin_x64 = 73, + isc_info_db_impl_sun_amd64 = 74, + + isc_info_db_impl_linux_arm = 75, + isc_info_db_impl_linux_ia64 = 76, + + isc_info_db_impl_darwin_ppc64 = 77, + isc_info_db_impl_linux_s390x = 78, + isc_info_db_impl_linux_s390 = 79, + + isc_info_db_impl_linux_sh = 80, + isc_info_db_impl_linux_sheb = 81, + isc_info_db_impl_linux_hppa = 82, + isc_info_db_impl_linux_alpha = 83, + isc_info_db_impl_linux_arm64 = 84, + isc_info_db_impl_linux_ppc64el = 85, + isc_info_db_impl_linux_ppc64 = 86, + isc_info_db_impl_linux_m68k = 87, + isc_info_db_impl_linux_riscv64 = 88, + + isc_info_db_impl_freebsd_ppc64el = 89, + + isc_info_db_impl_linux_mips64el = 90, + + isc_info_db_impl_freebsd_ppc64 = 91, + isc_info_db_impl_freebsd_ppc = 92, + + isc_info_db_impl_last_value // Leave this LAST! +}; + +enum info_db_class +{ + isc_info_db_class_access = 1, + isc_info_db_class_y_valve = 2, + isc_info_db_class_rem_int = 3, + isc_info_db_class_rem_srvr = 4, + isc_info_db_class_pipe_int = 7, + isc_info_db_class_pipe_srvr = 8, + isc_info_db_class_sam_int = 9, + isc_info_db_class_sam_srvr = 10, + isc_info_db_class_gateway = 11, + isc_info_db_class_cache = 12, + isc_info_db_class_classic_access = 13, + isc_info_db_class_server_access = 14, + + isc_info_db_class_last_value /* Leave this LAST! */ +}; + +enum info_db_provider +{ + isc_info_db_code_rdb_eln = 1, + isc_info_db_code_rdb_vms = 2, + isc_info_db_code_interbase = 3, + isc_info_db_code_firebird = 4, + + isc_info_db_code_last_value /* Leave this LAST! */ +}; + + +/*****************************/ +/* Request information items */ +/*****************************/ + +#define isc_info_number_messages 4 +#define isc_info_max_message 5 +#define isc_info_max_send 6 +#define isc_info_max_receive 7 +#define isc_info_state 8 +#define isc_info_message_number 9 +#define isc_info_message_size 10 +#define isc_info_request_cost 11 +#define isc_info_access_path 12 +#define isc_info_req_select_count 13 +#define isc_info_req_insert_count 14 +#define isc_info_req_update_count 15 +#define isc_info_req_delete_count 16 + + +/*********************/ +/* Access path items */ +/*********************/ + +#define isc_info_rsb_end 0 +#define isc_info_rsb_begin 1 +#define isc_info_rsb_type 2 +#define isc_info_rsb_relation 3 +#define isc_info_rsb_plan 4 + +/*************/ +/* RecordSource (RSB) types */ +/*************/ + +#define isc_info_rsb_unknown 1 +#define isc_info_rsb_indexed 2 +#define isc_info_rsb_navigate 3 +#define isc_info_rsb_sequential 4 +#define isc_info_rsb_cross 5 +#define isc_info_rsb_sort 6 +#define isc_info_rsb_first 7 +#define isc_info_rsb_boolean 8 +#define isc_info_rsb_union 9 +#define isc_info_rsb_aggregate 10 +#define isc_info_rsb_merge 11 +#define isc_info_rsb_ext_sequential 12 +#define isc_info_rsb_ext_indexed 13 +#define isc_info_rsb_ext_dbkey 14 +#define isc_info_rsb_left_cross 15 +#define isc_info_rsb_select 16 +#define isc_info_rsb_sql_join 17 +#define isc_info_rsb_simulate 18 +#define isc_info_rsb_sim_cross 19 +#define isc_info_rsb_once 20 +#define isc_info_rsb_procedure 21 +#define isc_info_rsb_skip 22 +#define isc_info_rsb_virt_sequential 23 +#define isc_info_rsb_recursive 24 +#define isc_info_rsb_window 25 +#define isc_info_rsb_singular 26 +#define isc_info_rsb_writelock 27 +#define isc_info_rsb_buffer 28 +#define isc_info_rsb_hash 29 + +/**********************/ +/* Bitmap expressions */ +/**********************/ + +#define isc_info_rsb_and 1 +#define isc_info_rsb_or 2 +#define isc_info_rsb_dbkey 3 +#define isc_info_rsb_index 4 + +#define isc_info_req_active 2 +#define isc_info_req_inactive 3 +#define isc_info_req_send 4 +#define isc_info_req_receive 5 +#define isc_info_req_select 6 +#define isc_info_req_sql_stall 7 + +/**************************/ +/* Blob information items */ +/**************************/ + +#define isc_info_blob_num_segments 4 +#define isc_info_blob_max_segment 5 +#define isc_info_blob_total_length 6 +#define isc_info_blob_type 7 + +/*********************************/ +/* Transaction information items */ +/*********************************/ + +#define isc_info_tra_id 4 +#define isc_info_tra_oldest_interesting 5 +#define isc_info_tra_oldest_snapshot 6 +#define isc_info_tra_oldest_active 7 +#define isc_info_tra_isolation 8 +#define isc_info_tra_access 9 +#define isc_info_tra_lock_timeout 10 +#define fb_info_tra_dbpath 11 +#define fb_info_tra_snapshot_number 12 + +// isc_info_tra_isolation responses +#define isc_info_tra_consistency 1 +#define isc_info_tra_concurrency 2 +#define isc_info_tra_read_committed 3 + +// isc_info_tra_read_committed options +#define isc_info_tra_no_rec_version 0 +#define isc_info_tra_rec_version 1 +#define isc_info_tra_read_consistency 2 + +// isc_info_tra_access responses +#define isc_info_tra_readonly 0 +#define isc_info_tra_readwrite 1 + + +/*************************/ +/* SQL information items */ +/*************************/ + +#define isc_info_sql_select 4 +#define isc_info_sql_bind 5 +#define isc_info_sql_num_variables 6 +#define isc_info_sql_describe_vars 7 +#define isc_info_sql_describe_end 8 +#define isc_info_sql_sqlda_seq 9 +#define isc_info_sql_message_seq 10 +#define isc_info_sql_type 11 +#define isc_info_sql_sub_type 12 +#define isc_info_sql_scale 13 +#define isc_info_sql_length 14 +#define isc_info_sql_null_ind 15 +#define isc_info_sql_field 16 +#define isc_info_sql_relation 17 +#define isc_info_sql_owner 18 +#define isc_info_sql_alias 19 +#define isc_info_sql_sqlda_start 20 +#define isc_info_sql_stmt_type 21 +#define isc_info_sql_get_plan 22 +#define isc_info_sql_records 23 +#define isc_info_sql_batch_fetch 24 +#define isc_info_sql_relation_alias 25 +#define isc_info_sql_explain_plan 26 +#define isc_info_sql_stmt_flags 27 +#define isc_info_sql_stmt_timeout_user 28 +#define isc_info_sql_stmt_timeout_run 29 +#define isc_info_sql_stmt_blob_align 30 +#define isc_info_sql_exec_path_blr_bytes 31 +#define isc_info_sql_exec_path_blr_text 32 + +/*********************************/ +/* SQL information return values */ +/*********************************/ + +#define isc_info_sql_stmt_select 1 +#define isc_info_sql_stmt_insert 2 +#define isc_info_sql_stmt_update 3 +#define isc_info_sql_stmt_delete 4 +#define isc_info_sql_stmt_ddl 5 +#define isc_info_sql_stmt_get_segment 6 +#define isc_info_sql_stmt_put_segment 7 +#define isc_info_sql_stmt_exec_procedure 8 +#define isc_info_sql_stmt_start_trans 9 +#define isc_info_sql_stmt_commit 10 +#define isc_info_sql_stmt_rollback 11 +#define isc_info_sql_stmt_select_for_upd 12 +#define isc_info_sql_stmt_set_generator 13 +#define isc_info_sql_stmt_savepoint 14 + +#endif /* FIREBIRD_IMPL_INF_PUB_H */ diff --git a/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/all.h b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/all.h new file mode 100644 index 0000000..664f5ba --- /dev/null +++ b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/all.h @@ -0,0 +1,38 @@ +/* + * The contents of this file are subject to the Initial + * Developer's Public License Version 1.0 (the "License"); + * you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl. + * + * Software distributed under the License is distributed AS IS, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. + * See the License for the specific language governing rights + * and limitations under the License. + * + * The Original Code was created by Adriano dos Santos Fernandes + * for the Firebird Open Source RDBMS project. + * + * Copyright (c) 2021 Adriano dos Santos Fernandes + * and all contributors signed below. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ + +// Include headers by their facility order (see firebird/impl/msg_helper.h) +#include "jrd.h" +#include "gfix.h" +#include "dsql.h" +#include "dyn.h" +#include "gbak.h" +#include "sqlerr.h" +#include "sqlwarn.h" +#include "jrd_bugchk.h" +#include "isql.h" +#include "gsec.h" +#include "gstat.h" +#include "fbsvcmgr.h" +#include "utl.h" +#include "nbackup.h" +#include "fbtracemgr.h" diff --git a/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/dsql.h b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/dsql.h new file mode 100644 index 0000000..54a5339 --- /dev/null +++ b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/dsql.h @@ -0,0 +1,40 @@ +FB_IMPL_MSG(DSQL, 2, dsql_dbkey_from_non_table, -607, "HY", "000", "Cannot SELECT RDB$DB_KEY from a stored procedure.") +FB_IMPL_MSG(DSQL, 3, dsql_transitional_numeric, -104, "HY", "000", "Precision 10 to 18 changed from DOUBLE PRECISION in SQL dialect 1 to 64-bit scaled integer in SQL dialect 3") +FB_IMPL_MSG(DSQL, 4, dsql_dialect_warning_expr, 301, "01", "000", "Use of @1 expression that returns different results in dialect 1 and dialect 3") +FB_IMPL_MSG(DSQL, 5, sql_db_dialect_dtype_unsupport, -104, "HY", "000", "Database SQL dialect @1 does not support reference to @2 datatype") +FB_IMPL_MSG_NO_SYMBOL(DSQL, 6, "") +FB_IMPL_MSG(DSQL, 7, sql_dialect_conflict_num, -817, "HY", "000", "DB dialect @1 and client dialect @2 conflict with respect to numeric precision @3.") +FB_IMPL_MSG(DSQL, 8, dsql_warning_number_ambiguous, 301, "HY", "104", "WARNING: Numeric literal @1 is interpreted as a floating-point") +FB_IMPL_MSG(DSQL, 9, dsql_warning_number_ambiguous1, 301, "HY", "104", "value in SQL dialect 1, but as an exact numeric value in SQL dialect 3.") +FB_IMPL_MSG(DSQL, 10, dsql_warn_precision_ambiguous, 301, "HY", "104", "WARNING: NUMERIC and DECIMAL fields with precision 10 or greater are stored") +FB_IMPL_MSG(DSQL, 11, dsql_warn_precision_ambiguous1, 301, "HY", "104", "as approximate floating-point values in SQL dialect 1, but as 64-bit") +FB_IMPL_MSG(DSQL, 12, dsql_warn_precision_ambiguous2, 301, "HY", "104", "integers in SQL dialect 3.") +FB_IMPL_MSG(DSQL, 13, dsql_ambiguous_field_name, -204, "42", "702", "Ambiguous field name between @1 and @2") +FB_IMPL_MSG(DSQL, 14, dsql_udf_return_pos_err, -607, "38", "000", "External function should have return position between 1 and @1") +FB_IMPL_MSG(DSQL, 15, dsql_invalid_label, -104, "HY", "000", "Label @1 @2 in the current scope") +FB_IMPL_MSG(DSQL, 16, dsql_datatypes_not_comparable, -104, "HY", "004", "Datatypes @1are not comparable in expression @2") +FB_IMPL_MSG(DSQL, 17, dsql_cursor_invalid, -504, "24", "000", "Empty cursor name is not allowed") +FB_IMPL_MSG(DSQL, 18, dsql_cursor_redefined, -502, "24", "000", "Statement already has a cursor @1 assigned") +FB_IMPL_MSG(DSQL, 19, dsql_cursor_not_found, -502, "34", "000", "Cursor @1 is not found in the current context") +FB_IMPL_MSG(DSQL, 20, dsql_cursor_exists, -502, "24", "000", "Cursor @1 already exists in the current context") +FB_IMPL_MSG(DSQL, 21, dsql_cursor_rel_ambiguous, -502, "34", "000", "Relation @1 is ambiguous in cursor @2") +FB_IMPL_MSG(DSQL, 22, dsql_cursor_rel_not_found, -502, "34", "000", "Relation @1 is not found in cursor @2") +FB_IMPL_MSG(DSQL, 23, dsql_cursor_not_open, -504, "24", "000", "Cursor is not open") +FB_IMPL_MSG(DSQL, 24, dsql_type_not_supp_ext_tab, -607, "HY", "004", "Data type @1 is not supported for EXTERNAL TABLES. Relation '@2', field '@3'") +FB_IMPL_MSG(DSQL, 25, dsql_feature_not_supported_ods, -804, "0A", "000", "Feature not supported on ODS version older than @1.@2") +FB_IMPL_MSG(DSQL, 26, primary_key_required, -660, "22", "000", "Primary key required on table @1") +FB_IMPL_MSG(DSQL, 27, upd_ins_doesnt_match_pk, -313, "42", "000", "UPDATE OR INSERT field list does not match primary key of table @1") +FB_IMPL_MSG(DSQL, 28, upd_ins_doesnt_match_matching, -313, "42", "000", "UPDATE OR INSERT field list does not match MATCHING clause") +FB_IMPL_MSG(DSQL, 29, upd_ins_with_complex_view, -817, "54", "001", "UPDATE OR INSERT without MATCHING could not be used with views based on more than one table") +FB_IMPL_MSG(DSQL, 30, dsql_incompatible_trigger_type, -817, "42", "000", "Incompatible trigger type") +FB_IMPL_MSG(DSQL, 31, dsql_db_trigger_type_cant_change, -817, "42", "000", "Database trigger type can't be changed") +FB_IMPL_MSG(DSQL, 32, dsql_record_version_table, -607, "HY", "000", "To be used with RDB$RECORD_VERSION, @1 must be a table or a view of single table") +FB_IMPL_MSG(DSQL, 33, dsql_invalid_sqlda_version, -802, "07", "002", "SQLDA version expected between @1 and @2, found @3") +FB_IMPL_MSG(DSQL, 34, dsql_sqlvar_index, -802, "07", "002", "at SQLVAR index @1") +FB_IMPL_MSG(DSQL, 35, dsql_no_sqlind, -802, "07", "002", "empty pointer to NULL indicator variable") +FB_IMPL_MSG(DSQL, 36, dsql_no_sqldata, -802, "07", "002", "empty pointer to data") +FB_IMPL_MSG(DSQL, 37, dsql_no_input_sqlda, -802, "07", "002", "No SQLDA for input values provided") +FB_IMPL_MSG(DSQL, 38, dsql_no_output_sqlda, -802, "07", "002", "No SQLDA for output values provided") +FB_IMPL_MSG(DSQL, 39, dsql_wrong_param_num, -313, "07", "001", "Wrong number of parameters (expected @1, got @2)") +FB_IMPL_MSG(DSQL, 40, dsql_invalid_drop_ss_clause, -817, "42", "000", "Invalid DROP SQL SECURITY clause") +FB_IMPL_MSG(DSQL, 41, upd_ins_cannot_default, -313, "42", "000", "UPDATE OR INSERT value for field @1, part of the implicit or explicit MATCHING clause, cannot be DEFAULT") diff --git a/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/dyn.h b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/dyn.h new file mode 100644 index 0000000..058b217 --- /dev/null +++ b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/dyn.h @@ -0,0 +1,301 @@ +FB_IMPL_MSG_NO_SYMBOL(DYN, 1, "ODS version not supported by DYN") +FB_IMPL_MSG_NO_SYMBOL(DYN, 2, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 3, "STORE RDB$FIELD_DIMENSIONS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 4, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 5, "@1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 6, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 7, "DEFINE BLOB FILTER failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 8, "DEFINE GENERATOR failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 9, "DEFINE GENERATOR unexpected DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 10, "DEFINE FUNCTION failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 11, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 12, "DEFINE FUNCTION ARGUMENT failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 13, "STORE RDB$FIELDS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 14, "No table specified for index") +FB_IMPL_MSG_NO_SYMBOL(DYN, 15, "STORE RDB$INDEX_SEGMENTS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 16, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 17, "PRIMARY KEY column lookup failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 18, "could not find UNIQUE or PRIMARY KEY constraint in table @1 with specified columns") +FB_IMPL_MSG_NO_SYMBOL(DYN, 19, "PRIMARY KEY lookup failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 20, "could not find PRIMARY KEY index in specified table @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 21, "STORE RDB$INDICES failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 22, "STORE RDB$FIELDS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 23, "STORE RDB$RELATION_FIELDS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 24, "STORE RDB$RELATIONS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 25, "STORE RDB$USER_PRIVILEGES failed defining a table") +FB_IMPL_MSG_NO_SYMBOL(DYN, 26, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 27, "STORE RDB$RELATIONS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 28, "STORE RDB$FIELDS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 29, "STORE RDB$RELATION_FIELDS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 30, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 31, "DEFINE TRIGGER failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 32, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 33, "DEFINE TRIGGER MESSAGE failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 34, "STORE RDB$VIEW_RELATIONS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 35, "ERASE RDB$FIELDS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 36, "ERASE BLOB FILTER failed") +FB_IMPL_MSG(DYN, 37, dyn_filter_not_found, -901, "42", "000", "BLOB Filter @1 not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 38, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 39, "ERASE RDB$FUNCTION_ARGUMENTS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 40, "ERASE RDB$FUNCTIONS failed") +FB_IMPL_MSG(DYN, 41, dyn_func_not_found, -901, "42", "000", "Function @1 not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 42, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 43, "Domain @1 is used in table @2 (local name @3) and cannot be dropped") +FB_IMPL_MSG_NO_SYMBOL(DYN, 44, "ERASE RDB$FIELDS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 45, "ERASE RDB$FIELDS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 46, "Column not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 47, "ERASE RDB$INDICES failed") +FB_IMPL_MSG(DYN, 48, dyn_index_not_found, -901, "42", "000", "Index not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 49, "ERASE RDB$INDEX_SEGMENTS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 50, "No segments found for index") +FB_IMPL_MSG_NO_SYMBOL(DYN, 51, "No table specified in ERASE RFR") +FB_IMPL_MSG_NO_SYMBOL(DYN, 52, "Column @1 from table @2 is referenced in view @3") +FB_IMPL_MSG_NO_SYMBOL(DYN, 53, "ERASE RDB$RELATION_FIELDS failed") +FB_IMPL_MSG(DYN, 54, dyn_view_not_found, -901, "42", "000", "View @1 not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 55, "Column not found for table") +FB_IMPL_MSG_NO_SYMBOL(DYN, 56, "ERASE RDB$INDEX_SEGMENTS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 57, "ERASE RDB$INDICES failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 58, "ERASE RDB$RELATION_FIELDS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 59, "ERASE RDB$VIEW_RELATIONS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 60, "ERASE RDB$RELATIONS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 61, "Table not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 62, "ERASE RDB$USER_PRIVILEGES failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 63, "ERASE RDB$FILES failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 64, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 65, "ERASE RDB$TRIGGER_MESSAGES failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 66, "ERASE RDB$TRIGGERS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 67, "Trigger not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 68, "MODIFY RDB$VIEW_RELATIONS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 69, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 70, "TRIGGER NAME expected") +FB_IMPL_MSG_NO_SYMBOL(DYN, 71, "ERASE TRIGGER MESSAGE failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 72, "Trigger Message not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 73, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 74, "ERASE RDB$SECURITY_CLASSES failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 75, "Security class not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 76, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 77, "SELECT RDB$USER_PRIVILEGES failed in grant") +FB_IMPL_MSG_NO_SYMBOL(DYN, 78, "SELECT RDB$USER_PRIVILEGES failed in grant") +FB_IMPL_MSG_NO_SYMBOL(DYN, 79, "STORE RDB$USER_PRIVILEGES failed in grant") +FB_IMPL_MSG_NO_SYMBOL(DYN, 80, "Specified domain or source column does not exist") +FB_IMPL_MSG_NO_SYMBOL(DYN, 81, "Generation of column name failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 82, "Generation of index name failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 83, "Generation of trigger name failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 84, "MODIFY DATABASE failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 85, "MODIFY RDB$CHARACTER_SETS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 86, "MODIFY RDB$COLLATIONS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 87, "MODIFY RDB$FIELDS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 88, "MODIFY RDB$BLOB_FILTERS failed") +FB_IMPL_MSG(DYN, 89, dyn_domain_not_found, -901, "42", "000", "Domain not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 90, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 91, "MODIFY RDB$INDICES failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 92, "MODIFY RDB$FUNCTIONS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 93, "Index column not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 94, "MODIFY RDB$GENERATORS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 95, "MODIFY RDB$RELATION_FIELDS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 96, "Local column @1 not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 97, "add EXTERNAL FILE not allowed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 98, "drop EXTERNAL FILE not allowed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 99, "MODIFY RDB$RELATIONS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 100, "MODIFY RDB$PROCEDURE_PARAMETERS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 101, "Table column not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 102, "MODIFY TRIGGER failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 103, "TRIGGER NAME expected") +FB_IMPL_MSG_NO_SYMBOL(DYN, 104, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 105, "MODIFY TRIGGER MESSAGE failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 106, "Create metadata BLOB failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 107, "Write metadata BLOB failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 108, "Close metadata BLOB failed") +FB_IMPL_MSG(DYN, 109, dyn_cant_modify_auto_trig, -901, "42", "000", "Triggers created automatically cannot be modified") +FB_IMPL_MSG_NO_SYMBOL(DYN, 110, "unsupported DYN verb") +FB_IMPL_MSG_NO_SYMBOL(DYN, 111, "ERASE RDB$USER_PRIVILEGES failed in revoke(1)") +FB_IMPL_MSG_NO_SYMBOL(DYN, 112, "Access to RDB$USER_PRIVILEGES failed in revoke(2)") +FB_IMPL_MSG_NO_SYMBOL(DYN, 113, "ERASE RDB$USER_PRIVILEGES failed in revoke (3)") +FB_IMPL_MSG_NO_SYMBOL(DYN, 114, "Access to RDB$USER_PRIVILEGES failed in revoke (4)") +FB_IMPL_MSG_NO_SYMBOL(DYN, 115, "CREATE VIEW failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 116, " attempt to index BLOB column in INDEX @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 117, " attempt to index array column in index @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 118, "key size too big for index @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 119, "no keys for index @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 120, "Unknown columns in index @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 121, "STORE RDB$RELATION_CONSTRAINTS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 122, "STORE RDB$CHECK_CONSTRAINTS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 123, "Column: @1 not defined as NOT NULL - cannot be used in PRIMARY KEY constraint definition") +FB_IMPL_MSG_NO_SYMBOL(DYN, 124, "A column name is repeated in the definition of constraint: @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 125, "Integrity Constraint lookup failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 126, "Same set of columns cannot be used in more than one PRIMARY KEY and/or UNIQUE constraint definition") +FB_IMPL_MSG_NO_SYMBOL(DYN, 127, "STORE RDB$REF_CONSTRAINTS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 128, "No table specified in delete_constraint") +FB_IMPL_MSG_NO_SYMBOL(DYN, 129, "ERASE RDB$RELATION_CONSTRAINTS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 130, "CONSTRAINT @1 does not exist.") +FB_IMPL_MSG_NO_SYMBOL(DYN, 131, "Generation of constraint name failed") +FB_IMPL_MSG(DYN, 132, dyn_dup_table, -901, "42", "S01", "Table @1 already exists") +FB_IMPL_MSG_NO_SYMBOL(DYN, 133, "Number of referencing columns do not equal number of referenced columns") +FB_IMPL_MSG_NO_SYMBOL(DYN, 134, "STORE RDB$PROCEDURES failed") +FB_IMPL_MSG_SYMBOL(DYN, 135, dyn_dup_procedure, "Procedure @1 already exists") +FB_IMPL_MSG_NO_SYMBOL(DYN, 136, "STORE RDB$PROCEDURE_PARAMETERS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 137, "Store into system table @1 failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 138, "ERASE RDB$PROCEDURE_PARAMETERS failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 139, "ERASE RDB$PROCEDURES failed") +FB_IMPL_MSG(DYN, 140, dyn_proc_not_found, -901, "42", "000", "Procedure @1 not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 141, "MODIFY RDB$PROCEDURES failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 142, "DEFINE EXCEPTION failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 143, "ERASE EXCEPTION failed") +FB_IMPL_MSG(DYN, 144, dyn_exception_not_found, -901, "42", "000", "Exception not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 145, "MODIFY EXCEPTION failed") +FB_IMPL_MSG(DYN, 146, dyn_proc_param_not_found, -901, "42", "000", "Parameter @1 in procedure @2 not found") +FB_IMPL_MSG(DYN, 147, dyn_trig_not_found, -901, "42", "000", "Trigger @1 not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 148, "Only one data type change to the domain @1 allowed at a time") +FB_IMPL_MSG_NO_SYMBOL(DYN, 149, "Only one data type change to the field @1 allowed at a time") +FB_IMPL_MSG_NO_SYMBOL(DYN, 150, "STORE RDB$FILES failed") +FB_IMPL_MSG(DYN, 151, dyn_charset_not_found, -901, "42", "000", "Character set @1 not found") +FB_IMPL_MSG(DYN, 152, dyn_collation_not_found, -901, "42", "000", "Collation @1 not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 153, "ERASE RDB$LOG_FILES failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 154, "STORE RDB$LOG_FILES failed") +FB_IMPL_MSG(DYN, 155, dyn_role_not_found, -901, "42", "000", "Role @1 not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 156, "Difference file lookup failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 157, "DEFINE SHADOW failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 158, "MODIFY RDB$ROLES failed") +FB_IMPL_MSG(DYN, 159, dyn_name_longer, -901, "42", "000", "Name longer than database column size") +FB_IMPL_MSG_NO_SYMBOL(DYN, 160, "\"Only one constraint allowed for a domain\"") +FB_IMPL_MSG_NO_SYMBOL(DYN, 162, "Looking up column position failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 163, "A node name is not permitted in a table with external file definition") +FB_IMPL_MSG_NO_SYMBOL(DYN, 164, "Shadow lookup failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 165, "Shadow @1 already exists") +FB_IMPL_MSG_NO_SYMBOL(DYN, 166, "Cannot add file with the same name as the database or added files") +FB_IMPL_MSG_NO_SYMBOL(DYN, 167, "no grant option for privilege @1 on column @2 of table/view @3") +FB_IMPL_MSG_NO_SYMBOL(DYN, 168, "no grant option for privilege @1 on column @2 of base table/view @3") +FB_IMPL_MSG_NO_SYMBOL(DYN, 169, "no grant option for privilege @1 on table/view @2 (for column @3)") +FB_IMPL_MSG_NO_SYMBOL(DYN, 170, "no grant option for privilege @1 on base table/view @2 (for column @3)") +FB_IMPL_MSG_NO_SYMBOL(DYN, 171, "no @1 privilege with grant option on table/view @2 (for column @3)") +FB_IMPL_MSG_NO_SYMBOL(DYN, 172, "no @1 privilege with grant option on base table/view @2 (for column @3)") +FB_IMPL_MSG_NO_SYMBOL(DYN, 173, "no grant option for privilege @1 on table/view @2") +FB_IMPL_MSG_NO_SYMBOL(DYN, 174, "no @1 privilege with grant option on table/view @2") +FB_IMPL_MSG_NO_SYMBOL(DYN, 175, "table/view @1 does not exist") +FB_IMPL_MSG(DYN, 176, dyn_column_does_not_exist, -901, "42", "S22", "column @1 does not exist in table/view @2") +FB_IMPL_MSG_NO_SYMBOL(DYN, 177, "Can not alter a view") +FB_IMPL_MSG_NO_SYMBOL(DYN, 178, "EXTERNAL FILE table not supported in this context") +FB_IMPL_MSG_NO_SYMBOL(DYN, 179, "attempt to index COMPUTED BY column in INDEX @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 180, "Table Name lookup failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 181, "attempt to index a view") +FB_IMPL_MSG_NO_SYMBOL(DYN, 182, "SELECT RDB$RELATIONS failed in grant") +FB_IMPL_MSG_NO_SYMBOL(DYN, 183, "SELECT RDB$RELATION_FIELDS failed in grant") +FB_IMPL_MSG_NO_SYMBOL(DYN, 184, "SELECT RDB$RELATIONS/RDB$OWNER_NAME failed in grant") +FB_IMPL_MSG_NO_SYMBOL(DYN, 185, "SELECT RDB$USER_PRIVILEGES failed in grant") +FB_IMPL_MSG_NO_SYMBOL(DYN, 186, "SELECT RDB$VIEW_RELATIONS/RDB$RELATION_FIELDS/... failed in grant") +FB_IMPL_MSG_NO_SYMBOL(DYN, 187, "column @1 from table @2 is referenced in index @3") +FB_IMPL_MSG(DYN, 188, dyn_role_does_not_exist, -901, "28", "000", "SQL role @1 does not exist") +FB_IMPL_MSG(DYN, 189, dyn_no_grant_admin_opt, -901, "28", "000", "user @1 has no grant admin option on SQL role @2") +FB_IMPL_MSG(DYN, 190, dyn_user_not_role_member, -901, "28", "000", "user @1 is not a member of SQL role @2") +FB_IMPL_MSG(DYN, 191, dyn_delete_role_failed, -901, "28", "000", "@1 is not the owner of SQL role @2") +FB_IMPL_MSG(DYN, 192, dyn_grant_role_to_user, -901, "28", "000", "@1 is a SQL role and not a user") +FB_IMPL_MSG(DYN, 193, dyn_inv_sql_role_name, -901, "28", "000", "user name @1 could not be used for SQL role") +FB_IMPL_MSG(DYN, 194, dyn_dup_sql_role, -901, "42", "000", "SQL role @1 already exists") +FB_IMPL_MSG(DYN, 195, dyn_kywd_spec_for_role, -901, "28", "000", "keyword @1 can not be used as a SQL role name") +FB_IMPL_MSG(DYN, 196, dyn_roles_not_supported, -901, "28", "000", "SQL roles are not supported in on older versions of the database. A backup and restore of the database is required.") +FB_IMPL_MSG(DYN, 204, dyn_domain_name_exists, -612, "42", "000", "Cannot rename domain @1 to @2. A domain with that name already exists.") +FB_IMPL_MSG(DYN, 205, dyn_field_name_exists, -612, "42", "S21", "Cannot rename column @1 to @2. A column with that name already exists in table @3.") +FB_IMPL_MSG(DYN, 206, dyn_dependency_exists, -383, "42", "000", "Column @1 from table @2 is referenced in @3") +FB_IMPL_MSG(DYN, 207, dyn_dtype_invalid, -315, "42", "000", "Cannot change datatype for column @1. Changing datatype is not supported for BLOB or ARRAY columns.") +FB_IMPL_MSG(DYN, 208, dyn_char_fld_too_small, -829, "42", "000", "New size specified for column @1 must be at least @2 characters.") +FB_IMPL_MSG(DYN, 209, dyn_invalid_dtype_conversion, -829, "42", "000", "Cannot change datatype for @1. Conversion from base type @2 to @3 is not supported.") +FB_IMPL_MSG(DYN, 210, dyn_dtype_conv_invalid, -829, "42", "000", "Cannot change datatype for column @1 from a character type to a non-character type.") +FB_IMPL_MSG_SYMBOL(DYN, 211, dyn_virmemexh, "unable to allocate memory from the operating system") +FB_IMPL_MSG(DYN, 212, dyn_zero_len_id, -901, "42", "000", "Zero length identifiers are not allowed") +FB_IMPL_MSG_SYMBOL(DYN, 213, del_gen_fail, "ERASE RDB$GENERATORS failed") +FB_IMPL_MSG(DYN, 214, dyn_gen_not_found, -901, "42", "000", "Sequence @1 not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 215, "Difference file is not defined") +FB_IMPL_MSG_NO_SYMBOL(DYN, 216, "Difference file is already defined") +FB_IMPL_MSG_NO_SYMBOL(DYN, 217, "Database is already in the physical backup mode") +FB_IMPL_MSG_NO_SYMBOL(DYN, 218, "Database is not in the physical backup mode") +FB_IMPL_MSG_NO_SYMBOL(DYN, 219, "DEFINE COLLATION failed") +FB_IMPL_MSG_NO_SYMBOL(DYN, 220, "CREATE COLLATION statement is not supported in older versions of the database. A backup and restore is required.") +FB_IMPL_MSG(DYN, 221, max_coll_per_charset, -829, "2C", "000", "Maximum number of collations per character set exceeded") +FB_IMPL_MSG(DYN, 222, invalid_coll_attr, -829, "HY", "000", "Invalid collation attributes") +FB_IMPL_MSG_NO_SYMBOL(DYN, 223, "Collation @1 not installed for character set @2") +FB_IMPL_MSG_NO_SYMBOL(DYN, 224, "Cannot use the internal domain @1 as new type for field @2") +FB_IMPL_MSG_NO_SYMBOL(DYN, 225, "Default value is not allowed for array type in field @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 226, "Default value is not allowed for array type in domain @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 227, "DYN_UTIL_is_array failed for domain @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 228, "DYN_UTIL_copy_domain failed for domain @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 229, "Local column @1 doesn't have a default") +FB_IMPL_MSG_NO_SYMBOL(DYN, 230, "Local column @1 default belongs to domain @2") +FB_IMPL_MSG_NO_SYMBOL(DYN, 231, "File name is invalid") +FB_IMPL_MSG(DYN, 232, dyn_wrong_gtt_scope, -901, "HY", "000", "@1 cannot reference @2") +FB_IMPL_MSG_NO_SYMBOL(DYN, 233, "Local column @1 is computed, cannot set a default value") +FB_IMPL_MSG_SYMBOL(DYN, 234, del_coll_fail, "ERASE RDB$COLLATIONS failed") +FB_IMPL_MSG(DYN, 235, dyn_coll_used_table, -901, "HY", "000", "Collation @1 is used in table @2 (field name @3) and cannot be dropped") +FB_IMPL_MSG(DYN, 236, dyn_coll_used_domain, -901, "HY", "000", "Collation @1 is used in domain @2 and cannot be dropped") +FB_IMPL_MSG(DYN, 237, dyn_cannot_del_syscoll, -607, "HY", "000", "Cannot delete system collation") +FB_IMPL_MSG(DYN, 238, dyn_cannot_del_def_coll, -901, "HY", "000", "Cannot delete default collation of CHARACTER SET @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 239, "Domain @1 is used in procedure @2 (parameter name @3) and cannot be dropped") +FB_IMPL_MSG_NO_SYMBOL(DYN, 240, "Field @1 cannot be used twice in index @2") +FB_IMPL_MSG(DYN, 241, dyn_table_not_found, -901, "42", "000", "Table @1 not found") +FB_IMPL_MSG_NO_SYMBOL(DYN, 242, "attempt to reference a view (@1) in a foreign key") +FB_IMPL_MSG(DYN, 243, dyn_coll_used_procedure, -901, "HY", "000", "Collation @1 is used in procedure @2 (parameter name @3) and cannot be dropped") +FB_IMPL_MSG(DYN, 244, dyn_scale_too_big, -829, "42", "000", "New scale specified for column @1 must be at most @2.") +FB_IMPL_MSG(DYN, 245, dyn_precision_too_small, -829, "42", "000", "New precision specified for column @1 must be at least @2.") +FB_IMPL_MSG_NO_SYMBOL(DYN, 246, "@1 is not grantor of @2 on @3 to @4.") +FB_IMPL_MSG(DYN, 247, dyn_miss_priv_warning, 106, "42", "000", "Warning: @1 on @2 is not granted to @3.") +FB_IMPL_MSG(DYN, 248, dyn_ods_not_supp_feature, -901, "0A", "000", "Feature '@1' is not supported in ODS @2.@3") +FB_IMPL_MSG(DYN, 249, dyn_cannot_addrem_computed, -829, "42", "000", "Cannot add or remove COMPUTED from column @1") +FB_IMPL_MSG(DYN, 250, dyn_no_empty_pw, -901, "42", "000", "Password should not be empty string") +FB_IMPL_MSG(DYN, 251, dyn_dup_index, -901, "42", "S11", "Index @1 already exists") +FB_IMPL_MSG_SYMBOL(DYN, 252, dyn_locksmith_use_granted, "Only @1 or user with privilege USE_GRANTED_BY_CLAUSE can use GRANTED BY clause") +FB_IMPL_MSG_SYMBOL(DYN, 253, dyn_dup_exception, "Exception @1 already exists") +FB_IMPL_MSG_SYMBOL(DYN, 254, dyn_dup_generator, "Sequence @1 already exists") +FB_IMPL_MSG_NO_SYMBOL(DYN, 255, "ERASE RDB$USER_PRIVILEGES failed in REVOKE ALL ON ALL") +FB_IMPL_MSG(DYN, 256, dyn_package_not_found, -901, "42", "000", "Package @1 not found") +FB_IMPL_MSG(DYN, 257, dyn_schema_not_found, -901, "42", "000", "Schema @1 not found") +FB_IMPL_MSG(DYN, 258, dyn_cannot_mod_sysproc, -607, "HY", "000", "Cannot ALTER or DROP system procedure @1") +FB_IMPL_MSG(DYN, 259, dyn_cannot_mod_systrig, -607, "HY", "000", "Cannot ALTER or DROP system trigger @1") +FB_IMPL_MSG(DYN, 260, dyn_cannot_mod_sysfunc, -607, "HY", "000", "Cannot ALTER or DROP system function @1") +FB_IMPL_MSG(DYN, 261, dyn_invalid_ddl_proc, -607, "HY", "000", "Invalid DDL statement for procedure @1") +FB_IMPL_MSG(DYN, 262, dyn_invalid_ddl_trig, -607, "HY", "000", "Invalid DDL statement for trigger @1") +FB_IMPL_MSG(DYN, 263, dyn_funcnotdef_package, -901, "42", "000", "Function @1 has not been defined on the package body @2") +FB_IMPL_MSG(DYN, 264, dyn_procnotdef_package, -901, "42", "000", "Procedure @1 has not been defined on the package body @2") +FB_IMPL_MSG(DYN, 265, dyn_funcsignat_package, -901, "42", "000", "Function @1 has a signature mismatch on package body @2") +FB_IMPL_MSG(DYN, 266, dyn_procsignat_package, -901, "42", "000", "Procedure @1 has a signature mismatch on package body @2") +FB_IMPL_MSG(DYN, 267, dyn_defvaldecl_package_proc, -901, "42", "000", "Default values for parameters are not allowed in the definition of a previously declared packaged procedure @1.@2") +FB_IMPL_MSG_SYMBOL(DYN, 268, dyn_dup_function, "Function @1 already exists") +FB_IMPL_MSG(DYN, 269, dyn_package_body_exists, -901, "42", "000", "Package body @1 already exists") +FB_IMPL_MSG(DYN, 270, dyn_invalid_ddl_func, -607, "HY", "000", "Invalid DDL statement for function @1") +FB_IMPL_MSG(DYN, 271, dyn_newfc_oldsyntax, -901, "42", "000", "Cannot alter new style function @1 with ALTER EXTERNAL FUNCTION. Use ALTER FUNCTION instead.") +FB_IMPL_MSG_NO_SYMBOL(DYN, 272, "Cannot delete system generator @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 273, "Identity column @1 of table @2 must be of exact number type with zero scale") +FB_IMPL_MSG_NO_SYMBOL(DYN, 274, "Identity column @1 of table @2 cannot be changed to NULLable") +FB_IMPL_MSG_NO_SYMBOL(DYN, 275, "Identity column @1 of table @2 cannot have default value") +FB_IMPL_MSG_NO_SYMBOL(DYN, 276, "Domain @1 must be of exact number type with zero scale because it's used in an identity column") +FB_IMPL_MSG_NO_SYMBOL(DYN, 277, "Generation of generator name failed") +FB_IMPL_MSG(DYN, 278, dyn_func_param_not_found, -901, "42", "000", "Parameter @1 in function @2 not found") +FB_IMPL_MSG(DYN, 279, dyn_routine_param_not_found, -901, "42", "000", "Parameter @1 of routine @2 not found") +FB_IMPL_MSG(DYN, 280, dyn_routine_param_ambiguous, -901, "42", "000", "Parameter @1 of routine @2 is ambiguous (found in both procedures and functions). Use a specifier keyword.") +FB_IMPL_MSG(DYN, 281, dyn_coll_used_function, -901, "HY", "000", "Collation @1 is used in function @2 (parameter name @3) and cannot be dropped") +FB_IMPL_MSG(DYN, 282, dyn_domain_used_function, -901, "HY", "000", "Domain @1 is used in function @2 (parameter name @3) and cannot be dropped") +FB_IMPL_MSG(DYN, 283, dyn_alter_user_no_clause, -901, "42", "000", "ALTER USER requires at least one clause to be specified") +FB_IMPL_MSG_NO_SYMBOL(DYN, 284, "Cannot delete system SQL role @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 285, "Column @1 is not an identity column") +FB_IMPL_MSG(DYN, 286, dyn_duplicate_package_item, -901, "42", "000", "Duplicate @1 @2") +FB_IMPL_MSG(DYN, 287, dyn_cant_modify_sysobj, -901, "42", "000", "System @1 @2 cannot be modified") +FB_IMPL_MSG(DYN, 288, dyn_cant_use_zero_increment, -901, "42", "000", "INCREMENT BY 0 is an illegal option for sequence @1") +FB_IMPL_MSG(DYN, 289, dyn_cant_use_in_foreignkey, -901, "42", "000", "Can't use @1 in FOREIGN KEY constraint") +FB_IMPL_MSG(DYN, 290, dyn_defvaldecl_package_func, -901, "42", "000", "Default values for parameters are not allowed in the definition of a previously declared packaged function @1.@2") +FB_IMPL_MSG_SYMBOL(DYN, 291, dyn_create_user_no_password, "Password must be specified when creating user") +FB_IMPL_MSG(DYN, 292, dyn_cyclic_role, -901, "42", "000", "role @1 can not be granted to role @2") +FB_IMPL_MSG_NO_SYMBOL(DYN, 293, "DROP SYSTEM PRIVILEGES should not be used in CREATE ROLE operator") +FB_IMPL_MSG_NO_SYMBOL(DYN, 294, "Access to SYSTEM PRIVILEGES in ROLES denied to @1") +FB_IMPL_MSG_NO_SYMBOL(DYN, 295, "Only @1, DB owner @2 or user with privilege USE_GRANTED_BY_CLAUSE can use GRANTED BY clause") +FB_IMPL_MSG(DYN, 296, dyn_cant_use_zero_inc_ident, -901, "42", "000", "INCREMENT BY 0 is an illegal option for identity column @1 of table @2") +FB_IMPL_MSG_SYMBOL(DYN, 297, dyn_concur_alter_database, "Concurrent ALTER DATABASE is not supported") +FB_IMPL_MSG_SYMBOL(DYN, 298, dyn_incompat_alter_database, "Incompatible ALTER DATABASE clauses: '@1' and '@2'") +FB_IMPL_MSG(DYN, 299, dyn_no_ddl_grant_opt_priv, -901, "42", "000", "no @1 privilege with grant option on DDL @2") +FB_IMPL_MSG(DYN, 300, dyn_no_grant_opt_priv, -901, "42", "000", "no @1 privilege with grant option on object @2") +FB_IMPL_MSG(DYN, 301, dyn_func_not_exist, -901, "42", "000", "Function @1 does not exist") +FB_IMPL_MSG(DYN, 302, dyn_proc_not_exist, -901, "42", "000", "Procedure @1 does not exist") +FB_IMPL_MSG(DYN, 303, dyn_pack_not_exist, -901, "42", "000", "Package @1 does not exist") +FB_IMPL_MSG(DYN, 304, dyn_trig_not_exist, -901, "42", "000", "Trigger @1 does not exist") +FB_IMPL_MSG(DYN, 305, dyn_view_not_exist, -901, "42", "000", "View @1 does not exist") +FB_IMPL_MSG(DYN, 306, dyn_rel_not_exist, -901, "42", "000", "Table @1 does not exist") +FB_IMPL_MSG(DYN, 307, dyn_exc_not_exist, -901, "42", "000", "Exception @1 does not exist") +FB_IMPL_MSG(DYN, 308, dyn_gen_not_exist, -901, "42", "000", "Generator/Sequence @1 does not exist") +FB_IMPL_MSG(DYN, 309, dyn_fld_not_exist, -901, "42", "000", "Field @1 of table @2 does not exist") diff --git a/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/fbsvcmgr.h b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/fbsvcmgr.h new file mode 100644 index 0000000..1d610f3 --- /dev/null +++ b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/fbsvcmgr.h @@ -0,0 +1,61 @@ +FB_IMPL_MSG(FBSVCMGR, 1, fbsvcmgr_bad_am, -901, "00", "000", "Wrong value for access mode") +FB_IMPL_MSG(FBSVCMGR, 2, fbsvcmgr_bad_wm, -901, "00", "000", "Wrong value for write mode") +FB_IMPL_MSG(FBSVCMGR, 3, fbsvcmgr_bad_rs, -901, "00", "000", "Wrong value for reserve space") +FB_IMPL_MSG(FBSVCMGR, 4, fbsvcmgr_info_err, -901, "00", "000", "Unknown tag (@1) in info_svr_db_info block after isc_svc_query()") +FB_IMPL_MSG(FBSVCMGR, 5, fbsvcmgr_query_err, -901, "00", "000", "Unknown tag (@1) in isc_svc_query() results") +FB_IMPL_MSG(FBSVCMGR, 6, fbsvcmgr_switch_unknown, -901, "00", "000", "Unknown switch \"@1\"") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 7, "Service Manager Version") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 8, "Server version") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 9, "Server implementation") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 10, "Path to firebird.msg") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 11, "Server root") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 12, "Path to lock files") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 13, "Security database") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 14, "Databases") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 15, " Database in use") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 16, " Number of attachments") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 17, " Number of databases") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 18, "Information truncated") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 19, "Usage: fbsvcmgr manager-name switches...") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 20, "Manager-name should be service_mgr, may be prefixed with host name") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 21, "according to common rules (host:service_mgr, \\\\host\\service_mgr).") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 22, "Switches exactly match SPB tags, used in abbreviated form.") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 23, "Remove isc_, spb_ and svc_ parts of tag and you will get the switch.") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 24, "For example: isc_action_svc_backup is specified as action_backup,") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 25, " isc_spb_dbname => dbname,") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 26, " isc_info_svc_implementation => info_implementation,") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 27, " isc_spb_prp_db_online => prp_db_online and so on.") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 28, "You may specify single action or multiple info items when calling fbsvcmgr once.") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 29, "Full command line samples:") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 30, "fbsvcmgr service_mgr user sysdba password masterkey action_db_stats dbname employee sts_hdr_pages") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 31, " (will list header info in database employee on local machine)") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 32, "fbsvcmgr yourserver:service_mgr user sysdba password masterkey info_server_version info_svr_db_info") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 33, " (will show firebird version and databases usage on yourserver)") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 34, "Transaction in limbo") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 35, "Multidatabase transaction in limbo") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 36, "Host Site") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 37, "Transaction") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 38, "has been prepared") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 39, "has been committed") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 40, "has been rolled back") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 41, "is not available") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 42, "Remote Site") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 43, "Database Path") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 44, "Automated recovery would commit this transaction") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 45, "Automated recovery would rollback this transaction") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 46, "No idea should it be commited or rolled back") +FB_IMPL_MSG(FBSVCMGR, 47, fbsvcmgr_bad_sm, -901, "00", "000", "Wrong value for shutdown mode") +FB_IMPL_MSG(FBSVCMGR, 48, fbsvcmgr_fp_open, -901, "00", "000", "could not open file @1") +FB_IMPL_MSG(FBSVCMGR, 49, fbsvcmgr_fp_read, -901, "00", "000", "could not read file @1") +FB_IMPL_MSG(FBSVCMGR, 50, fbsvcmgr_fp_empty, -901, "00", "000", "empty file @1") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 51, "Firebird Services Manager version @1") +FB_IMPL_MSG(FBSVCMGR, 52, fbsvcmgr_bad_arg, -901, "00", "000", "Invalid or missing parameter for switch @1") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 53, "To get full list of known services run with -? switch") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 54, "Attaching to services manager:") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 55, "Information requests:") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 56, "Actions:") +FB_IMPL_MSG_NO_SYMBOL(FBSVCMGR, 57, "Server capabilities:") +FB_IMPL_MSG(FBSVCMGR, 58, fbsvcmgr_info_limbo, -901, "00", "000", "Unknown tag (@1) in isc_info_svc_limbo_trans block after isc_svc_query()") +FB_IMPL_MSG(FBSVCMGR, 59, fbsvcmgr_limbo_state, -901, "00", "000", "Unknown tag (@1) in isc_spb_tra_state block after isc_svc_query()") +FB_IMPL_MSG(FBSVCMGR, 60, fbsvcmgr_limbo_advise, -901, "00", "000", "Unknown tag (@1) in isc_spb_tra_advise block after isc_svc_query()") +FB_IMPL_MSG(FBSVCMGR, 61, fbsvcmgr_bad_rm, -901, "00", "000", "Wrong value for replica mode") diff --git a/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/fbtracemgr.h b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/fbtracemgr.h new file mode 100644 index 0000000..fa4f34f --- /dev/null +++ b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/fbtracemgr.h @@ -0,0 +1,40 @@ +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 1, "Firebird Trace Manager version @1") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 2, "ERROR: ") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 3, "Firebird Trace Manager.") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 4, "Usage: fbtracemgr []") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 5, "Actions:") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 6, " -STA[RT] Start trace session") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 7, " -STO[P] Stop trace session") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 8, " -SU[SPEND] Suspend trace session") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 9, " -R[ESUME] Resume trace session") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 10, " -L[IST] List existing trace sessions") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 11, " -Z Show program version") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 12, "Action parameters:") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 13, " -N[AME] Session name") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 14, " -I[D] Session ID") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 15, " -C[ONFIG] Trace configuration file name") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 16, "Connection parameters:") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 17, " -SE[RVICE] Service name") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 18, " -U[SER] User name") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 19, " -P[ASSWORD] Password") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 20, " -FE[TCH] Fetch password from file") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 21, " -T[RUSTED] Force trusted authentication") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 22, "Examples:") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 23, " fbtracemgr -SE remote_host:service_mgr -USER SYSDBA -PASS masterkey -LIST") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 24, " fbtracemgr -SE service_mgr -START -NAME my_trace -CONFIG my_cfg.txt") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 25, " fbtracemgr -SE service_mgr -SUSPEND -ID 2") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 26, " fbtracemgr -SE service_mgr -RESUME -ID 2") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 27, " fbtracemgr -SE service_mgr -STOP -ID 4") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 28, "Notes:") +FB_IMPL_MSG_NO_SYMBOL(FBTRACEMGR, 29, " Press CTRL+C to stop interactive trace session") +FB_IMPL_MSG(FBTRACEMGR, 30, trace_conflict_acts, -901, "00", "000", "conflicting actions \"@1\" and \"@2\" found") +FB_IMPL_MSG(FBTRACEMGR, 31, trace_act_notfound, -901, "00", "000", "action switch not found") +FB_IMPL_MSG(FBTRACEMGR, 32, trace_switch_once, -901, "00", "000", "switch \"@1\" must be set only once") +FB_IMPL_MSG(FBTRACEMGR, 33, trace_param_val_miss, -901, "00", "000", "value for switch \"@1\" is missing") +FB_IMPL_MSG(FBTRACEMGR, 34, trace_param_invalid, -901, "00", "000", "invalid value (\"@1\") for switch \"@2\"") +FB_IMPL_MSG(FBTRACEMGR, 35, trace_switch_unknown, -901, "00", "000", "unknown switch \"@1\" encountered") +FB_IMPL_MSG(FBTRACEMGR, 36, trace_switch_svc_only, -901, "00", "000", "switch \"@1\" can be used by service only") +FB_IMPL_MSG(FBTRACEMGR, 37, trace_switch_user_only, -901, "00", "000", "switch \"@1\" can be used by interactive user only") +FB_IMPL_MSG(FBTRACEMGR, 38, trace_switch_param_miss, -901, "00", "000", "mandatory parameter \"@1\" for switch \"@2\" is missing") +FB_IMPL_MSG(FBTRACEMGR, 39, trace_param_act_notcompat, -901, "00", "000", "parameter \"@1\" is incompatible with action \"@2\"") +FB_IMPL_MSG(FBTRACEMGR, 40, trace_mandatory_switch_miss, -901, "00", "000", "mandatory switch \"@1\" is missing") diff --git a/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/gbak.h b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/gbak.h new file mode 100644 index 0000000..ea6291a --- /dev/null +++ b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/gbak.h @@ -0,0 +1,408 @@ +FB_IMPL_MSG_NO_SYMBOL(GBAK, 0, "could not locate appropriate error message") +FB_IMPL_MSG(GBAK, 1, gbak_unknown_switch, -901, "00", "000", "found unknown switch") +FB_IMPL_MSG(GBAK, 2, gbak_page_size_missing, -901, "00", "000", "page size parameter missing") +FB_IMPL_MSG(GBAK, 3, gbak_page_size_toobig, -901, "00", "000", "Page size specified (@1) greater than limit (32768 bytes)") +FB_IMPL_MSG(GBAK, 4, gbak_redir_ouput_missing, -901, "00", "000", "redirect location for output is not specified") +FB_IMPL_MSG(GBAK, 5, gbak_switches_conflict, -901, "00", "000", "conflicting switches for backup/restore") +FB_IMPL_MSG(GBAK, 6, gbak_unknown_device, -901, "00", "000", "device type @1 not known") +FB_IMPL_MSG(GBAK, 7, gbak_no_protection, -901, "00", "000", "protection is not there yet") +FB_IMPL_MSG(GBAK, 8, gbak_page_size_not_allowed, -901, "00", "000", "page size is allowed only on restore or create") +FB_IMPL_MSG(GBAK, 9, gbak_multi_source_dest, -901, "00", "000", "multiple sources or destinations specified") +FB_IMPL_MSG(GBAK, 10, gbak_filename_missing, -901, "00", "000", "requires both input and output filenames") +FB_IMPL_MSG(GBAK, 11, gbak_dup_inout_names, -901, "00", "000", "input and output have the same name. Disallowed.") +FB_IMPL_MSG(GBAK, 12, gbak_inv_page_size, -901, "00", "000", "expected page size, encountered \"@1\"") +FB_IMPL_MSG(GBAK, 13, gbak_db_specified, -901, "00", "000", "REPLACE specified, but the first file @1 is a database") +FB_IMPL_MSG(GBAK, 14, gbak_db_exists, -901, "00", "000", "database @1 already exists. To replace it, use the -REP switch") +FB_IMPL_MSG(GBAK, 15, gbak_unk_device, -901, "00", "000", "device type not specified") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 16, "cannot create APOLLO tape descriptor file @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 17, "cannot set APOLLO tape descriptor attribute for @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 18, "cannot create APOLLO cartridge descriptor file @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 19, "cannot close APOLLO tape descriptor file @1") +FB_IMPL_MSG(GBAK, 20, gbak_blob_info_failed, -901, "00", "000", "gds_$blob_info failed") +FB_IMPL_MSG(GBAK, 21, gbak_unk_blob_item, -901, "00", "000", "do not understand BLOB INFO item @1") +FB_IMPL_MSG(GBAK, 22, gbak_get_seg_failed, -901, "00", "000", "gds_$get_segment failed") +FB_IMPL_MSG(GBAK, 23, gbak_close_blob_failed, -901, "00", "000", "gds_$close_blob failed") +FB_IMPL_MSG(GBAK, 24, gbak_open_blob_failed, -901, "00", "000", "gds_$open_blob failed") +FB_IMPL_MSG(GBAK, 25, gbak_put_blr_gen_id_failed, -901, "00", "000", "Failed in put_blr_gen_id") +FB_IMPL_MSG(GBAK, 26, gbak_unk_type, -901, "00", "000", "data type @1 not understood") +FB_IMPL_MSG(GBAK, 27, gbak_comp_req_failed, -901, "00", "000", "gds_$compile_request failed") +FB_IMPL_MSG(GBAK, 28, gbak_start_req_failed, -901, "00", "000", "gds_$start_request failed") +FB_IMPL_MSG(GBAK, 29, gbak_rec_failed, -901, "00", "000", "gds_$receive failed") +FB_IMPL_MSG(GBAK, 30, gbak_rel_req_failed, -901, "00", "000", "gds_$release_request failed") +FB_IMPL_MSG(GBAK, 31, gbak_db_info_failed, -901, "00", "000", "gds_$database_info failed") +FB_IMPL_MSG(GBAK, 32, gbak_no_db_desc, -901, "00", "000", "Expected database description record") +FB_IMPL_MSG(GBAK, 33, gbak_db_create_failed, -901, "00", "000", "failed to create database @1") +FB_IMPL_MSG(GBAK, 34, gbak_decomp_len_error, -901, "00", "000", "RESTORE: decompression length error") +FB_IMPL_MSG(GBAK, 35, gbak_tbl_missing, -901, "00", "000", "cannot find table @1") +FB_IMPL_MSG(GBAK, 36, gbak_blob_col_missing, -901, "00", "000", "Cannot find column for BLOB") +FB_IMPL_MSG(GBAK, 37, gbak_create_blob_failed, -901, "00", "000", "gds_$create_blob failed") +FB_IMPL_MSG(GBAK, 38, gbak_put_seg_failed, -901, "00", "000", "gds_$put_segment failed") +FB_IMPL_MSG(GBAK, 39, gbak_rec_len_exp, -901, "00", "000", "expected record length") +FB_IMPL_MSG(GBAK, 40, gbak_inv_rec_len, -901, "00", "000", "wrong length record, expected @1 encountered @2") +FB_IMPL_MSG(GBAK, 41, gbak_exp_data_type, -901, "00", "000", "expected data attribute") +FB_IMPL_MSG(GBAK, 42, gbak_gen_id_failed, -901, "00", "000", "Failed in store_blr_gen_id") +FB_IMPL_MSG(GBAK, 43, gbak_unk_rec_type, -901, "00", "000", "do not recognize record type @1") +FB_IMPL_MSG(GBAK, 44, gbak_inv_bkup_ver, -901, "00", "000", "Expected backup version 1..10. Found @1") +FB_IMPL_MSG(GBAK, 45, gbak_missing_bkup_desc, -901, "00", "000", "expected backup description record") +FB_IMPL_MSG(GBAK, 46, gbak_string_trunc, -901, "00", "000", "string truncated") +FB_IMPL_MSG(GBAK, 47, gbak_cant_rest_record, -901, "00", "000", "warning -- record could not be restored") +FB_IMPL_MSG(GBAK, 48, gbak_send_failed, -901, "00", "000", "gds_$send failed") +FB_IMPL_MSG(GBAK, 49, gbak_no_tbl_name, -901, "00", "000", "no table name for data") +FB_IMPL_MSG(GBAK, 50, gbak_unexp_eof, -901, "00", "000", "unexpected end of file on backup file") +FB_IMPL_MSG(GBAK, 51, gbak_db_format_too_old, -901, "00", "000", "database format @1 is too old to restore to") +FB_IMPL_MSG(GBAK, 52, gbak_inv_array_dim, -901, "00", "000", "array dimension for column @1 is invalid") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 53, "expected array version number @1 but instead found @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 54, "expected array dimension @1 but instead found @2") +FB_IMPL_MSG(GBAK, 55, gbak_xdr_len_expected, -901, "00", "000", "Expected XDR record length") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 56, "Unexpected I/O error while @1 backup file") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 57, "adding file @1, starting at page @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 58, "array") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 59, "backup") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 60, " @1B(ACKUP_DATABASE) backup database to file") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 61, " backup file is compressed") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 62, " @1D(EVICE) backup file device type on APOLLO (CT or MT)") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 63, " @1M(ETA_DATA) backup or restore metadata only") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 64, "blob") +FB_IMPL_MSG(GBAK, 65, gbak_open_bkup_error, -901, "00", "000", "cannot open backup file @1") +FB_IMPL_MSG(GBAK, 66, gbak_open_error, -901, "00", "000", "cannot open status and error output file @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 67, "closing file, committing, and finishing") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 68, "committing metadata") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 69, "commit failed on table @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 70, "committing secondary files") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 71, "creating index @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 72, "committing data for table @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 73, " @1C(REATE_DATABASE) create database from backup file (restore)") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 74, "created database @1, page_size @2 bytes") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 75, "creating file @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 76, "creating indexes") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 77, "database @1 has a page size of @2 bytes.") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 78, " @1I(NACTIVE) deactivate indexes during restore") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 79, "do not understand BLOB INFO item @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 80, "do not recognize @1 attribute @2 -- continuing") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 81, "error accessing BLOB column @1 -- continuing") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 82, "Exiting before completion due to errors") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 83, "Exiting before completion due to errors") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 84, "column") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 85, "file") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 86, "file length") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 87, "filter") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 88, "finishing, closing, and going home") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 89, "function") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 90, "function argument") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 91, "gbak version @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 92, "domain") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 93, "index") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 94, "trigger @1 is invalid") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 95, "legal switches are:") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 96, "length given for initial file (@1) is less than minimum (@2)") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 97, " @1E(XPAND) no data compression") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 98, " @1L(IMBO) ignore transactions in limbo") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 99, " @1O(NE_AT_A_TIME) restore one table at a time") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 100, "opened file @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 101, " @1P(AGE_SIZE) override default page size") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 102, "page size") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 103, "page size specified (@1 bytes) rounded up to @2 bytes") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 104, " @1Z print version number") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 105, "privilege") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 106, " @1 records ignored") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 107, " @1 records restored") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 108, "@1 records written") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 109, " @1Y redirect/suppress status message output") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 110, "Reducing the database page size from @1 bytes to @2 bytes") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 111, "table") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 112, " @1REP(LACE_DATABASE) replace database from backup file (restore)") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 113, " @1V(ERIFY) report each action taken") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 114, "restore failed for record in table @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 115, " restoring column @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 116, " restoring file @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 117, " restoring filter @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 118, "restoring function @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 119, " restoring argument for function @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 120, " restoring gen id value of: @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 121, "restoring domain @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 122, " restoring index @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 123, " restoring privilege for user @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 124, "restoring data for table @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 125, "restoring security class @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 126, " restoring trigger @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 127, " restoring trigger message for @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 128, " restoring type @1 for column @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 129, "started transaction") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 130, "starting transaction") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 131, "security class") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 132, "switches can be abbreviated to the unparenthesized characters") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 133, "transportable backup -- data in XDR format") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 134, "trigger") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 135, "trigger message") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 136, "trigger type") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 137, "unknown switch \"@1\"") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 138, "validation error on column in table @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 139, " Version(s) for database \"@1\"") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 140, "view") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 141, " writing argument for function @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 142, " writing data for table @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 143, " writing gen id of: @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 144, " writing column @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 145, " writing filter @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 146, "writing filters") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 147, " writing function @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 148, "writing functions") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 149, " writing domain @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 150, "writing domains") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 151, " writing index @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 152, " writing privilege for user @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 153, " writing table @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 154, "writing tables") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 155, " writing security class @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 156, " writing trigger @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 157, " writing trigger message for @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 158, "writing trigger messages") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 159, "writing triggers") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 160, " writing type @1 for column @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 161, "writing types") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 162, "writing shadow files") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 163, " writing shadow file @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 164, "writing id generators") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 165, " writing generator @1 value @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 166, "readied database @1 for backup") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 167, "restoring table @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 168, "type") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 169, "gbak:") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 170, "committing metadata for table @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 171, "error committing metadata for table @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 172, " @1K(ILL) restore without creating shadows") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 173, "cannot commit index @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 174, "cannot commit files") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 175, " @1T(RANSPORTABLE) transportable backup -- data in XDR format") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 176, "closing file, committing, and finishing. @1 bytes written") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 177, " @1G(ARBAGE_COLLECT) inhibit garbage collection") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 178, " @1IG(NORE) ignore bad checksums") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 179, " column @1 used in index @2 seems to have vanished") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 180, "index @1 omitted because @2 of the expected @3 keys were found") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 181, " @1FA(CTOR) blocking factor") +FB_IMPL_MSG(GBAK, 182, gbak_missing_block_fac, -901, "00", "000", "blocking factor parameter missing") +FB_IMPL_MSG(GBAK, 183, gbak_inv_block_fac, -901, "00", "000", "expected blocking factor, encountered \"@1\"") +FB_IMPL_MSG(GBAK, 184, gbak_block_fac_specified, -901, "00", "000", "a blocking factor may not be used in conjunction with device CT") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 185, "restoring generator @1 value: @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 186, " @1OL(D_DESCRIPTIONS) save old style metadata descriptions") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 187, " @1N(O_VALIDITY) do not restore database validity conditions") +FB_IMPL_MSG(GBAK, 188, gbak_missing_username, -901, "00", "000", "user name parameter missing") +FB_IMPL_MSG(GBAK, 189, gbak_missing_password, -901, "00", "000", "password parameter missing") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 190, " @1PAS(SWORD) Firebird password") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 191, " @1USER Firebird user name") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 192, "writing stored procedures") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 193, "writing stored procedure @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 194, "writing parameter @1 for stored procedure") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 195, "restoring stored procedure @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 196, " restoring parameter @1 for stored procedure") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 197, "writing exceptions") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 198, "writing exception @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 199, "restoring exception @1") +FB_IMPL_MSG(GBAK, 200, gbak_missing_skipped_bytes, -901, "00", "000", " missing parameter for the number of bytes to be skipped") +FB_IMPL_MSG(GBAK, 201, gbak_inv_skipped_bytes, -901, "00", "000", "expected number of bytes to be skipped, encountered \"@1\"") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 202, "adjusting an invalid decompression length from @1 to @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 203, "skipped @1 bytes after reading a bad attribute @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 204, " @1S(KIP_BAD_DATA) skip number of bytes after reading bad data") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 205, "skipped @1 bytes looking for next valid attribute, encountered attribute @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 206, "writing table constraints") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 207, "writing constraint @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 208, "table constraint") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 209, "writing referential constraints") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 210, "writing check constraints") +FB_IMPL_MSG_SYMBOL(GBAK, 211, msgVerbose_write_charsets, "writing character sets") +FB_IMPL_MSG_SYMBOL(GBAK, 212, msgVerbose_write_collations, "writing collations") +FB_IMPL_MSG(GBAK, 213, gbak_err_restore_charset, -901, "00", "000", "character set") +FB_IMPL_MSG_SYMBOL(GBAK, 214, msgVerbose_restore_charset, "writing character set @1") +FB_IMPL_MSG(GBAK, 215, gbak_err_restore_collation, -901, "00", "000", "collation") +FB_IMPL_MSG_SYMBOL(GBAK, 216, msgVerbose_restore_collation, "writing collation @1") +FB_IMPL_MSG(GBAK, 220, gbak_read_error, -901, "00", "000", "Unexpected I/O error while reading from backup file") +FB_IMPL_MSG(GBAK, 221, gbak_write_error, -901, "00", "000", "Unexpected I/O error while writing to backup file") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 222, "\n\nCould not open file name \"@1\"") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 223, "\n\nCould not write to file \"@1\"") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 224, "\n\nCould not read from file \"@1\"") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 225, "Done with volume #@1, \"@2\"") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 226, " Press return to reopen that file, or type a new\n name followed by return to open a different file.") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 227, "Type a file name to open and hit return") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 228, " Name: ") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 229, "\n\nERROR: Backup incomplete") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 230, "Expected backup start time @1, found @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 231, "Expected backup database @1, found @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 232, "Expected volume number @1, found volume @2") +FB_IMPL_MSG(GBAK, 233, gbak_db_in_use, -901, "00", "000", "could not drop database @1 (no privilege or database might be in use)") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 234, "Skipped bad security class entry: @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 235, "Unknown V3 SUB_TYPE: @1 in FIELD: @2.") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 236, "Converted V3 sub_type: @1 to character_set_id: @2 and collate_id: @3.") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 237, "Converted V3 scale: @1 to character_set_id: @2 and callate_id: @3.") +FB_IMPL_MSG(GBAK, 238, gbak_sysmemex, -901, "00", "000", "System memory exhausted") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 239, " @1NT Non-Transportable backup file format") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 240, "Index \"@1\" failed to activate because:") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 241, " The unique index has duplicate values or NULLs.") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 242, " Delete or Update duplicate values or NULLs, and activate index with") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 243, " ALTER INDEX \"@1\" ACTIVE;") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 244, " Not enough disk space to create the sort file for an index.") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 245, " Set the TMP environment variable to a directory on a filesystem that does have enough space, and activate index with") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 246, "Database is not online due to failure to activate one or more indices.") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 247, "Run gfix -online to bring database online without active indices.") +FB_IMPL_MSG_SYMBOL(GBAK, 248, write_role_1, "writing SQL roles") +FB_IMPL_MSG_SYMBOL(GBAK, 249, write_role_2, " writing SQL role: @1") +FB_IMPL_MSG(GBAK, 250, gbak_restore_role_failed, -901, "00", "000", "SQL role") +FB_IMPL_MSG_SYMBOL(GBAK, 251, restore_role, " restoring SQL role: @1") +FB_IMPL_MSG_SYMBOL(GBAK, 252, gbak_role_op, " @1RO(LE) Firebird SQL role") +FB_IMPL_MSG(GBAK, 253, gbak_role_op_missing, -901, "00", "000", "SQL role parameter missing") +FB_IMPL_MSG_SYMBOL(GBAK, 254, gbak_convert_ext_tables, " @1CO(NVERT) backup external files as tables") +FB_IMPL_MSG_SYMBOL(GBAK, 255, gbak_warning, "gbak: WARNING:") +FB_IMPL_MSG_SYMBOL(GBAK, 256, gbak_error, "gbak: ERROR:") +FB_IMPL_MSG_SYMBOL(GBAK, 257, gbak_page_buffers, " @1BU(FFERS) override page buffers default") +FB_IMPL_MSG(GBAK, 258, gbak_page_buffers_missing, -901, "00", "000", "page buffers parameter missing") +FB_IMPL_MSG(GBAK, 259, gbak_page_buffers_wrong_param, -901, "00", "000", "expected page buffers, encountered \"@1\"") +FB_IMPL_MSG(GBAK, 260, gbak_page_buffers_restore, -901, "00", "000", "page buffers is allowed only on restore or create") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 261, "Starting with volume #@1, \"@2\"") +FB_IMPL_MSG(GBAK, 262, gbak_inv_size, -901, "00", "000", "size specification either missing or incorrect for file @1") +FB_IMPL_MSG(GBAK, 263, gbak_file_outof_sequence, -901, "00", "000", "file @1 out of sequence") +FB_IMPL_MSG(GBAK, 264, gbak_join_file_missing, -901, "00", "000", "can't join -- one of the files missing") +FB_IMPL_MSG(GBAK, 265, gbak_stdin_not_supptd, -901, "00", "000", " standard input is not supported when using join operation") +FB_IMPL_MSG(GBAK, 266, gbak_stdout_not_supptd, -901, "00", "000", "standard output is not supported when using split operation or in verbose mode") +FB_IMPL_MSG(GBAK, 267, gbak_bkup_corrupt, -901, "00", "000", "backup file @1 might be corrupt") +FB_IMPL_MSG(GBAK, 268, gbak_unk_db_file_spec, -901, "00", "000", "database file specification missing") +FB_IMPL_MSG(GBAK, 269, gbak_hdr_write_failed, -901, "00", "000", "can't write a header record to file @1") +FB_IMPL_MSG(GBAK, 270, gbak_disk_space_ex, -901, "00", "000", "free disk space exhausted") +FB_IMPL_MSG(GBAK, 271, gbak_size_lt_min, -901, "00", "000", "file size given (@1) is less than minimum allowed (@2)") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 272, "Warning -- free disk space exhausted for file @1, the rest of the bytes (@2) will be written to file @3") +FB_IMPL_MSG(GBAK, 273, gbak_svc_name_missing, -901, "00", "000", "service name parameter missing") +FB_IMPL_MSG(GBAK, 274, gbak_not_ownr, -901, "00", "000", "Cannot restore over current database, must be SYSDBA or owner of the existing database.") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 275, "") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 276, " @1USE_(ALL_SPACE) do not reserve space for record versions") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 277, " @1SE(RVICE) use services manager") +FB_IMPL_MSG_SYMBOL(GBAK, 278, gbak_opt_mode, " @1MO(DE) \"read_only\" or \"read_write\" access") +FB_IMPL_MSG(GBAK, 279, gbak_mode_req, -901, "00", "000", "\"read_only\" or \"read_write\" required") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 280, "setting database to read-only access") +FB_IMPL_MSG(GBAK, 281, gbak_just_data, -901, "00", "000", "just data ignore all constraints etc.") +FB_IMPL_MSG(GBAK, 282, gbak_data_only, -901, "00", "000", "restoring data only ignoring foreign key, unique, not null & other constraints") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 283, "closing file, committing, and finishing. @1 bytes written") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 284, " @1R(ECREATE_DATABASE) [O(VERWRITE)] create (or replace if OVERWRITE used)\\n database from backup file (restore)") +FB_IMPL_MSG_SYMBOL(GBAK, 285, gbak_activating_idx, " activating and creating deferred index @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 286, "check constraint") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 287, "exception") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 288, "array dimensions") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 289, "generator") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 290, "procedure") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 291, "procedure parameter") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 292, "referential constraint") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 293, "type (in RDB$TYPES)") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 294, " @1NOD(BTRIGGERS) do not run database triggers") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 295, " @1TRU(STED) use trusted authentication") +FB_IMPL_MSG_SYMBOL(GBAK, 296, write_map_1, "writing names mapping") +FB_IMPL_MSG_SYMBOL(GBAK, 297, write_map_2, " writing map for @1") +FB_IMPL_MSG_SYMBOL(GBAK, 298, get_map_1, " restoring map for @1") +FB_IMPL_MSG_SYMBOL(GBAK, 299, get_map_2, "name mapping") +FB_IMPL_MSG_SYMBOL(GBAK, 300, get_map_3, "cannot restore arbitrary mapping") +FB_IMPL_MSG_SYMBOL(GBAK, 301, get_map_4, "restoring names mapping") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 302, " @1FIX_FSS_D(ATA) fix malformed UNICODE_FSS data") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 303, " @1FIX_FSS_M(ETADATA) fix malformed UNICODE_FSS metadata") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 304, "Character set parameter missing") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 305, "Character set @1 not found") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 306, " @1FE(TCH_PASSWORD) fetch password from file") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 307, "too many passwords provided") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 308, "could not open password file @1, errno @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 309, "could not read password file @1, errno @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 310, "empty password file @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 311, "Attribute @1 was already processed for exception @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 312, "Skipping attribute @1 because the message already exists for exception @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 313, "Trying to recover from unexpected attribute @1 due to wrong message length for exception @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 314, "Attribute not specified for storing text bigger than 255 bytes") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 315, "Unable to store text bigger than 65536 bytes") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 316, "Failed while adjusting the security class name") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 317, "Usage:") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 318, " gbak -b [backup options] [general options]") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 319, " gbak -c [restore options] [general options]") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 320, " = | ... (size in db pages)") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 321, " = | ... (size in bytes = n[K|M|G])") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 322, " -recreate overwrite and -replace can be used instead of -c") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 323, "backup options are:") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 324, "restore options are:") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 325, "general options are:") +FB_IMPL_MSG(GBAK, 326, gbak_missing_interval, -901, "00", "000", "verbose interval value parameter missing") +FB_IMPL_MSG(GBAK, 327, gbak_wrong_interval, -901, "00", "000", "verbose interval value cannot be smaller than @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 328, " @1VERBI(NT) verbose information with explicit interval") +FB_IMPL_MSG(GBAK, 329, gbak_verify_verbint, -901, "00", "000", "verify (verbose) and verbint options are mutually exclusive") +FB_IMPL_MSG(GBAK, 330, gbak_option_only_restore, -901, "00", "000", "option -@1 is allowed only on restore or create") +FB_IMPL_MSG(GBAK, 331, gbak_option_only_backup, -901, "00", "000", "option -@1 is allowed only on backup") +FB_IMPL_MSG(GBAK, 332, gbak_option_conflict, -901, "00", "000", "options -@1 and -@2 are mutually exclusive") +FB_IMPL_MSG(GBAK, 333, gbak_param_conflict, -901, "00", "000", "parameter for option -@1 was already specified with value \"@2\"") +FB_IMPL_MSG(GBAK, 334, gbak_option_repeated, -901, "00", "000", "option -@1 was already specified") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 335, "writing package @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 336, "writing packages") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 337, "restoring package @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 338, "package") +FB_IMPL_MSG(GBAK, 339, gbak_max_dbkey_recursion, -901, "00", "000", "dependency depth greater than @1 for view @2") +FB_IMPL_MSG(GBAK, 340, gbak_max_dbkey_length, -901, "00", "000", "value greater than @1 when calculating length of rdb$db_key for view @2") +FB_IMPL_MSG(GBAK, 341, gbak_invalid_metadata, -901, "00", "000", "Invalid metadata detected. Use -FIX_FSS_METADATA option.") +FB_IMPL_MSG(GBAK, 342, gbak_invalid_data, -901, "00", "000", "Invalid data detected. Use -FIX_FSS_DATA option.") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 343, "text for attribute @1 is too large in @2, truncating to @3 bytes") +FB_IMPL_MSG(GBAK, 344, gbak_inv_bkup_ver2, -901, "00", "000", "Expected backup version @2..@3. Found @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 345, " writing view @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 346, " table @1 is a view") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 347, "writing security classes") +FB_IMPL_MSG(GBAK, 348, gbak_db_format_too_old2, -901, "00", "000", "database format @1 is too old to backup") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 349, "backup version is @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 350, "adjusting system generators") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 351, "Error closing database, but backup file is OK") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 352, "database") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 353, "required mapping attributes are missing in backup file") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 354, "missing regular expression to skip tables") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 355, " @1SKIP_D(ATA) skip data for table") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 356, "regular expression to skip tables was already set") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 357, "adjusting views dbkey length") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 358, "updating ownership of packages, procedures and tables") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 359, "adding missing privileges") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 360, "adjusting the ONLINE and FORCED WRITES flags") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 361, " @1ST(ATISTICS) TDRW show statistics:") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 362, " T time from start") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 363, " D delta time") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 364, " R page reads") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 365, " W page writes") +FB_IMPL_MSG_SYMBOL(GBAK, 366, gbak_missing_perf, "statistics parameter missing") +FB_IMPL_MSG_SYMBOL(GBAK, 367, gbak_wrong_perf, "wrong char \"@1\" at statistics parameter") +FB_IMPL_MSG_SYMBOL(GBAK, 368, gbak_too_long_perf, "too many chars at statistics parameter") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 369, "total statistics") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 370, "could not append BLOB data to batch") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 371, "could not start batch when restoring table @1, trying old way") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 372, " @1KEYNAME name of a key to be used for encryption") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 373, " @1CRYPT crypt plugin name") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 374, " @1ZIP backup file is in zip compressed format") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 375, "Keyname parameter missing") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 376, "Key holder parameter missing but backup file is encrypted") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 377, "CryptPlugin parameter missing") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 378, "Unknown crypt plugin name - use -CRYPT switch") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 379, "Inflate error @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 380, "Deflate error @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 381, "Key holder parameter missing") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 382, " @1KEYHOLDER name of a key holder plugin") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 383, "Decompression stream init error @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 384, "Compression stream init error @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 385, "Invalid reply from getInfo() when waiting for DB encryption") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 386, "Problems with just created database encryption") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 387, "Skipped trigger @1 on system table @2") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 388, " @1INCLUDE(_DATA) backup data of table(s)") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 389, "missing regular expression to include tables") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 390, "regular expression to include tables was already set") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 391, "writing database create grants") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 392, " database create grant for @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 393, " restoring database create grant for @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 394, "restoring database create grants") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 395, "database create grant") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 396, "writing publications") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 397, " writing publication @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 398, " writing publication for table @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 399, "restoring publication @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 400, "publication") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 401, "restoring publication for table @1") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 402, "publication for table") +FB_IMPL_MSG_SYMBOL(GBAK, 403, gbak_opt_replica, " @1REPLICA \"none\", \"read_only\" or \"read_write\" replica mode") +FB_IMPL_MSG_SYMBOL(GBAK, 404, gbak_replica_req, "\"none\", \"read_only\" or \"read_write\" required") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 405, "could not access batch parameters") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 406, " @1PAR(ALLEL) parallel workers") +FB_IMPL_MSG_SYMBOL(GBAK, 407, gbak_missing_prl_wrks, "parallel workers parameter missing") +FB_IMPL_MSG_SYMBOL(GBAK, 408, gbak_inv_prl_wrks, "expected parallel workers, encountered \"@1\"") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 409, " @1D(IRECT_IO) direct IO for backup file(s)") +FB_IMPL_MSG_NO_SYMBOL(GBAK, 410, "use up to @1 parallel workers") diff --git a/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/gfix.h b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/gfix.h new file mode 100644 index 0000000..f8f5135 --- /dev/null +++ b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/gfix.h @@ -0,0 +1,137 @@ +FB_IMPL_MSG(GFIX, 1, gfix_db_name, -901, "00", "000", "data base file name (@1) already given") +FB_IMPL_MSG(GFIX, 2, gfix_invalid_sw, -901, "00", "000", "invalid switch @1") +FB_IMPL_MSG_SYMBOL(GFIX, 3, gfix_version, "gfix version @1") +FB_IMPL_MSG(GFIX, 4, gfix_incmp_sw, -901, "00", "000", "incompatible switch combination") +FB_IMPL_MSG(GFIX, 5, gfix_replay_req, -901, "00", "000", "replay log pathname required") +FB_IMPL_MSG(GFIX, 6, gfix_pgbuf_req, -901, "00", "000", "number of page buffers for cache required") +FB_IMPL_MSG(GFIX, 7, gfix_val_req, -901, "00", "000", "numeric value required") +FB_IMPL_MSG(GFIX, 8, gfix_pval_req, -901, "00", "000", "positive numeric value required") +FB_IMPL_MSG(GFIX, 9, gfix_trn_req, -901, "00", "000", "number of transactions per sweep required") +FB_IMPL_MSG_SYMBOL(GFIX, 10, gfix_trn_all_req, "transaction number or \"all\" required") +FB_IMPL_MSG_SYMBOL(GFIX, 11, gfix_sync_req, "\"sync\" or \"async\" required") +FB_IMPL_MSG(GFIX, 12, gfix_full_req, -901, "00", "000", "\"full\" or \"reserve\" required") +FB_IMPL_MSG(GFIX, 13, gfix_usrname_req, -901, "00", "000", "user name required") +FB_IMPL_MSG(GFIX, 14, gfix_pass_req, -901, "00", "000", "password required") +FB_IMPL_MSG(GFIX, 15, gfix_subs_name, -901, "00", "000", "subsystem name") +FB_IMPL_MSG(GFIX, 16, gfix_wal_req, -901, "00", "000", "\"wal\" required") +FB_IMPL_MSG(GFIX, 17, gfix_sec_req, -901, "00", "000", "number of seconds required") +FB_IMPL_MSG(GFIX, 18, gfix_nval_req, -901, "00", "000", "numeric value between 0 and 32767 inclusive required") +FB_IMPL_MSG(GFIX, 19, gfix_type_shut, -901, "00", "000", "must specify type of shutdown") +FB_IMPL_MSG(GFIX, 20, gfix_retry, -901, "00", "000", "please retry, specifying an option") +FB_IMPL_MSG_SYMBOL(GFIX, 21, gfix_opt, "plausible options are:") +FB_IMPL_MSG_SYMBOL(GFIX, 22, gfix_qualifiers, "\\n Options can be abbreviated to the unparenthesized characters") +FB_IMPL_MSG(GFIX, 23, gfix_retry_db, -901, "00", "000", "please retry, giving a database name") +FB_IMPL_MSG_SYMBOL(GFIX, 24, gfix_summary, "Summary of validation errors") +FB_IMPL_MSG_SYMBOL(GFIX, 25, gfix_opt_active, " -ac(tivate_shadow) activate shadow file for database usage") +FB_IMPL_MSG_SYMBOL(GFIX, 26, gfix_opt_attach, " -at(tach) shutdown new database attachments") +FB_IMPL_MSG_SYMBOL(GFIX, 27, gfix_opt_begin_log, " -begin_log begin logging for replay utility") +FB_IMPL_MSG_SYMBOL(GFIX, 28, gfix_opt_buffers, " -b(uffers) set page buffers ") +FB_IMPL_MSG_SYMBOL(GFIX, 29, gfix_opt_commit, " -co(mmit) commit transaction ") +FB_IMPL_MSG_SYMBOL(GFIX, 30, gfix_opt_cache, " -ca(che) shutdown cache manager") +FB_IMPL_MSG_SYMBOL(GFIX, 31, gfix_opt_disable, " -disable disable WAL") +FB_IMPL_MSG_SYMBOL(GFIX, 32, gfix_opt_full, " -fu(ll) validate record fragments (-v)") +FB_IMPL_MSG_SYMBOL(GFIX, 33, gfix_opt_force, " -fo(rce_shutdown) force database shutdown") +FB_IMPL_MSG_SYMBOL(GFIX, 34, gfix_opt_housekeep, " -h(ousekeeping) set sweep interval ") +FB_IMPL_MSG_SYMBOL(GFIX, 35, gfix_opt_ignore, " -i(gnore) ignore checksum errors") +FB_IMPL_MSG_SYMBOL(GFIX, 36, gfix_opt_kill, " -k(ill_shadow) kill all unavailable shadow files") +FB_IMPL_MSG_SYMBOL(GFIX, 37, gfix_opt_list, " -l(ist) show limbo transactions") +FB_IMPL_MSG_SYMBOL(GFIX, 38, gfix_opt_mend, " -me(nd) prepare corrupt database for backup") +FB_IMPL_MSG_SYMBOL(GFIX, 39, gfix_opt_no_update, " -n(o_update) read-only validation (-v)") +FB_IMPL_MSG_SYMBOL(GFIX, 40, gfix_opt_online, " -o(nline) database online ") +FB_IMPL_MSG_SYMBOL(GFIX, 41, gfix_opt_prompt, " -pr(ompt) prompt for commit/rollback (-l)") +FB_IMPL_MSG_SYMBOL(GFIX, 42, gfix_opt_password, " -pa(ssword) default password") +FB_IMPL_MSG_SYMBOL(GFIX, 43, gfix_opt_quit_log, " -quit_log quit logging for replay utility") +FB_IMPL_MSG_SYMBOL(GFIX, 44, gfix_opt_rollback, " -r(ollback) rollback transaction ") +FB_IMPL_MSG_SYMBOL(GFIX, 45, gfix_opt_sweep, " -sw(eep) force garbage collection") +FB_IMPL_MSG_SYMBOL(GFIX, 46, gfix_opt_shut, " -sh(utdown) shutdown ") +FB_IMPL_MSG_SYMBOL(GFIX, 47, gfix_opt_two_phase, " -tw(o_phase) perform automated two-phase recovery") +FB_IMPL_MSG_SYMBOL(GFIX, 48, gfix_opt_tran, " -tra(nsaction) shutdown transaction startup") +FB_IMPL_MSG_SYMBOL(GFIX, 49, gfix_opt_use, " -u(se) use full or reserve space for versions") +FB_IMPL_MSG_SYMBOL(GFIX, 50, gfix_opt_user, " -user default user name") +FB_IMPL_MSG_SYMBOL(GFIX, 51, gfix_opt_validate, " -v(alidate) validate database structure") +FB_IMPL_MSG_SYMBOL(GFIX, 52, gfix_opt_write, " -w(rite) write synchronously or asynchronously") +FB_IMPL_MSG_SYMBOL(GFIX, 53, gfix_opt_x, " -x set debug on") +FB_IMPL_MSG_SYMBOL(GFIX, 54, gfix_opt_z, " -z print software version number") +FB_IMPL_MSG_SYMBOL(GFIX, 55, gfix_rec_err, "\\n Number of record level errors : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 56, gfix_blob_err, " Number of Blob page errors : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 57, gfix_data_err, " Number of data page errors : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 58, gfix_index_err, " Number of index page errors : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 59, gfix_pointer_err, " Number of pointer page errors : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 60, gfix_trn_err, " Number of transaction page errors : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 61, gfix_db_err, " Number of database page errors : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 62, gfix_bad_block, "bad block type") +FB_IMPL_MSG(GFIX, 63, gfix_exceed_max, -901, "00", "000", "internal block exceeds maximum size") +FB_IMPL_MSG(GFIX, 64, gfix_corrupt_pool, -901, "00", "000", "corrupt pool") +FB_IMPL_MSG(GFIX, 65, gfix_mem_exhausted, -901, "00", "000", "virtual memory exhausted") +FB_IMPL_MSG(GFIX, 66, gfix_bad_pool, -901, "00", "000", "bad pool id") +FB_IMPL_MSG(GFIX, 67, gfix_trn_not_valid, -901, "00", "000", "Transaction state @1 not in valid range.") +FB_IMPL_MSG_SYMBOL(GFIX, 68, gfix_dbg_attach, "ATTACH_DATABASE: attempted attach of @1,") +FB_IMPL_MSG_SYMBOL(GFIX, 69, gfix_dbg_failed, " failed") +FB_IMPL_MSG_SYMBOL(GFIX, 70, gfix_dbg_success, " succeeded") +FB_IMPL_MSG_SYMBOL(GFIX, 71, gfix_trn_limbo, "Transaction @1 is in limbo.") +FB_IMPL_MSG_SYMBOL(GFIX, 72, gfix_try_again, "More limbo transactions than fit. Try again") +FB_IMPL_MSG_SYMBOL(GFIX, 73, gfix_unrec_item, "Unrecognized info item @1") +FB_IMPL_MSG_SYMBOL(GFIX, 74, gfix_commit_violate, "A commit of transaction @1 will violate two-phase commit.") +FB_IMPL_MSG_SYMBOL(GFIX, 75, gfix_preserve, "A rollback of transaction @1 is needed to preserve two-phase commit.") +FB_IMPL_MSG_SYMBOL(GFIX, 76, gfix_part_commit, "Transaction @1 has already been partially committed.") +FB_IMPL_MSG_SYMBOL(GFIX, 77, gfix_rback_violate, "A rollback of this transaction will violate two-phase commit.") +FB_IMPL_MSG_SYMBOL(GFIX, 78, gfix_part_commit2, "Transaction @1 has been partially committed.") +FB_IMPL_MSG_SYMBOL(GFIX, 79, gfix_commit_pres, "A commit is necessary to preserve the two-phase commit.") +FB_IMPL_MSG_SYMBOL(GFIX, 80, gfix_insuff_info, "Insufficient information is available to determine") +FB_IMPL_MSG_SYMBOL(GFIX, 81, gfix_action, "a proper action for transaction @1.") +FB_IMPL_MSG_SYMBOL(GFIX, 82, gfix_all_prep, "Transaction @1: All subtransactions have been prepared.") +FB_IMPL_MSG_SYMBOL(GFIX, 83, gfix_comm_rback, "Either commit or rollback is possible.") +FB_IMPL_MSG(GFIX, 84, gfix_unexp_eoi, -901, "00", "000", "unexpected end of input") +FB_IMPL_MSG_SYMBOL(GFIX, 85, gfix_ask, "Commit, rollback, or neither (c, r, or n)?") +FB_IMPL_MSG_SYMBOL(GFIX, 86, gfix_reattach_failed, "Could not reattach to database for transaction @1.") +FB_IMPL_MSG_SYMBOL(GFIX, 87, gfix_org_path, "Original path: @1") +FB_IMPL_MSG_SYMBOL(GFIX, 88, gfix_enter_path, "Enter a valid path:") +FB_IMPL_MSG_SYMBOL(GFIX, 89, gfix_att_unsucc, "Attach unsuccessful.") +FB_IMPL_MSG(GFIX, 90, gfix_recon_fail, -901, "00", "000", "failed to reconnect to a transaction in database @1") +FB_IMPL_MSG_SYMBOL(GFIX, 91, gfix_trn2, "Transaction @1:") +FB_IMPL_MSG_SYMBOL(GFIX, 92, gfix_mdb_trn, " Multidatabase transaction:") +FB_IMPL_MSG_SYMBOL(GFIX, 93, gfix_host_site, " Host Site: @1") +FB_IMPL_MSG_SYMBOL(GFIX, 94, gfix_trn, " Transaction @1") +FB_IMPL_MSG_SYMBOL(GFIX, 95, gfix_prepared, "has been prepared.") +FB_IMPL_MSG_SYMBOL(GFIX, 96, gfix_committed, "has been committed.") +FB_IMPL_MSG_SYMBOL(GFIX, 97, gfix_rolled_back, "has been rolled back.") +FB_IMPL_MSG_SYMBOL(GFIX, 98, gfix_not_available, "is not available.") +FB_IMPL_MSG_SYMBOL(GFIX, 99, gfix_not_prepared, "is not found, assumed not prepared.") +FB_IMPL_MSG_SYMBOL(GFIX, 100, gfix_be_committed, "is not found, assumed to be committed.") +FB_IMPL_MSG_SYMBOL(GFIX, 101, gfix_rmt_site, " Remote Site: @1") +FB_IMPL_MSG_SYMBOL(GFIX, 102, gfix_db_path, " Database Path: @1") +FB_IMPL_MSG_SYMBOL(GFIX, 103, gfix_auto_comm, " Automated recovery would commit this transaction.") +FB_IMPL_MSG_SYMBOL(GFIX, 104, gfix_auto_rback, " Automated recovery would rollback this transaction.") +FB_IMPL_MSG_SYMBOL(GFIX, 105, gfix_warning, "Warning: Multidatabase transaction is in inconsistent state for recovery.") +FB_IMPL_MSG_SYMBOL(GFIX, 106, gfix_trn_was_comm, "Transaction @1 was committed, but prior ones were rolled back.") +FB_IMPL_MSG_SYMBOL(GFIX, 107, gfix_trn_was_rback, "Transaction @1 was rolled back, but prior ones were committed.") +FB_IMPL_MSG(GFIX, 108, gfix_trn_unknown, -901, "00", "000", "Transaction description item unknown") +FB_IMPL_MSG_SYMBOL(GFIX, 109, gfix_opt_mode, " -mo(de) read_only or read_write database") +FB_IMPL_MSG(GFIX, 110, gfix_mode_req, -901, "00", "000", "\"read_only\" or \"read_write\" required") +FB_IMPL_MSG_SYMBOL(GFIX, 111, gfix_opt_SQL_dialect, " -sq(l_dialect) set database dialect n") +FB_IMPL_MSG_SYMBOL(GFIX, 112, gfix_SQL_dialect, "database SQL dialect must be one of '@1'") +FB_IMPL_MSG_SYMBOL(GFIX, 113, gfix_dialect_req, "dialect number required") +FB_IMPL_MSG(GFIX, 114, gfix_pzval_req, -901, "00", "000", "positive or zero numeric value required") +FB_IMPL_MSG_SYMBOL(GFIX, 115, gfix_opt_trusted, " -tru(sted) use trusted authentication") +FB_IMPL_MSG_NO_SYMBOL(GFIX, 116, "could not open password file @1, errno @2") +FB_IMPL_MSG_NO_SYMBOL(GFIX, 117, "could not read password file @1, errno @2") +FB_IMPL_MSG_NO_SYMBOL(GFIX, 118, "empty password file @1") +FB_IMPL_MSG_NO_SYMBOL(GFIX, 119, " -fe(tch_password) fetch password from file") +FB_IMPL_MSG_NO_SYMBOL(GFIX, 120, "usage: gfix [options] ") +FB_IMPL_MSG_SYMBOL(GFIX, 121, gfix_opt_nolinger, " -nol(inger) close database ignoring linger setting for it") +FB_IMPL_MSG_SYMBOL(GFIX, 122, gfix_pip_err, " Number of inventory page errors : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 123, gfix_rec_warn, " Number of record level warnings : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 124, gfix_blob_warn, " Number of blob page warnings : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 125, gfix_data_warn, " Number of data page warnings : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 126, gfix_index_warn, " Number of index page warnings : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 127, gfix_pointer_warn, " Number of pointer page warnings : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 128, gfix_trn_warn, " Number of transaction page warnings : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 129, gfix_db_warn, " Number of database page warnings : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 130, gfix_pip_warn, " Number of inventory page warnings : @1") +FB_IMPL_MSG_SYMBOL(GFIX, 131, gfix_opt_icu, " -icu fix database to be usable with present ICU version") +FB_IMPL_MSG_SYMBOL(GFIX, 132, gfix_opt_role, " -role set SQL role name") +FB_IMPL_MSG_SYMBOL(GFIX, 133, gfix_role_req, "SQL role name required") +FB_IMPL_MSG_SYMBOL(GFIX, 134, gfix_opt_repl, " -repl(ica) replica mode ") +FB_IMPL_MSG_SYMBOL(GFIX, 135, gfix_repl_mode_req, "replica mode (none / read_only / read_write) required") +FB_IMPL_MSG_SYMBOL(GFIX, 136, gfix_opt_parallel, " -par(allel) parallel workers (-sweep, -icu)") +FB_IMPL_MSG_SYMBOL(GFIX, 137, gfix_opt_upgrade, " -up(grade) upgrade database ODS") diff --git a/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/gsec.h b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/gsec.h new file mode 100644 index 0000000..ff0582c --- /dev/null +++ b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/gsec.h @@ -0,0 +1,104 @@ +FB_IMPL_MSG_SYMBOL(GSEC, 1, GsecMsg1, "GSEC>") +FB_IMPL_MSG_SYMBOL(GSEC, 2, GsecMsg2, "gsec") +FB_IMPL_MSG_SYMBOL(GSEC, 3, GsecMsg3, "ADD add user") +FB_IMPL_MSG_SYMBOL(GSEC, 4, GsecMsg4, "DELETE delete user") +FB_IMPL_MSG_SYMBOL(GSEC, 5, GsecMsg5, "DISPLAY display user(s)") +FB_IMPL_MSG_SYMBOL(GSEC, 6, GsecMsg6, "MODIFY modify user") +FB_IMPL_MSG_SYMBOL(GSEC, 7, GsecMsg7, "PW user's password") +FB_IMPL_MSG_SYMBOL(GSEC, 8, GsecMsg8, "UID user's ID") +FB_IMPL_MSG_SYMBOL(GSEC, 9, GsecMsg9, "GID user's group ID") +FB_IMPL_MSG_SYMBOL(GSEC, 10, GsecMsg10, "PROJ user's project name") +FB_IMPL_MSG_SYMBOL(GSEC, 11, GsecMsg11, "ORG user's organization name") +FB_IMPL_MSG_SYMBOL(GSEC, 12, GsecMsg12, "FNAME user's first name") +FB_IMPL_MSG_SYMBOL(GSEC, 13, GsecMsg13, "MNAME user's middle name/initial") +FB_IMPL_MSG_SYMBOL(GSEC, 14, GsecMsg14, "LNAME user's last name") +FB_IMPL_MSG(GSEC, 15, gsec_cant_open_db, -901, "00", "000", "unable to open database") +FB_IMPL_MSG(GSEC, 16, gsec_switches_error, -901, "00", "000", "error in switch specifications") +FB_IMPL_MSG(GSEC, 17, gsec_no_op_spec, -901, "00", "000", "no operation specified") +FB_IMPL_MSG(GSEC, 18, gsec_no_usr_name, -901, "00", "000", "no user name specified") +FB_IMPL_MSG(GSEC, 19, gsec_err_add, -901, "00", "000", "add record error") +FB_IMPL_MSG(GSEC, 20, gsec_err_modify, -901, "00", "000", "modify record error") +FB_IMPL_MSG(GSEC, 21, gsec_err_find_mod, -901, "00", "000", "find/modify record error") +FB_IMPL_MSG(GSEC, 22, gsec_err_rec_not_found, -901, "00", "000", "record not found for user: @1") +FB_IMPL_MSG(GSEC, 23, gsec_err_delete, -901, "00", "000", "delete record error") +FB_IMPL_MSG(GSEC, 24, gsec_err_find_del, -901, "00", "000", "find/delete record error") +FB_IMPL_MSG_SYMBOL(GSEC, 25, GsecMsg25, "users defined for node") +FB_IMPL_MSG_SYMBOL(GSEC, 26, GsecMsg26, " user name uid gid admin full name") +FB_IMPL_MSG_SYMBOL(GSEC, 27, GsecMsg27, "------------------------------------------------------------------------------------------------") +FB_IMPL_MSG(GSEC, 28, gsec_err_find_disp, -901, "00", "000", "find/display record error") +FB_IMPL_MSG(GSEC, 29, gsec_inv_param, -901, "00", "000", "invalid parameter, no switch defined") +FB_IMPL_MSG(GSEC, 30, gsec_op_specified, -901, "00", "000", "operation already specified") +FB_IMPL_MSG(GSEC, 31, gsec_pw_specified, -901, "00", "000", "password already specified") +FB_IMPL_MSG(GSEC, 32, gsec_uid_specified, -901, "00", "000", "uid already specified") +FB_IMPL_MSG(GSEC, 33, gsec_gid_specified, -901, "00", "000", "gid already specified") +FB_IMPL_MSG(GSEC, 34, gsec_proj_specified, -901, "00", "000", "project already specified") +FB_IMPL_MSG(GSEC, 35, gsec_org_specified, -901, "00", "000", "organization already specified") +FB_IMPL_MSG(GSEC, 36, gsec_fname_specified, -901, "00", "000", "first name already specified") +FB_IMPL_MSG(GSEC, 37, gsec_mname_specified, -901, "00", "000", "middle name already specified") +FB_IMPL_MSG(GSEC, 38, gsec_lname_specified, -901, "00", "000", "last name already specified") +FB_IMPL_MSG_SYMBOL(GSEC, 39, GsecMsg39, "gsec version") +FB_IMPL_MSG(GSEC, 40, gsec_inv_switch, -901, "00", "000", "invalid switch specified") +FB_IMPL_MSG(GSEC, 41, gsec_amb_switch, -901, "00", "000", "ambiguous switch specified") +FB_IMPL_MSG(GSEC, 42, gsec_no_op_specified, -901, "00", "000", "no operation specified for parameters") +FB_IMPL_MSG(GSEC, 43, gsec_params_not_allowed, -901, "00", "000", "no parameters allowed for this operation") +FB_IMPL_MSG(GSEC, 44, gsec_incompat_switch, -901, "00", "000", "incompatible switches specified") +FB_IMPL_MSG_SYMBOL(GSEC, 45, GsecMsg45, "gsec utility - maintains user password database") +FB_IMPL_MSG_SYMBOL(GSEC, 46, GsecMsg46, "command line usage:") +FB_IMPL_MSG_SYMBOL(GSEC, 47, GsecMsg47, " [ ... ]") +FB_IMPL_MSG_SYMBOL(GSEC, 48, GsecMsg48, "interactive usage:") +FB_IMPL_MSG_SYMBOL(GSEC, 49, GsecMsg49, "available commands:") +FB_IMPL_MSG_SYMBOL(GSEC, 50, GsecMsgs50, "adding a new user:") +FB_IMPL_MSG_SYMBOL(GSEC, 51, GsecMsg51, "add [ ... ]") +FB_IMPL_MSG_SYMBOL(GSEC, 52, GsecMsg52, "deleting a current user:") +FB_IMPL_MSG_SYMBOL(GSEC, 53, GsecMsg53, "delete ") +FB_IMPL_MSG_SYMBOL(GSEC, 54, GsecMsg54, "displaying all users:") +FB_IMPL_MSG_SYMBOL(GSEC, 55, GsecMsg55, "display") +FB_IMPL_MSG_SYMBOL(GSEC, 56, GsecMsg56, "displaying one user:") +FB_IMPL_MSG_SYMBOL(GSEC, 57, GsecMsg57, "display ") +FB_IMPL_MSG_SYMBOL(GSEC, 58, GsecMsg58, "modifying a user's parameters:") +FB_IMPL_MSG_SYMBOL(GSEC, 59, GsecMsg59, "modify [ ... ]") +FB_IMPL_MSG_SYMBOL(GSEC, 60, GsecMsg60, "help:") +FB_IMPL_MSG_SYMBOL(GSEC, 61, GsecMsg61, "? (interactive only)") +FB_IMPL_MSG_SYMBOL(GSEC, 62, GsecMsg62, "help") +FB_IMPL_MSG_SYMBOL(GSEC, 63, GsecMsg63, "quit interactive session:") +FB_IMPL_MSG_SYMBOL(GSEC, 64, GsecMsg64, "quit (interactive only)") +FB_IMPL_MSG_SYMBOL(GSEC, 65, GsecMsg65, "available parameters:") +FB_IMPL_MSG_SYMBOL(GSEC, 66, GsecMsg66, "-pw ") +FB_IMPL_MSG_SYMBOL(GSEC, 67, GsecMsg67, "-uid ") +FB_IMPL_MSG_SYMBOL(GSEC, 68, GsecMsg68, "-gid ") +FB_IMPL_MSG_SYMBOL(GSEC, 69, GsecMsg69, "-proj ") +FB_IMPL_MSG_SYMBOL(GSEC, 70, GsecMsg70, "-org ") +FB_IMPL_MSG_SYMBOL(GSEC, 71, GsecMsg71, "-fname ") +FB_IMPL_MSG_SYMBOL(GSEC, 72, GsecMsg72, "-mname ") +FB_IMPL_MSG_SYMBOL(GSEC, 73, GsecMsg73, "-lname ") +FB_IMPL_MSG_NO_SYMBOL(GSEC, 74, "gsec - memory allocation error") +FB_IMPL_MSG_NO_SYMBOL(GSEC, 75, "gsec error") +FB_IMPL_MSG(GSEC, 76, gsec_inv_username, -901, "00", "000", "Invalid user name (maximum 31 bytes allowed)") +FB_IMPL_MSG(GSEC, 77, gsec_inv_pw_length, -901, "00", "000", "Warning - maximum 8 significant bytes of password used") +FB_IMPL_MSG(GSEC, 78, gsec_db_specified, -901, "00", "000", "database already specified") +FB_IMPL_MSG(GSEC, 79, gsec_db_admin_specified, -901, "00", "000", "database administrator name already specified") +FB_IMPL_MSG(GSEC, 80, gsec_db_admin_pw_specified, -901, "00", "000", "database administrator password already specified") +FB_IMPL_MSG(GSEC, 81, gsec_sql_role_specified, -901, "00", "000", "SQL role name already specified") +FB_IMPL_MSG_SYMBOL(GSEC, 82, GsecMsg82, "[ ... ]") +FB_IMPL_MSG_SYMBOL(GSEC, 83, GsecMsg83, "available options:") +FB_IMPL_MSG_SYMBOL(GSEC, 84, GsecMsg84, "-user ") +FB_IMPL_MSG_SYMBOL(GSEC, 85, GsecMsg85, "-password ") +FB_IMPL_MSG_SYMBOL(GSEC, 86, GsecMsg86, "-role ") +FB_IMPL_MSG_SYMBOL(GSEC, 87, GsecMsg87, "-database ") +FB_IMPL_MSG_SYMBOL(GSEC, 88, GsecMsg88, "-z") +FB_IMPL_MSG_SYMBOL(GSEC, 89, GsecMsg89, "displaying version number:") +FB_IMPL_MSG_SYMBOL(GSEC, 90, GsecMsg90, "z (interactive only)") +FB_IMPL_MSG_SYMBOL(GSEC, 91, GsecMsg91, "-trusted (use trusted authentication)") +FB_IMPL_MSG_SYMBOL(GSEC, 92, GsecMsg92, "invalid switch specified in interactive mode") +FB_IMPL_MSG_SYMBOL(GSEC, 93, GsecMsg93, "error closing security database") +FB_IMPL_MSG_SYMBOL(GSEC, 94, GsecMsg94, "error releasing request in security database") +FB_IMPL_MSG_SYMBOL(GSEC, 95, GsecMsg95, "-fetch_password ") +FB_IMPL_MSG_SYMBOL(GSEC, 96, GsecMsg96, "error fetching password from file") +FB_IMPL_MSG_SYMBOL(GSEC, 97, GsecMsg97, "error changing AUTO ADMINS MAPPING in security database") +FB_IMPL_MSG_SYMBOL(GSEC, 98, GsecMsg98, "changing admins mapping to RDB$ADMIN role in security database:") +FB_IMPL_MSG_SYMBOL(GSEC, 99, GsecMsg99, "invalid parameter for -MAPPING, only SET or DROP is accepted") +FB_IMPL_MSG_SYMBOL(GSEC, 100, GsecMsg100, "mapping {set|drop}") +FB_IMPL_MSG_SYMBOL(GSEC, 101, GsecMsg101, "use gsec -? to get help") +FB_IMPL_MSG_SYMBOL(GSEC, 102, GsecMsg102, "-admin {yes|no}") +FB_IMPL_MSG_SYMBOL(GSEC, 103, GsecMsg103, "invalid parameter for -ADMIN, only YES or NO is accepted") +FB_IMPL_MSG_SYMBOL(GSEC, 104, GsecMsg104, "not enough privileges to complete operation") diff --git a/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/gstat.h b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/gstat.h new file mode 100644 index 0000000..d3bb536 --- /dev/null +++ b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/gstat.h @@ -0,0 +1,64 @@ +FB_IMPL_MSG(GSTAT, 1, gstat_unknown_switch, -901, "00", "000", "found unknown switch") +FB_IMPL_MSG(GSTAT, 2, gstat_retry, -901, "00", "000", "please retry, giving a database name") +FB_IMPL_MSG(GSTAT, 3, gstat_wrong_ods, -901, "00", "000", "Wrong ODS version, expected @1, encountered @2") +FB_IMPL_MSG(GSTAT, 4, gstat_unexpected_eof, -901, "00", "000", "Unexpected end of database file.") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 5, "gstat version @1") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 6, "\nDatabase \"@1\"") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 7, "\n\nDatabase file sequence:") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 8, "File @1 continues as file @2") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 9, "File @1 is the @2 file") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 10, "\nAnalyzing database pages ...") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 11, " Primary pointer page: @1, Index root page: @2") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 12, " Data pages: @1, data page slots: @2, average fill: @3") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 13, " Fill distribution:") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 14, " Index @1 (@2)") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 15, " Depth: @1, leaf buckets: @2, nodes: @3") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 16, " Average data length: @1, total dup: @2, max dup: @3") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 17, " Fill distribution:") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 18, " Expected data on page @1") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 19, " Expected b-tree bucket on page @1 from @2") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 20, "unknown switch \"@1\"") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 21, "Available switches:") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 22, " -a analyze data and index pages") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 23, " -d analyze data pages") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 24, " -h analyze header page ONLY") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 25, " -i analyze index leaf pages") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 26, " -l analyze log page") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 27, " -s analyze system relations in addition to user tables") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 28, " -z display version number") +FB_IMPL_MSG(GSTAT, 29, gstat_open_err, -901, "00", "000", "Can't open database file @1") +FB_IMPL_MSG(GSTAT, 30, gstat_read_err, -901, "00", "000", "Can't read a database page") +FB_IMPL_MSG(GSTAT, 31, gstat_sysmemex, -901, "00", "000", "System memory exhausted") +FB_IMPL_MSG_SYMBOL(GSTAT, 32, gstat_username, " -u username") +FB_IMPL_MSG_SYMBOL(GSTAT, 33, gstat_password, " -p password") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 34, " -r analyze average record and version length") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 35, " -t tablename (case sensitive)") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 36, " -tr use trusted authentication") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 37, " -fetch fetch password from file") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 38, "option -h is incompatible with options -a, -d, -i, -r, -s and -t") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 39, "usage: gstat [options] or gstat [options]") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 40, "database name was already specified") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 41, "option -t needs a table name") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 42, "option -t got a too long table name @1") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 43, "option -t accepts several table names only if used after ") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 44, "table \"@1\" not found") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 45, "use gstat -? to get help") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 46, " Primary pages: @1, secondary pages: @2, swept pages: @3") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 47, " Big record pages: @1") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 48, " Blobs: @1, total length: @2, blob pages: @3") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 49, " Level 0: @1, Level 1: @2, Level 2: @3") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 50, "option -e is incompatible with options -a, -d, -h, -i, -r, -s and -t") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 51, " -e analyze database encryption") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 52, "Data pages: total @1, encrypted @2, non-crypted @3") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 53, "Index pages: total @1, encrypted @2, non-crypted @3") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 54, "Blob pages: total @1, encrypted @2, non-crypted @3") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 55, "no encrypted database support, only -e and -h can be used") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 56, " Empty pages: @1, full pages: @2") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 57, " -role SQL role name") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 58, "Other pages: total @1, ENCRYPTED @2 (DB problem!), non-crypted @3") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 59, "Gstat execution time @1") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 60, "Gstat completion time @1") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 61, " Expected page inventory page @1") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 62, "Generator pages: total @1, encrypted @2, non-crypted @3") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 63, " Table size: @1 bytes") +FB_IMPL_MSG_NO_SYMBOL(GSTAT, 64, " Level @1: @2, total length: @3, blob pages: @4") diff --git a/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/isql.h b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/isql.h new file mode 100644 index 0000000..8989539 --- /dev/null +++ b/packages/node-firebird-native-api/src/native/include/firebird/impl/msg/isql.h @@ -0,0 +1,208 @@ +FB_IMPL_MSG_SYMBOL(ISQL, 0, GEN_ERR, "Statement failed, SQLSTATE = @1") +FB_IMPL_MSG_SYMBOL(ISQL, 1, USAGE, "usage: isql [options] []") +FB_IMPL_MSG_SYMBOL(ISQL, 2, SWITCH, "Unknown switch: @1") +FB_IMPL_MSG_SYMBOL(ISQL, 3, NO_DB, "Use CONNECT or CREATE DATABASE to specify a database") +FB_IMPL_MSG_SYMBOL(ISQL, 4, FILE_OPEN_ERR, "Unable to open @1") +FB_IMPL_MSG_SYMBOL(ISQL, 5, COMMIT_PROMPT, "Commit current transaction (y/n)?") +FB_IMPL_MSG_SYMBOL(ISQL, 6, COMMIT_MSG, "Committing.") +FB_IMPL_MSG_SYMBOL(ISQL, 7, ROLLBACK_MSG, "Rolling back work.") +FB_IMPL_MSG_SYMBOL(ISQL, 8, CMD_ERR, "Command error: @1") +FB_IMPL_MSG_SYMBOL(ISQL, 9, ADD_PROMPT, "Enter data or NULL for each column. RETURN to end.") +FB_IMPL_MSG_SYMBOL(ISQL, 10, VERSION, "ISQL Version: @1") +FB_IMPL_MSG_SYMBOL(ISQL, 11, USAGE_ALL, " -a(ll) extract metadata incl. legacy non-SQL tables") +FB_IMPL_MSG_SYMBOL(ISQL, 12, NUMBER_PAGES, "Number of DB pages allocated = @1") +FB_IMPL_MSG_SYMBOL(ISQL, 13, SWEEP_INTERV, "Sweep interval = @1") +FB_IMPL_MSG_SYMBOL(ISQL, 14, NUM_WAL_BUFF, "Number of wal buffers = @1") +FB_IMPL_MSG_SYMBOL(ISQL, 15, WAL_BUFF_SIZE, "Wal buffer size = @1") +FB_IMPL_MSG_SYMBOL(ISQL, 16, CKPT_LENGTH, "Check point length = @1") +FB_IMPL_MSG_SYMBOL(ISQL, 17, CKPT_INTERV, "Check point interval = @1") +FB_IMPL_MSG_SYMBOL(ISQL, 18, WAL_GRPC_WAIT, "Wal group commit wait = @1") +FB_IMPL_MSG_SYMBOL(ISQL, 19, BASE_LEVEL, "Base level = @1") +FB_IMPL_MSG_SYMBOL(ISQL, 20, LIMBO, "Transaction in limbo = @1") +FB_IMPL_MSG_SYMBOL(ISQL, 21, HLP_FRONTEND, "Frontend commands:") +FB_IMPL_MSG_SYMBOL(ISQL, 22, HLP_BLOBED, "BLOBVIEW -- view BLOB in text editor") +FB_IMPL_MSG_SYMBOL(ISQL, 23, HLP_BLOBDMP, "BLOBDUMP -- dump BLOB to a file") +FB_IMPL_MSG_SYMBOL(ISQL, 24, HLP_EDIT, "EDIT [] -- edit SQL script file and execute") +FB_IMPL_MSG_SYMBOL(ISQL, 25, HLP_INPUT, "INput -- take input from the named SQL file") +FB_IMPL_MSG_SYMBOL(ISQL, 26, HLP_OUTPUT, "OUTput [] -- write output to named file") +FB_IMPL_MSG_SYMBOL(ISQL, 27, HLP_SHELL, "SHELL -- execute Operating System command in sub-shell") +FB_IMPL_MSG_SYMBOL(ISQL, 28, HLP_HELP, "HELP -- display this menu") +FB_IMPL_MSG_SYMBOL(ISQL, 29, HLP_SETCOM, "Set commands:") +FB_IMPL_MSG_SYMBOL(ISQL, 30, HLP_SET, " SET -- display current SET options") +FB_IMPL_MSG_SYMBOL(ISQL, 31, HLP_SETAUTO, " SET AUTOddl -- toggle autocommit of DDL statements") +FB_IMPL_MSG_SYMBOL(ISQL, 32, HLP_SETBLOB, " SET BLOB [ALL|] -- display BLOBS of subtype or ALL") +FB_IMPL_MSG_SYMBOL(ISQL, 33, HLP_SETCOUNT, " SET COUNT -- toggle count of selected rows on/off") +FB_IMPL_MSG_SYMBOL(ISQL, 34, HLP_SETECHO, " SET ECHO -- toggle command echo on/off") +FB_IMPL_MSG_SYMBOL(ISQL, 35, HLP_SETSTAT, " SET STATs -- toggle display of performance statistics") +FB_IMPL_MSG_SYMBOL(ISQL, 36, HLP_SETTERM, " SET TERM -- change statement terminator string") +FB_IMPL_MSG_SYMBOL(ISQL, 37, HLP_SHOW, "SHOW [] -- display system information") +FB_IMPL_MSG_SYMBOL(ISQL, 38, HLP_OBJTYPE, " = CHECK, COLLATION, DATABASE, DOMAIN, EXCEPTION, FILTER, FUNCTION,") +FB_IMPL_MSG_SYMBOL(ISQL, 39, HLP_EXIT, "EXIT -- exit and commit changes") +FB_IMPL_MSG_SYMBOL(ISQL, 40, HLP_QUIT, "QUIT -- exit and roll back changes") +FB_IMPL_MSG_SYMBOL(ISQL, 41, HLP_ALL, "All commands may be abbreviated to letters in CAPitals") +FB_IMPL_MSG_SYMBOL(ISQL, 42, HLP_SETSCHEMA, " SET SCHema/DB -- changes current database") +FB_IMPL_MSG_SYMBOL(ISQL, 43, YES_ANS, "Yes") +FB_IMPL_MSG_SYMBOL(ISQL, 44, REPORT1, "Current memory = !c\nDelta memory = !d\nMax memory = !x\nElapsed time = !e sec\n") +FB_IMPL_MSG_SYMBOL(ISQL, 45, REPORT2, "Cpu = !u sec\nBuffers = !b\nReads = !r\nWrites = !w\nFetches = !f") +FB_IMPL_MSG_SYMBOL(ISQL, 46, BLOB_SUBTYPE, "BLOB display set to subtype @1. This BLOB: subtype = @2") +FB_IMPL_MSG_SYMBOL(ISQL, 47, BLOB_PROMPT, "BLOB: @1, type 'edit' or filename to load>") +FB_IMPL_MSG_SYMBOL(ISQL, 48, DATE_PROMPT, "Enter @1 as Y/M/D>") +FB_IMPL_MSG_SYMBOL(ISQL, 49, NAME_PROMPT, "Enter @1>") +FB_IMPL_MSG_SYMBOL(ISQL, 50, DATE_ERR, "Bad date @1") +FB_IMPL_MSG_SYMBOL(ISQL, 51, CON_PROMPT, "CON> ") +FB_IMPL_MSG_SYMBOL(ISQL, 52, HLP_SETLIST, " SET LIST -- toggle column or table display format") +FB_IMPL_MSG_SYMBOL(ISQL, 53, NOT_FOUND, "@1 not found") +FB_IMPL_MSG_SYMBOL(ISQL, 54, COPY_ERR, "Errors occurred (possibly duplicate domains) in creating @1 in @2") +FB_IMPL_MSG_SYMBOL(ISQL, 55, SERVER_TOO_OLD, "Server version too old to support the isql command") +FB_IMPL_MSG_SYMBOL(ISQL, 56, REC_COUNT, "Records affected: @1") +FB_IMPL_MSG_SYMBOL(ISQL, 57, UNLICENSED, "Unlicensed for database \"@1\"") +FB_IMPL_MSG_SYMBOL(ISQL, 58, HLP_SETWIDTH, " SET WIDTH [] -- set/unset print width to for column ") +FB_IMPL_MSG_SYMBOL(ISQL, 59, HLP_SETPLAN, " SET PLAN -- toggle display of query access plan") +FB_IMPL_MSG_SYMBOL(ISQL, 60, HLP_SETTIME, " SET TIME -- toggle display of timestamp with DATE values") +FB_IMPL_MSG_SYMBOL(ISQL, 61, HLP_EDIT2, "EDIT -- edit current command buffer and execute") +FB_IMPL_MSG_SYMBOL(ISQL, 62, HLP_OUTPUT2, "OUTput -- return output to stdout") +FB_IMPL_MSG_SYMBOL(ISQL, 63, HLP_SETNAMES, " SET NAMES -- set name of runtime character set") +FB_IMPL_MSG_SYMBOL(ISQL, 64, HLP_OBJTYPE2, " GENERATOR, GRANT, INDEX, PACKAGE, PROCEDURE, ROLE, SQL DIALECT,") +FB_IMPL_MSG_SYMBOL(ISQL, 65, HLP_SETBLOB2, " SET BLOB -- turn off BLOB display") +FB_IMPL_MSG_SYMBOL(ISQL, 66, HLP_SET_ROOT, "SET