Skip to content

Instantly share code, notes, and snippets.

@clhenrick
Created February 15, 2018 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clhenrick/68ef0aee10e71fe6d8a2b2f4003d9769 to your computer and use it in GitHub Desktop.
Save clhenrick/68ef0aee10e71fe6d8a2b2f4003d9769 to your computer and use it in GitHub Desktop.
MapD browser connector
This file has been truncated, but you can view the full file.
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(1);
__webpack_require__(4);
__webpack_require__(6);
__webpack_require__(8);
module.exports = __webpack_require__(10);
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(2)(__webpack_require__(3))
/***/ }),
/* 2 */
/***/ (function(module, exports) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
module.exports = function(src) {
function log(error) {
(typeof console !== "undefined")
&& (console.error || console.log)("[Script Loader]", error);
}
// Check for IE =< 8
function isIE() {
return typeof attachEvent !== "undefined" && typeof addEventListener === "undefined";
}
try {
if (typeof execScript !== "undefined" && isIE()) {
execScript(src);
} else if (typeof eval !== "undefined") {
eval.call(null, src);
} else {
log("EvalError: No eval function available");
}
} catch (error) {
log(error);
}
}
/***/ }),
/* 3 */
/***/ (function(module, exports) {
module.exports = "\"use strict\";\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n/*jshint evil:true*/\n\n/**\n * The Thrift namespace houses the Apache Thrift JavaScript library\n * elements providing JavaScript bindings for the Apache Thrift RPC\n * system. End users will typically only directly make use of the\n * Transport (TXHRTransport/TWebSocketTransport) and Protocol\n * (TJSONPRotocol/TBinaryProtocol) constructors.\n *\n * Object methods beginning with a __ (e.g. __onOpen()) are internal\n * and should not be called outside of the object's own methods.\n *\n * This library creates one global object: Thrift\n * Code in this library must never create additional global identifiers,\n * all features must be scoped within the Thrift namespace.\n * @namespace\n * @example\n * var transport = new Thrift.Transport(\"http://localhost:8585\");\n * var protocol = new Thrift.Protocol(transport);\n * var client = new MyThriftSvcClient(protocol);\n * var result = client.MyMethod();\n */\n\nvar Thrift = {\n /**\n * Thrift JavaScript library version.\n * @readonly\n * @const {string} Version\n * @memberof Thrift\n */\n Version: '0.9.3',\n\n /**\n * Thrift IDL type string to Id mapping.\n * @readonly\n * @property {number} STOP - End of a set of fields.\n * @property {number} VOID - No value (only legal for return types).\n * @property {number} BOOL - True/False integer.\n * @property {number} BYTE - Signed 8 bit integer.\n * @property {number} I08 - Signed 8 bit integer.\n * @property {number} DOUBLE - 64 bit IEEE 854 floating point.\n * @property {number} I16 - Signed 16 bit integer.\n * @property {number} I32 - Signed 32 bit integer.\n * @property {number} I64 - Signed 64 bit integer.\n * @property {number} STRING - Array of bytes representing a string of characters.\n * @property {number} UTF7 - Array of bytes representing a string of UTF7 encoded characters.\n * @property {number} STRUCT - A multifield type.\n * @property {number} MAP - A collection type (map/associative-array/dictionary).\n * @property {number} SET - A collection type (unordered and without repeated values).\n * @property {number} LIST - A collection type (unordered).\n * @property {number} UTF8 - Array of bytes representing a string of UTF8 encoded characters.\n * @property {number} UTF16 - Array of bytes representing a string of UTF16 encoded characters.\n */\n Type: {\n 'STOP': 0,\n 'VOID': 1,\n 'BOOL': 2,\n 'BYTE': 3,\n 'I08': 3,\n 'DOUBLE': 4,\n 'I16': 6,\n 'I32': 8,\n 'I64': 10,\n 'STRING': 11,\n 'UTF7': 11,\n 'STRUCT': 12,\n 'MAP': 13,\n 'SET': 14,\n 'LIST': 15,\n 'UTF8': 16,\n 'UTF16': 17\n },\n\n /**\n * Thrift RPC message type string to Id mapping.\n * @readonly\n * @property {number} CALL - RPC call sent from client to server.\n * @property {number} REPLY - RPC call normal response from server to client.\n * @property {number} EXCEPTION - RPC call exception response from server to client.\n * @property {number} ONEWAY - Oneway RPC call from client to server with no response.\n */\n MessageType: {\n 'CALL': 1,\n 'REPLY': 2,\n 'EXCEPTION': 3,\n 'ONEWAY': 4\n },\n\n /**\n * Utility function returning the count of an object's own properties.\n * @param {object} obj - Object to test.\n * @returns {number} number of object's own properties\n */\n objectLength: function objectLength(obj) {\n var length = 0;\n for (var k in obj) {\n if (obj.hasOwnProperty(k)) {\n length++;\n }\n }\n return length;\n },\n\n /**\n * Utility function to establish prototype inheritance.\n * @see {@link http://javascript.crockford.com/prototypal.html|Prototypal Inheritance}\n * @param {function} constructor - Contstructor function to set as derived.\n * @param {function} superConstructor - Contstructor function to set as base.\n * @param {string} [name] - Type name to set as name property in derived prototype.\n */\n inherits: function inherits(constructor, superConstructor, name) {\n function F() {}\n F.prototype = superConstructor.prototype;\n constructor.prototype = new F();\n constructor.prototype.name = name || \"\";\n }\n};\n\n/**\n * Initializes a Thrift TException instance.\n * @constructor\n * @augments Error\n * @param {string} message - The TException message (distinct from the Error message).\n * @classdesc TException is the base class for all Thrift exceptions types.\n */\nThrift.TException = function (message) {\n this.message = message;\n};\nThrift.inherits(Thrift.TException, Error, 'TException');\n\n/**\n * Returns the message set on the exception.\n * @readonly\n * @returns {string} exception message\n */\nThrift.TException.prototype.getMessage = function () {\n return this.message;\n};\n\n/**\n * Thrift Application Exception type string to Id mapping.\n * @readonly\n * @property {number} UNKNOWN - Unknown/undefined.\n * @property {number} UNKNOWN_METHOD - Client attempted to call a method unknown to the server.\n * @property {number} INVALID_MESSAGE_TYPE - Client passed an unknown/unsupported MessageType.\n * @property {number} WRONG_METHOD_NAME - Unused.\n * @property {number} BAD_SEQUENCE_ID - Unused in Thrift RPC, used to flag proprietary sequence number errors.\n * @property {number} MISSING_RESULT - Raised by a server processor if a handler fails to supply the required return result.\n * @property {number} INTERNAL_ERROR - Something bad happened.\n * @property {number} PROTOCOL_ERROR - The protocol layer failed to serialize or deserialize data.\n * @property {number} INVALID_TRANSFORM - Unused.\n * @property {number} INVALID_PROTOCOL - The protocol (or version) is not supported.\n * @property {number} UNSUPPORTED_CLIENT_TYPE - Unused.\n */\nThrift.TApplicationExceptionType = {\n 'UNKNOWN': 0,\n 'UNKNOWN_METHOD': 1,\n 'INVALID_MESSAGE_TYPE': 2,\n 'WRONG_METHOD_NAME': 3,\n 'BAD_SEQUENCE_ID': 4,\n 'MISSING_RESULT': 5,\n 'INTERNAL_ERROR': 6,\n 'PROTOCOL_ERROR': 7,\n 'INVALID_TRANSFORM': 8,\n 'INVALID_PROTOCOL': 9,\n 'UNSUPPORTED_CLIENT_TYPE': 10\n};\n\n/**\n * Initializes a Thrift TApplicationException instance.\n * @constructor\n * @augments Thrift.TException\n * @param {string} message - The TApplicationException message (distinct from the Error message).\n * @param {Thrift.TApplicationExceptionType} [code] - The TApplicationExceptionType code.\n * @classdesc TApplicationException is the exception class used to propagate exceptions from an RPC server back to a calling client.\n*/\nThrift.TApplicationException = function (message, code) {\n this.message = message;\n this.code = typeof code === \"number\" ? code : 0;\n};\nThrift.inherits(Thrift.TApplicationException, Thrift.TException, 'TApplicationException');\n\n/**\n * Read a TApplicationException from the supplied protocol.\n * @param {object} input - The input protocol to read from.\n */\nThrift.TApplicationException.prototype.read = function (input) {\n while (1) {\n var ret = input.readFieldBegin();\n\n if (ret.ftype == Thrift.Type.STOP) {\n break;\n }\n\n var fid = ret.fid;\n\n switch (fid) {\n case 1:\n if (ret.ftype == Thrift.Type.STRING) {\n ret = input.readString();\n this.message = ret.value;\n } else {\n ret = input.skip(ret.ftype);\n }\n break;\n case 2:\n if (ret.ftype == Thrift.Type.I32) {\n ret = input.readI32();\n this.code = ret.value;\n } else {\n ret = input.skip(ret.ftype);\n }\n break;\n default:\n ret = input.skip(ret.ftype);\n break;\n }\n\n input.readFieldEnd();\n }\n\n input.readStructEnd();\n};\n\n/**\n * Wite a TApplicationException to the supplied protocol.\n * @param {object} output - The output protocol to write to.\n */\nThrift.TApplicationException.prototype.write = function (output) {\n output.writeStructBegin('TApplicationException');\n\n if (this.message) {\n output.writeFieldBegin('message', Thrift.Type.STRING, 1);\n output.writeString(this.getMessage());\n output.writeFieldEnd();\n }\n\n if (this.code) {\n output.writeFieldBegin('type', Thrift.Type.I32, 2);\n output.writeI32(this.code);\n output.writeFieldEnd();\n }\n\n output.writeFieldStop();\n output.writeStructEnd();\n};\n\n/**\n * Returns the application exception code set on the exception.\n * @readonly\n * @returns {Thrift.TApplicationExceptionType} exception code\n */\nThrift.TApplicationException.prototype.getCode = function () {\n return this.code;\n};\n\n/**\n * Constructor Function for the XHR transport.\n * If you do not specify a url then you must handle XHR operations on\n * your own. This type can also be constructed using the Transport alias\n * for backward compatibility.\n * @constructor\n * @param {string} [url] - The URL to connect to.\n * @classdesc The Apache Thrift Transport layer performs byte level I/O\n * between RPC clients and servers. The JavaScript TXHRTransport object\n * uses Http[s]/XHR. Target servers must implement the http[s] transport\n * (see: node.js example server_http.js).\n * @example\n * var transport = new Thrift.TXHRTransport(\"http://localhost:8585\");\n */\nThrift.Transport = Thrift.TXHRTransport = function (url, options) {\n this.url = url;\n this.wpos = 0;\n this.rpos = 0;\n this.useCORS = options && options.useCORS;\n this.send_buf = '';\n this.recv_buf = '';\n};\n\nThrift.TXHRTransport.prototype = {\n /**\n * Gets the browser specific XmlHttpRequest Object.\n * @returns {object} the browser XHR interface object\n */\n getXmlHttpRequestObject: function getXmlHttpRequestObject() {\n try {\n return new XMLHttpRequest();\n } catch (e1) {}\n try {\n return new ActiveXObject('Msxml2.XMLHTTP');\n } catch (e2) {}\n try {\n return new ActiveXObject('Microsoft.XMLHTTP');\n } catch (e3) {}\n\n throw \"Your browser doesn't support XHR.\";\n },\n\n /**\n * Sends the current XRH request if the transport was created with a URL\n * and the async parameter is false. If the transport was not created with\n * a URL, or the async parameter is True and no callback is provided, or\n * the URL is an empty string, the current send buffer is returned.\n * @param {object} async - If true the current send buffer is returned.\n * @param {object} callback - Optional async completion callback\n * @returns {undefined|string} Nothing or the current send buffer.\n * @throws {string} If XHR fails.\n */\n flush: function flush(async, callback) {\n var self = this;\n if (async && !callback || this.url === undefined || this.url === '') {\n return this.send_buf;\n }\n\n var xreq = this.getXmlHttpRequestObject();\n\n if (xreq.overrideMimeType) {\n xreq.overrideMimeType('application/vnd.apache.thrift.json; charset=utf-8');\n }\n\n if (callback) {\n //Ignore XHR callbacks until the data arrives, then call the\n // client's callback\n xreq.onreadystatechange = function () {\n var clientCallback = callback;\n return function () {\n if (this.readyState == 4 && this.status == 200) {\n self.setRecvBuffer(this.responseText);\n clientCallback();\n }\n };\n }();\n }\n\n xreq.open('POST', this.url, !!async);\n\n if (xreq.setRequestHeader) {\n xreq.setRequestHeader('Accept', 'application/vnd.apache.thrift.json; charset=utf-8');\n xreq.setRequestHeader('Content-Type', 'application/vnd.apache.thrift.json; charset=utf-8');\n }\n\n xreq.send(this.send_buf);\n if (async && callback) {\n return;\n }\n\n if (xreq.readyState != 4) {\n throw 'encountered an unknown ajax ready state: ' + xreq.readyState;\n }\n\n if (xreq.status != 200) {\n throw 'encountered a unknown request status: ' + xreq.status;\n }\n\n this.recv_buf = xreq.responseText;\n this.recv_buf_sz = this.recv_buf.length;\n this.wpos = this.recv_buf.length;\n this.rpos = 0;\n },\n\n /**\n * Creates a jQuery XHR object to be used for a Thrift server call.\n * @param {object} client - The Thrift Service client object generated by the IDL compiler.\n * @param {object} postData - The message to send to the server.\n * @param {function} args - The original call arguments with the success call back at the end.\n * @param {function} recv_method - The Thrift Service Client receive method for the call.\n * @returns {object} A new jQuery XHR object.\n * @throws {string} If the jQuery version is prior to 1.5 or if jQuery is not found.\n */\n jqRequest: function jqRequest(client, postData, args, recv_method) {\n if (typeof jQuery === 'undefined' || typeof jQuery.Deferred === 'undefined') {\n throw 'Thrift.js requires jQuery 1.5+ to use asynchronous requests';\n }\n\n var thriftTransport = this;\n\n var jqXHR = jQuery.ajax({\n url: this.url,\n data: postData,\n type: 'POST',\n cache: false,\n contentType: 'application/vnd.apache.thrift.json; charset=utf-8',\n dataType: 'text thrift',\n converters: {\n 'text thrift': function textThrift(responseData) {\n thriftTransport.setRecvBuffer(responseData);\n var value = recv_method.call(client);\n return value;\n }\n },\n context: client,\n success: jQuery.makeArray(args).pop()\n });\n\n return jqXHR;\n },\n\n /**\n * Sets the buffer to provide the protocol when deserializing.\n * @param {string} buf - The buffer to supply the protocol.\n */\n setRecvBuffer: function setRecvBuffer(buf) {\n this.recv_buf = buf;\n this.recv_buf_sz = this.recv_buf.length;\n this.wpos = this.recv_buf.length;\n this.rpos = 0;\n },\n\n /**\n * Returns true if the transport is open, XHR always returns true.\n * @readonly\n * @returns {boolean} Always True.\n */\n isOpen: function isOpen() {\n return true;\n },\n\n /**\n * Opens the transport connection, with XHR this is a nop.\n */\n open: function open() {},\n\n /**\n * Closes the transport connection, with XHR this is a nop.\n */\n close: function close() {},\n\n /**\n * Returns the specified number of characters from the response\n * buffer.\n * @param {number} len - The number of characters to return.\n * @returns {string} Characters sent by the server.\n */\n read: function read(len) {\n var avail = this.wpos - this.rpos;\n\n if (avail === 0) {\n return '';\n }\n\n var give = len;\n\n if (avail < len) {\n give = avail;\n }\n\n var ret = this.read_buf.substr(this.rpos, give);\n this.rpos += give;\n\n //clear buf when complete?\n return ret;\n },\n\n /**\n * Returns the entire response buffer.\n * @returns {string} Characters sent by the server.\n */\n readAll: function readAll() {\n return this.recv_buf;\n },\n\n /**\n * Sets the send buffer to buf.\n * @param {string} buf - The buffer to send.\n */\n write: function write(buf) {\n this.send_buf = buf;\n },\n\n /**\n * Returns the send buffer.\n * @readonly\n * @returns {string} The send buffer.\n */\n getSendBuffer: function getSendBuffer() {\n return this.send_buf;\n }\n\n};\n\n/**\n * Constructor Function for the WebSocket transport.\n * @constructor\n * @param {string} [url] - The URL to connect to.\n * @classdesc The Apache Thrift Transport layer performs byte level I/O\n * between RPC clients and servers. The JavaScript TWebSocketTransport object\n * uses the WebSocket protocol. Target servers must implement WebSocket.\n * (see: node.js example server_http.js).\n * @example\n * var transport = new Thrift.TWebSocketTransport(\"http://localhost:8585\");\n */\nThrift.TWebSocketTransport = function (url) {\n this.__reset(url);\n};\n\nThrift.TWebSocketTransport.prototype = {\n __reset: function __reset(url) {\n this.url = url; //Where to connect\n this.socket = null; //The web socket\n this.callbacks = []; //Pending callbacks\n this.send_pending = []; //Buffers/Callback pairs waiting to be sent\n this.send_buf = ''; //Outbound data, immutable until sent\n this.recv_buf = ''; //Inbound data\n this.rb_wpos = 0; //Network write position in receive buffer\n this.rb_rpos = 0; //Client read position in receive buffer\n },\n\n /**\n * Sends the current WS request and registers callback. The async\n * parameter is ignored (WS flush is always async) and the callback\n * function parameter is required.\n * @param {object} async - Ignored.\n * @param {object} callback - The client completion callback.\n * @returns {undefined|string} Nothing (undefined)\n */\n flush: function flush(async, callback) {\n var self = this;\n if (this.isOpen()) {\n //Send data and register a callback to invoke the client callback\n this.socket.send(this.send_buf);\n this.callbacks.push(function () {\n var clientCallback = callback;\n return function (msg) {\n self.setRecvBuffer(msg);\n clientCallback();\n };\n }());\n } else {\n //Queue the send to go out __onOpen\n this.send_pending.push({\n buf: this.send_buf,\n cb: callback\n });\n }\n },\n\n __onOpen: function __onOpen() {\n var self = this;\n if (this.send_pending.length > 0) {\n //If the user made calls before the connection was fully\n //open, send them now\n this.send_pending.forEach(function (elem) {\n this.socket.send(elem.buf);\n this.callbacks.push(function () {\n var clientCallback = elem.cb;\n return function (msg) {\n self.setRecvBuffer(msg);\n clientCallback();\n };\n }());\n });\n this.send_pending = [];\n }\n },\n\n __onClose: function __onClose(evt) {\n this.__reset(this.url);\n },\n\n __onMessage: function __onMessage(evt) {\n if (this.callbacks.length) {\n this.callbacks.shift()(evt.data);\n }\n },\n\n __onError: function __onError(evt) {\n console.log(\"Thrift WebSocket Error: \" + evt.toString());\n this.socket.close();\n },\n\n /**\n * Sets the buffer to use when receiving server responses.\n * @param {string} buf - The buffer to receive server responses.\n */\n setRecvBuffer: function setRecvBuffer(buf) {\n this.recv_buf = buf;\n this.recv_buf_sz = this.recv_buf.length;\n this.wpos = this.recv_buf.length;\n this.rpos = 0;\n },\n\n /**\n * Returns true if the transport is open\n * @readonly\n * @returns {boolean}\n */\n isOpen: function isOpen() {\n return this.socket && this.socket.readyState == this.socket.OPEN;\n },\n\n /**\n * Opens the transport connection\n */\n open: function open() {\n //If OPEN/CONNECTING/CLOSING ignore additional opens\n if (this.socket && this.socket.readyState != this.socket.CLOSED) {\n return;\n }\n //If there is no socket or the socket is closed:\n this.socket = new WebSocket(this.url);\n this.socket.onopen = this.__onOpen.bind(this);\n this.socket.onmessage = this.__onMessage.bind(this);\n this.socket.onerror = this.__onError.bind(this);\n this.socket.onclose = this.__onClose.bind(this);\n },\n\n /**\n * Closes the transport connection\n */\n close: function close() {\n this.socket.close();\n },\n\n /**\n * Returns the specified number of characters from the response\n * buffer.\n * @param {number} len - The number of characters to return.\n * @returns {string} Characters sent by the server.\n */\n read: function read(len) {\n var avail = this.wpos - this.rpos;\n\n if (avail === 0) {\n return '';\n }\n\n var give = len;\n\n if (avail < len) {\n give = avail;\n }\n\n var ret = this.read_buf.substr(this.rpos, give);\n this.rpos += give;\n\n //clear buf when complete?\n return ret;\n },\n\n /**\n * Returns the entire response buffer.\n * @returns {string} Characters sent by the server.\n */\n readAll: function readAll() {\n return this.recv_buf;\n },\n\n /**\n * Sets the send buffer to buf.\n * @param {string} buf - The buffer to send.\n */\n write: function write(buf) {\n this.send_buf = buf;\n },\n\n /**\n * Returns the send buffer.\n * @readonly\n * @returns {string} The send buffer.\n */\n getSendBuffer: function getSendBuffer() {\n return this.send_buf;\n }\n\n};\n\n/**\n * Initializes a Thrift JSON protocol instance.\n * @constructor\n * @param {Thrift.Transport} transport - The transport to serialize to/from.\n * @classdesc Apache Thrift Protocols perform serialization which enables cross\n * language RPC. The Protocol type is the JavaScript browser implementation\n * of the Apache Thrift TJSONProtocol.\n * @example\n * var protocol = new Thrift.Protocol(transport);\n */\nThrift.TJSONProtocol = Thrift.Protocol = function (transport) {\n this.tstack = [];\n this.tpos = [];\n this.transport = transport;\n};\n\n/**\n * Thrift IDL type Id to string mapping.\n * @readonly\n * @see {@link Thrift.Type}\n */\nThrift.Protocol.Type = {};\nThrift.Protocol.Type[Thrift.Type.BOOL] = '\"tf\"';\nThrift.Protocol.Type[Thrift.Type.BYTE] = '\"i8\"';\nThrift.Protocol.Type[Thrift.Type.I16] = '\"i16\"';\nThrift.Protocol.Type[Thrift.Type.I32] = '\"i32\"';\nThrift.Protocol.Type[Thrift.Type.I64] = '\"i64\"';\nThrift.Protocol.Type[Thrift.Type.DOUBLE] = '\"dbl\"';\nThrift.Protocol.Type[Thrift.Type.STRUCT] = '\"rec\"';\nThrift.Protocol.Type[Thrift.Type.STRING] = '\"str\"';\nThrift.Protocol.Type[Thrift.Type.MAP] = '\"map\"';\nThrift.Protocol.Type[Thrift.Type.LIST] = '\"lst\"';\nThrift.Protocol.Type[Thrift.Type.SET] = '\"set\"';\n\n/**\n * Thrift IDL type string to Id mapping.\n * @readonly\n * @see {@link Thrift.Type}\n */\nThrift.Protocol.RType = {};\nThrift.Protocol.RType.tf = Thrift.Type.BOOL;\nThrift.Protocol.RType.i8 = Thrift.Type.BYTE;\nThrift.Protocol.RType.i16 = Thrift.Type.I16;\nThrift.Protocol.RType.i32 = Thrift.Type.I32;\nThrift.Protocol.RType.i64 = Thrift.Type.I64;\nThrift.Protocol.RType.dbl = Thrift.Type.DOUBLE;\nThrift.Protocol.RType.rec = Thrift.Type.STRUCT;\nThrift.Protocol.RType.str = Thrift.Type.STRING;\nThrift.Protocol.RType.map = Thrift.Type.MAP;\nThrift.Protocol.RType.lst = Thrift.Type.LIST;\nThrift.Protocol.RType.set = Thrift.Type.SET;\n\n/**\n * The TJSONProtocol version number.\n * @readonly\n * @const {number} Version\n * @memberof Thrift.Protocol\n */\nThrift.Protocol.Version = 1;\n\nThrift.Protocol.prototype = {\n /**\n * Returns the underlying transport.\n * @readonly\n * @returns {Thrift.Transport} The underlying transport.\n */\n getTransport: function getTransport() {\n return this.transport;\n },\n\n /**\n * Serializes the beginning of a Thrift RPC message.\n * @param {string} name - The service method to call.\n * @param {Thrift.MessageType} messageType - The type of method call.\n * @param {number} seqid - The sequence number of this call (always 0 in Apache Thrift).\n */\n writeMessageBegin: function writeMessageBegin(name, messageType, seqid) {\n this.tstack = [];\n this.tpos = [];\n\n this.tstack.push([Thrift.Protocol.Version, '\"' + name + '\"', messageType, seqid]);\n },\n\n /**\n * Serializes the end of a Thrift RPC message.\n */\n writeMessageEnd: function writeMessageEnd() {\n var obj = this.tstack.pop();\n\n this.wobj = this.tstack.pop();\n this.wobj.push(obj);\n\n this.wbuf = '[' + this.wobj.join(',') + ']';\n\n this.transport.write(this.wbuf);\n },\n\n /**\n * Serializes the beginning of a struct.\n * @param {string} name - The name of the struct.\n */\n writeStructBegin: function writeStructBegin(name) {\n this.tpos.push(this.tstack.length);\n this.tstack.push({});\n },\n\n /**\n * Serializes the end of a struct.\n */\n writeStructEnd: function writeStructEnd() {\n\n var p = this.tpos.pop();\n var struct = this.tstack[p];\n var str = '{';\n var first = true;\n for (var key in struct) {\n if (first) {\n first = false;\n } else {\n str += ',';\n }\n\n str += key + ':' + struct[key];\n }\n\n str += '}';\n this.tstack[p] = str;\n },\n\n /**\n * Serializes the beginning of a struct field.\n * @param {string} name - The name of the field.\n * @param {Thrift.Protocol.Type} fieldType - The data type of the field.\n * @param {number} fieldId - The field's unique identifier.\n */\n writeFieldBegin: function writeFieldBegin(name, fieldType, fieldId) {\n this.tpos.push(this.tstack.length);\n this.tstack.push({ 'fieldId': '\"' + fieldId + '\"', 'fieldType': Thrift.Protocol.Type[fieldType]\n });\n },\n\n /**\n * Serializes the end of a field.\n */\n writeFieldEnd: function writeFieldEnd() {\n var value = this.tstack.pop();\n var fieldInfo = this.tstack.pop();\n\n this.tstack[this.tstack.length - 1][fieldInfo.fieldId] = '{' + fieldInfo.fieldType + ':' + value + '}';\n this.tpos.pop();\n },\n\n /**\n * Serializes the end of the set of fields for a struct.\n */\n writeFieldStop: function writeFieldStop() {\n //na\n },\n\n /**\n * Serializes the beginning of a map collection.\n * @param {Thrift.Type} keyType - The data type of the key.\n * @param {Thrift.Type} valType - The data type of the value.\n * @param {number} [size] - The number of elements in the map (ignored).\n */\n writeMapBegin: function writeMapBegin(keyType, valType, size) {\n this.tpos.push(this.tstack.length);\n this.tstack.push([Thrift.Protocol.Type[keyType], Thrift.Protocol.Type[valType], 0]);\n },\n\n /**\n * Serializes the end of a map.\n */\n writeMapEnd: function writeMapEnd() {\n var p = this.tpos.pop();\n\n if (p == this.tstack.length) {\n return;\n }\n\n if ((this.tstack.length - p - 1) % 2 !== 0) {\n this.tstack.push('');\n }\n\n var size = (this.tstack.length - p - 1) / 2;\n\n this.tstack[p][this.tstack[p].length - 1] = size;\n\n var map = '}';\n var first = true;\n while (this.tstack.length > p + 1) {\n var v = this.tstack.pop();\n var k = this.tstack.pop();\n if (first) {\n first = false;\n } else {\n map = ',' + map;\n }\n\n if (!isNaN(k)) {\n k = '\"' + k + '\"';\n } //json \"keys\" need to be strings\n map = k + ':' + v + map;\n }\n map = '{' + map;\n\n this.tstack[p].push(map);\n this.tstack[p] = '[' + this.tstack[p].join(',') + ']';\n },\n\n /**\n * Serializes the beginning of a list collection.\n * @param {Thrift.Type} elemType - The data type of the elements.\n * @param {number} size - The number of elements in the list.\n */\n writeListBegin: function writeListBegin(elemType, size) {\n this.tpos.push(this.tstack.length);\n this.tstack.push([Thrift.Protocol.Type[elemType], size]);\n },\n\n /**\n * Serializes the end of a list.\n */\n writeListEnd: function writeListEnd() {\n var p = this.tpos.pop();\n\n while (this.tstack.length > p + 1) {\n var tmpVal = this.tstack[p + 1];\n this.tstack.splice(p + 1, 1);\n this.tstack[p].push(tmpVal);\n }\n\n this.tstack[p] = '[' + this.tstack[p].join(',') + ']';\n },\n\n /**\n * Serializes the beginning of a set collection.\n * @param {Thrift.Type} elemType - The data type of the elements.\n * @param {number} size - The number of elements in the list.\n */\n writeSetBegin: function writeSetBegin(elemType, size) {\n this.tpos.push(this.tstack.length);\n this.tstack.push([Thrift.Protocol.Type[elemType], size]);\n },\n\n /**\n * Serializes the end of a set.\n */\n writeSetEnd: function writeSetEnd() {\n var p = this.tpos.pop();\n\n while (this.tstack.length > p + 1) {\n var tmpVal = this.tstack[p + 1];\n this.tstack.splice(p + 1, 1);\n this.tstack[p].push(tmpVal);\n }\n\n this.tstack[p] = '[' + this.tstack[p].join(',') + ']';\n },\n\n /** Serializes a boolean */\n writeBool: function writeBool(value) {\n this.tstack.push(value ? 1 : 0);\n },\n\n /** Serializes a number */\n writeByte: function writeByte(i8) {\n this.tstack.push(i8);\n },\n\n /** Serializes a number */\n writeI16: function writeI16(i16) {\n this.tstack.push(i16);\n },\n\n /** Serializes a number */\n writeI32: function writeI32(i32) {\n this.tstack.push(i32);\n },\n\n /** Serializes a number */\n writeI64: function writeI64(i64) {\n this.tstack.push(i64);\n },\n\n /** Serializes a number */\n writeDouble: function writeDouble(dbl) {\n this.tstack.push(dbl);\n },\n\n /** Serializes a string */\n writeString: function writeString(str) {\n // We do not encode uri components for wire transfer:\n if (str === null) {\n this.tstack.push(null);\n } else {\n // concat may be slower than building a byte buffer\n var escapedString = '';\n for (var i = 0; i < str.length; i++) {\n var ch = str.charAt(i); // a single double quote: \"\n if (ch === '\\\"') {\n escapedString += '\\\\\\\"'; // write out as: \\\"\n } else if (ch === '\\\\') {\n // a single backslash\n escapedString += '\\\\\\\\'; // write out as double backslash\n } else if (ch === '\\b') {\n // a single backspace: invisible\n escapedString += '\\\\b'; // write out as: \\b\"\n } else if (ch === '\\f') {\n // a single formfeed: invisible\n escapedString += '\\\\f'; // write out as: \\f\"\n } else if (ch === '\\n') {\n // a single newline: invisible\n escapedString += '\\\\n'; // write out as: \\n\"\n } else if (ch === '\\r') {\n // a single return: invisible\n escapedString += '\\\\r'; // write out as: \\r\"\n } else if (ch === '\\t') {\n // a single tab: invisible\n escapedString += '\\\\t'; // write out as: \\t\"\n } else {\n escapedString += ch; // Else it need not be escaped\n }\n }\n this.tstack.push('\"' + escapedString + '\"');\n }\n },\n\n /** Serializes a string */\n writeBinary: function writeBinary(str) {\n this.writeString(str);\n },\n\n /**\n @class\n @name AnonReadMessageBeginReturn\n @property {string} fname - The name of the service method.\n @property {Thrift.MessageType} mtype - The type of message call.\n @property {number} rseqid - The sequence number of the message (0 in Thrift RPC).\n */\n /**\n * Deserializes the beginning of a message.\n * @returns {AnonReadMessageBeginReturn}\n */\n readMessageBegin: function readMessageBegin() {\n this.rstack = [];\n this.rpos = [];\n\n if (typeof JSON !== 'undefined' && typeof JSON.parse === 'function') {\n this.robj = JSON.parse(this.transport.readAll());\n } else if (typeof jQuery !== 'undefined') {\n this.robj = jQuery.parseJSON(this.transport.readAll());\n } else {\n this.robj = eval(this.transport.readAll());\n }\n\n var r = {};\n var version = this.robj.shift();\n\n if (version != Thrift.Protocol.Version) {\n throw 'Wrong thrift protocol version: ' + version;\n }\n\n r.fname = this.robj.shift();\n r.mtype = this.robj.shift();\n r.rseqid = this.robj.shift();\n\n //get to the main obj\n this.rstack.push(this.robj.shift());\n\n return r;\n },\n\n /** Deserializes the end of a message. */\n readMessageEnd: function readMessageEnd() {},\n\n /**\n * Deserializes the beginning of a struct.\n * @param {string} [name] - The name of the struct (ignored)\n * @returns {object} - An object with an empty string fname property\n */\n readStructBegin: function readStructBegin(name) {\n var r = {};\n r.fname = '';\n\n //incase this is an array of structs\n if (this.rstack[this.rstack.length - 1] instanceof Array) {\n this.rstack.push(this.rstack[this.rstack.length - 1].shift());\n }\n\n return r;\n },\n\n /** Deserializes the end of a struct. */\n readStructEnd: function readStructEnd() {\n if (this.rstack[this.rstack.length - 2] instanceof Array) {\n this.rstack.pop();\n }\n },\n\n /**\n @class\n @name AnonReadFieldBeginReturn\n @property {string} fname - The name of the field (always '').\n @property {Thrift.Type} ftype - The data type of the field.\n @property {number} fid - The unique identifier of the field.\n */\n /**\n * Deserializes the beginning of a field.\n * @returns {AnonReadFieldBeginReturn}\n */\n readFieldBegin: function readFieldBegin() {\n var r = {};\n\n var fid = -1;\n var ftype = Thrift.Type.STOP;\n\n //get a fieldId\n for (var f in this.rstack[this.rstack.length - 1]) {\n if (f === null) {\n continue;\n }\n\n fid = parseInt(f, 10);\n this.rpos.push(this.rstack.length);\n\n var field = this.rstack[this.rstack.length - 1][fid];\n\n //remove so we don't see it again\n delete this.rstack[this.rstack.length - 1][fid];\n\n this.rstack.push(field);\n\n break;\n }\n\n if (fid != -1) {\n\n //should only be 1 of these but this is the only\n //way to match a key\n for (var i in this.rstack[this.rstack.length - 1]) {\n if (Thrift.Protocol.RType[i] === null) {\n continue;\n }\n\n ftype = Thrift.Protocol.RType[i];\n this.rstack[this.rstack.length - 1] = this.rstack[this.rstack.length - 1][i];\n }\n }\n\n r.fname = '';\n r.ftype = ftype;\n r.fid = fid;\n\n return r;\n },\n\n /** Deserializes the end of a field. */\n readFieldEnd: function readFieldEnd() {\n var pos = this.rpos.pop();\n\n //get back to the right place in the stack\n while (this.rstack.length > pos) {\n this.rstack.pop();\n }\n },\n\n /**\n @class\n @name AnonReadMapBeginReturn\n @property {Thrift.Type} ktype - The data type of the key.\n @property {Thrift.Type} vtype - The data type of the value.\n @property {number} size - The number of elements in the map.\n */\n /**\n * Deserializes the beginning of a map.\n * @returns {AnonReadMapBeginReturn}\n */\n readMapBegin: function readMapBegin() {\n var map = this.rstack.pop();\n var first = map.shift();\n if (first instanceof Array) {\n this.rstack.push(map);\n map = first;\n first = map.shift();\n }\n\n var r = {};\n r.ktype = Thrift.Protocol.RType[first];\n r.vtype = Thrift.Protocol.RType[map.shift()];\n r.size = map.shift();\n\n this.rpos.push(this.rstack.length);\n this.rstack.push(map.shift());\n\n return r;\n },\n\n /** Deserializes the end of a map. */\n readMapEnd: function readMapEnd() {\n this.readFieldEnd();\n },\n\n /**\n @class\n @name AnonReadColBeginReturn\n @property {Thrift.Type} etype - The data type of the element.\n @property {number} size - The number of elements in the collection.\n */\n /**\n * Deserializes the beginning of a list.\n * @returns {AnonReadColBeginReturn}\n */\n readListBegin: function readListBegin() {\n var list = this.rstack[this.rstack.length - 1];\n\n var r = {};\n r.etype = Thrift.Protocol.RType[list.shift()];\n r.size = list.shift();\n\n this.rpos.push(this.rstack.length);\n this.rstack.push(list.shift());\n\n return r;\n },\n\n /** Deserializes the end of a list. */\n readListEnd: function readListEnd() {\n this.readFieldEnd();\n },\n\n /**\n * Deserializes the beginning of a set.\n * @returns {AnonReadColBeginReturn}\n */\n readSetBegin: function readSetBegin(elemType, size) {\n return this.readListBegin(elemType, size);\n },\n\n /** Deserializes the end of a set. */\n readSetEnd: function readSetEnd() {\n return this.readListEnd();\n },\n\n /** Returns an object with a value property set to\n * False unless the next number in the protocol buffer\n * is 1, in which case the value property is True */\n readBool: function readBool() {\n var r = this.readI32();\n\n if (r !== null && r.value == '1') {\n r.value = true;\n } else {\n r.value = false;\n }\n\n return r;\n },\n\n /** Returns the an object with a value property set to the\n next value found in the protocol buffer */\n readByte: function readByte() {\n return this.readI32();\n },\n\n /** Returns the an object with a value property set to the\n next value found in the protocol buffer */\n readI16: function readI16() {\n return this.readI32();\n },\n\n /** Returns the an object with a value property set to the\n next value found in the protocol buffer */\n readI32: function readI32(f) {\n if (f === undefined) {\n f = this.rstack[this.rstack.length - 1];\n }\n\n var r = {};\n\n if (f instanceof Array) {\n if (f.length === 0) {\n r.value = undefined;\n } else {\n r.value = f.shift();\n }\n } else if (f instanceof Object) {\n for (var i in f) {\n if (i === null) {\n continue;\n }\n this.rstack.push(f[i]);\n delete f[i];\n\n r.value = i;\n break;\n }\n } else {\n r.value = f;\n this.rstack.pop();\n }\n\n return r;\n },\n\n /** Returns the an object with a value property set to the\n next value found in the protocol buffer */\n readI64: function readI64() {\n return this.readI32();\n },\n\n /** Returns the an object with a value property set to the\n next value found in the protocol buffer */\n readDouble: function readDouble() {\n return this.readI32();\n },\n\n /** Returns the an object with a value property set to the\n next value found in the protocol buffer */\n readString: function readString() {\n var r = this.readI32();\n return r;\n },\n\n /** Returns the an object with a value property set to the\n next value found in the protocol buffer */\n readBinary: function readBinary() {\n return this.readString();\n },\n\n /**\n * Method to arbitrarily skip over data */\n skip: function skip(type) {\n var ret, i;\n switch (type) {\n case Thrift.Type.STOP:\n return null;\n\n case Thrift.Type.BOOL:\n return this.readBool();\n\n case Thrift.Type.BYTE:\n return this.readByte();\n\n case Thrift.Type.I16:\n return this.readI16();\n\n case Thrift.Type.I32:\n return this.readI32();\n\n case Thrift.Type.I64:\n return this.readI64();\n\n case Thrift.Type.DOUBLE:\n return this.readDouble();\n\n case Thrift.Type.STRING:\n return this.readString();\n\n case Thrift.Type.STRUCT:\n this.readStructBegin();\n while (true) {\n ret = this.readFieldBegin();\n if (ret.ftype == Thrift.Type.STOP) {\n break;\n }\n this.skip(ret.ftype);\n this.readFieldEnd();\n }\n this.readStructEnd();\n return null;\n\n case Thrift.Type.MAP:\n ret = this.readMapBegin();\n for (i = 0; i < ret.size; i++) {\n if (i > 0) {\n if (this.rstack.length > this.rpos[this.rpos.length - 1] + 1) {\n this.rstack.pop();\n }\n }\n this.skip(ret.ktype);\n this.skip(ret.vtype);\n }\n this.readMapEnd();\n return null;\n\n case Thrift.Type.SET:\n ret = this.readSetBegin();\n for (i = 0; i < ret.size; i++) {\n this.skip(ret.etype);\n }\n this.readSetEnd();\n return null;\n\n case Thrift.Type.LIST:\n ret = this.readListBegin();\n for (i = 0; i < ret.size; i++) {\n this.skip(ret.etype);\n }\n this.readListEnd();\n return null;\n }\n }\n};\n\n/**\n * Initializes a MutilplexProtocol Implementation as a Wrapper for Thrift.Protocol\n * @constructor\n */\nThrift.MultiplexProtocol = function (srvName, trans, strictRead, strictWrite) {\n Thrift.Protocol.call(this, trans, strictRead, strictWrite);\n this.serviceName = srvName;\n};\nThrift.inherits(Thrift.MultiplexProtocol, Thrift.Protocol, 'multiplexProtocol');\n\n/** Override writeMessageBegin method of prototype*/\nThrift.MultiplexProtocol.prototype.writeMessageBegin = function (name, type, seqid) {\n\n if (type === Thrift.MessageType.CALL || type === Thrift.MessageType.ONEWAY) {\n Thrift.Protocol.prototype.writeMessageBegin.call(this, this.serviceName + \":\" + name, type, seqid);\n } else {\n Thrift.Protocol.prototype.writeMessageBegin.call(this, name, type, seqid);\n }\n};\n\nThrift.Multiplexer = function () {\n this.seqid = 0;\n};\n\n/** Instantiates a multiplexed client for a specific service\n * @constructor\n * @param {String} serviceName - The transport to serialize to/from.\n * @param {Thrift.ServiceClient} SCl - The Service Client Class\n * @param {Thrift.Transport} transport - Thrift.Transport instance which provides remote host:port\n * @example\n * var mp = new Thrift.Multiplexer();\n * var transport = new Thrift.Transport(\"http://localhost:9090/foo.thrift\");\n * var protocol = new Thrift.Protocol(transport);\n * var client = mp.createClient('AuthService', AuthServiceClient, transport);\n*/\nThrift.Multiplexer.prototype.createClient = function (serviceName, SCl, transport) {\n if (SCl.Client) {\n SCl = SCl.Client;\n }\n var self = this;\n SCl.prototype.new_seqid = function () {\n self.seqid += 1;\n return self.seqid;\n };\n var client = new SCl(new Thrift.MultiplexProtocol(serviceName, transport));\n\n return client;\n};\n\nvar copyList, copyMap;\n\nwindow.copyList = function (lst, types) {\n\n if (!lst) {\n return lst;\n }\n\n var type;\n\n if (types.shift === undefined) {\n type = types;\n } else {\n type = types[0];\n }\n var Type = type;\n\n var len = lst.length,\n result = [],\n i,\n val;\n for (i = 0; i < len; i++) {\n val = lst[i];\n if (type === null) {\n result.push(val);\n } else if (type === copyMap || type === copyList) {\n result.push(type(val, types.slice(1)));\n } else {\n result.push(new Type(val));\n }\n }\n return result;\n};\n\nwindow.copyMap = function (obj, types) {\n\n if (!obj) {\n return obj;\n }\n\n var type;\n\n if (types.shift === undefined) {\n type = types;\n } else {\n type = types[0];\n }\n var Type = type;\n\n var result = {},\n val;\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n val = obj[prop];\n if (type === null) {\n result[prop] = val;\n } else if (type === copyMap || type === copyList) {\n result[prop] = type(val, types.slice(1));\n } else {\n result[prop] = new Type(val);\n }\n }\n }\n return result;\n};\n\nThrift.copyMap = copyMap;\nThrift.copyList = copyList;\n;window.Thrift = Thrift;"
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(2)(__webpack_require__(5))
/***/ }),
/* 5 */
/***/ (function(module, exports) {
module.exports = "\"use strict\";\n//\n// Autogenerated by Thrift Compiler (0.10.0)\n//\n// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n//\n\n\nwindow.TDatumType = {\n 'SMALLINT': 0,\n 'INT': 1,\n 'BIGINT': 2,\n 'FLOAT': 3,\n 'DECIMAL': 4,\n 'DOUBLE': 5,\n 'STR': 6,\n 'TIME': 7,\n 'TIMESTAMP': 8,\n 'DATE': 9,\n 'BOOL': 10,\n 'INTERVAL_DAY_TIME': 11,\n 'INTERVAL_YEAR_MONTH': 12\n};\nwindow.TEncodingType = {\n 'NONE': 0,\n 'FIXED': 1,\n 'RL': 2,\n 'DIFF': 3,\n 'DICT': 4,\n 'SPARSE': 5\n};\nwindow.TExecuteMode = {\n 'HYBRID': 0,\n 'GPU': 1,\n 'CPU': 2\n};\nwindow.TDeviceType = {\n 'CPU': 0,\n 'GPU': 1\n};\nwindow.TTableType = {\n 'DELIMITED': 0,\n 'POLYGON': 1\n};\nwindow.TMergeType = {\n 'UNION': 0,\n 'REDUCE': 1\n};\nwindow.TExpressionRangeType = {\n 'INVALID': 0,\n 'INTEGER': 1,\n 'FLOAT': 2,\n 'DOUBLE': 3\n};\nwindow.TDBObjectType = {\n 'AbstractDBObjectType': 0,\n 'DatabaseDBObjectType': 1,\n 'TableDBObjectType': 2,\n 'ColumnDBObjectType': 3,\n 'DashboardDBObjectType': 4\n};\nwindow.TDatumVal = function (args) {\n this.int_val = null;\n this.real_val = null;\n this.str_val = null;\n this.arr_val = null;\n if (args) {\n if (args.int_val !== undefined && args.int_val !== null) {\n this.int_val = args.int_val;\n }\n if (args.real_val !== undefined && args.real_val !== null) {\n this.real_val = args.real_val;\n }\n if (args.str_val !== undefined && args.str_val !== null) {\n this.str_val = args.str_val;\n }\n if (args.arr_val !== undefined && args.arr_val !== null) {\n this.arr_val = Thrift.copyList(args.arr_val, [null]);\n }\n }\n};\nTDatumVal.prototype = {};\nTDatumVal.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I64) {\n this.int_val = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.DOUBLE) {\n this.real_val = input.readDouble().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.str_val = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.LIST) {\n var _size0 = 0;\n var _rtmp34;\n this.arr_val = [];\n var _etype3 = 0;\n _rtmp34 = input.readListBegin();\n _etype3 = _rtmp34.etype;\n _size0 = _rtmp34.size;\n for (var _i5 = 0; _i5 < _size0; ++_i5) {\n var elem6 = null;\n elem6 = new TDatum();\n elem6.read(input);\n this.arr_val.push(elem6);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTDatumVal.prototype.write = function (output) {\n output.writeStructBegin('TDatumVal');\n if (this.int_val !== null && this.int_val !== undefined) {\n output.writeFieldBegin('int_val', Thrift.Type.I64, 1);\n output.writeI64(this.int_val);\n output.writeFieldEnd();\n }\n if (this.real_val !== null && this.real_val !== undefined) {\n output.writeFieldBegin('real_val', Thrift.Type.DOUBLE, 2);\n output.writeDouble(this.real_val);\n output.writeFieldEnd();\n }\n if (this.str_val !== null && this.str_val !== undefined) {\n output.writeFieldBegin('str_val', Thrift.Type.STRING, 3);\n output.writeString(this.str_val);\n output.writeFieldEnd();\n }\n if (this.arr_val !== null && this.arr_val !== undefined) {\n output.writeFieldBegin('arr_val', Thrift.Type.LIST, 4);\n output.writeListBegin(Thrift.Type.STRUCT, this.arr_val.length);\n for (var iter7 in this.arr_val) {\n if (this.arr_val.hasOwnProperty(iter7)) {\n iter7 = this.arr_val[iter7];\n iter7.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TDatum = function (args) {\n this.val = null;\n this.is_null = null;\n if (args) {\n if (args.val !== undefined && args.val !== null) {\n this.val = new TDatumVal(args.val);\n }\n if (args.is_null !== undefined && args.is_null !== null) {\n this.is_null = args.is_null;\n }\n }\n};\nTDatum.prototype = {};\nTDatum.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.val = new TDatumVal();\n this.val.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.BOOL) {\n this.is_null = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTDatum.prototype.write = function (output) {\n output.writeStructBegin('TDatum');\n if (this.val !== null && this.val !== undefined) {\n output.writeFieldBegin('val', Thrift.Type.STRUCT, 1);\n this.val.write(output);\n output.writeFieldEnd();\n }\n if (this.is_null !== null && this.is_null !== undefined) {\n output.writeFieldBegin('is_null', Thrift.Type.BOOL, 2);\n output.writeBool(this.is_null);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TStringValue = function (args) {\n this.str_val = null;\n this.is_null = null;\n if (args) {\n if (args.str_val !== undefined && args.str_val !== null) {\n this.str_val = args.str_val;\n }\n if (args.is_null !== undefined && args.is_null !== null) {\n this.is_null = args.is_null;\n }\n }\n};\nTStringValue.prototype = {};\nTStringValue.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.str_val = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.BOOL) {\n this.is_null = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTStringValue.prototype.write = function (output) {\n output.writeStructBegin('TStringValue');\n if (this.str_val !== null && this.str_val !== undefined) {\n output.writeFieldBegin('str_val', Thrift.Type.STRING, 1);\n output.writeString(this.str_val);\n output.writeFieldEnd();\n }\n if (this.is_null !== null && this.is_null !== undefined) {\n output.writeFieldBegin('is_null', Thrift.Type.BOOL, 2);\n output.writeBool(this.is_null);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TTypeInfo = function (args) {\n this.type = null;\n this.encoding = null;\n this.nullable = null;\n this.is_array = null;\n this.precision = null;\n this.scale = null;\n this.comp_param = null;\n if (args) {\n if (args.type !== undefined && args.type !== null) {\n this.type = args.type;\n }\n if (args.encoding !== undefined && args.encoding !== null) {\n this.encoding = args.encoding;\n }\n if (args.nullable !== undefined && args.nullable !== null) {\n this.nullable = args.nullable;\n }\n if (args.is_array !== undefined && args.is_array !== null) {\n this.is_array = args.is_array;\n }\n if (args.precision !== undefined && args.precision !== null) {\n this.precision = args.precision;\n }\n if (args.scale !== undefined && args.scale !== null) {\n this.scale = args.scale;\n }\n if (args.comp_param !== undefined && args.comp_param !== null) {\n this.comp_param = args.comp_param;\n }\n }\n};\nTTypeInfo.prototype = {};\nTTypeInfo.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I32) {\n this.type = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I32) {\n this.encoding = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.BOOL) {\n this.nullable = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.BOOL) {\n this.is_array = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.I32) {\n this.precision = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 6:\n if (ftype == Thrift.Type.I32) {\n this.scale = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 7:\n if (ftype == Thrift.Type.I32) {\n this.comp_param = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTTypeInfo.prototype.write = function (output) {\n output.writeStructBegin('TTypeInfo');\n if (this.type !== null && this.type !== undefined) {\n output.writeFieldBegin('type', Thrift.Type.I32, 1);\n output.writeI32(this.type);\n output.writeFieldEnd();\n }\n if (this.encoding !== null && this.encoding !== undefined) {\n output.writeFieldBegin('encoding', Thrift.Type.I32, 4);\n output.writeI32(this.encoding);\n output.writeFieldEnd();\n }\n if (this.nullable !== null && this.nullable !== undefined) {\n output.writeFieldBegin('nullable', Thrift.Type.BOOL, 2);\n output.writeBool(this.nullable);\n output.writeFieldEnd();\n }\n if (this.is_array !== null && this.is_array !== undefined) {\n output.writeFieldBegin('is_array', Thrift.Type.BOOL, 3);\n output.writeBool(this.is_array);\n output.writeFieldEnd();\n }\n if (this.precision !== null && this.precision !== undefined) {\n output.writeFieldBegin('precision', Thrift.Type.I32, 5);\n output.writeI32(this.precision);\n output.writeFieldEnd();\n }\n if (this.scale !== null && this.scale !== undefined) {\n output.writeFieldBegin('scale', Thrift.Type.I32, 6);\n output.writeI32(this.scale);\n output.writeFieldEnd();\n }\n if (this.comp_param !== null && this.comp_param !== undefined) {\n output.writeFieldBegin('comp_param', Thrift.Type.I32, 7);\n output.writeI32(this.comp_param);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TColumnType = function (args) {\n this.col_name = null;\n this.col_type = null;\n this.is_reserved_keyword = null;\n this.src_name = null;\n this.is_system = null;\n if (args) {\n if (args.col_name !== undefined && args.col_name !== null) {\n this.col_name = args.col_name;\n }\n if (args.col_type !== undefined && args.col_type !== null) {\n this.col_type = new TTypeInfo(args.col_type);\n }\n if (args.is_reserved_keyword !== undefined && args.is_reserved_keyword !== null) {\n this.is_reserved_keyword = args.is_reserved_keyword;\n }\n if (args.src_name !== undefined && args.src_name !== null) {\n this.src_name = args.src_name;\n }\n if (args.is_system !== undefined && args.is_system !== null) {\n this.is_system = args.is_system;\n }\n }\n};\nTColumnType.prototype = {};\nTColumnType.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.col_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRUCT) {\n this.col_type = new TTypeInfo();\n this.col_type.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.BOOL) {\n this.is_reserved_keyword = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.STRING) {\n this.src_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.BOOL) {\n this.is_system = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTColumnType.prototype.write = function (output) {\n output.writeStructBegin('TColumnType');\n if (this.col_name !== null && this.col_name !== undefined) {\n output.writeFieldBegin('col_name', Thrift.Type.STRING, 1);\n output.writeString(this.col_name);\n output.writeFieldEnd();\n }\n if (this.col_type !== null && this.col_type !== undefined) {\n output.writeFieldBegin('col_type', Thrift.Type.STRUCT, 2);\n this.col_type.write(output);\n output.writeFieldEnd();\n }\n if (this.is_reserved_keyword !== null && this.is_reserved_keyword !== undefined) {\n output.writeFieldBegin('is_reserved_keyword', Thrift.Type.BOOL, 3);\n output.writeBool(this.is_reserved_keyword);\n output.writeFieldEnd();\n }\n if (this.src_name !== null && this.src_name !== undefined) {\n output.writeFieldBegin('src_name', Thrift.Type.STRING, 4);\n output.writeString(this.src_name);\n output.writeFieldEnd();\n }\n if (this.is_system !== null && this.is_system !== undefined) {\n output.writeFieldBegin('is_system', Thrift.Type.BOOL, 5);\n output.writeBool(this.is_system);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TRow = function (args) {\n this.cols = null;\n if (args) {\n if (args.cols !== undefined && args.cols !== null) {\n this.cols = Thrift.copyList(args.cols, [TDatum]);\n }\n }\n};\nTRow.prototype = {};\nTRow.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.LIST) {\n var _size8 = 0;\n var _rtmp312;\n this.cols = [];\n var _etype11 = 0;\n _rtmp312 = input.readListBegin();\n _etype11 = _rtmp312.etype;\n _size8 = _rtmp312.size;\n for (var _i13 = 0; _i13 < _size8; ++_i13) {\n var elem14 = null;\n elem14 = new TDatum();\n elem14.read(input);\n this.cols.push(elem14);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTRow.prototype.write = function (output) {\n output.writeStructBegin('TRow');\n if (this.cols !== null && this.cols !== undefined) {\n output.writeFieldBegin('cols', Thrift.Type.LIST, 1);\n output.writeListBegin(Thrift.Type.STRUCT, this.cols.length);\n for (var iter15 in this.cols) {\n if (this.cols.hasOwnProperty(iter15)) {\n iter15 = this.cols[iter15];\n iter15.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TColumnData = function (args) {\n this.int_col = null;\n this.real_col = null;\n this.str_col = null;\n this.arr_col = null;\n if (args) {\n if (args.int_col !== undefined && args.int_col !== null) {\n this.int_col = Thrift.copyList(args.int_col, [null]);\n }\n if (args.real_col !== undefined && args.real_col !== null) {\n this.real_col = Thrift.copyList(args.real_col, [null]);\n }\n if (args.str_col !== undefined && args.str_col !== null) {\n this.str_col = Thrift.copyList(args.str_col, [null]);\n }\n if (args.arr_col !== undefined && args.arr_col !== null) {\n this.arr_col = Thrift.copyList(args.arr_col, [null]);\n }\n }\n};\nTColumnData.prototype = {};\nTColumnData.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.LIST) {\n var _size16 = 0;\n var _rtmp320;\n this.int_col = [];\n var _etype19 = 0;\n _rtmp320 = input.readListBegin();\n _etype19 = _rtmp320.etype;\n _size16 = _rtmp320.size;\n for (var _i21 = 0; _i21 < _size16; ++_i21) {\n var elem22 = null;\n elem22 = input.readI64().value;\n this.int_col.push(elem22);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.LIST) {\n var _size23 = 0;\n var _rtmp327;\n this.real_col = [];\n var _etype26 = 0;\n _rtmp327 = input.readListBegin();\n _etype26 = _rtmp327.etype;\n _size23 = _rtmp327.size;\n for (var _i28 = 0; _i28 < _size23; ++_i28) {\n var elem29 = null;\n elem29 = input.readDouble().value;\n this.real_col.push(elem29);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.LIST) {\n var _size30 = 0;\n var _rtmp334;\n this.str_col = [];\n var _etype33 = 0;\n _rtmp334 = input.readListBegin();\n _etype33 = _rtmp334.etype;\n _size30 = _rtmp334.size;\n for (var _i35 = 0; _i35 < _size30; ++_i35) {\n var elem36 = null;\n elem36 = input.readString().value;\n this.str_col.push(elem36);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.LIST) {\n var _size37 = 0;\n var _rtmp341;\n this.arr_col = [];\n var _etype40 = 0;\n _rtmp341 = input.readListBegin();\n _etype40 = _rtmp341.etype;\n _size37 = _rtmp341.size;\n for (var _i42 = 0; _i42 < _size37; ++_i42) {\n var elem43 = null;\n elem43 = new TColumn();\n elem43.read(input);\n this.arr_col.push(elem43);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTColumnData.prototype.write = function (output) {\n output.writeStructBegin('TColumnData');\n if (this.int_col !== null && this.int_col !== undefined) {\n output.writeFieldBegin('int_col', Thrift.Type.LIST, 1);\n output.writeListBegin(Thrift.Type.I64, this.int_col.length);\n for (var iter44 in this.int_col) {\n if (this.int_col.hasOwnProperty(iter44)) {\n iter44 = this.int_col[iter44];\n output.writeI64(iter44);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.real_col !== null && this.real_col !== undefined) {\n output.writeFieldBegin('real_col', Thrift.Type.LIST, 2);\n output.writeListBegin(Thrift.Type.DOUBLE, this.real_col.length);\n for (var iter45 in this.real_col) {\n if (this.real_col.hasOwnProperty(iter45)) {\n iter45 = this.real_col[iter45];\n output.writeDouble(iter45);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.str_col !== null && this.str_col !== undefined) {\n output.writeFieldBegin('str_col', Thrift.Type.LIST, 3);\n output.writeListBegin(Thrift.Type.STRING, this.str_col.length);\n for (var iter46 in this.str_col) {\n if (this.str_col.hasOwnProperty(iter46)) {\n iter46 = this.str_col[iter46];\n output.writeString(iter46);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.arr_col !== null && this.arr_col !== undefined) {\n output.writeFieldBegin('arr_col', Thrift.Type.LIST, 4);\n output.writeListBegin(Thrift.Type.STRUCT, this.arr_col.length);\n for (var iter47 in this.arr_col) {\n if (this.arr_col.hasOwnProperty(iter47)) {\n iter47 = this.arr_col[iter47];\n iter47.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TColumn = function (args) {\n this.data = null;\n this.nulls = null;\n if (args) {\n if (args.data !== undefined && args.data !== null) {\n this.data = new TColumnData(args.data);\n }\n if (args.nulls !== undefined && args.nulls !== null) {\n this.nulls = Thrift.copyList(args.nulls, [null]);\n }\n }\n};\nTColumn.prototype = {};\nTColumn.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.data = new TColumnData();\n this.data.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.LIST) {\n var _size48 = 0;\n var _rtmp352;\n this.nulls = [];\n var _etype51 = 0;\n _rtmp352 = input.readListBegin();\n _etype51 = _rtmp352.etype;\n _size48 = _rtmp352.size;\n for (var _i53 = 0; _i53 < _size48; ++_i53) {\n var elem54 = null;\n elem54 = input.readBool().value;\n this.nulls.push(elem54);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTColumn.prototype.write = function (output) {\n output.writeStructBegin('TColumn');\n if (this.data !== null && this.data !== undefined) {\n output.writeFieldBegin('data', Thrift.Type.STRUCT, 1);\n this.data.write(output);\n output.writeFieldEnd();\n }\n if (this.nulls !== null && this.nulls !== undefined) {\n output.writeFieldBegin('nulls', Thrift.Type.LIST, 2);\n output.writeListBegin(Thrift.Type.BOOL, this.nulls.length);\n for (var iter55 in this.nulls) {\n if (this.nulls.hasOwnProperty(iter55)) {\n iter55 = this.nulls[iter55];\n output.writeBool(iter55);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TStringRow = function (args) {\n this.cols = null;\n if (args) {\n if (args.cols !== undefined && args.cols !== null) {\n this.cols = Thrift.copyList(args.cols, [TStringValue]);\n }\n }\n};\nTStringRow.prototype = {};\nTStringRow.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.LIST) {\n var _size56 = 0;\n var _rtmp360;\n this.cols = [];\n var _etype59 = 0;\n _rtmp360 = input.readListBegin();\n _etype59 = _rtmp360.etype;\n _size56 = _rtmp360.size;\n for (var _i61 = 0; _i61 < _size56; ++_i61) {\n var elem62 = null;\n elem62 = new TStringValue();\n elem62.read(input);\n this.cols.push(elem62);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTStringRow.prototype.write = function (output) {\n output.writeStructBegin('TStringRow');\n if (this.cols !== null && this.cols !== undefined) {\n output.writeFieldBegin('cols', Thrift.Type.LIST, 1);\n output.writeListBegin(Thrift.Type.STRUCT, this.cols.length);\n for (var iter63 in this.cols) {\n if (this.cols.hasOwnProperty(iter63)) {\n iter63 = this.cols[iter63];\n iter63.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TStepResult = function (args) {\n this.serialized_rows = null;\n this.execution_finished = null;\n this.merge_type = null;\n this.sharded = null;\n this.row_desc = null;\n this.node_id = null;\n if (args) {\n if (args.serialized_rows !== undefined && args.serialized_rows !== null) {\n this.serialized_rows = args.serialized_rows;\n }\n if (args.execution_finished !== undefined && args.execution_finished !== null) {\n this.execution_finished = args.execution_finished;\n }\n if (args.merge_type !== undefined && args.merge_type !== null) {\n this.merge_type = args.merge_type;\n }\n if (args.sharded !== undefined && args.sharded !== null) {\n this.sharded = args.sharded;\n }\n if (args.row_desc !== undefined && args.row_desc !== null) {\n this.row_desc = Thrift.copyList(args.row_desc, [TColumnType]);\n }\n if (args.node_id !== undefined && args.node_id !== null) {\n this.node_id = args.node_id;\n }\n }\n};\nTStepResult.prototype = {};\nTStepResult.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.serialized_rows = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.BOOL) {\n this.execution_finished = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I32) {\n this.merge_type = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.BOOL) {\n this.sharded = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.LIST) {\n var _size64 = 0;\n var _rtmp368;\n this.row_desc = [];\n var _etype67 = 0;\n _rtmp368 = input.readListBegin();\n _etype67 = _rtmp368.etype;\n _size64 = _rtmp368.size;\n for (var _i69 = 0; _i69 < _size64; ++_i69) {\n var elem70 = null;\n elem70 = new TColumnType();\n elem70.read(input);\n this.row_desc.push(elem70);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 6:\n if (ftype == Thrift.Type.I32) {\n this.node_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTStepResult.prototype.write = function (output) {\n output.writeStructBegin('TStepResult');\n if (this.serialized_rows !== null && this.serialized_rows !== undefined) {\n output.writeFieldBegin('serialized_rows', Thrift.Type.STRING, 1);\n output.writeString(this.serialized_rows);\n output.writeFieldEnd();\n }\n if (this.execution_finished !== null && this.execution_finished !== undefined) {\n output.writeFieldBegin('execution_finished', Thrift.Type.BOOL, 2);\n output.writeBool(this.execution_finished);\n output.writeFieldEnd();\n }\n if (this.merge_type !== null && this.merge_type !== undefined) {\n output.writeFieldBegin('merge_type', Thrift.Type.I32, 3);\n output.writeI32(this.merge_type);\n output.writeFieldEnd();\n }\n if (this.sharded !== null && this.sharded !== undefined) {\n output.writeFieldBegin('sharded', Thrift.Type.BOOL, 4);\n output.writeBool(this.sharded);\n output.writeFieldEnd();\n }\n if (this.row_desc !== null && this.row_desc !== undefined) {\n output.writeFieldBegin('row_desc', Thrift.Type.LIST, 5);\n output.writeListBegin(Thrift.Type.STRUCT, this.row_desc.length);\n for (var iter71 in this.row_desc) {\n if (this.row_desc.hasOwnProperty(iter71)) {\n iter71 = this.row_desc[iter71];\n iter71.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.node_id !== null && this.node_id !== undefined) {\n output.writeFieldBegin('node_id', Thrift.Type.I32, 6);\n output.writeI32(this.node_id);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TRowSet = function (args) {\n this.row_desc = null;\n this.rows = null;\n this.columns = null;\n this.is_columnar = null;\n if (args) {\n if (args.row_desc !== undefined && args.row_desc !== null) {\n this.row_desc = Thrift.copyList(args.row_desc, [TColumnType]);\n }\n if (args.rows !== undefined && args.rows !== null) {\n this.rows = Thrift.copyList(args.rows, [TRow]);\n }\n if (args.columns !== undefined && args.columns !== null) {\n this.columns = Thrift.copyList(args.columns, [TColumn]);\n }\n if (args.is_columnar !== undefined && args.is_columnar !== null) {\n this.is_columnar = args.is_columnar;\n }\n }\n};\nTRowSet.prototype = {};\nTRowSet.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.LIST) {\n var _size72 = 0;\n var _rtmp376;\n this.row_desc = [];\n var _etype75 = 0;\n _rtmp376 = input.readListBegin();\n _etype75 = _rtmp376.etype;\n _size72 = _rtmp376.size;\n for (var _i77 = 0; _i77 < _size72; ++_i77) {\n var elem78 = null;\n elem78 = new TColumnType();\n elem78.read(input);\n this.row_desc.push(elem78);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.LIST) {\n var _size79 = 0;\n var _rtmp383;\n this.rows = [];\n var _etype82 = 0;\n _rtmp383 = input.readListBegin();\n _etype82 = _rtmp383.etype;\n _size79 = _rtmp383.size;\n for (var _i84 = 0; _i84 < _size79; ++_i84) {\n var elem85 = null;\n elem85 = new TRow();\n elem85.read(input);\n this.rows.push(elem85);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.LIST) {\n var _size86 = 0;\n var _rtmp390;\n this.columns = [];\n var _etype89 = 0;\n _rtmp390 = input.readListBegin();\n _etype89 = _rtmp390.etype;\n _size86 = _rtmp390.size;\n for (var _i91 = 0; _i91 < _size86; ++_i91) {\n var elem92 = null;\n elem92 = new TColumn();\n elem92.read(input);\n this.columns.push(elem92);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.BOOL) {\n this.is_columnar = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTRowSet.prototype.write = function (output) {\n output.writeStructBegin('TRowSet');\n if (this.row_desc !== null && this.row_desc !== undefined) {\n output.writeFieldBegin('row_desc', Thrift.Type.LIST, 1);\n output.writeListBegin(Thrift.Type.STRUCT, this.row_desc.length);\n for (var iter93 in this.row_desc) {\n if (this.row_desc.hasOwnProperty(iter93)) {\n iter93 = this.row_desc[iter93];\n iter93.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.rows !== null && this.rows !== undefined) {\n output.writeFieldBegin('rows', Thrift.Type.LIST, 2);\n output.writeListBegin(Thrift.Type.STRUCT, this.rows.length);\n for (var iter94 in this.rows) {\n if (this.rows.hasOwnProperty(iter94)) {\n iter94 = this.rows[iter94];\n iter94.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.columns !== null && this.columns !== undefined) {\n output.writeFieldBegin('columns', Thrift.Type.LIST, 3);\n output.writeListBegin(Thrift.Type.STRUCT, this.columns.length);\n for (var iter95 in this.columns) {\n if (this.columns.hasOwnProperty(iter95)) {\n iter95 = this.columns[iter95];\n iter95.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.is_columnar !== null && this.is_columnar !== undefined) {\n output.writeFieldBegin('is_columnar', Thrift.Type.BOOL, 4);\n output.writeBool(this.is_columnar);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TQueryResult = function (args) {\n this.row_set = null;\n this.execution_time_ms = null;\n this.total_time_ms = null;\n this.nonce = null;\n if (args) {\n if (args.row_set !== undefined && args.row_set !== null) {\n this.row_set = new TRowSet(args.row_set);\n }\n if (args.execution_time_ms !== undefined && args.execution_time_ms !== null) {\n this.execution_time_ms = args.execution_time_ms;\n }\n if (args.total_time_ms !== undefined && args.total_time_ms !== null) {\n this.total_time_ms = args.total_time_ms;\n }\n if (args.nonce !== undefined && args.nonce !== null) {\n this.nonce = args.nonce;\n }\n }\n};\nTQueryResult.prototype = {};\nTQueryResult.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.row_set = new TRowSet();\n this.row_set.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.execution_time_ms = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I64) {\n this.total_time_ms = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.STRING) {\n this.nonce = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTQueryResult.prototype.write = function (output) {\n output.writeStructBegin('TQueryResult');\n if (this.row_set !== null && this.row_set !== undefined) {\n output.writeFieldBegin('row_set', Thrift.Type.STRUCT, 1);\n this.row_set.write(output);\n output.writeFieldEnd();\n }\n if (this.execution_time_ms !== null && this.execution_time_ms !== undefined) {\n output.writeFieldBegin('execution_time_ms', Thrift.Type.I64, 2);\n output.writeI64(this.execution_time_ms);\n output.writeFieldEnd();\n }\n if (this.total_time_ms !== null && this.total_time_ms !== undefined) {\n output.writeFieldBegin('total_time_ms', Thrift.Type.I64, 3);\n output.writeI64(this.total_time_ms);\n output.writeFieldEnd();\n }\n if (this.nonce !== null && this.nonce !== undefined) {\n output.writeFieldBegin('nonce', Thrift.Type.STRING, 4);\n output.writeString(this.nonce);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TDataFrame = function (args) {\n this.sm_handle = null;\n this.sm_size = null;\n this.df_handle = null;\n this.df_size = null;\n if (args) {\n if (args.sm_handle !== undefined && args.sm_handle !== null) {\n this.sm_handle = args.sm_handle;\n }\n if (args.sm_size !== undefined && args.sm_size !== null) {\n this.sm_size = args.sm_size;\n }\n if (args.df_handle !== undefined && args.df_handle !== null) {\n this.df_handle = args.df_handle;\n }\n if (args.df_size !== undefined && args.df_size !== null) {\n this.df_size = args.df_size;\n }\n }\n};\nTDataFrame.prototype = {};\nTDataFrame.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.sm_handle = input.readBinary().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.sm_size = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.df_handle = input.readBinary().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I64) {\n this.df_size = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTDataFrame.prototype.write = function (output) {\n output.writeStructBegin('TDataFrame');\n if (this.sm_handle !== null && this.sm_handle !== undefined) {\n output.writeFieldBegin('sm_handle', Thrift.Type.STRING, 1);\n output.writeBinary(this.sm_handle);\n output.writeFieldEnd();\n }\n if (this.sm_size !== null && this.sm_size !== undefined) {\n output.writeFieldBegin('sm_size', Thrift.Type.I64, 2);\n output.writeI64(this.sm_size);\n output.writeFieldEnd();\n }\n if (this.df_handle !== null && this.df_handle !== undefined) {\n output.writeFieldBegin('df_handle', Thrift.Type.STRING, 3);\n output.writeBinary(this.df_handle);\n output.writeFieldEnd();\n }\n if (this.df_size !== null && this.df_size !== undefined) {\n output.writeFieldBegin('df_size', Thrift.Type.I64, 4);\n output.writeI64(this.df_size);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TDBInfo = function (args) {\n this.db_name = null;\n this.db_owner = null;\n if (args) {\n if (args.db_name !== undefined && args.db_name !== null) {\n this.db_name = args.db_name;\n }\n if (args.db_owner !== undefined && args.db_owner !== null) {\n this.db_owner = args.db_owner;\n }\n }\n};\nTDBInfo.prototype = {};\nTDBInfo.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.db_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.db_owner = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTDBInfo.prototype.write = function (output) {\n output.writeStructBegin('TDBInfo');\n if (this.db_name !== null && this.db_name !== undefined) {\n output.writeFieldBegin('db_name', Thrift.Type.STRING, 1);\n output.writeString(this.db_name);\n output.writeFieldEnd();\n }\n if (this.db_owner !== null && this.db_owner !== undefined) {\n output.writeFieldBegin('db_owner', Thrift.Type.STRING, 2);\n output.writeString(this.db_owner);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TMapDException = function (args) {\n this.error_msg = null;\n if (args) {\n if (args.error_msg !== undefined && args.error_msg !== null) {\n this.error_msg = args.error_msg;\n }\n }\n};\nThrift.inherits(TMapDException, Thrift.TException);\nTMapDException.prototype.name = 'TMapDException';\nTMapDException.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.error_msg = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTMapDException.prototype.write = function (output) {\n output.writeStructBegin('TMapDException');\n if (this.error_msg !== null && this.error_msg !== undefined) {\n output.writeFieldBegin('error_msg', Thrift.Type.STRING, 1);\n output.writeString(this.error_msg);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TRenderProperty = function (args) {\n this.property_type = null;\n this.property_value = null;\n if (args) {\n if (args.property_type !== undefined && args.property_type !== null) {\n this.property_type = args.property_type;\n }\n if (args.property_value !== undefined && args.property_value !== null) {\n this.property_value = new TDatumVal(args.property_value);\n }\n }\n};\nTRenderProperty.prototype = {};\nTRenderProperty.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I32) {\n this.property_type = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRUCT) {\n this.property_value = new TDatumVal();\n this.property_value.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTRenderProperty.prototype.write = function (output) {\n output.writeStructBegin('TRenderProperty');\n if (this.property_type !== null && this.property_type !== undefined) {\n output.writeFieldBegin('property_type', Thrift.Type.I32, 1);\n output.writeI32(this.property_type);\n output.writeFieldEnd();\n }\n if (this.property_value !== null && this.property_value !== undefined) {\n output.writeFieldBegin('property_value', Thrift.Type.STRUCT, 2);\n this.property_value.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TCopyParams = function (args) {\n this.delimiter = null;\n this.null_str = null;\n this.has_header = null;\n this.quoted = null;\n this.quote = null;\n this.escape = null;\n this.line_delim = null;\n this.array_delim = null;\n this.array_begin = null;\n this.array_end = null;\n this.threads = null;\n this.table_type = 0;\n if (args) {\n if (args.delimiter !== undefined && args.delimiter !== null) {\n this.delimiter = args.delimiter;\n }\n if (args.null_str !== undefined && args.null_str !== null) {\n this.null_str = args.null_str;\n }\n if (args.has_header !== undefined && args.has_header !== null) {\n this.has_header = args.has_header;\n }\n if (args.quoted !== undefined && args.quoted !== null) {\n this.quoted = args.quoted;\n }\n if (args.quote !== undefined && args.quote !== null) {\n this.quote = args.quote;\n }\n if (args.escape !== undefined && args.escape !== null) {\n this.escape = args.escape;\n }\n if (args.line_delim !== undefined && args.line_delim !== null) {\n this.line_delim = args.line_delim;\n }\n if (args.array_delim !== undefined && args.array_delim !== null) {\n this.array_delim = args.array_delim;\n }\n if (args.array_begin !== undefined && args.array_begin !== null) {\n this.array_begin = args.array_begin;\n }\n if (args.array_end !== undefined && args.array_end !== null) {\n this.array_end = args.array_end;\n }\n if (args.threads !== undefined && args.threads !== null) {\n this.threads = args.threads;\n }\n if (args.table_type !== undefined && args.table_type !== null) {\n this.table_type = args.table_type;\n }\n }\n};\nTCopyParams.prototype = {};\nTCopyParams.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.delimiter = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.null_str = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.BOOL) {\n this.has_header = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.BOOL) {\n this.quoted = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.STRING) {\n this.quote = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 6:\n if (ftype == Thrift.Type.STRING) {\n this.escape = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 7:\n if (ftype == Thrift.Type.STRING) {\n this.line_delim = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 8:\n if (ftype == Thrift.Type.STRING) {\n this.array_delim = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 9:\n if (ftype == Thrift.Type.STRING) {\n this.array_begin = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 10:\n if (ftype == Thrift.Type.STRING) {\n this.array_end = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 11:\n if (ftype == Thrift.Type.I32) {\n this.threads = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 12:\n if (ftype == Thrift.Type.I32) {\n this.table_type = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTCopyParams.prototype.write = function (output) {\n output.writeStructBegin('TCopyParams');\n if (this.delimiter !== null && this.delimiter !== undefined) {\n output.writeFieldBegin('delimiter', Thrift.Type.STRING, 1);\n output.writeString(this.delimiter);\n output.writeFieldEnd();\n }\n if (this.null_str !== null && this.null_str !== undefined) {\n output.writeFieldBegin('null_str', Thrift.Type.STRING, 2);\n output.writeString(this.null_str);\n output.writeFieldEnd();\n }\n if (this.has_header !== null && this.has_header !== undefined) {\n output.writeFieldBegin('has_header', Thrift.Type.BOOL, 3);\n output.writeBool(this.has_header);\n output.writeFieldEnd();\n }\n if (this.quoted !== null && this.quoted !== undefined) {\n output.writeFieldBegin('quoted', Thrift.Type.BOOL, 4);\n output.writeBool(this.quoted);\n output.writeFieldEnd();\n }\n if (this.quote !== null && this.quote !== undefined) {\n output.writeFieldBegin('quote', Thrift.Type.STRING, 5);\n output.writeString(this.quote);\n output.writeFieldEnd();\n }\n if (this.escape !== null && this.escape !== undefined) {\n output.writeFieldBegin('escape', Thrift.Type.STRING, 6);\n output.writeString(this.escape);\n output.writeFieldEnd();\n }\n if (this.line_delim !== null && this.line_delim !== undefined) {\n output.writeFieldBegin('line_delim', Thrift.Type.STRING, 7);\n output.writeString(this.line_delim);\n output.writeFieldEnd();\n }\n if (this.array_delim !== null && this.array_delim !== undefined) {\n output.writeFieldBegin('array_delim', Thrift.Type.STRING, 8);\n output.writeString(this.array_delim);\n output.writeFieldEnd();\n }\n if (this.array_begin !== null && this.array_begin !== undefined) {\n output.writeFieldBegin('array_begin', Thrift.Type.STRING, 9);\n output.writeString(this.array_begin);\n output.writeFieldEnd();\n }\n if (this.array_end !== null && this.array_end !== undefined) {\n output.writeFieldBegin('array_end', Thrift.Type.STRING, 10);\n output.writeString(this.array_end);\n output.writeFieldEnd();\n }\n if (this.threads !== null && this.threads !== undefined) {\n output.writeFieldBegin('threads', Thrift.Type.I32, 11);\n output.writeI32(this.threads);\n output.writeFieldEnd();\n }\n if (this.table_type !== null && this.table_type !== undefined) {\n output.writeFieldBegin('table_type', Thrift.Type.I32, 12);\n output.writeI32(this.table_type);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TDetectResult = function (args) {\n this.row_set = null;\n this.copy_params = null;\n if (args) {\n if (args.row_set !== undefined && args.row_set !== null) {\n this.row_set = new TRowSet(args.row_set);\n }\n if (args.copy_params !== undefined && args.copy_params !== null) {\n this.copy_params = new TCopyParams(args.copy_params);\n }\n }\n};\nTDetectResult.prototype = {};\nTDetectResult.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.row_set = new TRowSet();\n this.row_set.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRUCT) {\n this.copy_params = new TCopyParams();\n this.copy_params.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTDetectResult.prototype.write = function (output) {\n output.writeStructBegin('TDetectResult');\n if (this.row_set !== null && this.row_set !== undefined) {\n output.writeFieldBegin('row_set', Thrift.Type.STRUCT, 1);\n this.row_set.write(output);\n output.writeFieldEnd();\n }\n if (this.copy_params !== null && this.copy_params !== undefined) {\n output.writeFieldBegin('copy_params', Thrift.Type.STRUCT, 2);\n this.copy_params.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TImportStatus = function (args) {\n this.elapsed = null;\n this.rows_completed = null;\n this.rows_estimated = null;\n this.rows_rejected = null;\n if (args) {\n if (args.elapsed !== undefined && args.elapsed !== null) {\n this.elapsed = args.elapsed;\n }\n if (args.rows_completed !== undefined && args.rows_completed !== null) {\n this.rows_completed = args.rows_completed;\n }\n if (args.rows_estimated !== undefined && args.rows_estimated !== null) {\n this.rows_estimated = args.rows_estimated;\n }\n if (args.rows_rejected !== undefined && args.rows_rejected !== null) {\n this.rows_rejected = args.rows_rejected;\n }\n }\n};\nTImportStatus.prototype = {};\nTImportStatus.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I64) {\n this.elapsed = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.rows_completed = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I64) {\n this.rows_estimated = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I64) {\n this.rows_rejected = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTImportStatus.prototype.write = function (output) {\n output.writeStructBegin('TImportStatus');\n if (this.elapsed !== null && this.elapsed !== undefined) {\n output.writeFieldBegin('elapsed', Thrift.Type.I64, 1);\n output.writeI64(this.elapsed);\n output.writeFieldEnd();\n }\n if (this.rows_completed !== null && this.rows_completed !== undefined) {\n output.writeFieldBegin('rows_completed', Thrift.Type.I64, 2);\n output.writeI64(this.rows_completed);\n output.writeFieldEnd();\n }\n if (this.rows_estimated !== null && this.rows_estimated !== undefined) {\n output.writeFieldBegin('rows_estimated', Thrift.Type.I64, 3);\n output.writeI64(this.rows_estimated);\n output.writeFieldEnd();\n }\n if (this.rows_rejected !== null && this.rows_rejected !== undefined) {\n output.writeFieldBegin('rows_rejected', Thrift.Type.I64, 4);\n output.writeI64(this.rows_rejected);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TFrontendView = function (args) {\n this.view_name = null;\n this.view_state = null;\n this.image_hash = null;\n this.update_time = null;\n this.view_metadata = null;\n if (args) {\n if (args.view_name !== undefined && args.view_name !== null) {\n this.view_name = args.view_name;\n }\n if (args.view_state !== undefined && args.view_state !== null) {\n this.view_state = args.view_state;\n }\n if (args.image_hash !== undefined && args.image_hash !== null) {\n this.image_hash = args.image_hash;\n }\n if (args.update_time !== undefined && args.update_time !== null) {\n this.update_time = args.update_time;\n }\n if (args.view_metadata !== undefined && args.view_metadata !== null) {\n this.view_metadata = args.view_metadata;\n }\n }\n};\nTFrontendView.prototype = {};\nTFrontendView.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.view_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.view_state = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.image_hash = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.STRING) {\n this.update_time = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.STRING) {\n this.view_metadata = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTFrontendView.prototype.write = function (output) {\n output.writeStructBegin('TFrontendView');\n if (this.view_name !== null && this.view_name !== undefined) {\n output.writeFieldBegin('view_name', Thrift.Type.STRING, 1);\n output.writeString(this.view_name);\n output.writeFieldEnd();\n }\n if (this.view_state !== null && this.view_state !== undefined) {\n output.writeFieldBegin('view_state', Thrift.Type.STRING, 2);\n output.writeString(this.view_state);\n output.writeFieldEnd();\n }\n if (this.image_hash !== null && this.image_hash !== undefined) {\n output.writeFieldBegin('image_hash', Thrift.Type.STRING, 3);\n output.writeString(this.image_hash);\n output.writeFieldEnd();\n }\n if (this.update_time !== null && this.update_time !== undefined) {\n output.writeFieldBegin('update_time', Thrift.Type.STRING, 4);\n output.writeString(this.update_time);\n output.writeFieldEnd();\n }\n if (this.view_metadata !== null && this.view_metadata !== undefined) {\n output.writeFieldBegin('view_metadata', Thrift.Type.STRING, 5);\n output.writeString(this.view_metadata);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TServerStatus = function (args) {\n this.read_only = null;\n this.version = null;\n this.rendering_enabled = null;\n this.start_time = null;\n this.edition = null;\n this.host_name = null;\n if (args) {\n if (args.read_only !== undefined && args.read_only !== null) {\n this.read_only = args.read_only;\n }\n if (args.version !== undefined && args.version !== null) {\n this.version = args.version;\n }\n if (args.rendering_enabled !== undefined && args.rendering_enabled !== null) {\n this.rendering_enabled = args.rendering_enabled;\n }\n if (args.start_time !== undefined && args.start_time !== null) {\n this.start_time = args.start_time;\n }\n if (args.edition !== undefined && args.edition !== null) {\n this.edition = args.edition;\n }\n if (args.host_name !== undefined && args.host_name !== null) {\n this.host_name = args.host_name;\n }\n }\n};\nTServerStatus.prototype = {};\nTServerStatus.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.BOOL) {\n this.read_only = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.version = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.BOOL) {\n this.rendering_enabled = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I64) {\n this.start_time = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.STRING) {\n this.edition = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 6:\n if (ftype == Thrift.Type.STRING) {\n this.host_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTServerStatus.prototype.write = function (output) {\n output.writeStructBegin('TServerStatus');\n if (this.read_only !== null && this.read_only !== undefined) {\n output.writeFieldBegin('read_only', Thrift.Type.BOOL, 1);\n output.writeBool(this.read_only);\n output.writeFieldEnd();\n }\n if (this.version !== null && this.version !== undefined) {\n output.writeFieldBegin('version', Thrift.Type.STRING, 2);\n output.writeString(this.version);\n output.writeFieldEnd();\n }\n if (this.rendering_enabled !== null && this.rendering_enabled !== undefined) {\n output.writeFieldBegin('rendering_enabled', Thrift.Type.BOOL, 3);\n output.writeBool(this.rendering_enabled);\n output.writeFieldEnd();\n }\n if (this.start_time !== null && this.start_time !== undefined) {\n output.writeFieldBegin('start_time', Thrift.Type.I64, 4);\n output.writeI64(this.start_time);\n output.writeFieldEnd();\n }\n if (this.edition !== null && this.edition !== undefined) {\n output.writeFieldBegin('edition', Thrift.Type.STRING, 5);\n output.writeString(this.edition);\n output.writeFieldEnd();\n }\n if (this.host_name !== null && this.host_name !== undefined) {\n output.writeFieldBegin('host_name', Thrift.Type.STRING, 6);\n output.writeString(this.host_name);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TPixel = function (args) {\n this.x = null;\n this.y = null;\n if (args) {\n if (args.x !== undefined && args.x !== null) {\n this.x = args.x;\n }\n if (args.y !== undefined && args.y !== null) {\n this.y = args.y;\n }\n }\n};\nTPixel.prototype = {};\nTPixel.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I64) {\n this.x = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.y = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTPixel.prototype.write = function (output) {\n output.writeStructBegin('TPixel');\n if (this.x !== null && this.x !== undefined) {\n output.writeFieldBegin('x', Thrift.Type.I64, 1);\n output.writeI64(this.x);\n output.writeFieldEnd();\n }\n if (this.y !== null && this.y !== undefined) {\n output.writeFieldBegin('y', Thrift.Type.I64, 2);\n output.writeI64(this.y);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TPixelTableRowResult = function (args) {\n this.pixel = null;\n this.vega_table_name = null;\n this.table_id = null;\n this.row_id = null;\n this.row_set = null;\n this.nonce = null;\n if (args) {\n if (args.pixel !== undefined && args.pixel !== null) {\n this.pixel = new TPixel(args.pixel);\n }\n if (args.vega_table_name !== undefined && args.vega_table_name !== null) {\n this.vega_table_name = args.vega_table_name;\n }\n if (args.table_id !== undefined && args.table_id !== null) {\n this.table_id = args.table_id;\n }\n if (args.row_id !== undefined && args.row_id !== null) {\n this.row_id = args.row_id;\n }\n if (args.row_set !== undefined && args.row_set !== null) {\n this.row_set = new TRowSet(args.row_set);\n }\n if (args.nonce !== undefined && args.nonce !== null) {\n this.nonce = args.nonce;\n }\n }\n};\nTPixelTableRowResult.prototype = {};\nTPixelTableRowResult.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.pixel = new TPixel();\n this.pixel.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.vega_table_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I64) {\n this.table_id = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I64) {\n this.row_id = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.STRUCT) {\n this.row_set = new TRowSet();\n this.row_set.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 6:\n if (ftype == Thrift.Type.STRING) {\n this.nonce = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTPixelTableRowResult.prototype.write = function (output) {\n output.writeStructBegin('TPixelTableRowResult');\n if (this.pixel !== null && this.pixel !== undefined) {\n output.writeFieldBegin('pixel', Thrift.Type.STRUCT, 1);\n this.pixel.write(output);\n output.writeFieldEnd();\n }\n if (this.vega_table_name !== null && this.vega_table_name !== undefined) {\n output.writeFieldBegin('vega_table_name', Thrift.Type.STRING, 2);\n output.writeString(this.vega_table_name);\n output.writeFieldEnd();\n }\n if (this.table_id !== null && this.table_id !== undefined) {\n output.writeFieldBegin('table_id', Thrift.Type.I64, 3);\n output.writeI64(this.table_id);\n output.writeFieldEnd();\n }\n if (this.row_id !== null && this.row_id !== undefined) {\n output.writeFieldBegin('row_id', Thrift.Type.I64, 4);\n output.writeI64(this.row_id);\n output.writeFieldEnd();\n }\n if (this.row_set !== null && this.row_set !== undefined) {\n output.writeFieldBegin('row_set', Thrift.Type.STRUCT, 5);\n this.row_set.write(output);\n output.writeFieldEnd();\n }\n if (this.nonce !== null && this.nonce !== undefined) {\n output.writeFieldBegin('nonce', Thrift.Type.STRING, 6);\n output.writeString(this.nonce);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TRenderResult = function (args) {\n this.image = null;\n this.nonce = null;\n this.execution_time_ms = null;\n this.render_time_ms = null;\n this.total_time_ms = null;\n if (args) {\n if (args.image !== undefined && args.image !== null) {\n this.image = args.image;\n }\n if (args.nonce !== undefined && args.nonce !== null) {\n this.nonce = args.nonce;\n }\n if (args.execution_time_ms !== undefined && args.execution_time_ms !== null) {\n this.execution_time_ms = args.execution_time_ms;\n }\n if (args.render_time_ms !== undefined && args.render_time_ms !== null) {\n this.render_time_ms = args.render_time_ms;\n }\n if (args.total_time_ms !== undefined && args.total_time_ms !== null) {\n this.total_time_ms = args.total_time_ms;\n }\n }\n};\nTRenderResult.prototype = {};\nTRenderResult.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.image = input.readBinary().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.nonce = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I64) {\n this.execution_time_ms = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I64) {\n this.render_time_ms = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.I64) {\n this.total_time_ms = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTRenderResult.prototype.write = function (output) {\n output.writeStructBegin('TRenderResult');\n if (this.image !== null && this.image !== undefined) {\n output.writeFieldBegin('image', Thrift.Type.STRING, 1);\n output.writeBinary(this.image);\n output.writeFieldEnd();\n }\n if (this.nonce !== null && this.nonce !== undefined) {\n output.writeFieldBegin('nonce', Thrift.Type.STRING, 2);\n output.writeString(this.nonce);\n output.writeFieldEnd();\n }\n if (this.execution_time_ms !== null && this.execution_time_ms !== undefined) {\n output.writeFieldBegin('execution_time_ms', Thrift.Type.I64, 3);\n output.writeI64(this.execution_time_ms);\n output.writeFieldEnd();\n }\n if (this.render_time_ms !== null && this.render_time_ms !== undefined) {\n output.writeFieldBegin('render_time_ms', Thrift.Type.I64, 4);\n output.writeI64(this.render_time_ms);\n output.writeFieldEnd();\n }\n if (this.total_time_ms !== null && this.total_time_ms !== undefined) {\n output.writeFieldBegin('total_time_ms', Thrift.Type.I64, 5);\n output.writeI64(this.total_time_ms);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TGpuSpecification = function (args) {\n this.num_sm = null;\n this.clock_frequency_kHz = null;\n this.memory = null;\n this.compute_capability_major = null;\n this.compute_capability_minor = null;\n if (args) {\n if (args.num_sm !== undefined && args.num_sm !== null) {\n this.num_sm = args.num_sm;\n }\n if (args.clock_frequency_kHz !== undefined && args.clock_frequency_kHz !== null) {\n this.clock_frequency_kHz = args.clock_frequency_kHz;\n }\n if (args.memory !== undefined && args.memory !== null) {\n this.memory = args.memory;\n }\n if (args.compute_capability_major !== undefined && args.compute_capability_major !== null) {\n this.compute_capability_major = args.compute_capability_major;\n }\n if (args.compute_capability_minor !== undefined && args.compute_capability_minor !== null) {\n this.compute_capability_minor = args.compute_capability_minor;\n }\n }\n};\nTGpuSpecification.prototype = {};\nTGpuSpecification.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I32) {\n this.num_sm = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.clock_frequency_kHz = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I64) {\n this.memory = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I16) {\n this.compute_capability_major = input.readI16().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.I16) {\n this.compute_capability_minor = input.readI16().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTGpuSpecification.prototype.write = function (output) {\n output.writeStructBegin('TGpuSpecification');\n if (this.num_sm !== null && this.num_sm !== undefined) {\n output.writeFieldBegin('num_sm', Thrift.Type.I32, 1);\n output.writeI32(this.num_sm);\n output.writeFieldEnd();\n }\n if (this.clock_frequency_kHz !== null && this.clock_frequency_kHz !== undefined) {\n output.writeFieldBegin('clock_frequency_kHz', Thrift.Type.I64, 2);\n output.writeI64(this.clock_frequency_kHz);\n output.writeFieldEnd();\n }\n if (this.memory !== null && this.memory !== undefined) {\n output.writeFieldBegin('memory', Thrift.Type.I64, 3);\n output.writeI64(this.memory);\n output.writeFieldEnd();\n }\n if (this.compute_capability_major !== null && this.compute_capability_major !== undefined) {\n output.writeFieldBegin('compute_capability_major', Thrift.Type.I16, 4);\n output.writeI16(this.compute_capability_major);\n output.writeFieldEnd();\n }\n if (this.compute_capability_minor !== null && this.compute_capability_minor !== undefined) {\n output.writeFieldBegin('compute_capability_minor', Thrift.Type.I16, 5);\n output.writeI16(this.compute_capability_minor);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.THardwareInfo = function (args) {\n this.num_gpu_hw = null;\n this.num_cpu_hw = null;\n this.num_gpu_allocated = null;\n this.start_gpu = null;\n this.host_name = null;\n this.gpu_info = null;\n if (args) {\n if (args.num_gpu_hw !== undefined && args.num_gpu_hw !== null) {\n this.num_gpu_hw = args.num_gpu_hw;\n }\n if (args.num_cpu_hw !== undefined && args.num_cpu_hw !== null) {\n this.num_cpu_hw = args.num_cpu_hw;\n }\n if (args.num_gpu_allocated !== undefined && args.num_gpu_allocated !== null) {\n this.num_gpu_allocated = args.num_gpu_allocated;\n }\n if (args.start_gpu !== undefined && args.start_gpu !== null) {\n this.start_gpu = args.start_gpu;\n }\n if (args.host_name !== undefined && args.host_name !== null) {\n this.host_name = args.host_name;\n }\n if (args.gpu_info !== undefined && args.gpu_info !== null) {\n this.gpu_info = Thrift.copyList(args.gpu_info, [TGpuSpecification]);\n }\n }\n};\nTHardwareInfo.prototype = {};\nTHardwareInfo.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I16) {\n this.num_gpu_hw = input.readI16().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I16) {\n this.num_cpu_hw = input.readI16().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I16) {\n this.num_gpu_allocated = input.readI16().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I16) {\n this.start_gpu = input.readI16().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.STRING) {\n this.host_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 6:\n if (ftype == Thrift.Type.LIST) {\n var _size96 = 0;\n var _rtmp3100;\n this.gpu_info = [];\n var _etype99 = 0;\n _rtmp3100 = input.readListBegin();\n _etype99 = _rtmp3100.etype;\n _size96 = _rtmp3100.size;\n for (var _i101 = 0; _i101 < _size96; ++_i101) {\n var elem102 = null;\n elem102 = new TGpuSpecification();\n elem102.read(input);\n this.gpu_info.push(elem102);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTHardwareInfo.prototype.write = function (output) {\n output.writeStructBegin('THardwareInfo');\n if (this.num_gpu_hw !== null && this.num_gpu_hw !== undefined) {\n output.writeFieldBegin('num_gpu_hw', Thrift.Type.I16, 1);\n output.writeI16(this.num_gpu_hw);\n output.writeFieldEnd();\n }\n if (this.num_cpu_hw !== null && this.num_cpu_hw !== undefined) {\n output.writeFieldBegin('num_cpu_hw', Thrift.Type.I16, 2);\n output.writeI16(this.num_cpu_hw);\n output.writeFieldEnd();\n }\n if (this.num_gpu_allocated !== null && this.num_gpu_allocated !== undefined) {\n output.writeFieldBegin('num_gpu_allocated', Thrift.Type.I16, 3);\n output.writeI16(this.num_gpu_allocated);\n output.writeFieldEnd();\n }\n if (this.start_gpu !== null && this.start_gpu !== undefined) {\n output.writeFieldBegin('start_gpu', Thrift.Type.I16, 4);\n output.writeI16(this.start_gpu);\n output.writeFieldEnd();\n }\n if (this.host_name !== null && this.host_name !== undefined) {\n output.writeFieldBegin('host_name', Thrift.Type.STRING, 5);\n output.writeString(this.host_name);\n output.writeFieldEnd();\n }\n if (this.gpu_info !== null && this.gpu_info !== undefined) {\n output.writeFieldBegin('gpu_info', Thrift.Type.LIST, 6);\n output.writeListBegin(Thrift.Type.STRUCT, this.gpu_info.length);\n for (var iter103 in this.gpu_info) {\n if (this.gpu_info.hasOwnProperty(iter103)) {\n iter103 = this.gpu_info[iter103];\n iter103.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TClusterHardwareInfo = function (args) {\n this.hardware_info = null;\n if (args) {\n if (args.hardware_info !== undefined && args.hardware_info !== null) {\n this.hardware_info = Thrift.copyList(args.hardware_info, [THardwareInfo]);\n }\n }\n};\nTClusterHardwareInfo.prototype = {};\nTClusterHardwareInfo.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.LIST) {\n var _size104 = 0;\n var _rtmp3108;\n this.hardware_info = [];\n var _etype107 = 0;\n _rtmp3108 = input.readListBegin();\n _etype107 = _rtmp3108.etype;\n _size104 = _rtmp3108.size;\n for (var _i109 = 0; _i109 < _size104; ++_i109) {\n var elem110 = null;\n elem110 = new THardwareInfo();\n elem110.read(input);\n this.hardware_info.push(elem110);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTClusterHardwareInfo.prototype.write = function (output) {\n output.writeStructBegin('TClusterHardwareInfo');\n if (this.hardware_info !== null && this.hardware_info !== undefined) {\n output.writeFieldBegin('hardware_info', Thrift.Type.LIST, 1);\n output.writeListBegin(Thrift.Type.STRUCT, this.hardware_info.length);\n for (var iter111 in this.hardware_info) {\n if (this.hardware_info.hasOwnProperty(iter111)) {\n iter111 = this.hardware_info[iter111];\n iter111.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TMemoryData = function (args) {\n this.slab = null;\n this.start_page = null;\n this.num_pages = null;\n this.touch = null;\n this.chunk_key = null;\n this.buffer_epoch = null;\n this.is_free = null;\n if (args) {\n if (args.slab !== undefined && args.slab !== null) {\n this.slab = args.slab;\n }\n if (args.start_page !== undefined && args.start_page !== null) {\n this.start_page = args.start_page;\n }\n if (args.num_pages !== undefined && args.num_pages !== null) {\n this.num_pages = args.num_pages;\n }\n if (args.touch !== undefined && args.touch !== null) {\n this.touch = args.touch;\n }\n if (args.chunk_key !== undefined && args.chunk_key !== null) {\n this.chunk_key = Thrift.copyList(args.chunk_key, [null]);\n }\n if (args.buffer_epoch !== undefined && args.buffer_epoch !== null) {\n this.buffer_epoch = args.buffer_epoch;\n }\n if (args.is_free !== undefined && args.is_free !== null) {\n this.is_free = args.is_free;\n }\n }\n};\nTMemoryData.prototype = {};\nTMemoryData.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I64) {\n this.slab = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I32) {\n this.start_page = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I64) {\n this.num_pages = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I32) {\n this.touch = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.LIST) {\n var _size112 = 0;\n var _rtmp3116;\n this.chunk_key = [];\n var _etype115 = 0;\n _rtmp3116 = input.readListBegin();\n _etype115 = _rtmp3116.etype;\n _size112 = _rtmp3116.size;\n for (var _i117 = 0; _i117 < _size112; ++_i117) {\n var elem118 = null;\n elem118 = input.readI64().value;\n this.chunk_key.push(elem118);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 6:\n if (ftype == Thrift.Type.I32) {\n this.buffer_epoch = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 7:\n if (ftype == Thrift.Type.BOOL) {\n this.is_free = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTMemoryData.prototype.write = function (output) {\n output.writeStructBegin('TMemoryData');\n if (this.slab !== null && this.slab !== undefined) {\n output.writeFieldBegin('slab', Thrift.Type.I64, 1);\n output.writeI64(this.slab);\n output.writeFieldEnd();\n }\n if (this.start_page !== null && this.start_page !== undefined) {\n output.writeFieldBegin('start_page', Thrift.Type.I32, 2);\n output.writeI32(this.start_page);\n output.writeFieldEnd();\n }\n if (this.num_pages !== null && this.num_pages !== undefined) {\n output.writeFieldBegin('num_pages', Thrift.Type.I64, 3);\n output.writeI64(this.num_pages);\n output.writeFieldEnd();\n }\n if (this.touch !== null && this.touch !== undefined) {\n output.writeFieldBegin('touch', Thrift.Type.I32, 4);\n output.writeI32(this.touch);\n output.writeFieldEnd();\n }\n if (this.chunk_key !== null && this.chunk_key !== undefined) {\n output.writeFieldBegin('chunk_key', Thrift.Type.LIST, 5);\n output.writeListBegin(Thrift.Type.I64, this.chunk_key.length);\n for (var iter119 in this.chunk_key) {\n if (this.chunk_key.hasOwnProperty(iter119)) {\n iter119 = this.chunk_key[iter119];\n output.writeI64(iter119);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.buffer_epoch !== null && this.buffer_epoch !== undefined) {\n output.writeFieldBegin('buffer_epoch', Thrift.Type.I32, 6);\n output.writeI32(this.buffer_epoch);\n output.writeFieldEnd();\n }\n if (this.is_free !== null && this.is_free !== undefined) {\n output.writeFieldBegin('is_free', Thrift.Type.BOOL, 7);\n output.writeBool(this.is_free);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TNodeMemoryInfo = function (args) {\n this.host_name = null;\n this.page_size = null;\n this.max_num_pages = null;\n this.num_pages_allocated = null;\n this.is_allocation_capped = null;\n this.node_memory_data = null;\n if (args) {\n if (args.host_name !== undefined && args.host_name !== null) {\n this.host_name = args.host_name;\n }\n if (args.page_size !== undefined && args.page_size !== null) {\n this.page_size = args.page_size;\n }\n if (args.max_num_pages !== undefined && args.max_num_pages !== null) {\n this.max_num_pages = args.max_num_pages;\n }\n if (args.num_pages_allocated !== undefined && args.num_pages_allocated !== null) {\n this.num_pages_allocated = args.num_pages_allocated;\n }\n if (args.is_allocation_capped !== undefined && args.is_allocation_capped !== null) {\n this.is_allocation_capped = args.is_allocation_capped;\n }\n if (args.node_memory_data !== undefined && args.node_memory_data !== null) {\n this.node_memory_data = Thrift.copyList(args.node_memory_data, [TMemoryData]);\n }\n }\n};\nTNodeMemoryInfo.prototype = {};\nTNodeMemoryInfo.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.host_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.page_size = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I64) {\n this.max_num_pages = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I64) {\n this.num_pages_allocated = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.BOOL) {\n this.is_allocation_capped = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 6:\n if (ftype == Thrift.Type.LIST) {\n var _size120 = 0;\n var _rtmp3124;\n this.node_memory_data = [];\n var _etype123 = 0;\n _rtmp3124 = input.readListBegin();\n _etype123 = _rtmp3124.etype;\n _size120 = _rtmp3124.size;\n for (var _i125 = 0; _i125 < _size120; ++_i125) {\n var elem126 = null;\n elem126 = new TMemoryData();\n elem126.read(input);\n this.node_memory_data.push(elem126);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTNodeMemoryInfo.prototype.write = function (output) {\n output.writeStructBegin('TNodeMemoryInfo');\n if (this.host_name !== null && this.host_name !== undefined) {\n output.writeFieldBegin('host_name', Thrift.Type.STRING, 1);\n output.writeString(this.host_name);\n output.writeFieldEnd();\n }\n if (this.page_size !== null && this.page_size !== undefined) {\n output.writeFieldBegin('page_size', Thrift.Type.I64, 2);\n output.writeI64(this.page_size);\n output.writeFieldEnd();\n }\n if (this.max_num_pages !== null && this.max_num_pages !== undefined) {\n output.writeFieldBegin('max_num_pages', Thrift.Type.I64, 3);\n output.writeI64(this.max_num_pages);\n output.writeFieldEnd();\n }\n if (this.num_pages_allocated !== null && this.num_pages_allocated !== undefined) {\n output.writeFieldBegin('num_pages_allocated', Thrift.Type.I64, 4);\n output.writeI64(this.num_pages_allocated);\n output.writeFieldEnd();\n }\n if (this.is_allocation_capped !== null && this.is_allocation_capped !== undefined) {\n output.writeFieldBegin('is_allocation_capped', Thrift.Type.BOOL, 5);\n output.writeBool(this.is_allocation_capped);\n output.writeFieldEnd();\n }\n if (this.node_memory_data !== null && this.node_memory_data !== undefined) {\n output.writeFieldBegin('node_memory_data', Thrift.Type.LIST, 6);\n output.writeListBegin(Thrift.Type.STRUCT, this.node_memory_data.length);\n for (var iter127 in this.node_memory_data) {\n if (this.node_memory_data.hasOwnProperty(iter127)) {\n iter127 = this.node_memory_data[iter127];\n iter127.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TTableDetails = function (args) {\n this.row_desc = null;\n this.fragment_size = null;\n this.page_size = null;\n this.max_rows = null;\n this.view_sql = null;\n this.shard_count = null;\n this.key_metainfo = null;\n this.is_temporary = null;\n if (args) {\n if (args.row_desc !== undefined && args.row_desc !== null) {\n this.row_desc = Thrift.copyList(args.row_desc, [TColumnType]);\n }\n if (args.fragment_size !== undefined && args.fragment_size !== null) {\n this.fragment_size = args.fragment_size;\n }\n if (args.page_size !== undefined && args.page_size !== null) {\n this.page_size = args.page_size;\n }\n if (args.max_rows !== undefined && args.max_rows !== null) {\n this.max_rows = args.max_rows;\n }\n if (args.view_sql !== undefined && args.view_sql !== null) {\n this.view_sql = args.view_sql;\n }\n if (args.shard_count !== undefined && args.shard_count !== null) {\n this.shard_count = args.shard_count;\n }\n if (args.key_metainfo !== undefined && args.key_metainfo !== null) {\n this.key_metainfo = args.key_metainfo;\n }\n if (args.is_temporary !== undefined && args.is_temporary !== null) {\n this.is_temporary = args.is_temporary;\n }\n }\n};\nTTableDetails.prototype = {};\nTTableDetails.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.LIST) {\n var _size128 = 0;\n var _rtmp3132;\n this.row_desc = [];\n var _etype131 = 0;\n _rtmp3132 = input.readListBegin();\n _etype131 = _rtmp3132.etype;\n _size128 = _rtmp3132.size;\n for (var _i133 = 0; _i133 < _size128; ++_i133) {\n var elem134 = null;\n elem134 = new TColumnType();\n elem134.read(input);\n this.row_desc.push(elem134);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.fragment_size = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I64) {\n this.page_size = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I64) {\n this.max_rows = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.STRING) {\n this.view_sql = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 6:\n if (ftype == Thrift.Type.I64) {\n this.shard_count = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 7:\n if (ftype == Thrift.Type.STRING) {\n this.key_metainfo = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 8:\n if (ftype == Thrift.Type.BOOL) {\n this.is_temporary = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTTableDetails.prototype.write = function (output) {\n output.writeStructBegin('TTableDetails');\n if (this.row_desc !== null && this.row_desc !== undefined) {\n output.writeFieldBegin('row_desc', Thrift.Type.LIST, 1);\n output.writeListBegin(Thrift.Type.STRUCT, this.row_desc.length);\n for (var iter135 in this.row_desc) {\n if (this.row_desc.hasOwnProperty(iter135)) {\n iter135 = this.row_desc[iter135];\n iter135.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.fragment_size !== null && this.fragment_size !== undefined) {\n output.writeFieldBegin('fragment_size', Thrift.Type.I64, 2);\n output.writeI64(this.fragment_size);\n output.writeFieldEnd();\n }\n if (this.page_size !== null && this.page_size !== undefined) {\n output.writeFieldBegin('page_size', Thrift.Type.I64, 3);\n output.writeI64(this.page_size);\n output.writeFieldEnd();\n }\n if (this.max_rows !== null && this.max_rows !== undefined) {\n output.writeFieldBegin('max_rows', Thrift.Type.I64, 4);\n output.writeI64(this.max_rows);\n output.writeFieldEnd();\n }\n if (this.view_sql !== null && this.view_sql !== undefined) {\n output.writeFieldBegin('view_sql', Thrift.Type.STRING, 5);\n output.writeString(this.view_sql);\n output.writeFieldEnd();\n }\n if (this.shard_count !== null && this.shard_count !== undefined) {\n output.writeFieldBegin('shard_count', Thrift.Type.I64, 6);\n output.writeI64(this.shard_count);\n output.writeFieldEnd();\n }\n if (this.key_metainfo !== null && this.key_metainfo !== undefined) {\n output.writeFieldBegin('key_metainfo', Thrift.Type.STRING, 7);\n output.writeString(this.key_metainfo);\n output.writeFieldEnd();\n }\n if (this.is_temporary !== null && this.is_temporary !== undefined) {\n output.writeFieldBegin('is_temporary', Thrift.Type.BOOL, 8);\n output.writeBool(this.is_temporary);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TColumnRange = function (args) {\n this.type = null;\n this.col_id = null;\n this.table_id = null;\n this.has_nulls = null;\n this.int_min = null;\n this.int_max = null;\n this.bucket = null;\n this.fp_min = null;\n this.fp_max = null;\n if (args) {\n if (args.type !== undefined && args.type !== null) {\n this.type = args.type;\n }\n if (args.col_id !== undefined && args.col_id !== null) {\n this.col_id = args.col_id;\n }\n if (args.table_id !== undefined && args.table_id !== null) {\n this.table_id = args.table_id;\n }\n if (args.has_nulls !== undefined && args.has_nulls !== null) {\n this.has_nulls = args.has_nulls;\n }\n if (args.int_min !== undefined && args.int_min !== null) {\n this.int_min = args.int_min;\n }\n if (args.int_max !== undefined && args.int_max !== null) {\n this.int_max = args.int_max;\n }\n if (args.bucket !== undefined && args.bucket !== null) {\n this.bucket = args.bucket;\n }\n if (args.fp_min !== undefined && args.fp_min !== null) {\n this.fp_min = args.fp_min;\n }\n if (args.fp_max !== undefined && args.fp_max !== null) {\n this.fp_max = args.fp_max;\n }\n }\n};\nTColumnRange.prototype = {};\nTColumnRange.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I32) {\n this.type = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I32) {\n this.col_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I32) {\n this.table_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.BOOL) {\n this.has_nulls = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.I64) {\n this.int_min = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 6:\n if (ftype == Thrift.Type.I64) {\n this.int_max = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 7:\n if (ftype == Thrift.Type.I64) {\n this.bucket = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 8:\n if (ftype == Thrift.Type.DOUBLE) {\n this.fp_min = input.readDouble().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 9:\n if (ftype == Thrift.Type.DOUBLE) {\n this.fp_max = input.readDouble().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTColumnRange.prototype.write = function (output) {\n output.writeStructBegin('TColumnRange');\n if (this.type !== null && this.type !== undefined) {\n output.writeFieldBegin('type', Thrift.Type.I32, 1);\n output.writeI32(this.type);\n output.writeFieldEnd();\n }\n if (this.col_id !== null && this.col_id !== undefined) {\n output.writeFieldBegin('col_id', Thrift.Type.I32, 2);\n output.writeI32(this.col_id);\n output.writeFieldEnd();\n }\n if (this.table_id !== null && this.table_id !== undefined) {\n output.writeFieldBegin('table_id', Thrift.Type.I32, 3);\n output.writeI32(this.table_id);\n output.writeFieldEnd();\n }\n if (this.has_nulls !== null && this.has_nulls !== undefined) {\n output.writeFieldBegin('has_nulls', Thrift.Type.BOOL, 4);\n output.writeBool(this.has_nulls);\n output.writeFieldEnd();\n }\n if (this.int_min !== null && this.int_min !== undefined) {\n output.writeFieldBegin('int_min', Thrift.Type.I64, 5);\n output.writeI64(this.int_min);\n output.writeFieldEnd();\n }\n if (this.int_max !== null && this.int_max !== undefined) {\n output.writeFieldBegin('int_max', Thrift.Type.I64, 6);\n output.writeI64(this.int_max);\n output.writeFieldEnd();\n }\n if (this.bucket !== null && this.bucket !== undefined) {\n output.writeFieldBegin('bucket', Thrift.Type.I64, 7);\n output.writeI64(this.bucket);\n output.writeFieldEnd();\n }\n if (this.fp_min !== null && this.fp_min !== undefined) {\n output.writeFieldBegin('fp_min', Thrift.Type.DOUBLE, 8);\n output.writeDouble(this.fp_min);\n output.writeFieldEnd();\n }\n if (this.fp_max !== null && this.fp_max !== undefined) {\n output.writeFieldBegin('fp_max', Thrift.Type.DOUBLE, 9);\n output.writeDouble(this.fp_max);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TDictionaryGeneration = function (args) {\n this.dict_id = null;\n this.entry_count = null;\n if (args) {\n if (args.dict_id !== undefined && args.dict_id !== null) {\n this.dict_id = args.dict_id;\n }\n if (args.entry_count !== undefined && args.entry_count !== null) {\n this.entry_count = args.entry_count;\n }\n }\n};\nTDictionaryGeneration.prototype = {};\nTDictionaryGeneration.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I32) {\n this.dict_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.entry_count = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTDictionaryGeneration.prototype.write = function (output) {\n output.writeStructBegin('TDictionaryGeneration');\n if (this.dict_id !== null && this.dict_id !== undefined) {\n output.writeFieldBegin('dict_id', Thrift.Type.I32, 1);\n output.writeI32(this.dict_id);\n output.writeFieldEnd();\n }\n if (this.entry_count !== null && this.entry_count !== undefined) {\n output.writeFieldBegin('entry_count', Thrift.Type.I64, 2);\n output.writeI64(this.entry_count);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TTableGeneration = function (args) {\n this.table_id = null;\n this.tuple_count = null;\n this.start_rowid = null;\n if (args) {\n if (args.table_id !== undefined && args.table_id !== null) {\n this.table_id = args.table_id;\n }\n if (args.tuple_count !== undefined && args.tuple_count !== null) {\n this.tuple_count = args.tuple_count;\n }\n if (args.start_rowid !== undefined && args.start_rowid !== null) {\n this.start_rowid = args.start_rowid;\n }\n }\n};\nTTableGeneration.prototype = {};\nTTableGeneration.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I32) {\n this.table_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.tuple_count = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I64) {\n this.start_rowid = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTTableGeneration.prototype.write = function (output) {\n output.writeStructBegin('TTableGeneration');\n if (this.table_id !== null && this.table_id !== undefined) {\n output.writeFieldBegin('table_id', Thrift.Type.I32, 1);\n output.writeI32(this.table_id);\n output.writeFieldEnd();\n }\n if (this.tuple_count !== null && this.tuple_count !== undefined) {\n output.writeFieldBegin('tuple_count', Thrift.Type.I64, 2);\n output.writeI64(this.tuple_count);\n output.writeFieldEnd();\n }\n if (this.start_rowid !== null && this.start_rowid !== undefined) {\n output.writeFieldBegin('start_rowid', Thrift.Type.I64, 3);\n output.writeI64(this.start_rowid);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TPendingQuery = function (args) {\n this.id = null;\n this.column_ranges = null;\n this.dictionary_generations = null;\n this.table_generations = null;\n if (args) {\n if (args.id !== undefined && args.id !== null) {\n this.id = args.id;\n }\n if (args.column_ranges !== undefined && args.column_ranges !== null) {\n this.column_ranges = Thrift.copyList(args.column_ranges, [TColumnRange]);\n }\n if (args.dictionary_generations !== undefined && args.dictionary_generations !== null) {\n this.dictionary_generations = Thrift.copyList(args.dictionary_generations, [TDictionaryGeneration]);\n }\n if (args.table_generations !== undefined && args.table_generations !== null) {\n this.table_generations = Thrift.copyList(args.table_generations, [TTableGeneration]);\n }\n }\n};\nTPendingQuery.prototype = {};\nTPendingQuery.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I64) {\n this.id = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.LIST) {\n var _size136 = 0;\n var _rtmp3140;\n this.column_ranges = [];\n var _etype139 = 0;\n _rtmp3140 = input.readListBegin();\n _etype139 = _rtmp3140.etype;\n _size136 = _rtmp3140.size;\n for (var _i141 = 0; _i141 < _size136; ++_i141) {\n var elem142 = null;\n elem142 = new TColumnRange();\n elem142.read(input);\n this.column_ranges.push(elem142);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.LIST) {\n var _size143 = 0;\n var _rtmp3147;\n this.dictionary_generations = [];\n var _etype146 = 0;\n _rtmp3147 = input.readListBegin();\n _etype146 = _rtmp3147.etype;\n _size143 = _rtmp3147.size;\n for (var _i148 = 0; _i148 < _size143; ++_i148) {\n var elem149 = null;\n elem149 = new TDictionaryGeneration();\n elem149.read(input);\n this.dictionary_generations.push(elem149);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.LIST) {\n var _size150 = 0;\n var _rtmp3154;\n this.table_generations = [];\n var _etype153 = 0;\n _rtmp3154 = input.readListBegin();\n _etype153 = _rtmp3154.etype;\n _size150 = _rtmp3154.size;\n for (var _i155 = 0; _i155 < _size150; ++_i155) {\n var elem156 = null;\n elem156 = new TTableGeneration();\n elem156.read(input);\n this.table_generations.push(elem156);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTPendingQuery.prototype.write = function (output) {\n output.writeStructBegin('TPendingQuery');\n if (this.id !== null && this.id !== undefined) {\n output.writeFieldBegin('id', Thrift.Type.I64, 1);\n output.writeI64(this.id);\n output.writeFieldEnd();\n }\n if (this.column_ranges !== null && this.column_ranges !== undefined) {\n output.writeFieldBegin('column_ranges', Thrift.Type.LIST, 2);\n output.writeListBegin(Thrift.Type.STRUCT, this.column_ranges.length);\n for (var iter157 in this.column_ranges) {\n if (this.column_ranges.hasOwnProperty(iter157)) {\n iter157 = this.column_ranges[iter157];\n iter157.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.dictionary_generations !== null && this.dictionary_generations !== undefined) {\n output.writeFieldBegin('dictionary_generations', Thrift.Type.LIST, 3);\n output.writeListBegin(Thrift.Type.STRUCT, this.dictionary_generations.length);\n for (var iter158 in this.dictionary_generations) {\n if (this.dictionary_generations.hasOwnProperty(iter158)) {\n iter158 = this.dictionary_generations[iter158];\n iter158.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.table_generations !== null && this.table_generations !== undefined) {\n output.writeFieldBegin('table_generations', Thrift.Type.LIST, 4);\n output.writeListBegin(Thrift.Type.STRUCT, this.table_generations.length);\n for (var iter159 in this.table_generations) {\n if (this.table_generations.hasOwnProperty(iter159)) {\n iter159 = this.table_generations[iter159];\n iter159.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TVarLen = function (args) {\n this.payload = null;\n this.is_null = null;\n if (args) {\n if (args.payload !== undefined && args.payload !== null) {\n this.payload = args.payload;\n }\n if (args.is_null !== undefined && args.is_null !== null) {\n this.is_null = args.is_null;\n }\n }\n};\nTVarLen.prototype = {};\nTVarLen.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.payload = input.readBinary().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.BOOL) {\n this.is_null = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTVarLen.prototype.write = function (output) {\n output.writeStructBegin('TVarLen');\n if (this.payload !== null && this.payload !== undefined) {\n output.writeFieldBegin('payload', Thrift.Type.STRING, 1);\n output.writeBinary(this.payload);\n output.writeFieldEnd();\n }\n if (this.is_null !== null && this.is_null !== undefined) {\n output.writeFieldBegin('is_null', Thrift.Type.BOOL, 2);\n output.writeBool(this.is_null);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TDataBlockPtr = function (args) {\n this.fixed_len_data = null;\n this.var_len_data = null;\n if (args) {\n if (args.fixed_len_data !== undefined && args.fixed_len_data !== null) {\n this.fixed_len_data = args.fixed_len_data;\n }\n if (args.var_len_data !== undefined && args.var_len_data !== null) {\n this.var_len_data = Thrift.copyList(args.var_len_data, [TVarLen]);\n }\n }\n};\nTDataBlockPtr.prototype = {};\nTDataBlockPtr.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.fixed_len_data = input.readBinary().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.LIST) {\n var _size160 = 0;\n var _rtmp3164;\n this.var_len_data = [];\n var _etype163 = 0;\n _rtmp3164 = input.readListBegin();\n _etype163 = _rtmp3164.etype;\n _size160 = _rtmp3164.size;\n for (var _i165 = 0; _i165 < _size160; ++_i165) {\n var elem166 = null;\n elem166 = new TVarLen();\n elem166.read(input);\n this.var_len_data.push(elem166);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTDataBlockPtr.prototype.write = function (output) {\n output.writeStructBegin('TDataBlockPtr');\n if (this.fixed_len_data !== null && this.fixed_len_data !== undefined) {\n output.writeFieldBegin('fixed_len_data', Thrift.Type.STRING, 1);\n output.writeBinary(this.fixed_len_data);\n output.writeFieldEnd();\n }\n if (this.var_len_data !== null && this.var_len_data !== undefined) {\n output.writeFieldBegin('var_len_data', Thrift.Type.LIST, 2);\n output.writeListBegin(Thrift.Type.STRUCT, this.var_len_data.length);\n for (var iter167 in this.var_len_data) {\n if (this.var_len_data.hasOwnProperty(iter167)) {\n iter167 = this.var_len_data[iter167];\n iter167.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TInsertData = function (args) {\n this.db_id = null;\n this.table_id = null;\n this.column_ids = null;\n this.data = null;\n this.num_rows = null;\n if (args) {\n if (args.db_id !== undefined && args.db_id !== null) {\n this.db_id = args.db_id;\n }\n if (args.table_id !== undefined && args.table_id !== null) {\n this.table_id = args.table_id;\n }\n if (args.column_ids !== undefined && args.column_ids !== null) {\n this.column_ids = Thrift.copyList(args.column_ids, [null]);\n }\n if (args.data !== undefined && args.data !== null) {\n this.data = Thrift.copyList(args.data, [TDataBlockPtr]);\n }\n if (args.num_rows !== undefined && args.num_rows !== null) {\n this.num_rows = args.num_rows;\n }\n }\n};\nTInsertData.prototype = {};\nTInsertData.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I32) {\n this.db_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I32) {\n this.table_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.LIST) {\n var _size168 = 0;\n var _rtmp3172;\n this.column_ids = [];\n var _etype171 = 0;\n _rtmp3172 = input.readListBegin();\n _etype171 = _rtmp3172.etype;\n _size168 = _rtmp3172.size;\n for (var _i173 = 0; _i173 < _size168; ++_i173) {\n var elem174 = null;\n elem174 = input.readI32().value;\n this.column_ids.push(elem174);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.LIST) {\n var _size175 = 0;\n var _rtmp3179;\n this.data = [];\n var _etype178 = 0;\n _rtmp3179 = input.readListBegin();\n _etype178 = _rtmp3179.etype;\n _size175 = _rtmp3179.size;\n for (var _i180 = 0; _i180 < _size175; ++_i180) {\n var elem181 = null;\n elem181 = new TDataBlockPtr();\n elem181.read(input);\n this.data.push(elem181);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.I64) {\n this.num_rows = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTInsertData.prototype.write = function (output) {\n output.writeStructBegin('TInsertData');\n if (this.db_id !== null && this.db_id !== undefined) {\n output.writeFieldBegin('db_id', Thrift.Type.I32, 1);\n output.writeI32(this.db_id);\n output.writeFieldEnd();\n }\n if (this.table_id !== null && this.table_id !== undefined) {\n output.writeFieldBegin('table_id', Thrift.Type.I32, 2);\n output.writeI32(this.table_id);\n output.writeFieldEnd();\n }\n if (this.column_ids !== null && this.column_ids !== undefined) {\n output.writeFieldBegin('column_ids', Thrift.Type.LIST, 3);\n output.writeListBegin(Thrift.Type.I32, this.column_ids.length);\n for (var iter182 in this.column_ids) {\n if (this.column_ids.hasOwnProperty(iter182)) {\n iter182 = this.column_ids[iter182];\n output.writeI32(iter182);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.data !== null && this.data !== undefined) {\n output.writeFieldBegin('data', Thrift.Type.LIST, 4);\n output.writeListBegin(Thrift.Type.STRUCT, this.data.length);\n for (var iter183 in this.data) {\n if (this.data.hasOwnProperty(iter183)) {\n iter183 = this.data[iter183];\n iter183.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.num_rows !== null && this.num_rows !== undefined) {\n output.writeFieldBegin('num_rows', Thrift.Type.I64, 5);\n output.writeI64(this.num_rows);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TRawRenderPassDataResult = function (args) {\n this.num_channels = null;\n this.pixels = null;\n this.row_ids_A = null;\n this.row_ids_B = null;\n this.table_ids = null;\n this.accum_data = null;\n if (args) {\n if (args.num_channels !== undefined && args.num_channels !== null) {\n this.num_channels = args.num_channels;\n }\n if (args.pixels !== undefined && args.pixels !== null) {\n this.pixels = args.pixels;\n }\n if (args.row_ids_A !== undefined && args.row_ids_A !== null) {\n this.row_ids_A = args.row_ids_A;\n }\n if (args.row_ids_B !== undefined && args.row_ids_B !== null) {\n this.row_ids_B = args.row_ids_B;\n }\n if (args.table_ids !== undefined && args.table_ids !== null) {\n this.table_ids = args.table_ids;\n }\n if (args.accum_data !== undefined && args.accum_data !== null) {\n this.accum_data = args.accum_data;\n }\n }\n};\nTRawRenderPassDataResult.prototype = {};\nTRawRenderPassDataResult.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I32) {\n this.num_channels = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.pixels = input.readBinary().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.row_ids_A = input.readBinary().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.STRING) {\n this.row_ids_B = input.readBinary().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.STRING) {\n this.table_ids = input.readBinary().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 6:\n if (ftype == Thrift.Type.STRING) {\n this.accum_data = input.readBinary().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTRawRenderPassDataResult.prototype.write = function (output) {\n output.writeStructBegin('TRawRenderPassDataResult');\n if (this.num_channels !== null && this.num_channels !== undefined) {\n output.writeFieldBegin('num_channels', Thrift.Type.I32, 1);\n output.writeI32(this.num_channels);\n output.writeFieldEnd();\n }\n if (this.pixels !== null && this.pixels !== undefined) {\n output.writeFieldBegin('pixels', Thrift.Type.STRING, 2);\n output.writeBinary(this.pixels);\n output.writeFieldEnd();\n }\n if (this.row_ids_A !== null && this.row_ids_A !== undefined) {\n output.writeFieldBegin('row_ids_A', Thrift.Type.STRING, 3);\n output.writeBinary(this.row_ids_A);\n output.writeFieldEnd();\n }\n if (this.row_ids_B !== null && this.row_ids_B !== undefined) {\n output.writeFieldBegin('row_ids_B', Thrift.Type.STRING, 4);\n output.writeBinary(this.row_ids_B);\n output.writeFieldEnd();\n }\n if (this.table_ids !== null && this.table_ids !== undefined) {\n output.writeFieldBegin('table_ids', Thrift.Type.STRING, 5);\n output.writeBinary(this.table_ids);\n output.writeFieldEnd();\n }\n if (this.accum_data !== null && this.accum_data !== undefined) {\n output.writeFieldBegin('accum_data', Thrift.Type.STRING, 6);\n output.writeBinary(this.accum_data);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TRawPixelDataResult = function (args) {\n this.width = null;\n this.height = null;\n this.render_pass_map = null;\n this.execution_time_ms = null;\n this.render_time_ms = null;\n this.total_time_ms = null;\n if (args) {\n if (args.width !== undefined && args.width !== null) {\n this.width = args.width;\n }\n if (args.height !== undefined && args.height !== null) {\n this.height = args.height;\n }\n if (args.render_pass_map !== undefined && args.render_pass_map !== null) {\n this.render_pass_map = Thrift.copyMap(args.render_pass_map, [TRawRenderPassDataResult]);\n }\n if (args.execution_time_ms !== undefined && args.execution_time_ms !== null) {\n this.execution_time_ms = args.execution_time_ms;\n }\n if (args.render_time_ms !== undefined && args.render_time_ms !== null) {\n this.render_time_ms = args.render_time_ms;\n }\n if (args.total_time_ms !== undefined && args.total_time_ms !== null) {\n this.total_time_ms = args.total_time_ms;\n }\n }\n};\nTRawPixelDataResult.prototype = {};\nTRawPixelDataResult.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I32) {\n this.width = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I32) {\n this.height = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.MAP) {\n var _size184 = 0;\n var _rtmp3188;\n this.render_pass_map = {};\n var _ktype185 = 0;\n var _vtype186 = 0;\n _rtmp3188 = input.readMapBegin();\n _ktype185 = _rtmp3188.ktype;\n _vtype186 = _rtmp3188.vtype;\n _size184 = _rtmp3188.size;\n for (var _i189 = 0; _i189 < _size184; ++_i189) {\n if (_i189 > 0) {\n if (input.rstack.length > input.rpos[input.rpos.length - 1] + 1) {\n input.rstack.pop();\n }\n }\n var key190 = null;\n var val191 = null;\n key190 = input.readI32().value;\n val191 = new TRawRenderPassDataResult();\n val191.read(input);\n this.render_pass_map[key190] = val191;\n }\n input.readMapEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 8:\n if (ftype == Thrift.Type.I64) {\n this.execution_time_ms = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 9:\n if (ftype == Thrift.Type.I64) {\n this.render_time_ms = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 10:\n if (ftype == Thrift.Type.I64) {\n this.total_time_ms = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTRawPixelDataResult.prototype.write = function (output) {\n output.writeStructBegin('TRawPixelDataResult');\n if (this.width !== null && this.width !== undefined) {\n output.writeFieldBegin('width', Thrift.Type.I32, 1);\n output.writeI32(this.width);\n output.writeFieldEnd();\n }\n if (this.height !== null && this.height !== undefined) {\n output.writeFieldBegin('height', Thrift.Type.I32, 2);\n output.writeI32(this.height);\n output.writeFieldEnd();\n }\n if (this.render_pass_map !== null && this.render_pass_map !== undefined) {\n output.writeFieldBegin('render_pass_map', Thrift.Type.MAP, 3);\n output.writeMapBegin(Thrift.Type.I32, Thrift.Type.STRUCT, Thrift.objectLength(this.render_pass_map));\n for (var kiter192 in this.render_pass_map) {\n if (this.render_pass_map.hasOwnProperty(kiter192)) {\n var viter193 = this.render_pass_map[kiter192];\n output.writeI32(kiter192);\n viter193.write(output);\n }\n }\n output.writeMapEnd();\n output.writeFieldEnd();\n }\n if (this.execution_time_ms !== null && this.execution_time_ms !== undefined) {\n output.writeFieldBegin('execution_time_ms', Thrift.Type.I64, 8);\n output.writeI64(this.execution_time_ms);\n output.writeFieldEnd();\n }\n if (this.render_time_ms !== null && this.render_time_ms !== undefined) {\n output.writeFieldBegin('render_time_ms', Thrift.Type.I64, 9);\n output.writeI64(this.render_time_ms);\n output.writeFieldEnd();\n }\n if (this.total_time_ms !== null && this.total_time_ms !== undefined) {\n output.writeFieldBegin('total_time_ms', Thrift.Type.I64, 10);\n output.writeI64(this.total_time_ms);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TAccessPrivileges = function (args) {\n this.select_ = null;\n this.insert_ = null;\n this.create_ = null;\n this.truncate_ = null;\n if (args) {\n if (args.select_ !== undefined && args.select_ !== null) {\n this.select_ = args.select_;\n }\n if (args.insert_ !== undefined && args.insert_ !== null) {\n this.insert_ = args.insert_;\n }\n if (args.create_ !== undefined && args.create_ !== null) {\n this.create_ = args.create_;\n }\n if (args.truncate_ !== undefined && args.truncate_ !== null) {\n this.truncate_ = args.truncate_;\n }\n }\n};\nTAccessPrivileges.prototype = {};\nTAccessPrivileges.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.BOOL) {\n this.select_ = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.BOOL) {\n this.insert_ = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.BOOL) {\n this.create_ = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.BOOL) {\n this.truncate_ = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTAccessPrivileges.prototype.write = function (output) {\n output.writeStructBegin('TAccessPrivileges');\n if (this.select_ !== null && this.select_ !== undefined) {\n output.writeFieldBegin('select_', Thrift.Type.BOOL, 1);\n output.writeBool(this.select_);\n output.writeFieldEnd();\n }\n if (this.insert_ !== null && this.insert_ !== undefined) {\n output.writeFieldBegin('insert_', Thrift.Type.BOOL, 2);\n output.writeBool(this.insert_);\n output.writeFieldEnd();\n }\n if (this.create_ !== null && this.create_ !== undefined) {\n output.writeFieldBegin('create_', Thrift.Type.BOOL, 3);\n output.writeBool(this.create_);\n output.writeFieldEnd();\n }\n if (this.truncate_ !== null && this.truncate_ !== undefined) {\n output.writeFieldBegin('truncate_', Thrift.Type.BOOL, 4);\n output.writeBool(this.truncate_);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TDBObject = function (args) {\n this.objectName = null;\n this.objectType = null;\n this.privs = null;\n if (args) {\n if (args.objectName !== undefined && args.objectName !== null) {\n this.objectName = args.objectName;\n }\n if (args.objectType !== undefined && args.objectType !== null) {\n this.objectType = args.objectType;\n }\n if (args.privs !== undefined && args.privs !== null) {\n this.privs = Thrift.copyList(args.privs, [null]);\n }\n }\n};\nTDBObject.prototype = {};\nTDBObject.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.objectName = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I32) {\n this.objectType = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.LIST) {\n var _size194 = 0;\n var _rtmp3198;\n this.privs = [];\n var _etype197 = 0;\n _rtmp3198 = input.readListBegin();\n _etype197 = _rtmp3198.etype;\n _size194 = _rtmp3198.size;\n for (var _i199 = 0; _i199 < _size194; ++_i199) {\n var elem200 = null;\n elem200 = input.readBool().value;\n this.privs.push(elem200);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTDBObject.prototype.write = function (output) {\n output.writeStructBegin('TDBObject');\n if (this.objectName !== null && this.objectName !== undefined) {\n output.writeFieldBegin('objectName', Thrift.Type.STRING, 1);\n output.writeString(this.objectName);\n output.writeFieldEnd();\n }\n if (this.objectType !== null && this.objectType !== undefined) {\n output.writeFieldBegin('objectType', Thrift.Type.I32, 2);\n output.writeI32(this.objectType);\n output.writeFieldEnd();\n }\n if (this.privs !== null && this.privs !== undefined) {\n output.writeFieldBegin('privs', Thrift.Type.LIST, 3);\n output.writeListBegin(Thrift.Type.BOOL, this.privs.length);\n for (var iter201 in this.privs) {\n if (this.privs.hasOwnProperty(iter201)) {\n iter201 = this.privs[iter201];\n output.writeBool(iter201);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.TLicenseInfo = function (args) {\n this.claims = null;\n if (args) {\n if (args.claims !== undefined && args.claims !== null) {\n this.claims = Thrift.copyList(args.claims, [null]);\n }\n }\n};\nTLicenseInfo.prototype = {};\nTLicenseInfo.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.LIST) {\n var _size202 = 0;\n var _rtmp3206;\n this.claims = [];\n var _etype205 = 0;\n _rtmp3206 = input.readListBegin();\n _etype205 = _rtmp3206.etype;\n _size202 = _rtmp3206.size;\n for (var _i207 = 0; _i207 < _size202; ++_i207) {\n var elem208 = null;\n elem208 = input.readString().value;\n this.claims.push(elem208);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTLicenseInfo.prototype.write = function (output) {\n output.writeStructBegin('TLicenseInfo');\n if (this.claims !== null && this.claims !== undefined) {\n output.writeFieldBegin('claims', Thrift.Type.LIST, 1);\n output.writeListBegin(Thrift.Type.STRING, this.claims.length);\n for (var iter209 in this.claims) {\n if (this.claims.hasOwnProperty(iter209)) {\n iter209 = this.claims[iter209];\n output.writeString(iter209);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};"
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(2)(__webpack_require__(7))
/***/ }),
/* 7 */
/***/ (function(module, exports) {
module.exports = "\"use strict\";\n//\n// Autogenerated by Thrift Compiler (0.10.0)\n//\n// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n//\n\n\n//HELPER FUNCTIONS AND STRUCTURES\n\nwindow.MapD_connect_args = function (args) {\n this.user = null;\n this.passwd = null;\n this.dbname = null;\n if (args) {\n if (args.user !== undefined && args.user !== null) {\n this.user = args.user;\n }\n if (args.passwd !== undefined && args.passwd !== null) {\n this.passwd = args.passwd;\n }\n if (args.dbname !== undefined && args.dbname !== null) {\n this.dbname = args.dbname;\n }\n }\n};\nMapD_connect_args.prototype = {};\nMapD_connect_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.user = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.passwd = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.dbname = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_connect_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_connect_args');\n if (this.user !== null && this.user !== undefined) {\n output.writeFieldBegin('user', Thrift.Type.STRING, 1);\n output.writeString(this.user);\n output.writeFieldEnd();\n }\n if (this.passwd !== null && this.passwd !== undefined) {\n output.writeFieldBegin('passwd', Thrift.Type.STRING, 2);\n output.writeString(this.passwd);\n output.writeFieldEnd();\n }\n if (this.dbname !== null && this.dbname !== undefined) {\n output.writeFieldBegin('dbname', Thrift.Type.STRING, 3);\n output.writeString(this.dbname);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_connect_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = args.success;\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_connect_result.prototype = {};\nMapD_connect_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRING) {\n this.success = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_connect_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_connect_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRING, 0);\n output.writeString(this.success);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_disconnect_args = function (args) {\n this.session = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n }\n};\nMapD_disconnect_args.prototype = {};\nMapD_disconnect_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_disconnect_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_disconnect_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_disconnect_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_disconnect_result.prototype = {};\nMapD_disconnect_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_disconnect_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_disconnect_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_server_status_args = function (args) {\n this.session = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n }\n};\nMapD_get_server_status_args.prototype = {};\nMapD_get_server_status_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_server_status_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_server_status_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_server_status_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TServerStatus(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_server_status_result.prototype = {};\nMapD_get_server_status_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TServerStatus();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_server_status_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_server_status_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_status_args = function (args) {\n this.session = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n }\n};\nMapD_get_status_args.prototype = {};\nMapD_get_status_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_status_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_status_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_status_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [TServerStatus]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_status_result.prototype = {};\nMapD_get_status_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size210 = 0;\n var _rtmp3214;\n this.success = [];\n var _etype213 = 0;\n _rtmp3214 = input.readListBegin();\n _etype213 = _rtmp3214.etype;\n _size210 = _rtmp3214.size;\n for (var _i215 = 0; _i215 < _size210; ++_i215) {\n var elem216 = null;\n elem216 = new TServerStatus();\n elem216.read(input);\n this.success.push(elem216);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_status_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_status_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRUCT, this.success.length);\n for (var iter217 in this.success) {\n if (this.success.hasOwnProperty(iter217)) {\n iter217 = this.success[iter217];\n iter217.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_hardware_info_args = function (args) {\n this.session = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n }\n};\nMapD_get_hardware_info_args.prototype = {};\nMapD_get_hardware_info_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_hardware_info_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_hardware_info_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_hardware_info_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TClusterHardwareInfo(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_hardware_info_result.prototype = {};\nMapD_get_hardware_info_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TClusterHardwareInfo();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_hardware_info_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_hardware_info_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_tables_args = function (args) {\n this.session = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n }\n};\nMapD_get_tables_args.prototype = {};\nMapD_get_tables_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_tables_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_tables_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_tables_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [null]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_tables_result.prototype = {};\nMapD_get_tables_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size218 = 0;\n var _rtmp3222;\n this.success = [];\n var _etype221 = 0;\n _rtmp3222 = input.readListBegin();\n _etype221 = _rtmp3222.etype;\n _size218 = _rtmp3222.size;\n for (var _i223 = 0; _i223 < _size218; ++_i223) {\n var elem224 = null;\n elem224 = input.readString().value;\n this.success.push(elem224);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_tables_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_tables_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRING, this.success.length);\n for (var iter225 in this.success) {\n if (this.success.hasOwnProperty(iter225)) {\n iter225 = this.success[iter225];\n output.writeString(iter225);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_table_details_args = function (args) {\n this.session = null;\n this.table_name = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.table_name !== undefined && args.table_name !== null) {\n this.table_name = args.table_name;\n }\n }\n};\nMapD_get_table_details_args.prototype = {};\nMapD_get_table_details_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.table_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_table_details_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_table_details_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.table_name !== null && this.table_name !== undefined) {\n output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);\n output.writeString(this.table_name);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_table_details_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TTableDetails(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_table_details_result.prototype = {};\nMapD_get_table_details_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TTableDetails();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_table_details_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_table_details_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_internal_table_details_args = function (args) {\n this.session = null;\n this.table_name = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.table_name !== undefined && args.table_name !== null) {\n this.table_name = args.table_name;\n }\n }\n};\nMapD_get_internal_table_details_args.prototype = {};\nMapD_get_internal_table_details_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.table_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_internal_table_details_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_internal_table_details_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.table_name !== null && this.table_name !== undefined) {\n output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);\n output.writeString(this.table_name);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_internal_table_details_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TTableDetails(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_internal_table_details_result.prototype = {};\nMapD_get_internal_table_details_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TTableDetails();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_internal_table_details_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_internal_table_details_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_users_args = function (args) {\n this.session = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n }\n};\nMapD_get_users_args.prototype = {};\nMapD_get_users_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_users_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_users_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_users_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [null]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_users_result.prototype = {};\nMapD_get_users_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size226 = 0;\n var _rtmp3230;\n this.success = [];\n var _etype229 = 0;\n _rtmp3230 = input.readListBegin();\n _etype229 = _rtmp3230.etype;\n _size226 = _rtmp3230.size;\n for (var _i231 = 0; _i231 < _size226; ++_i231) {\n var elem232 = null;\n elem232 = input.readString().value;\n this.success.push(elem232);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_users_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_users_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRING, this.success.length);\n for (var iter233 in this.success) {\n if (this.success.hasOwnProperty(iter233)) {\n iter233 = this.success[iter233];\n output.writeString(iter233);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_databases_args = function (args) {\n this.session = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n }\n};\nMapD_get_databases_args.prototype = {};\nMapD_get_databases_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_databases_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_databases_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_databases_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [TDBInfo]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_databases_result.prototype = {};\nMapD_get_databases_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size234 = 0;\n var _rtmp3238;\n this.success = [];\n var _etype237 = 0;\n _rtmp3238 = input.readListBegin();\n _etype237 = _rtmp3238.etype;\n _size234 = _rtmp3238.size;\n for (var _i239 = 0; _i239 < _size234; ++_i239) {\n var elem240 = null;\n elem240 = new TDBInfo();\n elem240.read(input);\n this.success.push(elem240);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_databases_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_databases_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRUCT, this.success.length);\n for (var iter241 in this.success) {\n if (this.success.hasOwnProperty(iter241)) {\n iter241 = this.success[iter241];\n iter241.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_version_args = function (args) {};\nMapD_get_version_args.prototype = {};\nMapD_get_version_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n input.skip(ftype);\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_version_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_version_args');\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_version_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = args.success;\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_version_result.prototype = {};\nMapD_get_version_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRING) {\n this.success = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_version_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_version_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRING, 0);\n output.writeString(this.success);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_start_heap_profile_args = function (args) {\n this.session = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n }\n};\nMapD_start_heap_profile_args.prototype = {};\nMapD_start_heap_profile_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_start_heap_profile_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_start_heap_profile_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_start_heap_profile_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_start_heap_profile_result.prototype = {};\nMapD_start_heap_profile_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_start_heap_profile_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_start_heap_profile_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_stop_heap_profile_args = function (args) {\n this.session = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n }\n};\nMapD_stop_heap_profile_args.prototype = {};\nMapD_stop_heap_profile_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_stop_heap_profile_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_stop_heap_profile_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_stop_heap_profile_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_stop_heap_profile_result.prototype = {};\nMapD_stop_heap_profile_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_stop_heap_profile_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_stop_heap_profile_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_heap_profile_args = function (args) {\n this.session = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n }\n};\nMapD_get_heap_profile_args.prototype = {};\nMapD_get_heap_profile_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_heap_profile_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_heap_profile_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_heap_profile_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = args.success;\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_heap_profile_result.prototype = {};\nMapD_get_heap_profile_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRING) {\n this.success = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_heap_profile_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_heap_profile_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRING, 0);\n output.writeString(this.success);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_memory_args = function (args) {\n this.session = null;\n this.memory_level = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.memory_level !== undefined && args.memory_level !== null) {\n this.memory_level = args.memory_level;\n }\n }\n};\nMapD_get_memory_args.prototype = {};\nMapD_get_memory_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.memory_level = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_memory_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_memory_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.memory_level !== null && this.memory_level !== undefined) {\n output.writeFieldBegin('memory_level', Thrift.Type.STRING, 2);\n output.writeString(this.memory_level);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_memory_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [TNodeMemoryInfo]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_memory_result.prototype = {};\nMapD_get_memory_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size242 = 0;\n var _rtmp3246;\n this.success = [];\n var _etype245 = 0;\n _rtmp3246 = input.readListBegin();\n _etype245 = _rtmp3246.etype;\n _size242 = _rtmp3246.size;\n for (var _i247 = 0; _i247 < _size242; ++_i247) {\n var elem248 = null;\n elem248 = new TNodeMemoryInfo();\n elem248.read(input);\n this.success.push(elem248);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_memory_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_memory_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRUCT, this.success.length);\n for (var iter249 in this.success) {\n if (this.success.hasOwnProperty(iter249)) {\n iter249 = this.success[iter249];\n iter249.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_clear_cpu_memory_args = function (args) {\n this.session = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n }\n};\nMapD_clear_cpu_memory_args.prototype = {};\nMapD_clear_cpu_memory_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_clear_cpu_memory_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_clear_cpu_memory_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_clear_cpu_memory_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_clear_cpu_memory_result.prototype = {};\nMapD_clear_cpu_memory_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_clear_cpu_memory_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_clear_cpu_memory_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_clear_gpu_memory_args = function (args) {\n this.session = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n }\n};\nMapD_clear_gpu_memory_args.prototype = {};\nMapD_clear_gpu_memory_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_clear_gpu_memory_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_clear_gpu_memory_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_clear_gpu_memory_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_clear_gpu_memory_result.prototype = {};\nMapD_clear_gpu_memory_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_clear_gpu_memory_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_clear_gpu_memory_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_set_table_epoch_args = function (args) {\n this.session = null;\n this.db_id = null;\n this.table_id = null;\n this.new_epoch = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.db_id !== undefined && args.db_id !== null) {\n this.db_id = args.db_id;\n }\n if (args.table_id !== undefined && args.table_id !== null) {\n this.table_id = args.table_id;\n }\n if (args.new_epoch !== undefined && args.new_epoch !== null) {\n this.new_epoch = args.new_epoch;\n }\n }\n};\nMapD_set_table_epoch_args.prototype = {};\nMapD_set_table_epoch_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I32) {\n this.db_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I32) {\n this.table_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I32) {\n this.new_epoch = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_set_table_epoch_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_set_table_epoch_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.db_id !== null && this.db_id !== undefined) {\n output.writeFieldBegin('db_id', Thrift.Type.I32, 2);\n output.writeI32(this.db_id);\n output.writeFieldEnd();\n }\n if (this.table_id !== null && this.table_id !== undefined) {\n output.writeFieldBegin('table_id', Thrift.Type.I32, 3);\n output.writeI32(this.table_id);\n output.writeFieldEnd();\n }\n if (this.new_epoch !== null && this.new_epoch !== undefined) {\n output.writeFieldBegin('new_epoch', Thrift.Type.I32, 4);\n output.writeI32(this.new_epoch);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_set_table_epoch_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_set_table_epoch_result.prototype = {};\nMapD_set_table_epoch_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_set_table_epoch_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_set_table_epoch_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_table_epoch_args = function (args) {\n this.session = null;\n this.db_id = null;\n this.table_id = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.db_id !== undefined && args.db_id !== null) {\n this.db_id = args.db_id;\n }\n if (args.table_id !== undefined && args.table_id !== null) {\n this.table_id = args.table_id;\n }\n }\n};\nMapD_get_table_epoch_args.prototype = {};\nMapD_get_table_epoch_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I32) {\n this.db_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I32) {\n this.table_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_table_epoch_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_table_epoch_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.db_id !== null && this.db_id !== undefined) {\n output.writeFieldBegin('db_id', Thrift.Type.I32, 2);\n output.writeI32(this.db_id);\n output.writeFieldEnd();\n }\n if (this.table_id !== null && this.table_id !== undefined) {\n output.writeFieldBegin('table_id', Thrift.Type.I32, 3);\n output.writeI32(this.table_id);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_table_epoch_result = function (args) {\n this.success = null;\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = args.success;\n }\n }\n};\nMapD_get_table_epoch_result.prototype = {};\nMapD_get_table_epoch_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.I32) {\n this.success = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_table_epoch_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_table_epoch_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.I32, 0);\n output.writeI32(this.success);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_sql_execute_args = function (args) {\n this.session = null;\n this.query = null;\n this.column_format = null;\n this.nonce = null;\n this.first_n = -1;\n this.at_most_n = -1;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.query !== undefined && args.query !== null) {\n this.query = args.query;\n }\n if (args.column_format !== undefined && args.column_format !== null) {\n this.column_format = args.column_format;\n }\n if (args.nonce !== undefined && args.nonce !== null) {\n this.nonce = args.nonce;\n }\n if (args.first_n !== undefined && args.first_n !== null) {\n this.first_n = args.first_n;\n }\n if (args.at_most_n !== undefined && args.at_most_n !== null) {\n this.at_most_n = args.at_most_n;\n }\n }\n};\nMapD_sql_execute_args.prototype = {};\nMapD_sql_execute_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.query = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.BOOL) {\n this.column_format = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.STRING) {\n this.nonce = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.I32) {\n this.first_n = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 6:\n if (ftype == Thrift.Type.I32) {\n this.at_most_n = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_sql_execute_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_sql_execute_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.query !== null && this.query !== undefined) {\n output.writeFieldBegin('query', Thrift.Type.STRING, 2);\n output.writeString(this.query);\n output.writeFieldEnd();\n }\n if (this.column_format !== null && this.column_format !== undefined) {\n output.writeFieldBegin('column_format', Thrift.Type.BOOL, 3);\n output.writeBool(this.column_format);\n output.writeFieldEnd();\n }\n if (this.nonce !== null && this.nonce !== undefined) {\n output.writeFieldBegin('nonce', Thrift.Type.STRING, 4);\n output.writeString(this.nonce);\n output.writeFieldEnd();\n }\n if (this.first_n !== null && this.first_n !== undefined) {\n output.writeFieldBegin('first_n', Thrift.Type.I32, 5);\n output.writeI32(this.first_n);\n output.writeFieldEnd();\n }\n if (this.at_most_n !== null && this.at_most_n !== undefined) {\n output.writeFieldBegin('at_most_n', Thrift.Type.I32, 6);\n output.writeI32(this.at_most_n);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_sql_execute_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TQueryResult(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_sql_execute_result.prototype = {};\nMapD_sql_execute_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TQueryResult();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_sql_execute_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_sql_execute_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_sql_execute_df_args = function (args) {\n this.session = null;\n this.query = null;\n this.device_type = null;\n this.device_id = 0;\n this.first_n = -1;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.query !== undefined && args.query !== null) {\n this.query = args.query;\n }\n if (args.device_type !== undefined && args.device_type !== null) {\n this.device_type = args.device_type;\n }\n if (args.device_id !== undefined && args.device_id !== null) {\n this.device_id = args.device_id;\n }\n if (args.first_n !== undefined && args.first_n !== null) {\n this.first_n = args.first_n;\n }\n }\n};\nMapD_sql_execute_df_args.prototype = {};\nMapD_sql_execute_df_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.query = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I32) {\n this.device_type = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I32) {\n this.device_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.I32) {\n this.first_n = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_sql_execute_df_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_sql_execute_df_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.query !== null && this.query !== undefined) {\n output.writeFieldBegin('query', Thrift.Type.STRING, 2);\n output.writeString(this.query);\n output.writeFieldEnd();\n }\n if (this.device_type !== null && this.device_type !== undefined) {\n output.writeFieldBegin('device_type', Thrift.Type.I32, 3);\n output.writeI32(this.device_type);\n output.writeFieldEnd();\n }\n if (this.device_id !== null && this.device_id !== undefined) {\n output.writeFieldBegin('device_id', Thrift.Type.I32, 4);\n output.writeI32(this.device_id);\n output.writeFieldEnd();\n }\n if (this.first_n !== null && this.first_n !== undefined) {\n output.writeFieldBegin('first_n', Thrift.Type.I32, 5);\n output.writeI32(this.first_n);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_sql_execute_df_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TDataFrame(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_sql_execute_df_result.prototype = {};\nMapD_sql_execute_df_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TDataFrame();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_sql_execute_df_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_sql_execute_df_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_sql_execute_gdf_args = function (args) {\n this.session = null;\n this.query = null;\n this.device_id = 0;\n this.first_n = -1;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.query !== undefined && args.query !== null) {\n this.query = args.query;\n }\n if (args.device_id !== undefined && args.device_id !== null) {\n this.device_id = args.device_id;\n }\n if (args.first_n !== undefined && args.first_n !== null) {\n this.first_n = args.first_n;\n }\n }\n};\nMapD_sql_execute_gdf_args.prototype = {};\nMapD_sql_execute_gdf_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.query = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I32) {\n this.device_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I32) {\n this.first_n = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_sql_execute_gdf_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_sql_execute_gdf_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.query !== null && this.query !== undefined) {\n output.writeFieldBegin('query', Thrift.Type.STRING, 2);\n output.writeString(this.query);\n output.writeFieldEnd();\n }\n if (this.device_id !== null && this.device_id !== undefined) {\n output.writeFieldBegin('device_id', Thrift.Type.I32, 3);\n output.writeI32(this.device_id);\n output.writeFieldEnd();\n }\n if (this.first_n !== null && this.first_n !== undefined) {\n output.writeFieldBegin('first_n', Thrift.Type.I32, 4);\n output.writeI32(this.first_n);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_sql_execute_gdf_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TDataFrame(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_sql_execute_gdf_result.prototype = {};\nMapD_sql_execute_gdf_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TDataFrame();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_sql_execute_gdf_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_sql_execute_gdf_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_deallocate_df_args = function (args) {\n this.session = null;\n this.df = null;\n this.device_type = null;\n this.device_id = 0;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.df !== undefined && args.df !== null) {\n this.df = new TDataFrame(args.df);\n }\n if (args.device_type !== undefined && args.device_type !== null) {\n this.device_type = args.device_type;\n }\n if (args.device_id !== undefined && args.device_id !== null) {\n this.device_id = args.device_id;\n }\n }\n};\nMapD_deallocate_df_args.prototype = {};\nMapD_deallocate_df_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRUCT) {\n this.df = new TDataFrame();\n this.df.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I32) {\n this.device_type = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I32) {\n this.device_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_deallocate_df_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_deallocate_df_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.df !== null && this.df !== undefined) {\n output.writeFieldBegin('df', Thrift.Type.STRUCT, 2);\n this.df.write(output);\n output.writeFieldEnd();\n }\n if (this.device_type !== null && this.device_type !== undefined) {\n output.writeFieldBegin('device_type', Thrift.Type.I32, 3);\n output.writeI32(this.device_type);\n output.writeFieldEnd();\n }\n if (this.device_id !== null && this.device_id !== undefined) {\n output.writeFieldBegin('device_id', Thrift.Type.I32, 4);\n output.writeI32(this.device_id);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_deallocate_df_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_deallocate_df_result.prototype = {};\nMapD_deallocate_df_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_deallocate_df_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_deallocate_df_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_interrupt_args = function (args) {\n this.session = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n }\n};\nMapD_interrupt_args.prototype = {};\nMapD_interrupt_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_interrupt_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_interrupt_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_interrupt_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_interrupt_result.prototype = {};\nMapD_interrupt_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_interrupt_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_interrupt_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_sql_validate_args = function (args) {\n this.session = null;\n this.query = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.query !== undefined && args.query !== null) {\n this.query = args.query;\n }\n }\n};\nMapD_sql_validate_args.prototype = {};\nMapD_sql_validate_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.query = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_sql_validate_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_sql_validate_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.query !== null && this.query !== undefined) {\n output.writeFieldBegin('query', Thrift.Type.STRING, 2);\n output.writeString(this.query);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_sql_validate_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyMap(args.success, [TColumnType]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_sql_validate_result.prototype = {};\nMapD_sql_validate_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.MAP) {\n var _size250 = 0;\n var _rtmp3254;\n this.success = {};\n var _ktype251 = 0;\n var _vtype252 = 0;\n _rtmp3254 = input.readMapBegin();\n _ktype251 = _rtmp3254.ktype;\n _vtype252 = _rtmp3254.vtype;\n _size250 = _rtmp3254.size;\n for (var _i255 = 0; _i255 < _size250; ++_i255) {\n if (_i255 > 0) {\n if (input.rstack.length > input.rpos[input.rpos.length - 1] + 1) {\n input.rstack.pop();\n }\n }\n var key256 = null;\n var val257 = null;\n key256 = input.readString().value;\n val257 = new TColumnType();\n val257.read(input);\n this.success[key256] = val257;\n }\n input.readMapEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_sql_validate_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_sql_validate_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.MAP, 0);\n output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.success));\n for (var kiter258 in this.success) {\n if (this.success.hasOwnProperty(kiter258)) {\n var viter259 = this.success[kiter258];\n output.writeString(kiter258);\n viter259.write(output);\n }\n }\n output.writeMapEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_completion_hints_args = function (args) {\n this.session = null;\n this.sql = null;\n this.cursor = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.sql !== undefined && args.sql !== null) {\n this.sql = args.sql;\n }\n if (args.cursor !== undefined && args.cursor !== null) {\n this.cursor = args.cursor;\n }\n }\n};\nMapD_get_completion_hints_args.prototype = {};\nMapD_get_completion_hints_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.sql = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I32) {\n this.cursor = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_completion_hints_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_completion_hints_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.sql !== null && this.sql !== undefined) {\n output.writeFieldBegin('sql', Thrift.Type.STRING, 2);\n output.writeString(this.sql);\n output.writeFieldEnd();\n }\n if (this.cursor !== null && this.cursor !== undefined) {\n output.writeFieldBegin('cursor', Thrift.Type.I32, 3);\n output.writeI32(this.cursor);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_completion_hints_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [TCompletionHint]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_completion_hints_result.prototype = {};\nMapD_get_completion_hints_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size260 = 0;\n var _rtmp3264;\n this.success = [];\n var _etype263 = 0;\n _rtmp3264 = input.readListBegin();\n _etype263 = _rtmp3264.etype;\n _size260 = _rtmp3264.size;\n for (var _i265 = 0; _i265 < _size260; ++_i265) {\n var elem266 = null;\n elem266 = new TCompletionHint();\n elem266.read(input);\n this.success.push(elem266);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_completion_hints_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_completion_hints_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRUCT, this.success.length);\n for (var iter267 in this.success) {\n if (this.success.hasOwnProperty(iter267)) {\n iter267 = this.success[iter267];\n iter267.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_set_execution_mode_args = function (args) {\n this.session = null;\n this.mode = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.mode !== undefined && args.mode !== null) {\n this.mode = args.mode;\n }\n }\n};\nMapD_set_execution_mode_args.prototype = {};\nMapD_set_execution_mode_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I32) {\n this.mode = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_set_execution_mode_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_set_execution_mode_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.mode !== null && this.mode !== undefined) {\n output.writeFieldBegin('mode', Thrift.Type.I32, 2);\n output.writeI32(this.mode);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_set_execution_mode_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_set_execution_mode_result.prototype = {};\nMapD_set_execution_mode_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_set_execution_mode_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_set_execution_mode_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_render_vega_args = function (args) {\n this.session = null;\n this.widget_id = null;\n this.vega_json = null;\n this.compression_level = null;\n this.nonce = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.widget_id !== undefined && args.widget_id !== null) {\n this.widget_id = args.widget_id;\n }\n if (args.vega_json !== undefined && args.vega_json !== null) {\n this.vega_json = args.vega_json;\n }\n if (args.compression_level !== undefined && args.compression_level !== null) {\n this.compression_level = args.compression_level;\n }\n if (args.nonce !== undefined && args.nonce !== null) {\n this.nonce = args.nonce;\n }\n }\n};\nMapD_render_vega_args.prototype = {};\nMapD_render_vega_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.widget_id = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.vega_json = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I32) {\n this.compression_level = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.STRING) {\n this.nonce = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_render_vega_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_render_vega_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.widget_id !== null && this.widget_id !== undefined) {\n output.writeFieldBegin('widget_id', Thrift.Type.I64, 2);\n output.writeI64(this.widget_id);\n output.writeFieldEnd();\n }\n if (this.vega_json !== null && this.vega_json !== undefined) {\n output.writeFieldBegin('vega_json', Thrift.Type.STRING, 3);\n output.writeString(this.vega_json);\n output.writeFieldEnd();\n }\n if (this.compression_level !== null && this.compression_level !== undefined) {\n output.writeFieldBegin('compression_level', Thrift.Type.I32, 4);\n output.writeI32(this.compression_level);\n output.writeFieldEnd();\n }\n if (this.nonce !== null && this.nonce !== undefined) {\n output.writeFieldBegin('nonce', Thrift.Type.STRING, 5);\n output.writeString(this.nonce);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_render_vega_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TRenderResult(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_render_vega_result.prototype = {};\nMapD_render_vega_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TRenderResult();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_render_vega_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_render_vega_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_result_row_for_pixel_args = function (args) {\n this.session = null;\n this.widget_id = null;\n this.pixel = null;\n this.table_col_names = null;\n this.column_format = null;\n this.pixelRadius = null;\n this.nonce = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.widget_id !== undefined && args.widget_id !== null) {\n this.widget_id = args.widget_id;\n }\n if (args.pixel !== undefined && args.pixel !== null) {\n this.pixel = new TPixel(args.pixel);\n }\n if (args.table_col_names !== undefined && args.table_col_names !== null) {\n this.table_col_names = Thrift.copyMap(args.table_col_names, [Thrift.copyList, null]);\n }\n if (args.column_format !== undefined && args.column_format !== null) {\n this.column_format = args.column_format;\n }\n if (args.pixelRadius !== undefined && args.pixelRadius !== null) {\n this.pixelRadius = args.pixelRadius;\n }\n if (args.nonce !== undefined && args.nonce !== null) {\n this.nonce = args.nonce;\n }\n }\n};\nMapD_get_result_row_for_pixel_args.prototype = {};\nMapD_get_result_row_for_pixel_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.widget_id = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRUCT) {\n this.pixel = new TPixel();\n this.pixel.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.MAP) {\n var _size268 = 0;\n var _rtmp3272;\n this.table_col_names = {};\n var _ktype269 = 0;\n var _vtype270 = 0;\n _rtmp3272 = input.readMapBegin();\n _ktype269 = _rtmp3272.ktype;\n _vtype270 = _rtmp3272.vtype;\n _size268 = _rtmp3272.size;\n for (var _i273 = 0; _i273 < _size268; ++_i273) {\n if (_i273 > 0) {\n if (input.rstack.length > input.rpos[input.rpos.length - 1] + 1) {\n input.rstack.pop();\n }\n }\n var key274 = null;\n var val275 = null;\n key274 = input.readString().value;\n var _size276 = 0;\n var _rtmp3280;\n val275 = [];\n var _etype279 = 0;\n _rtmp3280 = input.readListBegin();\n _etype279 = _rtmp3280.etype;\n _size276 = _rtmp3280.size;\n for (var _i281 = 0; _i281 < _size276; ++_i281) {\n var elem282 = null;\n elem282 = input.readString().value;\n val275.push(elem282);\n }\n input.readListEnd();\n this.table_col_names[key274] = val275;\n }\n input.readMapEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.BOOL) {\n this.column_format = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 6:\n if (ftype == Thrift.Type.I32) {\n this.pixelRadius = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 7:\n if (ftype == Thrift.Type.STRING) {\n this.nonce = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_result_row_for_pixel_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_result_row_for_pixel_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.widget_id !== null && this.widget_id !== undefined) {\n output.writeFieldBegin('widget_id', Thrift.Type.I64, 2);\n output.writeI64(this.widget_id);\n output.writeFieldEnd();\n }\n if (this.pixel !== null && this.pixel !== undefined) {\n output.writeFieldBegin('pixel', Thrift.Type.STRUCT, 3);\n this.pixel.write(output);\n output.writeFieldEnd();\n }\n if (this.table_col_names !== null && this.table_col_names !== undefined) {\n output.writeFieldBegin('table_col_names', Thrift.Type.MAP, 4);\n output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.LIST, Thrift.objectLength(this.table_col_names));\n for (var kiter283 in this.table_col_names) {\n if (this.table_col_names.hasOwnProperty(kiter283)) {\n var viter284 = this.table_col_names[kiter283];\n output.writeString(kiter283);\n output.writeListBegin(Thrift.Type.STRING, viter284.length);\n for (var iter285 in viter284) {\n if (viter284.hasOwnProperty(iter285)) {\n iter285 = viter284[iter285];\n output.writeString(iter285);\n }\n }\n output.writeListEnd();\n }\n }\n output.writeMapEnd();\n output.writeFieldEnd();\n }\n if (this.column_format !== null && this.column_format !== undefined) {\n output.writeFieldBegin('column_format', Thrift.Type.BOOL, 5);\n output.writeBool(this.column_format);\n output.writeFieldEnd();\n }\n if (this.pixelRadius !== null && this.pixelRadius !== undefined) {\n output.writeFieldBegin('pixelRadius', Thrift.Type.I32, 6);\n output.writeI32(this.pixelRadius);\n output.writeFieldEnd();\n }\n if (this.nonce !== null && this.nonce !== undefined) {\n output.writeFieldBegin('nonce', Thrift.Type.STRING, 7);\n output.writeString(this.nonce);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_result_row_for_pixel_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TPixelTableRowResult(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_result_row_for_pixel_result.prototype = {};\nMapD_get_result_row_for_pixel_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TPixelTableRowResult();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_result_row_for_pixel_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_result_row_for_pixel_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_frontend_view_args = function (args) {\n this.session = null;\n this.view_name = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.view_name !== undefined && args.view_name !== null) {\n this.view_name = args.view_name;\n }\n }\n};\nMapD_get_frontend_view_args.prototype = {};\nMapD_get_frontend_view_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.view_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_frontend_view_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_frontend_view_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.view_name !== null && this.view_name !== undefined) {\n output.writeFieldBegin('view_name', Thrift.Type.STRING, 2);\n output.writeString(this.view_name);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_frontend_view_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TFrontendView(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_frontend_view_result.prototype = {};\nMapD_get_frontend_view_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TFrontendView();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_frontend_view_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_frontend_view_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_frontend_views_args = function (args) {\n this.session = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n }\n};\nMapD_get_frontend_views_args.prototype = {};\nMapD_get_frontend_views_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_frontend_views_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_frontend_views_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_frontend_views_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [TFrontendView]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_frontend_views_result.prototype = {};\nMapD_get_frontend_views_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size286 = 0;\n var _rtmp3290;\n this.success = [];\n var _etype289 = 0;\n _rtmp3290 = input.readListBegin();\n _etype289 = _rtmp3290.etype;\n _size286 = _rtmp3290.size;\n for (var _i291 = 0; _i291 < _size286; ++_i291) {\n var elem292 = null;\n elem292 = new TFrontendView();\n elem292.read(input);\n this.success.push(elem292);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_frontend_views_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_frontend_views_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRUCT, this.success.length);\n for (var iter293 in this.success) {\n if (this.success.hasOwnProperty(iter293)) {\n iter293 = this.success[iter293];\n iter293.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_create_frontend_view_args = function (args) {\n this.session = null;\n this.view_name = null;\n this.view_state = null;\n this.image_hash = null;\n this.view_metadata = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.view_name !== undefined && args.view_name !== null) {\n this.view_name = args.view_name;\n }\n if (args.view_state !== undefined && args.view_state !== null) {\n this.view_state = args.view_state;\n }\n if (args.image_hash !== undefined && args.image_hash !== null) {\n this.image_hash = args.image_hash;\n }\n if (args.view_metadata !== undefined && args.view_metadata !== null) {\n this.view_metadata = args.view_metadata;\n }\n }\n};\nMapD_create_frontend_view_args.prototype = {};\nMapD_create_frontend_view_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.view_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.view_state = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.STRING) {\n this.image_hash = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.STRING) {\n this.view_metadata = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_create_frontend_view_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_create_frontend_view_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.view_name !== null && this.view_name !== undefined) {\n output.writeFieldBegin('view_name', Thrift.Type.STRING, 2);\n output.writeString(this.view_name);\n output.writeFieldEnd();\n }\n if (this.view_state !== null && this.view_state !== undefined) {\n output.writeFieldBegin('view_state', Thrift.Type.STRING, 3);\n output.writeString(this.view_state);\n output.writeFieldEnd();\n }\n if (this.image_hash !== null && this.image_hash !== undefined) {\n output.writeFieldBegin('image_hash', Thrift.Type.STRING, 4);\n output.writeString(this.image_hash);\n output.writeFieldEnd();\n }\n if (this.view_metadata !== null && this.view_metadata !== undefined) {\n output.writeFieldBegin('view_metadata', Thrift.Type.STRING, 5);\n output.writeString(this.view_metadata);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_create_frontend_view_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_create_frontend_view_result.prototype = {};\nMapD_create_frontend_view_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_create_frontend_view_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_create_frontend_view_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_delete_frontend_view_args = function (args) {\n this.session = null;\n this.view_name = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.view_name !== undefined && args.view_name !== null) {\n this.view_name = args.view_name;\n }\n }\n};\nMapD_delete_frontend_view_args.prototype = {};\nMapD_delete_frontend_view_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.view_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_delete_frontend_view_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_delete_frontend_view_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.view_name !== null && this.view_name !== undefined) {\n output.writeFieldBegin('view_name', Thrift.Type.STRING, 2);\n output.writeString(this.view_name);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_delete_frontend_view_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_delete_frontend_view_result.prototype = {};\nMapD_delete_frontend_view_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_delete_frontend_view_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_delete_frontend_view_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_link_view_args = function (args) {\n this.session = null;\n this.link = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.link !== undefined && args.link !== null) {\n this.link = args.link;\n }\n }\n};\nMapD_get_link_view_args.prototype = {};\nMapD_get_link_view_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.link = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_link_view_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_link_view_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.link !== null && this.link !== undefined) {\n output.writeFieldBegin('link', Thrift.Type.STRING, 2);\n output.writeString(this.link);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_link_view_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TFrontendView(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_link_view_result.prototype = {};\nMapD_get_link_view_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TFrontendView();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_link_view_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_link_view_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_create_link_args = function (args) {\n this.session = null;\n this.view_state = null;\n this.view_metadata = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.view_state !== undefined && args.view_state !== null) {\n this.view_state = args.view_state;\n }\n if (args.view_metadata !== undefined && args.view_metadata !== null) {\n this.view_metadata = args.view_metadata;\n }\n }\n};\nMapD_create_link_args.prototype = {};\nMapD_create_link_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.view_state = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.view_metadata = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_create_link_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_create_link_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.view_state !== null && this.view_state !== undefined) {\n output.writeFieldBegin('view_state', Thrift.Type.STRING, 2);\n output.writeString(this.view_state);\n output.writeFieldEnd();\n }\n if (this.view_metadata !== null && this.view_metadata !== undefined) {\n output.writeFieldBegin('view_metadata', Thrift.Type.STRING, 3);\n output.writeString(this.view_metadata);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_create_link_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = args.success;\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_create_link_result.prototype = {};\nMapD_create_link_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRING) {\n this.success = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_create_link_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_create_link_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRING, 0);\n output.writeString(this.success);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_load_table_binary_args = function (args) {\n this.session = null;\n this.table_name = null;\n this.rows = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.table_name !== undefined && args.table_name !== null) {\n this.table_name = args.table_name;\n }\n if (args.rows !== undefined && args.rows !== null) {\n this.rows = Thrift.copyList(args.rows, [TRow]);\n }\n }\n};\nMapD_load_table_binary_args.prototype = {};\nMapD_load_table_binary_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.table_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.LIST) {\n var _size294 = 0;\n var _rtmp3298;\n this.rows = [];\n var _etype297 = 0;\n _rtmp3298 = input.readListBegin();\n _etype297 = _rtmp3298.etype;\n _size294 = _rtmp3298.size;\n for (var _i299 = 0; _i299 < _size294; ++_i299) {\n var elem300 = null;\n elem300 = new TRow();\n elem300.read(input);\n this.rows.push(elem300);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_load_table_binary_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_load_table_binary_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.table_name !== null && this.table_name !== undefined) {\n output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);\n output.writeString(this.table_name);\n output.writeFieldEnd();\n }\n if (this.rows !== null && this.rows !== undefined) {\n output.writeFieldBegin('rows', Thrift.Type.LIST, 3);\n output.writeListBegin(Thrift.Type.STRUCT, this.rows.length);\n for (var iter301 in this.rows) {\n if (this.rows.hasOwnProperty(iter301)) {\n iter301 = this.rows[iter301];\n iter301.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_load_table_binary_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_load_table_binary_result.prototype = {};\nMapD_load_table_binary_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_load_table_binary_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_load_table_binary_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_load_table_binary_columnar_args = function (args) {\n this.session = null;\n this.table_name = null;\n this.cols = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.table_name !== undefined && args.table_name !== null) {\n this.table_name = args.table_name;\n }\n if (args.cols !== undefined && args.cols !== null) {\n this.cols = Thrift.copyList(args.cols, [TColumn]);\n }\n }\n};\nMapD_load_table_binary_columnar_args.prototype = {};\nMapD_load_table_binary_columnar_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.table_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.LIST) {\n var _size302 = 0;\n var _rtmp3306;\n this.cols = [];\n var _etype305 = 0;\n _rtmp3306 = input.readListBegin();\n _etype305 = _rtmp3306.etype;\n _size302 = _rtmp3306.size;\n for (var _i307 = 0; _i307 < _size302; ++_i307) {\n var elem308 = null;\n elem308 = new TColumn();\n elem308.read(input);\n this.cols.push(elem308);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_load_table_binary_columnar_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_load_table_binary_columnar_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.table_name !== null && this.table_name !== undefined) {\n output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);\n output.writeString(this.table_name);\n output.writeFieldEnd();\n }\n if (this.cols !== null && this.cols !== undefined) {\n output.writeFieldBegin('cols', Thrift.Type.LIST, 3);\n output.writeListBegin(Thrift.Type.STRUCT, this.cols.length);\n for (var iter309 in this.cols) {\n if (this.cols.hasOwnProperty(iter309)) {\n iter309 = this.cols[iter309];\n iter309.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_load_table_binary_columnar_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_load_table_binary_columnar_result.prototype = {};\nMapD_load_table_binary_columnar_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_load_table_binary_columnar_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_load_table_binary_columnar_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_load_table_binary_arrow_args = function (args) {\n this.session = null;\n this.table_name = null;\n this.arrow_stream = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.table_name !== undefined && args.table_name !== null) {\n this.table_name = args.table_name;\n }\n if (args.arrow_stream !== undefined && args.arrow_stream !== null) {\n this.arrow_stream = args.arrow_stream;\n }\n }\n};\nMapD_load_table_binary_arrow_args.prototype = {};\nMapD_load_table_binary_arrow_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.table_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.arrow_stream = input.readBinary().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_load_table_binary_arrow_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_load_table_binary_arrow_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.table_name !== null && this.table_name !== undefined) {\n output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);\n output.writeString(this.table_name);\n output.writeFieldEnd();\n }\n if (this.arrow_stream !== null && this.arrow_stream !== undefined) {\n output.writeFieldBegin('arrow_stream', Thrift.Type.STRING, 3);\n output.writeBinary(this.arrow_stream);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_load_table_binary_arrow_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_load_table_binary_arrow_result.prototype = {};\nMapD_load_table_binary_arrow_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_load_table_binary_arrow_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_load_table_binary_arrow_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_load_table_args = function (args) {\n this.session = null;\n this.table_name = null;\n this.rows = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.table_name !== undefined && args.table_name !== null) {\n this.table_name = args.table_name;\n }\n if (args.rows !== undefined && args.rows !== null) {\n this.rows = Thrift.copyList(args.rows, [TStringRow]);\n }\n }\n};\nMapD_load_table_args.prototype = {};\nMapD_load_table_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.table_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.LIST) {\n var _size310 = 0;\n var _rtmp3314;\n this.rows = [];\n var _etype313 = 0;\n _rtmp3314 = input.readListBegin();\n _etype313 = _rtmp3314.etype;\n _size310 = _rtmp3314.size;\n for (var _i315 = 0; _i315 < _size310; ++_i315) {\n var elem316 = null;\n elem316 = new TStringRow();\n elem316.read(input);\n this.rows.push(elem316);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_load_table_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_load_table_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.table_name !== null && this.table_name !== undefined) {\n output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);\n output.writeString(this.table_name);\n output.writeFieldEnd();\n }\n if (this.rows !== null && this.rows !== undefined) {\n output.writeFieldBegin('rows', Thrift.Type.LIST, 3);\n output.writeListBegin(Thrift.Type.STRUCT, this.rows.length);\n for (var iter317 in this.rows) {\n if (this.rows.hasOwnProperty(iter317)) {\n iter317 = this.rows[iter317];\n iter317.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_load_table_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_load_table_result.prototype = {};\nMapD_load_table_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_load_table_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_load_table_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_detect_column_types_args = function (args) {\n this.session = null;\n this.file_name = null;\n this.copy_params = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.file_name !== undefined && args.file_name !== null) {\n this.file_name = args.file_name;\n }\n if (args.copy_params !== undefined && args.copy_params !== null) {\n this.copy_params = new TCopyParams(args.copy_params);\n }\n }\n};\nMapD_detect_column_types_args.prototype = {};\nMapD_detect_column_types_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.file_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRUCT) {\n this.copy_params = new TCopyParams();\n this.copy_params.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_detect_column_types_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_detect_column_types_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.file_name !== null && this.file_name !== undefined) {\n output.writeFieldBegin('file_name', Thrift.Type.STRING, 2);\n output.writeString(this.file_name);\n output.writeFieldEnd();\n }\n if (this.copy_params !== null && this.copy_params !== undefined) {\n output.writeFieldBegin('copy_params', Thrift.Type.STRUCT, 3);\n this.copy_params.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_detect_column_types_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TDetectResult(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_detect_column_types_result.prototype = {};\nMapD_detect_column_types_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TDetectResult();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_detect_column_types_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_detect_column_types_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_create_table_args = function (args) {\n this.session = null;\n this.table_name = null;\n this.row_desc = null;\n this.table_type = 0;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.table_name !== undefined && args.table_name !== null) {\n this.table_name = args.table_name;\n }\n if (args.row_desc !== undefined && args.row_desc !== null) {\n this.row_desc = Thrift.copyList(args.row_desc, [TColumnType]);\n }\n if (args.table_type !== undefined && args.table_type !== null) {\n this.table_type = args.table_type;\n }\n }\n};\nMapD_create_table_args.prototype = {};\nMapD_create_table_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.table_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.LIST) {\n var _size318 = 0;\n var _rtmp3322;\n this.row_desc = [];\n var _etype321 = 0;\n _rtmp3322 = input.readListBegin();\n _etype321 = _rtmp3322.etype;\n _size318 = _rtmp3322.size;\n for (var _i323 = 0; _i323 < _size318; ++_i323) {\n var elem324 = null;\n elem324 = new TColumnType();\n elem324.read(input);\n this.row_desc.push(elem324);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.I32) {\n this.table_type = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_create_table_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_create_table_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.table_name !== null && this.table_name !== undefined) {\n output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);\n output.writeString(this.table_name);\n output.writeFieldEnd();\n }\n if (this.row_desc !== null && this.row_desc !== undefined) {\n output.writeFieldBegin('row_desc', Thrift.Type.LIST, 3);\n output.writeListBegin(Thrift.Type.STRUCT, this.row_desc.length);\n for (var iter325 in this.row_desc) {\n if (this.row_desc.hasOwnProperty(iter325)) {\n iter325 = this.row_desc[iter325];\n iter325.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.table_type !== null && this.table_type !== undefined) {\n output.writeFieldBegin('table_type', Thrift.Type.I32, 4);\n output.writeI32(this.table_type);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_create_table_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_create_table_result.prototype = {};\nMapD_create_table_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_create_table_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_create_table_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_import_table_args = function (args) {\n this.session = null;\n this.table_name = null;\n this.file_name = null;\n this.copy_params = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.table_name !== undefined && args.table_name !== null) {\n this.table_name = args.table_name;\n }\n if (args.file_name !== undefined && args.file_name !== null) {\n this.file_name = args.file_name;\n }\n if (args.copy_params !== undefined && args.copy_params !== null) {\n this.copy_params = new TCopyParams(args.copy_params);\n }\n }\n};\nMapD_import_table_args.prototype = {};\nMapD_import_table_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.table_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.file_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.STRUCT) {\n this.copy_params = new TCopyParams();\n this.copy_params.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_import_table_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_import_table_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.table_name !== null && this.table_name !== undefined) {\n output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);\n output.writeString(this.table_name);\n output.writeFieldEnd();\n }\n if (this.file_name !== null && this.file_name !== undefined) {\n output.writeFieldBegin('file_name', Thrift.Type.STRING, 3);\n output.writeString(this.file_name);\n output.writeFieldEnd();\n }\n if (this.copy_params !== null && this.copy_params !== undefined) {\n output.writeFieldBegin('copy_params', Thrift.Type.STRUCT, 4);\n this.copy_params.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_import_table_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_import_table_result.prototype = {};\nMapD_import_table_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_import_table_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_import_table_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_import_geo_table_args = function (args) {\n this.session = null;\n this.table_name = null;\n this.file_name = null;\n this.copy_params = null;\n this.row_desc = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.table_name !== undefined && args.table_name !== null) {\n this.table_name = args.table_name;\n }\n if (args.file_name !== undefined && args.file_name !== null) {\n this.file_name = args.file_name;\n }\n if (args.copy_params !== undefined && args.copy_params !== null) {\n this.copy_params = new TCopyParams(args.copy_params);\n }\n if (args.row_desc !== undefined && args.row_desc !== null) {\n this.row_desc = Thrift.copyList(args.row_desc, [TColumnType]);\n }\n }\n};\nMapD_import_geo_table_args.prototype = {};\nMapD_import_geo_table_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.table_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.file_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.STRUCT) {\n this.copy_params = new TCopyParams();\n this.copy_params.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.LIST) {\n var _size326 = 0;\n var _rtmp3330;\n this.row_desc = [];\n var _etype329 = 0;\n _rtmp3330 = input.readListBegin();\n _etype329 = _rtmp3330.etype;\n _size326 = _rtmp3330.size;\n for (var _i331 = 0; _i331 < _size326; ++_i331) {\n var elem332 = null;\n elem332 = new TColumnType();\n elem332.read(input);\n this.row_desc.push(elem332);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_import_geo_table_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_import_geo_table_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.table_name !== null && this.table_name !== undefined) {\n output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);\n output.writeString(this.table_name);\n output.writeFieldEnd();\n }\n if (this.file_name !== null && this.file_name !== undefined) {\n output.writeFieldBegin('file_name', Thrift.Type.STRING, 3);\n output.writeString(this.file_name);\n output.writeFieldEnd();\n }\n if (this.copy_params !== null && this.copy_params !== undefined) {\n output.writeFieldBegin('copy_params', Thrift.Type.STRUCT, 4);\n this.copy_params.write(output);\n output.writeFieldEnd();\n }\n if (this.row_desc !== null && this.row_desc !== undefined) {\n output.writeFieldBegin('row_desc', Thrift.Type.LIST, 5);\n output.writeListBegin(Thrift.Type.STRUCT, this.row_desc.length);\n for (var iter333 in this.row_desc) {\n if (this.row_desc.hasOwnProperty(iter333)) {\n iter333 = this.row_desc[iter333];\n iter333.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_import_geo_table_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_import_geo_table_result.prototype = {};\nMapD_import_geo_table_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_import_geo_table_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_import_geo_table_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_import_table_status_args = function (args) {\n this.session = null;\n this.import_id = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.import_id !== undefined && args.import_id !== null) {\n this.import_id = args.import_id;\n }\n }\n};\nMapD_import_table_status_args.prototype = {};\nMapD_import_table_status_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.import_id = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_import_table_status_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_import_table_status_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.import_id !== null && this.import_id !== undefined) {\n output.writeFieldBegin('import_id', Thrift.Type.STRING, 2);\n output.writeString(this.import_id);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_import_table_status_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TImportStatus(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_import_table_status_result.prototype = {};\nMapD_import_table_status_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TImportStatus();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_import_table_status_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_import_table_status_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_start_query_args = function (args) {\n this.session = null;\n this.query_ra = null;\n this.just_explain = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.query_ra !== undefined && args.query_ra !== null) {\n this.query_ra = args.query_ra;\n }\n if (args.just_explain !== undefined && args.just_explain !== null) {\n this.just_explain = args.just_explain;\n }\n }\n};\nMapD_start_query_args.prototype = {};\nMapD_start_query_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.query_ra = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.BOOL) {\n this.just_explain = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_start_query_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_start_query_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.query_ra !== null && this.query_ra !== undefined) {\n output.writeFieldBegin('query_ra', Thrift.Type.STRING, 2);\n output.writeString(this.query_ra);\n output.writeFieldEnd();\n }\n if (this.just_explain !== null && this.just_explain !== undefined) {\n output.writeFieldBegin('just_explain', Thrift.Type.BOOL, 3);\n output.writeBool(this.just_explain);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_start_query_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TPendingQuery(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_start_query_result.prototype = {};\nMapD_start_query_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TPendingQuery();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_start_query_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_start_query_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_execute_first_step_args = function (args) {\n this.pending_query = null;\n if (args) {\n if (args.pending_query !== undefined && args.pending_query !== null) {\n this.pending_query = new TPendingQuery(args.pending_query);\n }\n }\n};\nMapD_execute_first_step_args.prototype = {};\nMapD_execute_first_step_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.pending_query = new TPendingQuery();\n this.pending_query.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_execute_first_step_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_execute_first_step_args');\n if (this.pending_query !== null && this.pending_query !== undefined) {\n output.writeFieldBegin('pending_query', Thrift.Type.STRUCT, 1);\n this.pending_query.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_execute_first_step_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TStepResult(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_execute_first_step_result.prototype = {};\nMapD_execute_first_step_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TStepResult();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_execute_first_step_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_execute_first_step_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_broadcast_serialized_rows_args = function (args) {\n this.serialized_rows = null;\n this.row_desc = null;\n this.query_id = null;\n if (args) {\n if (args.serialized_rows !== undefined && args.serialized_rows !== null) {\n this.serialized_rows = args.serialized_rows;\n }\n if (args.row_desc !== undefined && args.row_desc !== null) {\n this.row_desc = Thrift.copyList(args.row_desc, [TColumnType]);\n }\n if (args.query_id !== undefined && args.query_id !== null) {\n this.query_id = args.query_id;\n }\n }\n};\nMapD_broadcast_serialized_rows_args.prototype = {};\nMapD_broadcast_serialized_rows_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.serialized_rows = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.LIST) {\n var _size334 = 0;\n var _rtmp3338;\n this.row_desc = [];\n var _etype337 = 0;\n _rtmp3338 = input.readListBegin();\n _etype337 = _rtmp3338.etype;\n _size334 = _rtmp3338.size;\n for (var _i339 = 0; _i339 < _size334; ++_i339) {\n var elem340 = null;\n elem340 = new TColumnType();\n elem340.read(input);\n this.row_desc.push(elem340);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I64) {\n this.query_id = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_broadcast_serialized_rows_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_broadcast_serialized_rows_args');\n if (this.serialized_rows !== null && this.serialized_rows !== undefined) {\n output.writeFieldBegin('serialized_rows', Thrift.Type.STRING, 1);\n output.writeString(this.serialized_rows);\n output.writeFieldEnd();\n }\n if (this.row_desc !== null && this.row_desc !== undefined) {\n output.writeFieldBegin('row_desc', Thrift.Type.LIST, 2);\n output.writeListBegin(Thrift.Type.STRUCT, this.row_desc.length);\n for (var iter341 in this.row_desc) {\n if (this.row_desc.hasOwnProperty(iter341)) {\n iter341 = this.row_desc[iter341];\n iter341.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.query_id !== null && this.query_id !== undefined) {\n output.writeFieldBegin('query_id', Thrift.Type.I64, 3);\n output.writeI64(this.query_id);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_broadcast_serialized_rows_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_broadcast_serialized_rows_result.prototype = {};\nMapD_broadcast_serialized_rows_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_broadcast_serialized_rows_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_broadcast_serialized_rows_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_render_vega_raw_pixels_args = function (args) {\n this.session = null;\n this.widget_id = null;\n this.node_idx = null;\n this.vega_json = null;\n this.nonce = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.widget_id !== undefined && args.widget_id !== null) {\n this.widget_id = args.widget_id;\n }\n if (args.node_idx !== undefined && args.node_idx !== null) {\n this.node_idx = args.node_idx;\n }\n if (args.vega_json !== undefined && args.vega_json !== null) {\n this.vega_json = args.vega_json;\n }\n if (args.nonce !== undefined && args.nonce !== null) {\n this.nonce = args.nonce;\n }\n }\n};\nMapD_render_vega_raw_pixels_args.prototype = {};\nMapD_render_vega_raw_pixels_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I64) {\n this.widget_id = input.readI64().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I16) {\n this.node_idx = input.readI16().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.STRING) {\n this.vega_json = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 5:\n if (ftype == Thrift.Type.STRING) {\n this.nonce = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_render_vega_raw_pixels_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_render_vega_raw_pixels_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.widget_id !== null && this.widget_id !== undefined) {\n output.writeFieldBegin('widget_id', Thrift.Type.I64, 2);\n output.writeI64(this.widget_id);\n output.writeFieldEnd();\n }\n if (this.node_idx !== null && this.node_idx !== undefined) {\n output.writeFieldBegin('node_idx', Thrift.Type.I16, 3);\n output.writeI16(this.node_idx);\n output.writeFieldEnd();\n }\n if (this.vega_json !== null && this.vega_json !== undefined) {\n output.writeFieldBegin('vega_json', Thrift.Type.STRING, 4);\n output.writeString(this.vega_json);\n output.writeFieldEnd();\n }\n if (this.nonce !== null && this.nonce !== undefined) {\n output.writeFieldBegin('nonce', Thrift.Type.STRING, 5);\n output.writeString(this.nonce);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_render_vega_raw_pixels_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TRawPixelDataResult(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_render_vega_raw_pixels_result.prototype = {};\nMapD_render_vega_raw_pixels_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TRawPixelDataResult();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_render_vega_raw_pixels_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_render_vega_raw_pixels_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_insert_data_args = function (args) {\n this.session = null;\n this.insert_data = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.insert_data !== undefined && args.insert_data !== null) {\n this.insert_data = new TInsertData(args.insert_data);\n }\n }\n};\nMapD_insert_data_args.prototype = {};\nMapD_insert_data_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRUCT) {\n this.insert_data = new TInsertData();\n this.insert_data.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_insert_data_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_insert_data_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.insert_data !== null && this.insert_data !== undefined) {\n output.writeFieldBegin('insert_data', Thrift.Type.STRUCT, 2);\n this.insert_data.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_insert_data_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_insert_data_result.prototype = {};\nMapD_insert_data_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_insert_data_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_insert_data_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_checkpoint_args = function (args) {\n this.session = null;\n this.db_id = null;\n this.table_id = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.db_id !== undefined && args.db_id !== null) {\n this.db_id = args.db_id;\n }\n if (args.table_id !== undefined && args.table_id !== null) {\n this.table_id = args.table_id;\n }\n }\n};\nMapD_checkpoint_args.prototype = {};\nMapD_checkpoint_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.I32) {\n this.db_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I32) {\n this.table_id = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_checkpoint_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_checkpoint_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.db_id !== null && this.db_id !== undefined) {\n output.writeFieldBegin('db_id', Thrift.Type.I32, 2);\n output.writeI32(this.db_id);\n output.writeFieldEnd();\n }\n if (this.table_id !== null && this.table_id !== undefined) {\n output.writeFieldBegin('table_id', Thrift.Type.I32, 3);\n output.writeI32(this.table_id);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_checkpoint_result = function (args) {\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_checkpoint_result.prototype = {};\nMapD_checkpoint_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 0:\n input.skip(ftype);\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_checkpoint_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_checkpoint_result');\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_table_descriptor_args = function (args) {\n this.session = null;\n this.table_name = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.table_name !== undefined && args.table_name !== null) {\n this.table_name = args.table_name;\n }\n }\n};\nMapD_get_table_descriptor_args.prototype = {};\nMapD_get_table_descriptor_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.table_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_table_descriptor_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_table_descriptor_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.table_name !== null && this.table_name !== undefined) {\n output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);\n output.writeString(this.table_name);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_table_descriptor_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyMap(args.success, [TColumnType]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_table_descriptor_result.prototype = {};\nMapD_get_table_descriptor_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.MAP) {\n var _size342 = 0;\n var _rtmp3346;\n this.success = {};\n var _ktype343 = 0;\n var _vtype344 = 0;\n _rtmp3346 = input.readMapBegin();\n _ktype343 = _rtmp3346.ktype;\n _vtype344 = _rtmp3346.vtype;\n _size342 = _rtmp3346.size;\n for (var _i347 = 0; _i347 < _size342; ++_i347) {\n if (_i347 > 0) {\n if (input.rstack.length > input.rpos[input.rpos.length - 1] + 1) {\n input.rstack.pop();\n }\n }\n var key348 = null;\n var val349 = null;\n key348 = input.readString().value;\n val349 = new TColumnType();\n val349.read(input);\n this.success[key348] = val349;\n }\n input.readMapEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_table_descriptor_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_table_descriptor_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.MAP, 0);\n output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.success));\n for (var kiter350 in this.success) {\n if (this.success.hasOwnProperty(kiter350)) {\n var viter351 = this.success[kiter350];\n output.writeString(kiter350);\n viter351.write(output);\n }\n }\n output.writeMapEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_row_descriptor_args = function (args) {\n this.session = null;\n this.table_name = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.table_name !== undefined && args.table_name !== null) {\n this.table_name = args.table_name;\n }\n }\n};\nMapD_get_row_descriptor_args.prototype = {};\nMapD_get_row_descriptor_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.table_name = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_row_descriptor_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_row_descriptor_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.table_name !== null && this.table_name !== undefined) {\n output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);\n output.writeString(this.table_name);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_row_descriptor_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [TColumnType]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_row_descriptor_result.prototype = {};\nMapD_get_row_descriptor_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size352 = 0;\n var _rtmp3356;\n this.success = [];\n var _etype355 = 0;\n _rtmp3356 = input.readListBegin();\n _etype355 = _rtmp3356.etype;\n _size352 = _rtmp3356.size;\n for (var _i357 = 0; _i357 < _size352; ++_i357) {\n var elem358 = null;\n elem358 = new TColumnType();\n elem358.read(input);\n this.success.push(elem358);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_row_descriptor_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_row_descriptor_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRUCT, this.success.length);\n for (var iter359 in this.success) {\n if (this.success.hasOwnProperty(iter359)) {\n iter359 = this.success[iter359];\n iter359.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_role_args = function (args) {\n this.session = null;\n this.roleName = null;\n this.userPrivateRole = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.roleName !== undefined && args.roleName !== null) {\n this.roleName = args.roleName;\n }\n if (args.userPrivateRole !== undefined && args.userPrivateRole !== null) {\n this.userPrivateRole = args.userPrivateRole;\n }\n }\n};\nMapD_get_role_args.prototype = {};\nMapD_get_role_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.roleName = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.BOOL) {\n this.userPrivateRole = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_role_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_role_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.roleName !== null && this.roleName !== undefined) {\n output.writeFieldBegin('roleName', Thrift.Type.STRING, 2);\n output.writeString(this.roleName);\n output.writeFieldEnd();\n }\n if (this.userPrivateRole !== null && this.userPrivateRole !== undefined) {\n output.writeFieldBegin('userPrivateRole', Thrift.Type.BOOL, 3);\n output.writeBool(this.userPrivateRole);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_role_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [null]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_role_result.prototype = {};\nMapD_get_role_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size360 = 0;\n var _rtmp3364;\n this.success = [];\n var _etype363 = 0;\n _rtmp3364 = input.readListBegin();\n _etype363 = _rtmp3364.etype;\n _size360 = _rtmp3364.size;\n for (var _i365 = 0; _i365 < _size360; ++_i365) {\n var elem366 = null;\n elem366 = input.readString().value;\n this.success.push(elem366);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_role_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_role_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRING, this.success.length);\n for (var iter367 in this.success) {\n if (this.success.hasOwnProperty(iter367)) {\n iter367 = this.success[iter367];\n output.writeString(iter367);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_all_roles_args = function (args) {\n this.session = null;\n this.userPrivateRole = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.userPrivateRole !== undefined && args.userPrivateRole !== null) {\n this.userPrivateRole = args.userPrivateRole;\n }\n }\n};\nMapD_get_all_roles_args.prototype = {};\nMapD_get_all_roles_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.BOOL) {\n this.userPrivateRole = input.readBool().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_all_roles_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_all_roles_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.userPrivateRole !== null && this.userPrivateRole !== undefined) {\n output.writeFieldBegin('userPrivateRole', Thrift.Type.BOOL, 2);\n output.writeBool(this.userPrivateRole);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_all_roles_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [null]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_all_roles_result.prototype = {};\nMapD_get_all_roles_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size368 = 0;\n var _rtmp3372;\n this.success = [];\n var _etype371 = 0;\n _rtmp3372 = input.readListBegin();\n _etype371 = _rtmp3372.etype;\n _size368 = _rtmp3372.size;\n for (var _i373 = 0; _i373 < _size368; ++_i373) {\n var elem374 = null;\n elem374 = input.readString().value;\n this.success.push(elem374);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_all_roles_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_all_roles_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRING, this.success.length);\n for (var iter375 in this.success) {\n if (this.success.hasOwnProperty(iter375)) {\n iter375 = this.success[iter375];\n output.writeString(iter375);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_db_object_privileges_for_role_args = function (args) {\n this.session = null;\n this.roleName = null;\n this.objectType = null;\n this.objectName = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.roleName !== undefined && args.roleName !== null) {\n this.roleName = args.roleName;\n }\n if (args.objectType !== undefined && args.objectType !== null) {\n this.objectType = args.objectType;\n }\n if (args.objectName !== undefined && args.objectName !== null) {\n this.objectName = args.objectName;\n }\n }\n};\nMapD_get_db_object_privileges_for_role_args.prototype = {};\nMapD_get_db_object_privileges_for_role_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.roleName = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I16) {\n this.objectType = input.readI16().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.STRING) {\n this.objectName = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_db_object_privileges_for_role_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_db_object_privileges_for_role_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.roleName !== null && this.roleName !== undefined) {\n output.writeFieldBegin('roleName', Thrift.Type.STRING, 2);\n output.writeString(this.roleName);\n output.writeFieldEnd();\n }\n if (this.objectType !== null && this.objectType !== undefined) {\n output.writeFieldBegin('objectType', Thrift.Type.I16, 3);\n output.writeI16(this.objectType);\n output.writeFieldEnd();\n }\n if (this.objectName !== null && this.objectName !== undefined) {\n output.writeFieldBegin('objectName', Thrift.Type.STRING, 4);\n output.writeString(this.objectName);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_db_object_privileges_for_role_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [TAccessPrivileges]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_db_object_privileges_for_role_result.prototype = {};\nMapD_get_db_object_privileges_for_role_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size376 = 0;\n var _rtmp3380;\n this.success = [];\n var _etype379 = 0;\n _rtmp3380 = input.readListBegin();\n _etype379 = _rtmp3380.etype;\n _size376 = _rtmp3380.size;\n for (var _i381 = 0; _i381 < _size376; ++_i381) {\n var elem382 = null;\n elem382 = new TAccessPrivileges();\n elem382.read(input);\n this.success.push(elem382);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_db_object_privileges_for_role_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_db_object_privileges_for_role_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRUCT, this.success.length);\n for (var iter383 in this.success) {\n if (this.success.hasOwnProperty(iter383)) {\n iter383 = this.success[iter383];\n iter383.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_db_objects_for_role_args = function (args) {\n this.session = null;\n this.roleName = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.roleName !== undefined && args.roleName !== null) {\n this.roleName = args.roleName;\n }\n }\n};\nMapD_get_db_objects_for_role_args.prototype = {};\nMapD_get_db_objects_for_role_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.roleName = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_db_objects_for_role_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_db_objects_for_role_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.roleName !== null && this.roleName !== undefined) {\n output.writeFieldBegin('roleName', Thrift.Type.STRING, 2);\n output.writeString(this.roleName);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_db_objects_for_role_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [TDBObject]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_db_objects_for_role_result.prototype = {};\nMapD_get_db_objects_for_role_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size384 = 0;\n var _rtmp3388;\n this.success = [];\n var _etype387 = 0;\n _rtmp3388 = input.readListBegin();\n _etype387 = _rtmp3388.etype;\n _size384 = _rtmp3388.size;\n for (var _i389 = 0; _i389 < _size384; ++_i389) {\n var elem390 = null;\n elem390 = new TDBObject();\n elem390.read(input);\n this.success.push(elem390);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_db_objects_for_role_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_db_objects_for_role_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRUCT, this.success.length);\n for (var iter391 in this.success) {\n if (this.success.hasOwnProperty(iter391)) {\n iter391 = this.success[iter391];\n iter391.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_db_object_privs_args = function (args) {\n this.session = null;\n this.objectName = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.objectName !== undefined && args.objectName !== null) {\n this.objectName = args.objectName;\n }\n }\n};\nMapD_get_db_object_privs_args.prototype = {};\nMapD_get_db_object_privs_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.objectName = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_db_object_privs_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_db_object_privs_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.objectName !== null && this.objectName !== undefined) {\n output.writeFieldBegin('objectName', Thrift.Type.STRING, 2);\n output.writeString(this.objectName);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_db_object_privs_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [TDBObject]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_db_object_privs_result.prototype = {};\nMapD_get_db_object_privs_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size392 = 0;\n var _rtmp3396;\n this.success = [];\n var _etype395 = 0;\n _rtmp3396 = input.readListBegin();\n _etype395 = _rtmp3396.etype;\n _size392 = _rtmp3396.size;\n for (var _i397 = 0; _i397 < _size392; ++_i397) {\n var elem398 = null;\n elem398 = new TDBObject();\n elem398.read(input);\n this.success.push(elem398);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_db_object_privs_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_db_object_privs_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRUCT, this.success.length);\n for (var iter399 in this.success) {\n if (this.success.hasOwnProperty(iter399)) {\n iter399 = this.success[iter399];\n iter399.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_all_roles_for_user_args = function (args) {\n this.session = null;\n this.userName = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.userName !== undefined && args.userName !== null) {\n this.userName = args.userName;\n }\n }\n};\nMapD_get_all_roles_for_user_args.prototype = {};\nMapD_get_all_roles_for_user_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.userName = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_all_roles_for_user_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_all_roles_for_user_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.userName !== null && this.userName !== undefined) {\n output.writeFieldBegin('userName', Thrift.Type.STRING, 2);\n output.writeString(this.userName);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_all_roles_for_user_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [null]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_all_roles_for_user_result.prototype = {};\nMapD_get_all_roles_for_user_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size400 = 0;\n var _rtmp3404;\n this.success = [];\n var _etype403 = 0;\n _rtmp3404 = input.readListBegin();\n _etype403 = _rtmp3404.etype;\n _size400 = _rtmp3404.size;\n for (var _i405 = 0; _i405 < _size400; ++_i405) {\n var elem406 = null;\n elem406 = input.readString().value;\n this.success.push(elem406);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_all_roles_for_user_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_all_roles_for_user_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRING, this.success.length);\n for (var iter407 in this.success) {\n if (this.success.hasOwnProperty(iter407)) {\n iter407 = this.success[iter407];\n output.writeString(iter407);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_db_object_privileges_for_user_args = function (args) {\n this.session = null;\n this.userName = null;\n this.objectType = null;\n this.objectName = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.userName !== undefined && args.userName !== null) {\n this.userName = args.userName;\n }\n if (args.objectType !== undefined && args.objectType !== null) {\n this.objectType = args.objectType;\n }\n if (args.objectName !== undefined && args.objectName !== null) {\n this.objectName = args.objectName;\n }\n }\n};\nMapD_get_db_object_privileges_for_user_args.prototype = {};\nMapD_get_db_object_privileges_for_user_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.userName = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.I16) {\n this.objectType = input.readI16().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 4:\n if (ftype == Thrift.Type.STRING) {\n this.objectName = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_db_object_privileges_for_user_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_db_object_privileges_for_user_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.userName !== null && this.userName !== undefined) {\n output.writeFieldBegin('userName', Thrift.Type.STRING, 2);\n output.writeString(this.userName);\n output.writeFieldEnd();\n }\n if (this.objectType !== null && this.objectType !== undefined) {\n output.writeFieldBegin('objectType', Thrift.Type.I16, 3);\n output.writeI16(this.objectType);\n output.writeFieldEnd();\n }\n if (this.objectName !== null && this.objectName !== undefined) {\n output.writeFieldBegin('objectName', Thrift.Type.STRING, 4);\n output.writeString(this.objectName);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_db_object_privileges_for_user_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [TAccessPrivileges]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_db_object_privileges_for_user_result.prototype = {};\nMapD_get_db_object_privileges_for_user_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size408 = 0;\n var _rtmp3412;\n this.success = [];\n var _etype411 = 0;\n _rtmp3412 = input.readListBegin();\n _etype411 = _rtmp3412.etype;\n _size408 = _rtmp3412.size;\n for (var _i413 = 0; _i413 < _size408; ++_i413) {\n var elem414 = null;\n elem414 = new TAccessPrivileges();\n elem414.read(input);\n this.success.push(elem414);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_db_object_privileges_for_user_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_db_object_privileges_for_user_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRUCT, this.success.length);\n for (var iter415 in this.success) {\n if (this.success.hasOwnProperty(iter415)) {\n iter415 = this.success[iter415];\n iter415.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_db_objects_for_user_args = function (args) {\n this.session = null;\n this.userName = null;\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.userName !== undefined && args.userName !== null) {\n this.userName = args.userName;\n }\n }\n};\nMapD_get_db_objects_for_user_args.prototype = {};\nMapD_get_db_objects_for_user_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.userName = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_db_objects_for_user_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_db_objects_for_user_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.userName !== null && this.userName !== undefined) {\n output.writeFieldBegin('userName', Thrift.Type.STRING, 2);\n output.writeString(this.userName);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_db_objects_for_user_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = Thrift.copyList(args.success, [TDBObject]);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_db_objects_for_user_result.prototype = {};\nMapD_get_db_objects_for_user_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.LIST) {\n var _size416 = 0;\n var _rtmp3420;\n this.success = [];\n var _etype419 = 0;\n _rtmp3420 = input.readListBegin();\n _etype419 = _rtmp3420.etype;\n _size416 = _rtmp3420.size;\n for (var _i421 = 0; _i421 < _size416; ++_i421) {\n var elem422 = null;\n elem422 = new TDBObject();\n elem422.read(input);\n this.success.push(elem422);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_db_objects_for_user_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_db_objects_for_user_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.LIST, 0);\n output.writeListBegin(Thrift.Type.STRUCT, this.success.length);\n for (var iter423 in this.success) {\n if (this.success.hasOwnProperty(iter423)) {\n iter423 = this.success[iter423];\n iter423.write(output);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_set_license_key_args = function (args) {\n this.session = null;\n this.key = null;\n this.nonce = '';\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.key !== undefined && args.key !== null) {\n this.key = args.key;\n }\n if (args.nonce !== undefined && args.nonce !== null) {\n this.nonce = args.nonce;\n }\n }\n};\nMapD_set_license_key_args.prototype = {};\nMapD_set_license_key_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.key = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.nonce = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_set_license_key_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_set_license_key_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.key !== null && this.key !== undefined) {\n output.writeFieldBegin('key', Thrift.Type.STRING, 2);\n output.writeString(this.key);\n output.writeFieldEnd();\n }\n if (this.nonce !== null && this.nonce !== undefined) {\n output.writeFieldBegin('nonce', Thrift.Type.STRING, 3);\n output.writeString(this.nonce);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_set_license_key_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TLicenseInfo(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_set_license_key_result.prototype = {};\nMapD_set_license_key_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TLicenseInfo();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_set_license_key_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_set_license_key_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_license_claims_args = function (args) {\n this.session = null;\n this.nonce = '';\n if (args) {\n if (args.session !== undefined && args.session !== null) {\n this.session = args.session;\n }\n if (args.nonce !== undefined && args.nonce !== null) {\n this.nonce = args.nonce;\n }\n }\n};\nMapD_get_license_claims_args.prototype = {};\nMapD_get_license_claims_args.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.STRING) {\n this.session = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.STRING) {\n this.nonce = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_license_claims_args.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_license_claims_args');\n if (this.session !== null && this.session !== undefined) {\n output.writeFieldBegin('session', Thrift.Type.STRING, 1);\n output.writeString(this.session);\n output.writeFieldEnd();\n }\n if (this.nonce !== null && this.nonce !== undefined) {\n output.writeFieldBegin('nonce', Thrift.Type.STRING, 2);\n output.writeString(this.nonce);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapD_get_license_claims_result = function (args) {\n this.success = null;\n this.e = null;\n if (args instanceof TMapDException) {\n this.e = args;\n return;\n }\n if (args) {\n if (args.success !== undefined && args.success !== null) {\n this.success = new TLicenseInfo(args.success);\n }\n if (args.e !== undefined && args.e !== null) {\n this.e = args.e;\n }\n }\n};\nMapD_get_license_claims_result.prototype = {};\nMapD_get_license_claims_result.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 0:\n if (ftype == Thrift.Type.STRUCT) {\n this.success = new TLicenseInfo();\n this.success.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n case 1:\n if (ftype == Thrift.Type.STRUCT) {\n this.e = new TMapDException();\n this.e.read(input);\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nMapD_get_license_claims_result.prototype.write = function (output) {\n output.writeStructBegin('MapD_get_license_claims_result');\n if (this.success !== null && this.success !== undefined) {\n output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);\n this.success.write(output);\n output.writeFieldEnd();\n }\n if (this.e !== null && this.e !== undefined) {\n output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);\n this.e.write(output);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};\n\nwindow.MapDClient = function (input, output) {\n this.input = input;\n this.output = !output ? input : output;\n this.seqid = 0;\n};\nMapDClient.prototype = {};\nMapDClient.prototype.connect = function (user, passwd, dbname, callback) {\n this.send_connect(user, passwd, dbname, callback);\n if (!callback) {\n return this.recv_connect();\n }\n};\n\nMapDClient.prototype.send_connect = function (user, passwd, dbname, callback) {\n this.output.writeMessageBegin('connect', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_connect_args();\n args.user = user;\n args.passwd = passwd;\n args.dbname = dbname;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_connect();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_connect = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_connect_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'connect failed: unknown result';\n};\nMapDClient.prototype.disconnect = function (session, callback) {\n this.send_disconnect(session, callback);\n if (!callback) {\n this.recv_disconnect();\n }\n};\n\nMapDClient.prototype.send_disconnect = function (session, callback) {\n this.output.writeMessageBegin('disconnect', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_disconnect_args();\n args.session = session;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_disconnect();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_disconnect = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_disconnect_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.get_server_status = function (session, callback) {\n this.send_get_server_status(session, callback);\n if (!callback) {\n return this.recv_get_server_status();\n }\n};\n\nMapDClient.prototype.send_get_server_status = function (session, callback) {\n this.output.writeMessageBegin('get_server_status', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_server_status_args();\n args.session = session;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_server_status();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_server_status = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_server_status_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_server_status failed: unknown result';\n};\nMapDClient.prototype.get_status = function (session, callback) {\n this.send_get_status(session, callback);\n if (!callback) {\n return this.recv_get_status();\n }\n};\n\nMapDClient.prototype.send_get_status = function (session, callback) {\n this.output.writeMessageBegin('get_status', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_status_args();\n args.session = session;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_status();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_status = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_status_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_status failed: unknown result';\n};\nMapDClient.prototype.get_hardware_info = function (session, callback) {\n this.send_get_hardware_info(session, callback);\n if (!callback) {\n return this.recv_get_hardware_info();\n }\n};\n\nMapDClient.prototype.send_get_hardware_info = function (session, callback) {\n this.output.writeMessageBegin('get_hardware_info', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_hardware_info_args();\n args.session = session;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_hardware_info();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_hardware_info = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_hardware_info_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_hardware_info failed: unknown result';\n};\nMapDClient.prototype.get_tables = function (session, callback) {\n this.send_get_tables(session, callback);\n if (!callback) {\n return this.recv_get_tables();\n }\n};\n\nMapDClient.prototype.send_get_tables = function (session, callback) {\n this.output.writeMessageBegin('get_tables', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_tables_args();\n args.session = session;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_tables();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_tables = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_tables_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_tables failed: unknown result';\n};\nMapDClient.prototype.get_table_details = function (session, table_name, callback) {\n this.send_get_table_details(session, table_name, callback);\n if (!callback) {\n return this.recv_get_table_details();\n }\n};\n\nMapDClient.prototype.send_get_table_details = function (session, table_name, callback) {\n this.output.writeMessageBegin('get_table_details', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_table_details_args();\n args.session = session;\n args.table_name = table_name;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_table_details();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_table_details = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_table_details_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_table_details failed: unknown result';\n};\nMapDClient.prototype.get_internal_table_details = function (session, table_name, callback) {\n this.send_get_internal_table_details(session, table_name, callback);\n if (!callback) {\n return this.recv_get_internal_table_details();\n }\n};\n\nMapDClient.prototype.send_get_internal_table_details = function (session, table_name, callback) {\n this.output.writeMessageBegin('get_internal_table_details', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_internal_table_details_args();\n args.session = session;\n args.table_name = table_name;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_internal_table_details();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_internal_table_details = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_internal_table_details_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_internal_table_details failed: unknown result';\n};\nMapDClient.prototype.get_users = function (session, callback) {\n this.send_get_users(session, callback);\n if (!callback) {\n return this.recv_get_users();\n }\n};\n\nMapDClient.prototype.send_get_users = function (session, callback) {\n this.output.writeMessageBegin('get_users', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_users_args();\n args.session = session;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_users();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_users = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_users_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_users failed: unknown result';\n};\nMapDClient.prototype.get_databases = function (session, callback) {\n this.send_get_databases(session, callback);\n if (!callback) {\n return this.recv_get_databases();\n }\n};\n\nMapDClient.prototype.send_get_databases = function (session, callback) {\n this.output.writeMessageBegin('get_databases', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_databases_args();\n args.session = session;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_databases();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_databases = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_databases_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_databases failed: unknown result';\n};\nMapDClient.prototype.get_version = function (callback) {\n this.send_get_version(callback);\n if (!callback) {\n return this.recv_get_version();\n }\n};\n\nMapDClient.prototype.send_get_version = function (callback) {\n this.output.writeMessageBegin('get_version', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_version_args();\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_version();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_version = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_version_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_version failed: unknown result';\n};\nMapDClient.prototype.start_heap_profile = function (session, callback) {\n this.send_start_heap_profile(session, callback);\n if (!callback) {\n this.recv_start_heap_profile();\n }\n};\n\nMapDClient.prototype.send_start_heap_profile = function (session, callback) {\n this.output.writeMessageBegin('start_heap_profile', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_start_heap_profile_args();\n args.session = session;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_start_heap_profile();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_start_heap_profile = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_start_heap_profile_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.stop_heap_profile = function (session, callback) {\n this.send_stop_heap_profile(session, callback);\n if (!callback) {\n this.recv_stop_heap_profile();\n }\n};\n\nMapDClient.prototype.send_stop_heap_profile = function (session, callback) {\n this.output.writeMessageBegin('stop_heap_profile', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_stop_heap_profile_args();\n args.session = session;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_stop_heap_profile();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_stop_heap_profile = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_stop_heap_profile_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.get_heap_profile = function (session, callback) {\n this.send_get_heap_profile(session, callback);\n if (!callback) {\n return this.recv_get_heap_profile();\n }\n};\n\nMapDClient.prototype.send_get_heap_profile = function (session, callback) {\n this.output.writeMessageBegin('get_heap_profile', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_heap_profile_args();\n args.session = session;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_heap_profile();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_heap_profile = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_heap_profile_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_heap_profile failed: unknown result';\n};\nMapDClient.prototype.get_memory = function (session, memory_level, callback) {\n this.send_get_memory(session, memory_level, callback);\n if (!callback) {\n return this.recv_get_memory();\n }\n};\n\nMapDClient.prototype.send_get_memory = function (session, memory_level, callback) {\n this.output.writeMessageBegin('get_memory', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_memory_args();\n args.session = session;\n args.memory_level = memory_level;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_memory();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_memory = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_memory_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_memory failed: unknown result';\n};\nMapDClient.prototype.clear_cpu_memory = function (session, callback) {\n this.send_clear_cpu_memory(session, callback);\n if (!callback) {\n this.recv_clear_cpu_memory();\n }\n};\n\nMapDClient.prototype.send_clear_cpu_memory = function (session, callback) {\n this.output.writeMessageBegin('clear_cpu_memory', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_clear_cpu_memory_args();\n args.session = session;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_clear_cpu_memory();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_clear_cpu_memory = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_clear_cpu_memory_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.clear_gpu_memory = function (session, callback) {\n this.send_clear_gpu_memory(session, callback);\n if (!callback) {\n this.recv_clear_gpu_memory();\n }\n};\n\nMapDClient.prototype.send_clear_gpu_memory = function (session, callback) {\n this.output.writeMessageBegin('clear_gpu_memory', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_clear_gpu_memory_args();\n args.session = session;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_clear_gpu_memory();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_clear_gpu_memory = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_clear_gpu_memory_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.set_table_epoch = function (session, db_id, table_id, new_epoch, callback) {\n this.send_set_table_epoch(session, db_id, table_id, new_epoch, callback);\n if (!callback) {\n this.recv_set_table_epoch();\n }\n};\n\nMapDClient.prototype.send_set_table_epoch = function (session, db_id, table_id, new_epoch, callback) {\n this.output.writeMessageBegin('set_table_epoch', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_set_table_epoch_args();\n args.session = session;\n args.db_id = db_id;\n args.table_id = table_id;\n args.new_epoch = new_epoch;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_set_table_epoch();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_set_table_epoch = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_set_table_epoch_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.get_table_epoch = function (session, db_id, table_id, callback) {\n this.send_get_table_epoch(session, db_id, table_id, callback);\n if (!callback) {\n return this.recv_get_table_epoch();\n }\n};\n\nMapDClient.prototype.send_get_table_epoch = function (session, db_id, table_id, callback) {\n this.output.writeMessageBegin('get_table_epoch', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_table_epoch_args();\n args.session = session;\n args.db_id = db_id;\n args.table_id = table_id;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_table_epoch();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_table_epoch = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_table_epoch_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_table_epoch failed: unknown result';\n};\nMapDClient.prototype.sql_execute = function (session, query, column_format, nonce, first_n, at_most_n, callback) {\n this.send_sql_execute(session, query, column_format, nonce, first_n, at_most_n, callback);\n if (!callback) {\n return this.recv_sql_execute();\n }\n};\n\nMapDClient.prototype.send_sql_execute = function (session, query, column_format, nonce, first_n, at_most_n, callback) {\n this.output.writeMessageBegin('sql_execute', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_sql_execute_args();\n args.session = session;\n args.query = query;\n args.column_format = column_format;\n args.nonce = nonce;\n args.first_n = first_n;\n args.at_most_n = at_most_n;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_sql_execute();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_sql_execute = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_sql_execute_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'sql_execute failed: unknown result';\n};\nMapDClient.prototype.sql_execute_df = function (session, query, device_type, device_id, first_n, callback) {\n this.send_sql_execute_df(session, query, device_type, device_id, first_n, callback);\n if (!callback) {\n return this.recv_sql_execute_df();\n }\n};\n\nMapDClient.prototype.send_sql_execute_df = function (session, query, device_type, device_id, first_n, callback) {\n this.output.writeMessageBegin('sql_execute_df', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_sql_execute_df_args();\n args.session = session;\n args.query = query;\n args.device_type = device_type;\n args.device_id = device_id;\n args.first_n = first_n;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_sql_execute_df();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_sql_execute_df = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_sql_execute_df_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'sql_execute_df failed: unknown result';\n};\nMapDClient.prototype.sql_execute_gdf = function (session, query, device_id, first_n, callback) {\n this.send_sql_execute_gdf(session, query, device_id, first_n, callback);\n if (!callback) {\n return this.recv_sql_execute_gdf();\n }\n};\n\nMapDClient.prototype.send_sql_execute_gdf = function (session, query, device_id, first_n, callback) {\n this.output.writeMessageBegin('sql_execute_gdf', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_sql_execute_gdf_args();\n args.session = session;\n args.query = query;\n args.device_id = device_id;\n args.first_n = first_n;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_sql_execute_gdf();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_sql_execute_gdf = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_sql_execute_gdf_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'sql_execute_gdf failed: unknown result';\n};\nMapDClient.prototype.deallocate_df = function (session, df, device_type, device_id, callback) {\n this.send_deallocate_df(session, df, device_type, device_id, callback);\n if (!callback) {\n this.recv_deallocate_df();\n }\n};\n\nMapDClient.prototype.send_deallocate_df = function (session, df, device_type, device_id, callback) {\n this.output.writeMessageBegin('deallocate_df', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_deallocate_df_args();\n args.session = session;\n args.df = df;\n args.device_type = device_type;\n args.device_id = device_id;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_deallocate_df();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_deallocate_df = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_deallocate_df_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.interrupt = function (session, callback) {\n this.send_interrupt(session, callback);\n if (!callback) {\n this.recv_interrupt();\n }\n};\n\nMapDClient.prototype.send_interrupt = function (session, callback) {\n this.output.writeMessageBegin('interrupt', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_interrupt_args();\n args.session = session;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_interrupt();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_interrupt = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_interrupt_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.sql_validate = function (session, query, callback) {\n this.send_sql_validate(session, query, callback);\n if (!callback) {\n return this.recv_sql_validate();\n }\n};\n\nMapDClient.prototype.send_sql_validate = function (session, query, callback) {\n this.output.writeMessageBegin('sql_validate', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_sql_validate_args();\n args.session = session;\n args.query = query;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_sql_validate();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_sql_validate = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_sql_validate_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'sql_validate failed: unknown result';\n};\nMapDClient.prototype.get_completion_hints = function (session, sql, cursor, callback) {\n this.send_get_completion_hints(session, sql, cursor, callback);\n if (!callback) {\n return this.recv_get_completion_hints();\n }\n};\n\nMapDClient.prototype.send_get_completion_hints = function (session, sql, cursor, callback) {\n this.output.writeMessageBegin('get_completion_hints', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_completion_hints_args();\n args.session = session;\n args.sql = sql;\n args.cursor = cursor;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_completion_hints();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_completion_hints = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_completion_hints_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_completion_hints failed: unknown result';\n};\nMapDClient.prototype.set_execution_mode = function (session, mode, callback) {\n this.send_set_execution_mode(session, mode, callback);\n if (!callback) {\n this.recv_set_execution_mode();\n }\n};\n\nMapDClient.prototype.send_set_execution_mode = function (session, mode, callback) {\n this.output.writeMessageBegin('set_execution_mode', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_set_execution_mode_args();\n args.session = session;\n args.mode = mode;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_set_execution_mode();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_set_execution_mode = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_set_execution_mode_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.render_vega = function (session, widget_id, vega_json, compression_level, nonce, callback) {\n this.send_render_vega(session, widget_id, vega_json, compression_level, nonce, callback);\n if (!callback) {\n return this.recv_render_vega();\n }\n};\n\nMapDClient.prototype.send_render_vega = function (session, widget_id, vega_json, compression_level, nonce, callback) {\n this.output.writeMessageBegin('render_vega', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_render_vega_args();\n args.session = session;\n args.widget_id = widget_id;\n args.vega_json = vega_json;\n args.compression_level = compression_level;\n args.nonce = nonce;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_render_vega();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_render_vega = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_render_vega_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'render_vega failed: unknown result';\n};\nMapDClient.prototype.get_result_row_for_pixel = function (session, widget_id, pixel, table_col_names, column_format, pixelRadius, nonce, callback) {\n this.send_get_result_row_for_pixel(session, widget_id, pixel, table_col_names, column_format, pixelRadius, nonce, callback);\n if (!callback) {\n return this.recv_get_result_row_for_pixel();\n }\n};\n\nMapDClient.prototype.send_get_result_row_for_pixel = function (session, widget_id, pixel, table_col_names, column_format, pixelRadius, nonce, callback) {\n this.output.writeMessageBegin('get_result_row_for_pixel', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_result_row_for_pixel_args();\n args.session = session;\n args.widget_id = widget_id;\n args.pixel = pixel;\n args.table_col_names = table_col_names;\n args.column_format = column_format;\n args.pixelRadius = pixelRadius;\n args.nonce = nonce;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_result_row_for_pixel();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_result_row_for_pixel = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_result_row_for_pixel_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_result_row_for_pixel failed: unknown result';\n};\nMapDClient.prototype.get_frontend_view = function (session, view_name, callback) {\n this.send_get_frontend_view(session, view_name, callback);\n if (!callback) {\n return this.recv_get_frontend_view();\n }\n};\n\nMapDClient.prototype.send_get_frontend_view = function (session, view_name, callback) {\n this.output.writeMessageBegin('get_frontend_view', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_frontend_view_args();\n args.session = session;\n args.view_name = view_name;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_frontend_view();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_frontend_view = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_frontend_view_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_frontend_view failed: unknown result';\n};\nMapDClient.prototype.get_frontend_views = function (session, callback) {\n this.send_get_frontend_views(session, callback);\n if (!callback) {\n return this.recv_get_frontend_views();\n }\n};\n\nMapDClient.prototype.send_get_frontend_views = function (session, callback) {\n this.output.writeMessageBegin('get_frontend_views', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_frontend_views_args();\n args.session = session;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_frontend_views();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_frontend_views = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_frontend_views_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_frontend_views failed: unknown result';\n};\nMapDClient.prototype.create_frontend_view = function (session, view_name, view_state, image_hash, view_metadata, callback) {\n this.send_create_frontend_view(session, view_name, view_state, image_hash, view_metadata, callback);\n if (!callback) {\n this.recv_create_frontend_view();\n }\n};\n\nMapDClient.prototype.send_create_frontend_view = function (session, view_name, view_state, image_hash, view_metadata, callback) {\n this.output.writeMessageBegin('create_frontend_view', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_create_frontend_view_args();\n args.session = session;\n args.view_name = view_name;\n args.view_state = view_state;\n args.image_hash = image_hash;\n args.view_metadata = view_metadata;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_create_frontend_view();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_create_frontend_view = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_create_frontend_view_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.delete_frontend_view = function (session, view_name, callback) {\n this.send_delete_frontend_view(session, view_name, callback);\n if (!callback) {\n this.recv_delete_frontend_view();\n }\n};\n\nMapDClient.prototype.send_delete_frontend_view = function (session, view_name, callback) {\n this.output.writeMessageBegin('delete_frontend_view', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_delete_frontend_view_args();\n args.session = session;\n args.view_name = view_name;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_delete_frontend_view();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_delete_frontend_view = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_delete_frontend_view_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.get_link_view = function (session, link, callback) {\n this.send_get_link_view(session, link, callback);\n if (!callback) {\n return this.recv_get_link_view();\n }\n};\n\nMapDClient.prototype.send_get_link_view = function (session, link, callback) {\n this.output.writeMessageBegin('get_link_view', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_link_view_args();\n args.session = session;\n args.link = link;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_link_view();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_link_view = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_link_view_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_link_view failed: unknown result';\n};\nMapDClient.prototype.create_link = function (session, view_state, view_metadata, callback) {\n this.send_create_link(session, view_state, view_metadata, callback);\n if (!callback) {\n return this.recv_create_link();\n }\n};\n\nMapDClient.prototype.send_create_link = function (session, view_state, view_metadata, callback) {\n this.output.writeMessageBegin('create_link', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_create_link_args();\n args.session = session;\n args.view_state = view_state;\n args.view_metadata = view_metadata;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_create_link();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_create_link = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_create_link_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'create_link failed: unknown result';\n};\nMapDClient.prototype.load_table_binary = function (session, table_name, rows, callback) {\n this.send_load_table_binary(session, table_name, rows, callback);\n if (!callback) {\n this.recv_load_table_binary();\n }\n};\n\nMapDClient.prototype.send_load_table_binary = function (session, table_name, rows, callback) {\n this.output.writeMessageBegin('load_table_binary', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_load_table_binary_args();\n args.session = session;\n args.table_name = table_name;\n args.rows = rows;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_load_table_binary();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_load_table_binary = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_load_table_binary_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.load_table_binary_columnar = function (session, table_name, cols, callback) {\n this.send_load_table_binary_columnar(session, table_name, cols, callback);\n if (!callback) {\n this.recv_load_table_binary_columnar();\n }\n};\n\nMapDClient.prototype.send_load_table_binary_columnar = function (session, table_name, cols, callback) {\n this.output.writeMessageBegin('load_table_binary_columnar', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_load_table_binary_columnar_args();\n args.session = session;\n args.table_name = table_name;\n args.cols = cols;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_load_table_binary_columnar();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_load_table_binary_columnar = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_load_table_binary_columnar_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.load_table_binary_arrow = function (session, table_name, arrow_stream, callback) {\n this.send_load_table_binary_arrow(session, table_name, arrow_stream, callback);\n if (!callback) {\n this.recv_load_table_binary_arrow();\n }\n};\n\nMapDClient.prototype.send_load_table_binary_arrow = function (session, table_name, arrow_stream, callback) {\n this.output.writeMessageBegin('load_table_binary_arrow', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_load_table_binary_arrow_args();\n args.session = session;\n args.table_name = table_name;\n args.arrow_stream = arrow_stream;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_load_table_binary_arrow();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_load_table_binary_arrow = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_load_table_binary_arrow_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.load_table = function (session, table_name, rows, callback) {\n this.send_load_table(session, table_name, rows, callback);\n if (!callback) {\n this.recv_load_table();\n }\n};\n\nMapDClient.prototype.send_load_table = function (session, table_name, rows, callback) {\n this.output.writeMessageBegin('load_table', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_load_table_args();\n args.session = session;\n args.table_name = table_name;\n args.rows = rows;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_load_table();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_load_table = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_load_table_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.detect_column_types = function (session, file_name, copy_params, callback) {\n this.send_detect_column_types(session, file_name, copy_params, callback);\n if (!callback) {\n return this.recv_detect_column_types();\n }\n};\n\nMapDClient.prototype.send_detect_column_types = function (session, file_name, copy_params, callback) {\n this.output.writeMessageBegin('detect_column_types', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_detect_column_types_args();\n args.session = session;\n args.file_name = file_name;\n args.copy_params = copy_params;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_detect_column_types();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_detect_column_types = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_detect_column_types_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'detect_column_types failed: unknown result';\n};\nMapDClient.prototype.create_table = function (session, table_name, row_desc, table_type, callback) {\n this.send_create_table(session, table_name, row_desc, table_type, callback);\n if (!callback) {\n this.recv_create_table();\n }\n};\n\nMapDClient.prototype.send_create_table = function (session, table_name, row_desc, table_type, callback) {\n this.output.writeMessageBegin('create_table', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_create_table_args();\n args.session = session;\n args.table_name = table_name;\n args.row_desc = row_desc;\n args.table_type = table_type;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_create_table();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_create_table = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_create_table_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.import_table = function (session, table_name, file_name, copy_params, callback) {\n this.send_import_table(session, table_name, file_name, copy_params, callback);\n if (!callback) {\n this.recv_import_table();\n }\n};\n\nMapDClient.prototype.send_import_table = function (session, table_name, file_name, copy_params, callback) {\n this.output.writeMessageBegin('import_table', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_import_table_args();\n args.session = session;\n args.table_name = table_name;\n args.file_name = file_name;\n args.copy_params = copy_params;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_import_table();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_import_table = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_import_table_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.import_geo_table = function (session, table_name, file_name, copy_params, row_desc, callback) {\n this.send_import_geo_table(session, table_name, file_name, copy_params, row_desc, callback);\n if (!callback) {\n this.recv_import_geo_table();\n }\n};\n\nMapDClient.prototype.send_import_geo_table = function (session, table_name, file_name, copy_params, row_desc, callback) {\n this.output.writeMessageBegin('import_geo_table', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_import_geo_table_args();\n args.session = session;\n args.table_name = table_name;\n args.file_name = file_name;\n args.copy_params = copy_params;\n args.row_desc = row_desc;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_import_geo_table();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_import_geo_table = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_import_geo_table_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.import_table_status = function (session, import_id, callback) {\n this.send_import_table_status(session, import_id, callback);\n if (!callback) {\n return this.recv_import_table_status();\n }\n};\n\nMapDClient.prototype.send_import_table_status = function (session, import_id, callback) {\n this.output.writeMessageBegin('import_table_status', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_import_table_status_args();\n args.session = session;\n args.import_id = import_id;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_import_table_status();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_import_table_status = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_import_table_status_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'import_table_status failed: unknown result';\n};\nMapDClient.prototype.start_query = function (session, query_ra, just_explain, callback) {\n this.send_start_query(session, query_ra, just_explain, callback);\n if (!callback) {\n return this.recv_start_query();\n }\n};\n\nMapDClient.prototype.send_start_query = function (session, query_ra, just_explain, callback) {\n this.output.writeMessageBegin('start_query', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_start_query_args();\n args.session = session;\n args.query_ra = query_ra;\n args.just_explain = just_explain;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_start_query();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_start_query = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_start_query_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'start_query failed: unknown result';\n};\nMapDClient.prototype.execute_first_step = function (pending_query, callback) {\n this.send_execute_first_step(pending_query, callback);\n if (!callback) {\n return this.recv_execute_first_step();\n }\n};\n\nMapDClient.prototype.send_execute_first_step = function (pending_query, callback) {\n this.output.writeMessageBegin('execute_first_step', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_execute_first_step_args();\n args.pending_query = pending_query;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_execute_first_step();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_execute_first_step = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_execute_first_step_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'execute_first_step failed: unknown result';\n};\nMapDClient.prototype.broadcast_serialized_rows = function (serialized_rows, row_desc, query_id, callback) {\n this.send_broadcast_serialized_rows(serialized_rows, row_desc, query_id, callback);\n if (!callback) {\n this.recv_broadcast_serialized_rows();\n }\n};\n\nMapDClient.prototype.send_broadcast_serialized_rows = function (serialized_rows, row_desc, query_id, callback) {\n this.output.writeMessageBegin('broadcast_serialized_rows', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_broadcast_serialized_rows_args();\n args.serialized_rows = serialized_rows;\n args.row_desc = row_desc;\n args.query_id = query_id;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_broadcast_serialized_rows();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_broadcast_serialized_rows = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_broadcast_serialized_rows_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.render_vega_raw_pixels = function (session, widget_id, node_idx, vega_json, nonce, callback) {\n this.send_render_vega_raw_pixels(session, widget_id, node_idx, vega_json, nonce, callback);\n if (!callback) {\n return this.recv_render_vega_raw_pixels();\n }\n};\n\nMapDClient.prototype.send_render_vega_raw_pixels = function (session, widget_id, node_idx, vega_json, nonce, callback) {\n this.output.writeMessageBegin('render_vega_raw_pixels', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_render_vega_raw_pixels_args();\n args.session = session;\n args.widget_id = widget_id;\n args.node_idx = node_idx;\n args.vega_json = vega_json;\n args.nonce = nonce;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_render_vega_raw_pixels();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_render_vega_raw_pixels = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_render_vega_raw_pixels_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'render_vega_raw_pixels failed: unknown result';\n};\nMapDClient.prototype.insert_data = function (session, insert_data, callback) {\n this.send_insert_data(session, insert_data, callback);\n if (!callback) {\n this.recv_insert_data();\n }\n};\n\nMapDClient.prototype.send_insert_data = function (session, insert_data, callback) {\n this.output.writeMessageBegin('insert_data', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_insert_data_args();\n args.session = session;\n args.insert_data = insert_data;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_insert_data();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_insert_data = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_insert_data_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.checkpoint = function (session, db_id, table_id, callback) {\n this.send_checkpoint(session, db_id, table_id, callback);\n if (!callback) {\n this.recv_checkpoint();\n }\n};\n\nMapDClient.prototype.send_checkpoint = function (session, db_id, table_id, callback) {\n this.output.writeMessageBegin('checkpoint', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_checkpoint_args();\n args.session = session;\n args.db_id = db_id;\n args.table_id = table_id;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_checkpoint();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_checkpoint = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_checkpoint_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n return;\n};\nMapDClient.prototype.get_table_descriptor = function (session, table_name, callback) {\n this.send_get_table_descriptor(session, table_name, callback);\n if (!callback) {\n return this.recv_get_table_descriptor();\n }\n};\n\nMapDClient.prototype.send_get_table_descriptor = function (session, table_name, callback) {\n this.output.writeMessageBegin('get_table_descriptor', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_table_descriptor_args();\n args.session = session;\n args.table_name = table_name;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_table_descriptor();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_table_descriptor = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_table_descriptor_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_table_descriptor failed: unknown result';\n};\nMapDClient.prototype.get_row_descriptor = function (session, table_name, callback) {\n this.send_get_row_descriptor(session, table_name, callback);\n if (!callback) {\n return this.recv_get_row_descriptor();\n }\n};\n\nMapDClient.prototype.send_get_row_descriptor = function (session, table_name, callback) {\n this.output.writeMessageBegin('get_row_descriptor', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_row_descriptor_args();\n args.session = session;\n args.table_name = table_name;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_row_descriptor();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_row_descriptor = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_row_descriptor_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_row_descriptor failed: unknown result';\n};\nMapDClient.prototype.get_role = function (session, roleName, userPrivateRole, callback) {\n this.send_get_role(session, roleName, userPrivateRole, callback);\n if (!callback) {\n return this.recv_get_role();\n }\n};\n\nMapDClient.prototype.send_get_role = function (session, roleName, userPrivateRole, callback) {\n this.output.writeMessageBegin('get_role', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_role_args();\n args.session = session;\n args.roleName = roleName;\n args.userPrivateRole = userPrivateRole;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_role();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_role = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_role_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_role failed: unknown result';\n};\nMapDClient.prototype.get_all_roles = function (session, userPrivateRole, callback) {\n this.send_get_all_roles(session, userPrivateRole, callback);\n if (!callback) {\n return this.recv_get_all_roles();\n }\n};\n\nMapDClient.prototype.send_get_all_roles = function (session, userPrivateRole, callback) {\n this.output.writeMessageBegin('get_all_roles', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_all_roles_args();\n args.session = session;\n args.userPrivateRole = userPrivateRole;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_all_roles();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_all_roles = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_all_roles_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_all_roles failed: unknown result';\n};\nMapDClient.prototype.get_db_object_privileges_for_role = function (session, roleName, objectType, objectName, callback) {\n this.send_get_db_object_privileges_for_role(session, roleName, objectType, objectName, callback);\n if (!callback) {\n return this.recv_get_db_object_privileges_for_role();\n }\n};\n\nMapDClient.prototype.send_get_db_object_privileges_for_role = function (session, roleName, objectType, objectName, callback) {\n this.output.writeMessageBegin('get_db_object_privileges_for_role', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_db_object_privileges_for_role_args();\n args.session = session;\n args.roleName = roleName;\n args.objectType = objectType;\n args.objectName = objectName;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_db_object_privileges_for_role();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_db_object_privileges_for_role = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_db_object_privileges_for_role_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_db_object_privileges_for_role failed: unknown result';\n};\nMapDClient.prototype.get_db_objects_for_role = function (session, roleName, callback) {\n this.send_get_db_objects_for_role(session, roleName, callback);\n if (!callback) {\n return this.recv_get_db_objects_for_role();\n }\n};\n\nMapDClient.prototype.send_get_db_objects_for_role = function (session, roleName, callback) {\n this.output.writeMessageBegin('get_db_objects_for_role', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_db_objects_for_role_args();\n args.session = session;\n args.roleName = roleName;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_db_objects_for_role();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_db_objects_for_role = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_db_objects_for_role_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_db_objects_for_role failed: unknown result';\n};\nMapDClient.prototype.get_db_object_privs = function (session, objectName, callback) {\n this.send_get_db_object_privs(session, objectName, callback);\n if (!callback) {\n return this.recv_get_db_object_privs();\n }\n};\n\nMapDClient.prototype.send_get_db_object_privs = function (session, objectName, callback) {\n this.output.writeMessageBegin('get_db_object_privs', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_db_object_privs_args();\n args.session = session;\n args.objectName = objectName;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_db_object_privs();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_db_object_privs = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_db_object_privs_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_db_object_privs failed: unknown result';\n};\nMapDClient.prototype.get_all_roles_for_user = function (session, userName, callback) {\n this.send_get_all_roles_for_user(session, userName, callback);\n if (!callback) {\n return this.recv_get_all_roles_for_user();\n }\n};\n\nMapDClient.prototype.send_get_all_roles_for_user = function (session, userName, callback) {\n this.output.writeMessageBegin('get_all_roles_for_user', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_all_roles_for_user_args();\n args.session = session;\n args.userName = userName;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_all_roles_for_user();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_all_roles_for_user = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_all_roles_for_user_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_all_roles_for_user failed: unknown result';\n};\nMapDClient.prototype.get_db_object_privileges_for_user = function (session, userName, objectType, objectName, callback) {\n this.send_get_db_object_privileges_for_user(session, userName, objectType, objectName, callback);\n if (!callback) {\n return this.recv_get_db_object_privileges_for_user();\n }\n};\n\nMapDClient.prototype.send_get_db_object_privileges_for_user = function (session, userName, objectType, objectName, callback) {\n this.output.writeMessageBegin('get_db_object_privileges_for_user', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_db_object_privileges_for_user_args();\n args.session = session;\n args.userName = userName;\n args.objectType = objectType;\n args.objectName = objectName;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_db_object_privileges_for_user();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_db_object_privileges_for_user = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_db_object_privileges_for_user_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_db_object_privileges_for_user failed: unknown result';\n};\nMapDClient.prototype.get_db_objects_for_user = function (session, userName, callback) {\n this.send_get_db_objects_for_user(session, userName, callback);\n if (!callback) {\n return this.recv_get_db_objects_for_user();\n }\n};\n\nMapDClient.prototype.send_get_db_objects_for_user = function (session, userName, callback) {\n this.output.writeMessageBegin('get_db_objects_for_user', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_db_objects_for_user_args();\n args.session = session;\n args.userName = userName;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_db_objects_for_user();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_db_objects_for_user = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_db_objects_for_user_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_db_objects_for_user failed: unknown result';\n};\nMapDClient.prototype.set_license_key = function (session, key, nonce, callback) {\n this.send_set_license_key(session, key, nonce, callback);\n if (!callback) {\n return this.recv_set_license_key();\n }\n};\n\nMapDClient.prototype.send_set_license_key = function (session, key, nonce, callback) {\n this.output.writeMessageBegin('set_license_key', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_set_license_key_args();\n args.session = session;\n args.key = key;\n args.nonce = nonce;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_set_license_key();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_set_license_key = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_set_license_key_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'set_license_key failed: unknown result';\n};\nMapDClient.prototype.get_license_claims = function (session, nonce, callback) {\n this.send_get_license_claims(session, nonce, callback);\n if (!callback) {\n return this.recv_get_license_claims();\n }\n};\n\nMapDClient.prototype.send_get_license_claims = function (session, nonce, callback) {\n this.output.writeMessageBegin('get_license_claims', Thrift.MessageType.CALL, this.seqid);\n var args = new MapD_get_license_claims_args();\n args.session = session;\n args.nonce = nonce;\n args.write(this.output);\n this.output.writeMessageEnd();\n if (callback) {\n var self = this;\n this.output.getTransport().flush(true, function () {\n var result = null;\n try {\n result = self.recv_get_license_claims();\n } catch (e) {\n result = e;\n }\n callback(result);\n });\n } else {\n return this.output.getTransport().flush();\n }\n};\n\nMapDClient.prototype.recv_get_license_claims = function () {\n var ret = this.input.readMessageBegin();\n var fname = ret.fname;\n var mtype = ret.mtype;\n var rseqid = ret.rseqid;\n if (mtype == Thrift.MessageType.EXCEPTION) {\n var x = new Thrift.TApplicationException();\n x.read(this.input);\n this.input.readMessageEnd();\n throw x;\n }\n var result = new MapD_get_license_claims_result();\n result.read(this.input);\n this.input.readMessageEnd();\n\n if (null !== result.e) {\n throw result.e;\n }\n if (null !== result.success) {\n return result.success;\n }\n throw 'get_license_claims failed: unknown result';\n};"
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(2)(__webpack_require__(9))
/***/ }),
/* 9 */
/***/ (function(module, exports) {
module.exports = "\"use strict\";\n//\n// Autogenerated by Thrift Compiler (0.10.0)\n//\n// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n//\n\n\nwindow.TCompletionHintType = {\n 'COLUMN': 0,\n 'TABLE': 1,\n 'VIEW': 2,\n 'SCHEMA': 3,\n 'CATALOG': 4,\n 'REPOSITORY': 5,\n 'FUNCTION': 6,\n 'KEYWORD': 7\n};\nwindow.TCompletionHint = function (args) {\n this.type = null;\n this.hints = null;\n this.replaced = null;\n if (args) {\n if (args.type !== undefined && args.type !== null) {\n this.type = args.type;\n }\n if (args.hints !== undefined && args.hints !== null) {\n this.hints = Thrift.copyList(args.hints, [null]);\n }\n if (args.replaced !== undefined && args.replaced !== null) {\n this.replaced = args.replaced;\n }\n }\n};\nTCompletionHint.prototype = {};\nTCompletionHint.prototype.read = function (input) {\n input.readStructBegin();\n while (true) {\n var ret = input.readFieldBegin();\n var fname = ret.fname;\n var ftype = ret.ftype;\n var fid = ret.fid;\n if (ftype == Thrift.Type.STOP) {\n break;\n }\n switch (fid) {\n case 1:\n if (ftype == Thrift.Type.I32) {\n this.type = input.readI32().value;\n } else {\n input.skip(ftype);\n }\n break;\n case 2:\n if (ftype == Thrift.Type.LIST) {\n var _size0 = 0;\n var _rtmp34;\n this.hints = [];\n var _etype3 = 0;\n _rtmp34 = input.readListBegin();\n _etype3 = _rtmp34.etype;\n _size0 = _rtmp34.size;\n for (var _i5 = 0; _i5 < _size0; ++_i5) {\n var elem6 = null;\n elem6 = input.readString().value;\n this.hints.push(elem6);\n }\n input.readListEnd();\n } else {\n input.skip(ftype);\n }\n break;\n case 3:\n if (ftype == Thrift.Type.STRING) {\n this.replaced = input.readString().value;\n } else {\n input.skip(ftype);\n }\n break;\n default:\n input.skip(ftype);\n }\n input.readFieldEnd();\n }\n input.readStructEnd();\n return;\n};\n\nTCompletionHint.prototype.write = function (output) {\n output.writeStructBegin('TCompletionHint');\n if (this.type !== null && this.type !== undefined) {\n output.writeFieldBegin('type', Thrift.Type.I32, 1);\n output.writeI32(this.type);\n output.writeFieldEnd();\n }\n if (this.hints !== null && this.hints !== undefined) {\n output.writeFieldBegin('hints', Thrift.Type.LIST, 2);\n output.writeListBegin(Thrift.Type.STRING, this.hints.length);\n for (var iter7 in this.hints) {\n if (this.hints.hasOwnProperty(iter7)) {\n iter7 = this.hints[iter7];\n output.writeString(iter7);\n }\n }\n output.writeListEnd();\n output.writeFieldEnd();\n }\n if (this.replaced !== null && this.replaced !== undefined) {\n output.writeFieldBegin('replaced', Thrift.Type.STRING, 3);\n output.writeString(this.replaced);\n output.writeFieldEnd();\n }\n output.writeFieldStop();\n output.writeStructEnd();\n return;\n};"
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _helpers = __webpack_require__(12);
var helpers = _interopRequireWildcard(_helpers);
var _mapdClientV = __webpack_require__(13);
var _mapdClientV2 = _interopRequireDefault(_mapdClientV);
var _processQueryResults = __webpack_require__(121);
var _processQueryResults2 = _interopRequireDefault(_processQueryResults);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var _ref = isNodeRuntime() && __webpack_require__(120) || window,
TDatumType = _ref.TDatumType,
TEncodingType = _ref.TEncodingType,
TPixel = _ref.TPixel; // eslint-disable-line global-require
var MapDThrift = isNodeRuntime() && __webpack_require__(15); // eslint-disable-line global-require
var Thrift = isNodeRuntime() && __webpack_require__(16) || window.Thrift; // eslint-disable-line global-require
var thriftWrapper = Thrift;
var parseUrl = isNodeRuntime() && __webpack_require__(62).parse; // eslint-disable-line global-require
if (isNodeRuntime()) {
// Because browser Thrift and Node Thrift are exposed slightly differently.
Thrift = Thrift.Thrift;
Thrift.Transport = thriftWrapper.TBufferedTransport;
Thrift.Protocol = thriftWrapper.TJSONProtocol;
}
var COMPRESSION_LEVEL_DEFAULT = 3;
function arrayify(maybeArray) {
return Array.isArray(maybeArray) ? maybeArray : [maybeArray];
}
function isNodeRuntime() {
return typeof window === "undefined";
}
var MapdCon = function () {
function MapdCon() {
var _this = this;
_classCallCheck(this, MapdCon);
this.updateQueryTimes = function (conId, queryId, estimatedQueryTime, execution_time_ms) {
_this.queryTimes[queryId] = execution_time_ms;
};
this.getFrontendViews = function (callback) {
if (_this._sessionId) {
_this._client[0].get_frontend_views(_this._sessionId[0], callback);
} else {
callback(new Error("No Session ID"));
}
};
this.getFrontendViewsAsync = function () {
return new Promise(function (resolve, reject) {
_this.getFrontendViews(function (error, views) {
if (error) {
reject(error);
} else {
resolve(views);
}
});
});
};
this.getFrontendView = function (viewName, callback) {
if (_this._sessionId && viewName) {
_this._client[0].get_frontend_view(_this._sessionId[0], viewName, callback);
} else {
callback(new Error("No Session ID"));
}
};
this.getFrontendViewAsync = function (viewName) {
return new Promise(function (resolve, reject) {
_this.getFrontendView(viewName, function (err, view) {
if (err) {
reject(err);
} else {
resolve(view);
}
});
});
};
this.getStatus = function (callback) {
_this._client[0].get_status(_this._sessionId[0], callback);
};
this.getServerStatusAsync = function () {
console.warn("getServerStatusAsync is deprecated, please use getStatusAsync");
return new Promise(function (resolve, reject) {
_this.getStatus(function (err, result) {
if (err) {
reject(err);
} else {
resolve(result[0]);
}
});
});
};
this.getStatusAsync = function () {
return new Promise(function (resolve, reject) {
_this.getStatus(function (err, result) {
if (err) {
reject(err);
} else {
resolve(result);
}
});
});
};
this.getHardwareInfo = function (callback) {
_this._client[0].get_hardware_info(_this._sessionId[0], callback);
};
this.getHardwareInfoAsync = function () {
return new Promise(function (resolve, reject) {
_this.getHardwareInfo(function (err, result) {
if (err) {
reject(err);
} else {
resolve(result);
}
});
});
};
this.deleteFrontendViewAsync = function (viewName) {
return new Promise(function (resolve, reject) {
_this.deleteFrontendView(viewName, function (err) {
if (err) {
reject(err);
} else {
resolve(viewName);
}
});
});
};
this.getLinkView = function (link, callback) {
_this._client[0].get_link_view(_this._sessionId[0], link, callback);
};
this.getLinkViewAsync = function (link) {
return new Promise(function (resolve, reject) {
_this.getLinkView(link, function (err, theLink) {
if (err) {
reject(err);
} else {
resolve(theLink);
}
});
});
};
this.queryAsync = this.query;
this.createTableAsync = function (tableName, rowDescObj, tableType) {
return new Promise(function (resolve, reject) {
_this.createTable(tableName, rowDescObj, tableType, function (err) {
if (err) {
reject(err);
} else {
resolve();
}
});
});
};
this.importTableAsync = this.importTableAsyncWrapper(false);
this.importTableGeoAsync = this.importTableAsyncWrapper(true);
this._host = null;
this._user = null;
this._password = null;
this._port = null;
this._dbName = null;
this._client = null;
this._sessionId = null;
this._protocol = null;
this._datumEnum = {};
this._logging = false;
this._platform = "mapd";
this._nonce = 0;
this._balanceStrategy = "adaptive";
this._numConnections = 0;
this._lastRenderCon = 0;
this.queryTimes = {};
this.serverQueueTimes = null;
this.serverPingTimes = null;
this.pingCount = null;
this.DEFAULT_QUERY_TIME = 50;
this.NUM_PINGS_PER_SERVER = 4;
this.importerRowDesc = null;
// invoke initialization methods
this.invertDatumTypes();
this.processResults = function () {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var result = arguments[1];
var callback = arguments[2];
var processor = (0, _processQueryResults2.default)(_this._logging, _this.updateQueryTimes);
var processResultsObject = processor(options, _this._datumEnum, result, callback);
return processResultsObject;
};
// return this to allow chaining off of instantiation
return this;
}
/**
* Create a connection to the server, generating a client and session id.
* @param {Function} callback A callback that takes `(err, success)` as its signature. Returns con singleton on success.
* @return {MapdCon} Object
*
* @example <caption>Connect to a MapD server:</caption>
* var con = new MapdCon()
* .host('localhost')
* .port('8080')
* .dbName('myDatabase')
* .user('foo')
* .password('bar')
* .connect((err, con) => console.log(con.sessionId()));
*
* // ["om9E9Ujgbhl6wIzWgLENncjWsaXRDYLy"]
*/
_createClass(MapdCon, [{
key: "connect",
value: function connect(callback) {
var _this2 = this;
if (this._sessionId) {
this.disconnect();
}
// TODO: should be its own function
var allAreArrays = Array.isArray(this._host) && Array.isArray(this._port) && Array.isArray(this._user) && Array.isArray(this._password) && Array.isArray(this._dbName);
if (!allAreArrays) {
return callback("All connection parameters must be arrays.");
}
this._client = [];
this._sessionId = [];
if (!this._user[0]) {
return callback("Please enter a username.");
} else if (!this._password[0]) {
return callback("Please enter a password.");
} else if (!this._dbName[0]) {
return callback("Please enter a database.");
} else if (!this._host[0]) {
return callback("Please enter a host name.");
} else if (!this._port[0]) {
return callback("Please enter a port.");
}
// now check to see if length of all arrays are the same and > 0
var hostLength = this._host.length;
if (hostLength < 1) {
return callback("Must have at least one server to connect to.");
}
if (hostLength !== this._port.length || hostLength !== this._user.length || hostLength !== this._password.length || hostLength !== this._dbName.length) {
return callback("Array connection parameters must be of equal length.");
}
if (!this._protocol) {
this._protocol = this._host.map(function () {
return window.location.protocol.replace(":", "");
});
}
var transportUrls = this.getEndpoints();
var _loop = function _loop(h) {
var client = null;
if (isNodeRuntime()) {
var _parseUrl = parseUrl(transportUrls[h]),
protocol = _parseUrl.protocol,
hostname = _parseUrl.hostname,
port = _parseUrl.port;
var connection = thriftWrapper.createHttpConnection(hostname, port, {
transport: thriftWrapper.TBufferedTransport,
protocol: thriftWrapper.TJSONProtocol,
path: "/",
headers: { Connection: "close" },
https: protocol === "https:"
});
connection.on("error", console.error); // eslint-disable-line no-console
client = thriftWrapper.createClient(MapDThrift, connection);
resetThriftClientOnArgumentErrorForMethods(_this2, client, ["connect", "createFrontendViewAsync", "createLinkAsync", "createTableAsync", "dbName", "deleteFrontendViewAsync", "detectColumnTypesAsync", "disconnect", "getFields", "getFrontendViewAsync", "getFrontendViewsAsync", "getLinkViewAsync", "getResultRowForPixel", "getServerStatusAsync", "getStatusAsync", "getTablesAsync", "host", "importTableAsync", "importTableGeoAsync", "logging", "password", "port", "protocol", "query", "renderVega", "sessionId", "user", "validateQuery"]);
} else {
var thriftTransport = new Thrift.Transport(transportUrls[h]);
var thriftProtocol = new Thrift.Protocol(thriftTransport);
client = new _mapdClientV2.default(thriftProtocol);
}
client.connect(_this2._user[h], _this2._password[h], _this2._dbName[h], function (error, sessionId) {
if (error) {
callback(error);
return;
}
_this2._client.push(client);
_this2._sessionId.push(sessionId);
_this2._numConnections = _this2._client.length;
callback(null, _this2);
});
};
for (var h = 0; h < hostLength; h++) {
_loop(h);
}
return this;
}
}, {
key: "convertFromThriftTypes",
value: function convertFromThriftTypes(fields) {
var fieldsArray = [];
// silly to change this from map to array
// - then later it turns back to map
for (var key in fields) {
if (fields.hasOwnProperty(key)) {
fieldsArray.push({
name: key,
type: this._datumEnum[fields[key].col_type.type],
is_array: fields[key].col_type.is_array,
is_dict: fields[key].col_type.encoding === TEncodingType.DICT // eslint-disable-line no-undef
});
}
}
return fieldsArray;
}
/**
* Disconnect from the server then clears the client and session values.
* @return {MapdCon} Object
* @param {Function} callback A callback that takes `(err, success)` as its signature. Returns con singleton on success.
*
* @example <caption>Disconnect from the server:</caption>
*
* con.sessionId() // ["om9E9Ujgbhl6wIzWgLENncjWsaXRDYLy"]
* con.disconnect((err, con) => console.log(err, con))
* con.sessionId() === null;
*/
}, {
key: "disconnect",
value: function disconnect(callback) {
var _this3 = this;
if (this._sessionId !== null) {
for (var c = 0; c < this._client.length; c++) {
this._client[c].disconnect(this._sessionId[c], function (error) {
// Success will return NULL
if (error) {
return callback(error, _this3);
}
_this3._sessionId = null;
_this3._client = null;
_this3._numConnections = 0;
_this3.serverPingTimes = null;
return callback(null, _this3);
});
}
}
return this;
}
/**
* Get the recent dashboards as a list of <code>TFrontendView</code> objects.
* These objects contain a value for the <code>view_name</code> property,
* but not for the <code>view_state</code> property.
* @return {Promise<TFrontendView[]>} An array which has all saved dashboards.
*
* @example <caption>Get the list of dashboards from the server:</caption>
*
* con.getFrontendViewsAsync().then((results) => console.log(results))
* // [TFrontendView, TFrontendView]
*/
/**
* Get a dashboard object containing a value for the <code>view_state</code> property.
* This object contains a value for the <code>view_state</code> property,
* but not for the <code>view_name</code> property.
* @param {String} viewName the name of the dashboard
* @return {Promise.<Object>} An object that contains all data and metadata related to the dashboard
*
* @example <caption>Get a specific dashboard from the server:</caption>
*
* con.getFrontendViewAsync('dashboard_name').then((result) => console.log(result))
* // {TFrontendView}
*/
/**
* Get the status of the server as a <code>TServerStatus</code> object.
* This includes whether the server is read-only,
* has backend rendering enabled, and the version number.
* @return {Promise.<Object>}
*
* @example <caption>Get the server status:</caption>
*
* con.getServerStatusAsync().then((result) => console.log(result))
* // {
* // "read_only": false,
* // "version": "3.0.0dev-20170503-40e2de3",
* // "rendering_enabled": true,
* // "start_time": 1493840131
* // }
*/
/**
* Get the status of the server as an array of <code>TServerStatus</code> objects.
* This includes whether the server is read-only,
* has backend rendering enabled, and the version number.
* @return {Promise.<Object>}
*
* @example <caption>Get the server status:</caption>
*
* con.getStatusAsync().then((result) => console.log(result))
* // [{
* // "read_only": false,
* // "version": "3.0.0dev-20170503-40e2de3",
* // "rendering_enabled": true,
* // "start_time": 1493840131
* // }]
*/
/**
* Get some info about the hardware
* - Number of GPUs
* - Number of GPUs allocated to MapD
* - Start GPU
* - Number of SMs or SMx or CU (They simply mean streaming multi processors)
* - Clock frequency of each GPUs
* - Physical Memory of each GPU
* - Compute capability of each GPU
* @return {Promise.<Object>}
*
* @example <caption>Get harddware info:</caption>
*
* con.getHardwareInfoAsync().then((result) => console.log(result))
* {
* "hardware_info": [{
* "num_gpu_hw": 2,
* "num_cpu_hw": 12,
* "num_gpu_allocated": 2,
* "start_gpu": 0,
* "host_name": "",
* "gpu_info": [{
* "num_sm": 28,
* "clock_frequency_kHz": 1531000,
* "memory": 12781682688,
* "compute_capability_major": 6,
* "compute_capability_minor": 1
* }, {
* "num_sm": 28,
* "clock_frequency_kHz": 1531000,
* "memory": 12782075904,
* "compute_capability_major": 6,
* "compute_capability_minor": 1
* }]
* }]
* }
*/
}, {
key: "createFrontendViewAsync",
/**
* Add a new dashboard to the server.
* @param {String} viewName - the name of the new dashboard
* @param {String} viewState - the base64-encoded state string of the new dashboard
* @param {String} imageHash - the numeric hash of the dashboard thumbnail
* @param {String} metaData - Stringified metaData related to the view
* @return {Promise} Returns empty if success
*
* @example <caption>Add a new dashboard to the server:</caption>
*
* con.createFrontendViewAsync('newSave', 'viewstateBase64', null, 'metaData').then(res => console.log(res))
*/
value: function createFrontendViewAsync(viewName, viewState, imageHash, metaData) {
var _this4 = this;
if (!this._sessionId) {
return new Promise(function (resolve, reject) {
reject(new Error("You are not connected to a server. Try running the connect method first."));
});
}
return Promise.all(this._client.map(function (client, i) {
return new Promise(function (resolve, reject) {
client.create_frontend_view(_this4._sessionId[i], viewName, viewState, imageHash, metaData, function (error, data) {
if (error) {
reject(error);
} else {
resolve(data);
}
});
});
}));
}
}, {
key: "deleteFrontendView",
value: function deleteFrontendView(viewName, callback) {
var _this5 = this;
if (!this._sessionId) {
throw new Error("You are not connected to a server. Try running the connect method first.");
}
try {
this._client.forEach(function (client, i) {
// do we want to try each one individually so if we fail we keep going?
client.delete_frontend_view(_this5._sessionId[i], viewName, callback);
});
} catch (err) {
console.log("ERROR: Could not delete the frontend view. Check your session id.", err);
}
}
/**
* Delete a dashboard object containing a value for the <code>view_state</code> property.
* @param {String} viewName - the name of the dashboard
* @return {Promise.<String>} Name of dashboard successfully deleted
*
* @example <caption>Delete a specific dashboard from the server:</caption>
*
* con.deleteFrontendViewAsync('dashboard_name').then(res => console.log(res))
*/
}, {
key: "createLinkAsync",
/**
* Create a short hash to make it easy to share a link to a specific dashboard.
* @param {String} viewState - the base64-encoded state string of the new dashboard
* @param {String} metaData - Stringified metaData related to the link
* @return {Promise.<String[]>} link - A short hash of the dashboard used for URLs
*
* @example <caption>Create a link to the current state of a dashboard:</caption>
*
* con.createLinkAsync("eyJuYW1lIjoibXlkYXNoYm9hcmQifQ==", 'metaData').then(res => console.log(res));
* // ["28127951"]
*/
value: function createLinkAsync(viewState, metaData) {
var _this6 = this;
return Promise.all(this._client.map(function (client, i) {
return new Promise(function (resolve, reject) {
client.create_link(_this6._sessionId[i], viewState, metaData, function (error, data) {
if (error) {
reject(error);
} else {
var result = data.split(",").reduce(function (links, link) {
if (links.indexOf(link) === -1) {
links.push(link);
}
return links;
}, []);
if (!result || result.length !== 1) {
reject(new Error("Different links were created on connection"));
} else {
resolve(result.join());
}
}
});
});
}));
}
/**
* Get a fully-formed dashboard object from a generated share link.
* This object contains the given link for the <code>view_name</code> property,
* @param {String} link - the short hash of the dashboard, see {@link createLink}
* @return {Promise.<Object>} Object of the dashboard and metadata
*
* @example <caption>Get a dashboard from a link:</caption>
*
* con.getLinkViewAsync('28127951').then(res => console.log(res))
* // {
* // "view_name": "28127951",
* // "view_state": "eyJuYW1lIjoibXlkYXNoYm9hcmQifQ==",
* // "image_hash": "",
* // "update_time": "2017-04-28T21:34:01Z",
* // "view_metadata": "metaData"
* // }
*/
}, {
key: "detectColumnTypes",
value: function detectColumnTypes(fileName, copyParams, callback) {
var thriftCopyParams = helpers.convertObjectToThriftCopyParams(copyParams);
this._client[0].detect_column_types(this._sessionId[0], fileName, thriftCopyParams, callback);
}
/**
* Asynchronously get the data from an importable file,
* such as a .csv or plaintext file with a header.
* @param {String} fileName - the name of the importable file
* @param {TCopyParams} copyParams - see {@link TCopyParams}
* @returns {Promise.<TDetectResult>} An object which has copy_params and row_set
*
* @example <caption>Get data from table_data.csv:</caption>
*
* var copyParams = new TCopyParams();
* con.detectColumnTypesAsync('table_data.csv', copyParams).then(res => console.log(res))
* // TDetectResult {row_set: TRowSet, copy_params: TCopyParams}
*
*/
}, {
key: "detectColumnTypesAsync",
value: function detectColumnTypesAsync(fileName, copyParams) {
var _this7 = this;
return new Promise(function (resolve, reject) {
_this7.detectColumnTypes.bind(_this7, fileName, copyParams)(function (err, res) {
if (err) {
reject(err);
} else {
_this7.importerRowDesc = res.row_set.row_desc;
resolve(res);
}
});
});
}
/**
* Submit a query to the database and process the results.
* @param {String} query The query to perform
* @param {Object} options the options for the query
* @param {Function} callback that takes `(err, result) => result`
* @returns {Object} The result of the query
*
* @example <caption>create a query</caption>
*
* var query = "SELECT count(*) AS n FROM tweets_nov_feb WHERE country='CO'";
* var options = {};
*
* con.query(query, options, function(err, result) {
* console.log(result)
* });
*
*/
}, {
key: "query",
value: function query(_query, options, callback) {
var _this8 = this;
var columnarResults = true;
var eliminateNullRows = false;
var queryId = null;
var returnTiming = false;
var limit = -1;
if (options) {
columnarResults = options.hasOwnProperty("columnarResults") ? options.columnarResults : columnarResults;
eliminateNullRows = options.hasOwnProperty("eliminateNullRows") ? options.eliminateNullRows : eliminateNullRows;
queryId = options.hasOwnProperty("queryId") ? options.queryId : queryId;
returnTiming = options.hasOwnProperty("returnTiming") ? options.returnTiming : returnTiming;
limit = options.hasOwnProperty("limit") ? options.limit : limit;
}
var lastQueryTime = queryId in this.queryTimes ? this.queryTimes[queryId] : this.DEFAULT_QUERY_TIME;
var curNonce = (this._nonce++).toString();
var conId = 0;
var processResultsOptions = {
returnTiming: returnTiming,
eliminateNullRows: eliminateNullRows,
query: _query,
queryId: queryId,
conId: conId,
estimatedQueryTime: lastQueryTime
};
try {
var AT_MOST_N = -1;
if (callback) {
this._client[conId].sql_execute(this._sessionId[conId], _query, columnarResults, curNonce, limit, AT_MOST_N, function (error, result) {
if (error) {
callback(error);
} else {
_this8.processResults(processResultsOptions, result, callback);
}
});
return curNonce;
} else if (!callback) {
var SQLExecuteResult = this._client[conId].sql_execute(this._sessionId[conId], _query, columnarResults, curNonce, limit, AT_MOST_N);
return this.processResults(processResultsOptions, SQLExecuteResult);
}
} catch (err) {
if (err.name === "NetworkError") {
this.removeConnection(conId);
if (this._numConnections === 0) {
err.msg = "No remaining database connections";
throw err;
}
this.query(_query, options, callback);
} else if (callback) {
callback(err);
} else {
throw err;
}
}
}
/** @deprecated will default to query */
}, {
key: "validateQuery",
/**
* Submit a query to validate whether the backend can create a result set based on the SQL statement.
* @param {String} query The query to perform
* @returns {Promise.<Object>} The result of whether the query is valid
*
* @example <caption>create a query</caption>
*
* var query = "SELECT count(*) AS n FROM tweets_nov_feb WHERE country='CO'";
*
* con.validateQuery(query).then(res => console.log(res))
*
* // [{
* // "name": "n",
* // "type": "INT",
* // "is_array": false,
* // "is_dict": false
* // }]
*
*/
value: function validateQuery(query) {
var _this9 = this;
return new Promise(function (resolve, reject) {
_this9._client[0].sql_validate(_this9._sessionId[0], query, function (error, res) {
if (error) {
reject(error);
} else {
resolve(_this9.convertFromThriftTypes(res));
}
});
});
}
}, {
key: "removeConnection",
value: function removeConnection(conId) {
if (conId < 0 || conId >= this.numConnections) {
var err = {
msg: "Remove connection id invalid"
};
throw err;
}
this._client.splice(conId, 1);
this._sessionId.splice(conId, 1);
this._numConnections--;
}
}, {
key: "getTables",
value: function getTables(callback) {
this._client[0].get_tables(this._sessionId[0], function (error, tables) {
if (error) {
callback(error);
} else {
callback(null, tables.map(function (table) {
return {
name: table,
label: "obs"
};
}));
}
});
}
/**
* Get the names of the databases that exist on the current session's connectdion.
* @return {Promise.<Object[]>} list of table objects containing the label and table names.
*
* @example <caption>Get the list of tables from a connection:</caption>
*
* con.getTablesAsync().then(res => console.log(res))
*
* // [{
* // label: 'obs', // deprecated property
* // name: 'myDatabaseName'
* // },
* // ...]
*/
}, {
key: "getTablesAsync",
value: function getTablesAsync() {
var _this10 = this;
return new Promise(function (resolve, reject) {
_this10.getTables.bind(_this10)(function (error, tables) {
if (error) {
reject(error);
} else {
resolve(tables);
}
});
});
}
/**
* Create an array-like object from {@link TDatumType} by
* flipping the string key and numerical value around.
*
* @returns {Undefined} This function does not return anything
*/
}, {
key: "invertDatumTypes",
value: function invertDatumTypes() {
var datumType = TDatumType; // eslint-disable-line no-undef
for (var key in datumType) {
if (datumType.hasOwnProperty(key)) {
this._datumEnum[datumType[key]] = key;
}
}
}
/**
* Get a list of field objects for a given table.
* @param {String} tableName - name of table containing field names
* @param {Function} callback - (err, results)
* @return {Array<Object>} fields - the formmatted list of field objects
*
* @example <caption>Get the list of fields from a specific table:</caption>
*
* con.getFields('flights', (err, res) => console.log(res))
* // [{
* name: 'fieldName',
* type: 'BIGINT',
* is_array: false,
* is_dict: false
* }, ...]
*/
}, {
key: "getFields",
value: function getFields(tableName, callback) {
var _this11 = this;
this._client[0].get_table_details(this._sessionId[0], tableName, function (error, fields) {
if (fields) {
var rowDict = fields.row_desc.reduce(function (accum, value) {
accum[value.col_name] = value;
return accum;
}, {});
callback(null, _this11.convertFromThriftTypes(rowDict));
} else {
callback(new Error("Table (" + tableName + ") not found" + error));
}
});
}
}, {
key: "createTable",
value: function createTable(tableName, rowDescObj, tableType, callback) {
if (!this._sessionId) {
throw new Error("You are not connected to a server. Try running the connect method first.");
}
var thriftRowDesc = helpers.mutateThriftRowDesc(rowDescObj, this.importerRowDesc);
for (var c = 0; c < this._numConnections; c++) {
this._client[c].create_table(this._sessionId[c], tableName, thriftRowDesc, tableType, function (err) {
if (err) {
callback(err);
} else {
callback();
}
});
}
}
/**
* Create a table and persist it to the backend.
* @param {String} tableName - desired name of the new table
* @param {Array<TColumnType>} rowDescObj - fields of the new table
* @param {Number<TTableType>} tableType - the types of tables a user can import into the db
* @return {Promise.<undefined>} it will either catch an error or return undefined on success
*
* @example <caption>Create a new table:</caption>
*
* con.createTable('mynewtable', [TColumnType, TColumnType, ...], 0).then(res => console.log(res));
* // undefined
*/
}, {
key: "importTable",
value: function importTable(tableName, fileName, copyParams, rowDescObj, isShapeFile, callback) {
if (!this._sessionId) {
throw new Error("You are not connected to a server. Try running the connect method first.");
}
var thriftCopyParams = helpers.convertObjectToThriftCopyParams(copyParams);
var thriftRowDesc = helpers.mutateThriftRowDesc(rowDescObj, this.importerRowDesc);
var thriftCallBack = function thriftCallBack(err, res) {
if (err) {
callback(err);
} else {
callback(null, res);
}
};
for (var c = 0; c < this._numConnections; c++) {
if (isShapeFile) {
this._client[c].import_geo_table(this._sessionId[c], tableName, fileName, thriftCopyParams, thriftRowDesc, thriftCallBack);
} else {
this._client[c].import_table(this._sessionId[c], tableName, fileName, thriftCopyParams, thriftCallBack);
}
}
}
}, {
key: "importTableAsyncWrapper",
value: function importTableAsyncWrapper(isShapeFile) {
var _this12 = this;
return function (tableName, fileName, copyParams, headers) {
return new Promise(function (resolve, reject) {
_this12.importTable(tableName, fileName, copyParams, headers, isShapeFile, function (err, link) {
if (err) {
reject(err);
} else {
resolve(link);
}
});
});
};
}
/**
* Import a delimited table from a file.
* @param {String} tableName - desired name of the new table
* @param {String} fileName
* @param {TCopyParams} copyParams - see {@link TCopyParams}
* @param {TColumnType[]} headers -- a colleciton of metadata related to the table headers
*/
/**
* Import a geo table from a file.
* @param {String} tableName - desired name of the new table
* @param {String} fileName
* @param {TCopyParams} copyParams - see {@link TCopyParams}
* @param {TColumnType[]} headers -- a colleciton of metadata related to the table headers
*/
}, {
key: "renderVega",
/**
* Use for backend rendering. This method will fetch a PNG image
* that is a render of the vega json object.
*
* @param {Number} widgetid the widget id of the calling widget
* @param {String} vega the vega json
* @param {Object} options the options for the render query
* @param {Number} options.compressionLevel the png compression level.
* range 1 (low compression, faster) to 10 (high compression, slower).
* Default 3.
* @param {Function} callback takes `(err, success)` as its signature. Returns con singleton on success.
*
* @returns {Image} Base 64 Image
*/
value: function renderVega(widgetid, vega, options, callback) /* istanbul ignore next */{
var _this13 = this;
var queryId = null;
var compressionLevel = COMPRESSION_LEVEL_DEFAULT;
if (options) {
queryId = options.hasOwnProperty("queryId") ? options.queryId : queryId;
compressionLevel = options.hasOwnProperty("compressionLevel") ? options.compressionLevel : compressionLevel;
}
var lastQueryTime = queryId in this.queryTimes ? this.queryTimes[queryId] : this.DEFAULT_QUERY_TIME;
var curNonce = (this._nonce++).toString();
var conId = 0;
this._lastRenderCon = conId;
var processResultsOptions = {
isImage: true,
query: "render: " + vega,
queryId: queryId,
conId: conId,
estimatedQueryTime: lastQueryTime
};
try {
if (!callback) {
var renderResult = this._client[conId].render_vega(this._sessionId[conId], widgetid, vega, compressionLevel, curNonce);
return this.processResults(processResultsOptions, renderResult);
}
this._client[conId].render_vega(this._sessionId[conId], widgetid, vega, compressionLevel, curNonce, function (error, result) {
if (error) {
callback(error);
} else {
_this13.processResults(processResultsOptions, result, callback);
}
});
} catch (err) {
throw err;
}
return curNonce;
}
/**
* Used primarily for backend rendered maps, this method will fetch the row
* for a specific table that was last rendered at a pixel.
*
* @param {widgetId} Number - the widget id of the caller
* @param {TPixel} pixel - the pixel (lower left-hand corner is pixel (0,0))
* @param {String} tableName - the table containing the geo data
* @param {Object} tableColNamesMap - object of tableName -> array of col names
* @param {Array<Function>} callbacks
* @param {Number} [pixelRadius=2] - the radius around the primary pixel to search
*/
}, {
key: "getResultRowForPixel",
value: function getResultRowForPixel(widgetId, pixel, tableColNamesMap, callbacks) /* istanbul ignore next */{
var pixelRadius = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 2;
if (!(pixel instanceof TPixel)) {
pixel = new TPixel(pixel);
}
var columnFormat = true; // BOOL
var curNonce = (this._nonce++).toString();
try {
if (!callbacks) {
return this.processPixelResults(undefined, // eslint-disable-line no-undefined
this._client[this._lastRenderCon].get_result_row_for_pixel(this._sessionId[this._lastRenderCon], widgetId, pixel, tableColNamesMap, columnFormat, pixelRadius, curNonce));
}
this._client[this._lastRenderCon].get_result_row_for_pixel(this._sessionId[this._lastRenderCon], widgetId, pixel, tableColNamesMap, columnFormat, pixelRadius, curNonce, this.processPixelResults.bind(this, callbacks));
} catch (err) {
throw err;
}
return curNonce;
}
/**
* Formats the pixel results into the same pattern as textual results.
*
* @param {Array<Function>} callbacks a collection of callbacks
* @param {Object} error an error if one was thrown, otherwise null
* @param {Array|Object} results unformatted results of pixel rowId information
*
* @returns {Object} An object with the pixel results formatted for display
*/
}, {
key: "processPixelResults",
value: function processPixelResults(callbacks, error, results) {
callbacks = Array.isArray(callbacks) ? callbacks : [callbacks];
results = Array.isArray(results) ? results.pixel_rows : [results];
var numPixels = results.length;
var processResultsOptions = {
isImage: false,
eliminateNullRows: false,
query: "pixel request",
queryId: -2
};
for (var p = 0; p < numPixels; p++) {
results[p].row_set = this.processResults(processResultsOptions, results[p]);
}
if (!callbacks) {
return results;
}
callbacks.pop()(error, results);
}
/**
* Get or set the session ID used by the server to serve the correct data.
* This is typically set by {@link connect} and should not be set manually.
* @param {Number} sessionId - The session ID of the current connection
* @return {Number|MapdCon} - The session ID or the MapdCon itself
*
* @example <caption>Get the session id:</caption>
*
* con.sessionId();
* // sessionID === 3145846410
*
* @example <caption>Set the session id:</caption>
* var con = new MapdCon().connect().sessionId(3415846410);
* // NOTE: It is generally unsafe to set the session id manually.
*/
}, {
key: "sessionId",
value: function sessionId(_sessionId) {
if (!arguments.length) {
return this._sessionId;
}
this._sessionId = _sessionId;
return this;
}
/**
* Get or set the connection server hostname.
* This is is typically the first method called after instantiating a new MapdCon.
* @param {String} host - The hostname address
* @return {String|MapdCon} - The hostname or the MapdCon itself
*
* @example <caption>Set the hostname:</caption>
* var con = new MapdCon().host('localhost');
*
* @example <caption>Get the hostname:</caption>
* var host = con.host();
* // host === 'localhost'
*/
}, {
key: "host",
value: function host(_host) {
if (!arguments.length) {
return this._host;
}
this._host = arrayify(_host);
return this;
}
/**
* Get or set the connection port.
* @param {String} port - The port to connect on
* @return {String|MapdCon} - The port or the MapdCon itself
*
* @example <caption>Set the port:</caption>
* var con = new MapdCon().port('8080');
*
* @example <caption>Get the port:</caption>
* var port = con.port();
* // port === '8080'
*/
}, {
key: "port",
value: function port(_port) {
if (!arguments.length) {
return this._port;
}
this._port = arrayify(_port);
return this;
}
/**
* Get or set the username to authenticate with.
* @param {String} user - The username to authenticate with
* @return {String|MapdCon} - The username or the MapdCon itself
*
* @example <caption>Set the username:</caption>
* var con = new MapdCon().user('foo');
*
* @example <caption>Get the username:</caption>
* var username = con.user();
* // user === 'foo'
*/
}, {
key: "user",
value: function user(_user) {
if (!arguments.length) {
return this._user;
}
this._user = arrayify(_user);
return this;
}
/**
* Get or set the user's password to authenticate with.
* @param {String} password - The password to authenticate with
* @return {String|MapdCon} - The password or the MapdCon itself
*
* @example <caption>Set the password:</caption>
* var con = new MapdCon().password('bar');
*
* @example <caption>Get the username:</caption>
* var password = con.password();
* // password === 'bar'
*/
}, {
key: "password",
value: function password(_password) {
if (!arguments.length) {
return this._password;
}
this._password = arrayify(_password);
return this;
}
/**
* Get or set the name of the database to connect to.
* @param {String} dbName - The database to connect to
* @return {String|MapdCon} - The name of the database or the MapdCon itself
*
* @example <caption>Set the database name:</caption>
* var con = new MapdCon().dbName('myDatabase');
*
* @example <caption>Get the database name:</caption>
* var dbName = con.dbName();
* // dbName === 'myDatabase'
*/
}, {
key: "dbName",
value: function dbName(_dbName) {
if (!arguments.length) {
return this._dbName;
}
this._dbName = arrayify(_dbName);
return this;
}
/**
* Whether the raw queries strings will be logged to the console.
* Used primarily for debugging and defaults to <code>false</code>.
* @param {Boolean} logging - Set to true to enable logging
* @return {Boolean|MapdCon} - The current logging flag or MapdCon itself
*
* @example <caption>Set logging to true:</caption>
* var con = new MapdCon().logging(true);
*
* @example <caption>Get the logging flag:</caption>
* var isLogging = con.logging();
* // isLogging === true
*/
}, {
key: "logging",
value: function logging(_logging) {
if (typeof _logging === "undefined") {
return this._logging;
} else if (typeof _logging !== "boolean") {
return "logging can only be set with boolean values";
}
this._logging = _logging;
var isEnabledTxt = _logging ? "enabled" : "disabled";
return "SQL logging is now " + isEnabledTxt;
}
/**
* The name of the platform.
* @param {String} platform - The platform, default is "mapd"
* @return {String|MapdCon} - The platform or the MapdCon itself
*
* @example <caption>Set the platform name:</caption>
* var con = new MapdCon().platform('myPlatform');
*
* @example <caption>Get the platform name:</caption>
* var platform = con.platform();
* // platform === 'myPlatform'
*/
}, {
key: "platform",
value: function platform(_platform) {
if (!arguments.length) {
return this._platform;
}
this._platform = _platform;
return this;
}
/**
* Get the number of connections that are currently open.
* @return {Number} - number of open connections
*
* @example <caption>Get the number of connections:</caption>
*
* var numConnections = con.numConnections();
* // numConnections === 1
*/
}, {
key: "numConnections",
value: function numConnections() {
return this._numConnections;
}
/**
* The protocol to use for requests.
* @param {String} protocol - http or https
* @return {String|MapdCon} - protocol or MapdCon itself
*
* @example <caption>Set the protocol:</caption>
* var con = new MapdCon().protocol('http');
*
* @example <caption>Get the protocol:</caption>
* var protocol = con.protocol();
* // protocol === 'http'
*/
}, {
key: "protocol",
value: function protocol(_protocol) {
if (!arguments.length) {
return this._protocol;
}
this._protocol = arrayify(_protocol);
return this;
}
/**
* Generates a list of endpoints from the connection params.
* @return {Array<String>} - list of endpoints
*
* @example <caption>Get the endpoints:</caption>
* var con = new MapdCon().protocol('http').host('localhost').port('8000');
* var endpoints = con.getEndpoints();
* // endpoints === [ 'http://localhost:8000' ]
*/
}, {
key: "getEndpoints",
value: function getEndpoints() {
var _this14 = this;
return this._host.map(function (host, i) {
return _this14._protocol[i] + "://" + host + ":" + _this14._port[i];
});
}
}]);
return MapdCon;
}();
function resetThriftClientOnArgumentErrorForMethods(connector, client, methodNames) {
methodNames.forEach(function (methodName) {
var oldFunc = connector[methodName];
connector[methodName] = function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
try {
// eslint-disable-line no-restricted-syntax
return oldFunc.apply(connector, args); // TODO should reject rather than throw for Promises.
} catch (e) {
// `this.output` is the Thrift transport instance
client.output.outCount = 0;
client.output.outBuffers = [];
client.output._seqid = null;
// dereference the callback
client._reqs[client._seqid] = null;
throw e; // re-throw the error to Rx
}
};
});
}
// Set a global mapdcon function when mapdcon is brought in via script tag.
if (( false ? "undefined" : _typeof(module)) === "object" && module.exports) {
if (!isNodeRuntime()) {
window.MapdCon = MapdCon;
}
}
module.exports = MapdCon;
exports.default = MapdCon;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(11)(module)))
/***/ }),
/* 11 */
/***/ (function(module, exports) {
module.exports = function(module) {
if(!module.webpackPolyfill) {
module.deprecate = function() {};
module.paths = [];
// module.parent = undefined by default
module.children = [];
module.webpackPolyfill = 1;
}
return module;
}
/***/ }),
/* 12 */
/***/ (function(module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var convertObjectToThriftCopyParams = exports.convertObjectToThriftCopyParams = function convertObjectToThriftCopyParams(obj) {
return new TCopyParams(obj);
}; // eslint-disable-line no-undef
var mutateThriftRowDesc = exports.mutateThriftRowDesc = function mutateThriftRowDesc(rowDescArray, thriftRowDescArray) {
rowDescArray.forEach(function (obj, i) {
thriftRowDescArray[i].col_name = obj.clean_col_name;
thriftRowDescArray[i].col_type.encoding = obj.col_type.encoding;
thriftRowDescArray[i].col_type.type = obj.col_type.type;
});
return thriftRowDescArray;
};
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = MapDClientV2;
var _wrapWithErrorHandling = __webpack_require__(14);
var MapDClient = typeof window !== "undefined" && window.MapDClient || __webpack_require__(15).Client; // eslint-disable-line global-require
function MapDClientV2(protocol) {
MapDClient.call(this, protocol);
}
MapDClientV2.prototype = Object.create(MapDClient.prototype);
MapDClientV2.prototype.connect = function () {
var connectWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "connect");
return connectWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.sql_execute = function () {
var SQLExecuteWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "sql_execute");
return SQLExecuteWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.sql_validate = function () {
var SQLValidateWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "sql_validate");
return SQLValidateWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.render = function () {
var renderWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "render");
return renderWithErrorHandling.apply(undefined, arguments);
};
/* istanbul ignore next */
MapDClientV2.prototype.render_vega = function () {
var renderVegaWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "render_vega");
return renderVegaWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.get_result_row_for_pixel = function () {
var getResultRowForPixelWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "get_result_row_for_pixel");
return getResultRowForPixelWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.delete_frontend_view = function () {
var deleteFrontendViewWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "delete_frontend_view");
return deleteFrontendViewWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.get_tables = function () {
var getTablesWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "get_tables");
return getTablesWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.get_table_details = function () {
var getTableDetailsWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "get_table_details");
return getTableDetailsWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.get_fields = function () {
var getFieldsWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "get_fields");
return getFieldsWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.get_status = function () {
var getStatusWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "get_status");
return getStatusWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.get_server_status = function () {
var getServerStatusWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "get_server_status");
return getServerStatusWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.get_hardware_info = function () {
var getHardwareInfoWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "get_hardware_info");
return getHardwareInfoWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.get_frontend_views = function () {
var getFrontEndViewsWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "get_frontend_views");
return getFrontEndViewsWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.get_frontend_view = function () {
var getFrontEndViewWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "get_frontend_view");
return getFrontEndViewWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.create_link = function () {
var createLinkWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "create_link");
return createLinkWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.get_link_view = function () {
var getLinkViewWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "get_link_view");
return getLinkViewWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.detect_column_types = function () {
var detectColumnTypesWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "detect_column_types");
return detectColumnTypesWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.create_frontend_view = function () {
var createFrontEndViewWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "create_frontend_view");
return createFrontEndViewWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.send_create_table = function () {
var sendCreateTableWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "send_create_table");
return sendCreateTableWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.send_import_table = function () {
var sendImportTableWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "send_import_table");
return sendImportTableWithErrorHandling.apply(undefined, arguments);
};
MapDClientV2.prototype.detect_column_types = function () {
var detectColumnTypesWithErrorHandling = (0, _wrapWithErrorHandling.wrapWithErrorHandling)(this, "detect_column_types");
return detectColumnTypesWithErrorHandling.apply(undefined, arguments);
};
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isResultError = isResultError;
exports.createResultError = createResultError;
exports.wrapMethod = wrapMethod;
exports.wrapWithErrorHandling = wrapWithErrorHandling;
var MapDClient = typeof window !== "undefined" && window.MapDClient || __webpack_require__(15).Client; // eslint-disable-line global-require
var TMapDException = typeof window !== "undefined" && window.TMapDException || __webpack_require__(120).TMapDException; // eslint-disable-line global-require
var Thrift = typeof window !== "undefined" && window.Thrift || __webpack_require__(16).Thrift; // eslint-disable-line global-require
function isResultError(result) {
return result instanceof Thrift.TException || result instanceof Error;
}
function createResultError(result) {
if (result instanceof TMapDException) {
return new Error(result.error_msg);
} else if (typeof result.message === "undefined") {
return new Error("Unspecified Error");
} else {
return new Error(result.message);
}
}
function wrapMethod(context, method, isError) {
// eslint-disable-line consistent-this
return function wrapped() {
var arity = MapDClient.prototype[method].length;
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
if (args.length === arity) {
var _MapDClient$prototype;
var callback = args.pop();
(_MapDClient$prototype = MapDClient.prototype[method]).call.apply(_MapDClient$prototype, [context].concat(args, [function (result) {
if (isError(result)) {
callback(createResultError(result));
} else {
callback(null, result);
}
}]));
} else if (args.length === arity - 1) {
var _MapDClient$prototype2;
var result = (_MapDClient$prototype2 = MapDClient.prototype[method]).call.apply(_MapDClient$prototype2, [context].concat(args));
if (isError(result)) {
throw createResultError(result);
}
return result;
} else {
throw new Error("Insufficient arguments to run this method " + method);
}
};
}
function wrapWithErrorHandling(context, method) {
// eslint-disable-line consistent-this
return wrapMethod(context, method, isResultError);
}
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
//
// Autogenerated by Thrift Compiler (0.10.0)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
"use strict";
var thrift = __webpack_require__(16);
var Thrift = thrift.Thrift;
var Q = thrift.Q;
var completion_hints_ttypes = __webpack_require__(119);
var ttypes = __webpack_require__(120);
//HELPER FUNCTIONS AND STRUCTURES
var MapD_connect_args = function MapD_connect_args(args) {
this.user = null;
this.passwd = null;
this.dbname = null;
if (args) {
if (args.user !== undefined && args.user !== null) {
this.user = args.user;
}
if (args.passwd !== undefined && args.passwd !== null) {
this.passwd = args.passwd;
}
if (args.dbname !== undefined && args.dbname !== null) {
this.dbname = args.dbname;
}
}
};
MapD_connect_args.prototype = {};
MapD_connect_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.user = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.passwd = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.dbname = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_connect_args.prototype.write = function (output) {
output.writeStructBegin('MapD_connect_args');
if (this.user !== null && this.user !== undefined) {
output.writeFieldBegin('user', Thrift.Type.STRING, 1);
output.writeString(this.user);
output.writeFieldEnd();
}
if (this.passwd !== null && this.passwd !== undefined) {
output.writeFieldBegin('passwd', Thrift.Type.STRING, 2);
output.writeString(this.passwd);
output.writeFieldEnd();
}
if (this.dbname !== null && this.dbname !== undefined) {
output.writeFieldBegin('dbname', Thrift.Type.STRING, 3);
output.writeString(this.dbname);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_connect_result = function MapD_connect_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_connect_result.prototype = {};
MapD_connect_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRING) {
this.success = input.readString();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_connect_result.prototype.write = function (output) {
output.writeStructBegin('MapD_connect_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRING, 0);
output.writeString(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_disconnect_args = function MapD_disconnect_args(args) {
this.session = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
}
};
MapD_disconnect_args.prototype = {};
MapD_disconnect_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_disconnect_args.prototype.write = function (output) {
output.writeStructBegin('MapD_disconnect_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_disconnect_result = function MapD_disconnect_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_disconnect_result.prototype = {};
MapD_disconnect_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_disconnect_result.prototype.write = function (output) {
output.writeStructBegin('MapD_disconnect_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_server_status_args = function MapD_get_server_status_args(args) {
this.session = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
}
};
MapD_get_server_status_args.prototype = {};
MapD_get_server_status_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_server_status_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_server_status_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_server_status_result = function MapD_get_server_status_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TServerStatus(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_server_status_result.prototype = {};
MapD_get_server_status_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TServerStatus();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_server_status_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_server_status_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_status_args = function MapD_get_status_args(args) {
this.session = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
}
};
MapD_get_status_args.prototype = {};
MapD_get_status_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_status_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_status_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_status_result = function MapD_get_status_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.TServerStatus]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_status_result.prototype = {};
MapD_get_status_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size210 = 0;
var _rtmp3214;
this.success = [];
var _etype213 = 0;
_rtmp3214 = input.readListBegin();
_etype213 = _rtmp3214.etype;
_size210 = _rtmp3214.size;
for (var _i215 = 0; _i215 < _size210; ++_i215) {
var elem216 = null;
elem216 = new ttypes.TServerStatus();
elem216.read(input);
this.success.push(elem216);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_status_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_status_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
for (var iter217 in this.success) {
if (this.success.hasOwnProperty(iter217)) {
iter217 = this.success[iter217];
iter217.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_hardware_info_args = function MapD_get_hardware_info_args(args) {
this.session = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
}
};
MapD_get_hardware_info_args.prototype = {};
MapD_get_hardware_info_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_hardware_info_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_hardware_info_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_hardware_info_result = function MapD_get_hardware_info_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TClusterHardwareInfo(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_hardware_info_result.prototype = {};
MapD_get_hardware_info_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TClusterHardwareInfo();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_hardware_info_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_hardware_info_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_tables_args = function MapD_get_tables_args(args) {
this.session = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
}
};
MapD_get_tables_args.prototype = {};
MapD_get_tables_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_tables_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_tables_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_tables_result = function MapD_get_tables_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_tables_result.prototype = {};
MapD_get_tables_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size218 = 0;
var _rtmp3222;
this.success = [];
var _etype221 = 0;
_rtmp3222 = input.readListBegin();
_etype221 = _rtmp3222.etype;
_size218 = _rtmp3222.size;
for (var _i223 = 0; _i223 < _size218; ++_i223) {
var elem224 = null;
elem224 = input.readString();
this.success.push(elem224);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_tables_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_tables_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRING, this.success.length);
for (var iter225 in this.success) {
if (this.success.hasOwnProperty(iter225)) {
iter225 = this.success[iter225];
output.writeString(iter225);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_table_details_args = function MapD_get_table_details_args(args) {
this.session = null;
this.table_name = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.table_name !== undefined && args.table_name !== null) {
this.table_name = args.table_name;
}
}
};
MapD_get_table_details_args.prototype = {};
MapD_get_table_details_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.table_name = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_table_details_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_table_details_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.table_name !== null && this.table_name !== undefined) {
output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);
output.writeString(this.table_name);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_table_details_result = function MapD_get_table_details_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TTableDetails(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_table_details_result.prototype = {};
MapD_get_table_details_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TTableDetails();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_table_details_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_table_details_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_internal_table_details_args = function MapD_get_internal_table_details_args(args) {
this.session = null;
this.table_name = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.table_name !== undefined && args.table_name !== null) {
this.table_name = args.table_name;
}
}
};
MapD_get_internal_table_details_args.prototype = {};
MapD_get_internal_table_details_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.table_name = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_internal_table_details_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_internal_table_details_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.table_name !== null && this.table_name !== undefined) {
output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);
output.writeString(this.table_name);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_internal_table_details_result = function MapD_get_internal_table_details_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TTableDetails(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_internal_table_details_result.prototype = {};
MapD_get_internal_table_details_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TTableDetails();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_internal_table_details_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_internal_table_details_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_users_args = function MapD_get_users_args(args) {
this.session = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
}
};
MapD_get_users_args.prototype = {};
MapD_get_users_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_users_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_users_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_users_result = function MapD_get_users_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_users_result.prototype = {};
MapD_get_users_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size226 = 0;
var _rtmp3230;
this.success = [];
var _etype229 = 0;
_rtmp3230 = input.readListBegin();
_etype229 = _rtmp3230.etype;
_size226 = _rtmp3230.size;
for (var _i231 = 0; _i231 < _size226; ++_i231) {
var elem232 = null;
elem232 = input.readString();
this.success.push(elem232);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_users_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_users_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRING, this.success.length);
for (var iter233 in this.success) {
if (this.success.hasOwnProperty(iter233)) {
iter233 = this.success[iter233];
output.writeString(iter233);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_databases_args = function MapD_get_databases_args(args) {
this.session = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
}
};
MapD_get_databases_args.prototype = {};
MapD_get_databases_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_databases_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_databases_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_databases_result = function MapD_get_databases_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.TDBInfo]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_databases_result.prototype = {};
MapD_get_databases_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size234 = 0;
var _rtmp3238;
this.success = [];
var _etype237 = 0;
_rtmp3238 = input.readListBegin();
_etype237 = _rtmp3238.etype;
_size234 = _rtmp3238.size;
for (var _i239 = 0; _i239 < _size234; ++_i239) {
var elem240 = null;
elem240 = new ttypes.TDBInfo();
elem240.read(input);
this.success.push(elem240);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_databases_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_databases_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
for (var iter241 in this.success) {
if (this.success.hasOwnProperty(iter241)) {
iter241 = this.success[iter241];
iter241.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_version_args = function MapD_get_version_args(args) {};
MapD_get_version_args.prototype = {};
MapD_get_version_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
input.skip(ftype);
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_version_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_version_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_version_result = function MapD_get_version_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_version_result.prototype = {};
MapD_get_version_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRING) {
this.success = input.readString();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_version_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_version_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRING, 0);
output.writeString(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_start_heap_profile_args = function MapD_start_heap_profile_args(args) {
this.session = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
}
};
MapD_start_heap_profile_args.prototype = {};
MapD_start_heap_profile_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_start_heap_profile_args.prototype.write = function (output) {
output.writeStructBegin('MapD_start_heap_profile_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_start_heap_profile_result = function MapD_start_heap_profile_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_start_heap_profile_result.prototype = {};
MapD_start_heap_profile_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_start_heap_profile_result.prototype.write = function (output) {
output.writeStructBegin('MapD_start_heap_profile_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_stop_heap_profile_args = function MapD_stop_heap_profile_args(args) {
this.session = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
}
};
MapD_stop_heap_profile_args.prototype = {};
MapD_stop_heap_profile_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_stop_heap_profile_args.prototype.write = function (output) {
output.writeStructBegin('MapD_stop_heap_profile_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_stop_heap_profile_result = function MapD_stop_heap_profile_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_stop_heap_profile_result.prototype = {};
MapD_stop_heap_profile_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_stop_heap_profile_result.prototype.write = function (output) {
output.writeStructBegin('MapD_stop_heap_profile_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_heap_profile_args = function MapD_get_heap_profile_args(args) {
this.session = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
}
};
MapD_get_heap_profile_args.prototype = {};
MapD_get_heap_profile_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_heap_profile_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_heap_profile_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_heap_profile_result = function MapD_get_heap_profile_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_heap_profile_result.prototype = {};
MapD_get_heap_profile_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRING) {
this.success = input.readString();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_heap_profile_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_heap_profile_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRING, 0);
output.writeString(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_memory_args = function MapD_get_memory_args(args) {
this.session = null;
this.memory_level = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.memory_level !== undefined && args.memory_level !== null) {
this.memory_level = args.memory_level;
}
}
};
MapD_get_memory_args.prototype = {};
MapD_get_memory_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.memory_level = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_memory_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_memory_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.memory_level !== null && this.memory_level !== undefined) {
output.writeFieldBegin('memory_level', Thrift.Type.STRING, 2);
output.writeString(this.memory_level);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_memory_result = function MapD_get_memory_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.TNodeMemoryInfo]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_memory_result.prototype = {};
MapD_get_memory_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size242 = 0;
var _rtmp3246;
this.success = [];
var _etype245 = 0;
_rtmp3246 = input.readListBegin();
_etype245 = _rtmp3246.etype;
_size242 = _rtmp3246.size;
for (var _i247 = 0; _i247 < _size242; ++_i247) {
var elem248 = null;
elem248 = new ttypes.TNodeMemoryInfo();
elem248.read(input);
this.success.push(elem248);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_memory_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_memory_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
for (var iter249 in this.success) {
if (this.success.hasOwnProperty(iter249)) {
iter249 = this.success[iter249];
iter249.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_clear_cpu_memory_args = function MapD_clear_cpu_memory_args(args) {
this.session = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
}
};
MapD_clear_cpu_memory_args.prototype = {};
MapD_clear_cpu_memory_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_clear_cpu_memory_args.prototype.write = function (output) {
output.writeStructBegin('MapD_clear_cpu_memory_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_clear_cpu_memory_result = function MapD_clear_cpu_memory_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_clear_cpu_memory_result.prototype = {};
MapD_clear_cpu_memory_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_clear_cpu_memory_result.prototype.write = function (output) {
output.writeStructBegin('MapD_clear_cpu_memory_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_clear_gpu_memory_args = function MapD_clear_gpu_memory_args(args) {
this.session = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
}
};
MapD_clear_gpu_memory_args.prototype = {};
MapD_clear_gpu_memory_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_clear_gpu_memory_args.prototype.write = function (output) {
output.writeStructBegin('MapD_clear_gpu_memory_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_clear_gpu_memory_result = function MapD_clear_gpu_memory_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_clear_gpu_memory_result.prototype = {};
MapD_clear_gpu_memory_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_clear_gpu_memory_result.prototype.write = function (output) {
output.writeStructBegin('MapD_clear_gpu_memory_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_set_table_epoch_args = function MapD_set_table_epoch_args(args) {
this.session = null;
this.db_id = null;
this.table_id = null;
this.new_epoch = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.db_id !== undefined && args.db_id !== null) {
this.db_id = args.db_id;
}
if (args.table_id !== undefined && args.table_id !== null) {
this.table_id = args.table_id;
}
if (args.new_epoch !== undefined && args.new_epoch !== null) {
this.new_epoch = args.new_epoch;
}
}
};
MapD_set_table_epoch_args.prototype = {};
MapD_set_table_epoch_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.I32) {
this.db_id = input.readI32();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.I32) {
this.table_id = input.readI32();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.I32) {
this.new_epoch = input.readI32();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_set_table_epoch_args.prototype.write = function (output) {
output.writeStructBegin('MapD_set_table_epoch_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.db_id !== null && this.db_id !== undefined) {
output.writeFieldBegin('db_id', Thrift.Type.I32, 2);
output.writeI32(this.db_id);
output.writeFieldEnd();
}
if (this.table_id !== null && this.table_id !== undefined) {
output.writeFieldBegin('table_id', Thrift.Type.I32, 3);
output.writeI32(this.table_id);
output.writeFieldEnd();
}
if (this.new_epoch !== null && this.new_epoch !== undefined) {
output.writeFieldBegin('new_epoch', Thrift.Type.I32, 4);
output.writeI32(this.new_epoch);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_set_table_epoch_result = function MapD_set_table_epoch_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_set_table_epoch_result.prototype = {};
MapD_set_table_epoch_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_set_table_epoch_result.prototype.write = function (output) {
output.writeStructBegin('MapD_set_table_epoch_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_table_epoch_args = function MapD_get_table_epoch_args(args) {
this.session = null;
this.db_id = null;
this.table_id = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.db_id !== undefined && args.db_id !== null) {
this.db_id = args.db_id;
}
if (args.table_id !== undefined && args.table_id !== null) {
this.table_id = args.table_id;
}
}
};
MapD_get_table_epoch_args.prototype = {};
MapD_get_table_epoch_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.I32) {
this.db_id = input.readI32();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.I32) {
this.table_id = input.readI32();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_table_epoch_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_table_epoch_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.db_id !== null && this.db_id !== undefined) {
output.writeFieldBegin('db_id', Thrift.Type.I32, 2);
output.writeI32(this.db_id);
output.writeFieldEnd();
}
if (this.table_id !== null && this.table_id !== undefined) {
output.writeFieldBegin('table_id', Thrift.Type.I32, 3);
output.writeI32(this.table_id);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_table_epoch_result = function MapD_get_table_epoch_result(args) {
this.success = null;
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
}
};
MapD_get_table_epoch_result.prototype = {};
MapD_get_table_epoch_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.I32) {
this.success = input.readI32();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_table_epoch_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_table_epoch_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.I32, 0);
output.writeI32(this.success);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_sql_execute_args = function MapD_sql_execute_args(args) {
this.session = null;
this.query = null;
this.column_format = null;
this.nonce = null;
this.first_n = -1;
this.at_most_n = -1;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.query !== undefined && args.query !== null) {
this.query = args.query;
}
if (args.column_format !== undefined && args.column_format !== null) {
this.column_format = args.column_format;
}
if (args.nonce !== undefined && args.nonce !== null) {
this.nonce = args.nonce;
}
if (args.first_n !== undefined && args.first_n !== null) {
this.first_n = args.first_n;
}
if (args.at_most_n !== undefined && args.at_most_n !== null) {
this.at_most_n = args.at_most_n;
}
}
};
MapD_sql_execute_args.prototype = {};
MapD_sql_execute_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.query = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.BOOL) {
this.column_format = input.readBool();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRING) {
this.nonce = input.readString();
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.I32) {
this.first_n = input.readI32();
} else {
input.skip(ftype);
}
break;
case 6:
if (ftype == Thrift.Type.I32) {
this.at_most_n = input.readI32();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_sql_execute_args.prototype.write = function (output) {
output.writeStructBegin('MapD_sql_execute_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.query !== null && this.query !== undefined) {
output.writeFieldBegin('query', Thrift.Type.STRING, 2);
output.writeString(this.query);
output.writeFieldEnd();
}
if (this.column_format !== null && this.column_format !== undefined) {
output.writeFieldBegin('column_format', Thrift.Type.BOOL, 3);
output.writeBool(this.column_format);
output.writeFieldEnd();
}
if (this.nonce !== null && this.nonce !== undefined) {
output.writeFieldBegin('nonce', Thrift.Type.STRING, 4);
output.writeString(this.nonce);
output.writeFieldEnd();
}
if (this.first_n !== null && this.first_n !== undefined) {
output.writeFieldBegin('first_n', Thrift.Type.I32, 5);
output.writeI32(this.first_n);
output.writeFieldEnd();
}
if (this.at_most_n !== null && this.at_most_n !== undefined) {
output.writeFieldBegin('at_most_n', Thrift.Type.I32, 6);
output.writeI32(this.at_most_n);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_sql_execute_result = function MapD_sql_execute_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TQueryResult(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_sql_execute_result.prototype = {};
MapD_sql_execute_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TQueryResult();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_sql_execute_result.prototype.write = function (output) {
output.writeStructBegin('MapD_sql_execute_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_sql_execute_df_args = function MapD_sql_execute_df_args(args) {
this.session = null;
this.query = null;
this.device_type = null;
this.device_id = 0;
this.first_n = -1;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.query !== undefined && args.query !== null) {
this.query = args.query;
}
if (args.device_type !== undefined && args.device_type !== null) {
this.device_type = args.device_type;
}
if (args.device_id !== undefined && args.device_id !== null) {
this.device_id = args.device_id;
}
if (args.first_n !== undefined && args.first_n !== null) {
this.first_n = args.first_n;
}
}
};
MapD_sql_execute_df_args.prototype = {};
MapD_sql_execute_df_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.query = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.I32) {
this.device_type = input.readI32();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.I32) {
this.device_id = input.readI32();
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.I32) {
this.first_n = input.readI32();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_sql_execute_df_args.prototype.write = function (output) {
output.writeStructBegin('MapD_sql_execute_df_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.query !== null && this.query !== undefined) {
output.writeFieldBegin('query', Thrift.Type.STRING, 2);
output.writeString(this.query);
output.writeFieldEnd();
}
if (this.device_type !== null && this.device_type !== undefined) {
output.writeFieldBegin('device_type', Thrift.Type.I32, 3);
output.writeI32(this.device_type);
output.writeFieldEnd();
}
if (this.device_id !== null && this.device_id !== undefined) {
output.writeFieldBegin('device_id', Thrift.Type.I32, 4);
output.writeI32(this.device_id);
output.writeFieldEnd();
}
if (this.first_n !== null && this.first_n !== undefined) {
output.writeFieldBegin('first_n', Thrift.Type.I32, 5);
output.writeI32(this.first_n);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_sql_execute_df_result = function MapD_sql_execute_df_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TDataFrame(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_sql_execute_df_result.prototype = {};
MapD_sql_execute_df_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TDataFrame();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_sql_execute_df_result.prototype.write = function (output) {
output.writeStructBegin('MapD_sql_execute_df_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_sql_execute_gdf_args = function MapD_sql_execute_gdf_args(args) {
this.session = null;
this.query = null;
this.device_id = 0;
this.first_n = -1;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.query !== undefined && args.query !== null) {
this.query = args.query;
}
if (args.device_id !== undefined && args.device_id !== null) {
this.device_id = args.device_id;
}
if (args.first_n !== undefined && args.first_n !== null) {
this.first_n = args.first_n;
}
}
};
MapD_sql_execute_gdf_args.prototype = {};
MapD_sql_execute_gdf_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.query = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.I32) {
this.device_id = input.readI32();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.I32) {
this.first_n = input.readI32();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_sql_execute_gdf_args.prototype.write = function (output) {
output.writeStructBegin('MapD_sql_execute_gdf_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.query !== null && this.query !== undefined) {
output.writeFieldBegin('query', Thrift.Type.STRING, 2);
output.writeString(this.query);
output.writeFieldEnd();
}
if (this.device_id !== null && this.device_id !== undefined) {
output.writeFieldBegin('device_id', Thrift.Type.I32, 3);
output.writeI32(this.device_id);
output.writeFieldEnd();
}
if (this.first_n !== null && this.first_n !== undefined) {
output.writeFieldBegin('first_n', Thrift.Type.I32, 4);
output.writeI32(this.first_n);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_sql_execute_gdf_result = function MapD_sql_execute_gdf_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TDataFrame(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_sql_execute_gdf_result.prototype = {};
MapD_sql_execute_gdf_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TDataFrame();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_sql_execute_gdf_result.prototype.write = function (output) {
output.writeStructBegin('MapD_sql_execute_gdf_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_deallocate_df_args = function MapD_deallocate_df_args(args) {
this.session = null;
this.df = null;
this.device_type = null;
this.device_id = 0;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.df !== undefined && args.df !== null) {
this.df = new ttypes.TDataFrame(args.df);
}
if (args.device_type !== undefined && args.device_type !== null) {
this.device_type = args.device_type;
}
if (args.device_id !== undefined && args.device_id !== null) {
this.device_id = args.device_id;
}
}
};
MapD_deallocate_df_args.prototype = {};
MapD_deallocate_df_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.df = new ttypes.TDataFrame();
this.df.read(input);
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.I32) {
this.device_type = input.readI32();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.I32) {
this.device_id = input.readI32();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_deallocate_df_args.prototype.write = function (output) {
output.writeStructBegin('MapD_deallocate_df_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.df !== null && this.df !== undefined) {
output.writeFieldBegin('df', Thrift.Type.STRUCT, 2);
this.df.write(output);
output.writeFieldEnd();
}
if (this.device_type !== null && this.device_type !== undefined) {
output.writeFieldBegin('device_type', Thrift.Type.I32, 3);
output.writeI32(this.device_type);
output.writeFieldEnd();
}
if (this.device_id !== null && this.device_id !== undefined) {
output.writeFieldBegin('device_id', Thrift.Type.I32, 4);
output.writeI32(this.device_id);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_deallocate_df_result = function MapD_deallocate_df_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_deallocate_df_result.prototype = {};
MapD_deallocate_df_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_deallocate_df_result.prototype.write = function (output) {
output.writeStructBegin('MapD_deallocate_df_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_interrupt_args = function MapD_interrupt_args(args) {
this.session = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
}
};
MapD_interrupt_args.prototype = {};
MapD_interrupt_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_interrupt_args.prototype.write = function (output) {
output.writeStructBegin('MapD_interrupt_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_interrupt_result = function MapD_interrupt_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_interrupt_result.prototype = {};
MapD_interrupt_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_interrupt_result.prototype.write = function (output) {
output.writeStructBegin('MapD_interrupt_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_sql_validate_args = function MapD_sql_validate_args(args) {
this.session = null;
this.query = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.query !== undefined && args.query !== null) {
this.query = args.query;
}
}
};
MapD_sql_validate_args.prototype = {};
MapD_sql_validate_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.query = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_sql_validate_args.prototype.write = function (output) {
output.writeStructBegin('MapD_sql_validate_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.query !== null && this.query !== undefined) {
output.writeFieldBegin('query', Thrift.Type.STRING, 2);
output.writeString(this.query);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_sql_validate_result = function MapD_sql_validate_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyMap(args.success, [ttypes.TColumnType]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_sql_validate_result.prototype = {};
MapD_sql_validate_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.MAP) {
var _size250 = 0;
var _rtmp3254;
this.success = {};
var _ktype251 = 0;
var _vtype252 = 0;
_rtmp3254 = input.readMapBegin();
_ktype251 = _rtmp3254.ktype;
_vtype252 = _rtmp3254.vtype;
_size250 = _rtmp3254.size;
for (var _i255 = 0; _i255 < _size250; ++_i255) {
var key256 = null;
var val257 = null;
key256 = input.readString();
val257 = new ttypes.TColumnType();
val257.read(input);
this.success[key256] = val257;
}
input.readMapEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_sql_validate_result.prototype.write = function (output) {
output.writeStructBegin('MapD_sql_validate_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.MAP, 0);
output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.success));
for (var kiter258 in this.success) {
if (this.success.hasOwnProperty(kiter258)) {
var viter259 = this.success[kiter258];
output.writeString(kiter258);
viter259.write(output);
}
}
output.writeMapEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_completion_hints_args = function MapD_get_completion_hints_args(args) {
this.session = null;
this.sql = null;
this.cursor = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.sql !== undefined && args.sql !== null) {
this.sql = args.sql;
}
if (args.cursor !== undefined && args.cursor !== null) {
this.cursor = args.cursor;
}
}
};
MapD_get_completion_hints_args.prototype = {};
MapD_get_completion_hints_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.sql = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.I32) {
this.cursor = input.readI32();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_completion_hints_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_completion_hints_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.sql !== null && this.sql !== undefined) {
output.writeFieldBegin('sql', Thrift.Type.STRING, 2);
output.writeString(this.sql);
output.writeFieldEnd();
}
if (this.cursor !== null && this.cursor !== undefined) {
output.writeFieldBegin('cursor', Thrift.Type.I32, 3);
output.writeI32(this.cursor);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_completion_hints_result = function MapD_get_completion_hints_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [completion_hints_ttypes.TCompletionHint]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_completion_hints_result.prototype = {};
MapD_get_completion_hints_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size260 = 0;
var _rtmp3264;
this.success = [];
var _etype263 = 0;
_rtmp3264 = input.readListBegin();
_etype263 = _rtmp3264.etype;
_size260 = _rtmp3264.size;
for (var _i265 = 0; _i265 < _size260; ++_i265) {
var elem266 = null;
elem266 = new completion_hints_ttypes.TCompletionHint();
elem266.read(input);
this.success.push(elem266);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_completion_hints_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_completion_hints_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
for (var iter267 in this.success) {
if (this.success.hasOwnProperty(iter267)) {
iter267 = this.success[iter267];
iter267.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_set_execution_mode_args = function MapD_set_execution_mode_args(args) {
this.session = null;
this.mode = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.mode !== undefined && args.mode !== null) {
this.mode = args.mode;
}
}
};
MapD_set_execution_mode_args.prototype = {};
MapD_set_execution_mode_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.I32) {
this.mode = input.readI32();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_set_execution_mode_args.prototype.write = function (output) {
output.writeStructBegin('MapD_set_execution_mode_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.mode !== null && this.mode !== undefined) {
output.writeFieldBegin('mode', Thrift.Type.I32, 2);
output.writeI32(this.mode);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_set_execution_mode_result = function MapD_set_execution_mode_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_set_execution_mode_result.prototype = {};
MapD_set_execution_mode_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_set_execution_mode_result.prototype.write = function (output) {
output.writeStructBegin('MapD_set_execution_mode_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_render_vega_args = function MapD_render_vega_args(args) {
this.session = null;
this.widget_id = null;
this.vega_json = null;
this.compression_level = null;
this.nonce = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.widget_id !== undefined && args.widget_id !== null) {
this.widget_id = args.widget_id;
}
if (args.vega_json !== undefined && args.vega_json !== null) {
this.vega_json = args.vega_json;
}
if (args.compression_level !== undefined && args.compression_level !== null) {
this.compression_level = args.compression_level;
}
if (args.nonce !== undefined && args.nonce !== null) {
this.nonce = args.nonce;
}
}
};
MapD_render_vega_args.prototype = {};
MapD_render_vega_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.I64) {
this.widget_id = input.readI64();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.vega_json = input.readString();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.I32) {
this.compression_level = input.readI32();
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.STRING) {
this.nonce = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_render_vega_args.prototype.write = function (output) {
output.writeStructBegin('MapD_render_vega_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.widget_id !== null && this.widget_id !== undefined) {
output.writeFieldBegin('widget_id', Thrift.Type.I64, 2);
output.writeI64(this.widget_id);
output.writeFieldEnd();
}
if (this.vega_json !== null && this.vega_json !== undefined) {
output.writeFieldBegin('vega_json', Thrift.Type.STRING, 3);
output.writeString(this.vega_json);
output.writeFieldEnd();
}
if (this.compression_level !== null && this.compression_level !== undefined) {
output.writeFieldBegin('compression_level', Thrift.Type.I32, 4);
output.writeI32(this.compression_level);
output.writeFieldEnd();
}
if (this.nonce !== null && this.nonce !== undefined) {
output.writeFieldBegin('nonce', Thrift.Type.STRING, 5);
output.writeString(this.nonce);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_render_vega_result = function MapD_render_vega_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TRenderResult(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_render_vega_result.prototype = {};
MapD_render_vega_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TRenderResult();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_render_vega_result.prototype.write = function (output) {
output.writeStructBegin('MapD_render_vega_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_result_row_for_pixel_args = function MapD_get_result_row_for_pixel_args(args) {
this.session = null;
this.widget_id = null;
this.pixel = null;
this.table_col_names = null;
this.column_format = null;
this.pixelRadius = null;
this.nonce = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.widget_id !== undefined && args.widget_id !== null) {
this.widget_id = args.widget_id;
}
if (args.pixel !== undefined && args.pixel !== null) {
this.pixel = new ttypes.TPixel(args.pixel);
}
if (args.table_col_names !== undefined && args.table_col_names !== null) {
this.table_col_names = Thrift.copyMap(args.table_col_names, [Thrift.copyList, null]);
}
if (args.column_format !== undefined && args.column_format !== null) {
this.column_format = args.column_format;
}
if (args.pixelRadius !== undefined && args.pixelRadius !== null) {
this.pixelRadius = args.pixelRadius;
}
if (args.nonce !== undefined && args.nonce !== null) {
this.nonce = args.nonce;
}
}
};
MapD_get_result_row_for_pixel_args.prototype = {};
MapD_get_result_row_for_pixel_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.I64) {
this.widget_id = input.readI64();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRUCT) {
this.pixel = new ttypes.TPixel();
this.pixel.read(input);
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.MAP) {
var _size268 = 0;
var _rtmp3272;
this.table_col_names = {};
var _ktype269 = 0;
var _vtype270 = 0;
_rtmp3272 = input.readMapBegin();
_ktype269 = _rtmp3272.ktype;
_vtype270 = _rtmp3272.vtype;
_size268 = _rtmp3272.size;
for (var _i273 = 0; _i273 < _size268; ++_i273) {
var key274 = null;
var val275 = null;
key274 = input.readString();
var _size276 = 0;
var _rtmp3280;
val275 = [];
var _etype279 = 0;
_rtmp3280 = input.readListBegin();
_etype279 = _rtmp3280.etype;
_size276 = _rtmp3280.size;
for (var _i281 = 0; _i281 < _size276; ++_i281) {
var elem282 = null;
elem282 = input.readString();
val275.push(elem282);
}
input.readListEnd();
this.table_col_names[key274] = val275;
}
input.readMapEnd();
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.BOOL) {
this.column_format = input.readBool();
} else {
input.skip(ftype);
}
break;
case 6:
if (ftype == Thrift.Type.I32) {
this.pixelRadius = input.readI32();
} else {
input.skip(ftype);
}
break;
case 7:
if (ftype == Thrift.Type.STRING) {
this.nonce = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_result_row_for_pixel_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_result_row_for_pixel_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.widget_id !== null && this.widget_id !== undefined) {
output.writeFieldBegin('widget_id', Thrift.Type.I64, 2);
output.writeI64(this.widget_id);
output.writeFieldEnd();
}
if (this.pixel !== null && this.pixel !== undefined) {
output.writeFieldBegin('pixel', Thrift.Type.STRUCT, 3);
this.pixel.write(output);
output.writeFieldEnd();
}
if (this.table_col_names !== null && this.table_col_names !== undefined) {
output.writeFieldBegin('table_col_names', Thrift.Type.MAP, 4);
output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.LIST, Thrift.objectLength(this.table_col_names));
for (var kiter283 in this.table_col_names) {
if (this.table_col_names.hasOwnProperty(kiter283)) {
var viter284 = this.table_col_names[kiter283];
output.writeString(kiter283);
output.writeListBegin(Thrift.Type.STRING, viter284.length);
for (var iter285 in viter284) {
if (viter284.hasOwnProperty(iter285)) {
iter285 = viter284[iter285];
output.writeString(iter285);
}
}
output.writeListEnd();
}
}
output.writeMapEnd();
output.writeFieldEnd();
}
if (this.column_format !== null && this.column_format !== undefined) {
output.writeFieldBegin('column_format', Thrift.Type.BOOL, 5);
output.writeBool(this.column_format);
output.writeFieldEnd();
}
if (this.pixelRadius !== null && this.pixelRadius !== undefined) {
output.writeFieldBegin('pixelRadius', Thrift.Type.I32, 6);
output.writeI32(this.pixelRadius);
output.writeFieldEnd();
}
if (this.nonce !== null && this.nonce !== undefined) {
output.writeFieldBegin('nonce', Thrift.Type.STRING, 7);
output.writeString(this.nonce);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_result_row_for_pixel_result = function MapD_get_result_row_for_pixel_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TPixelTableRowResult(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_result_row_for_pixel_result.prototype = {};
MapD_get_result_row_for_pixel_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TPixelTableRowResult();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_result_row_for_pixel_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_result_row_for_pixel_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_frontend_view_args = function MapD_get_frontend_view_args(args) {
this.session = null;
this.view_name = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.view_name !== undefined && args.view_name !== null) {
this.view_name = args.view_name;
}
}
};
MapD_get_frontend_view_args.prototype = {};
MapD_get_frontend_view_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.view_name = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_frontend_view_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_frontend_view_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.view_name !== null && this.view_name !== undefined) {
output.writeFieldBegin('view_name', Thrift.Type.STRING, 2);
output.writeString(this.view_name);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_frontend_view_result = function MapD_get_frontend_view_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TFrontendView(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_frontend_view_result.prototype = {};
MapD_get_frontend_view_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TFrontendView();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_frontend_view_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_frontend_view_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_frontend_views_args = function MapD_get_frontend_views_args(args) {
this.session = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
}
};
MapD_get_frontend_views_args.prototype = {};
MapD_get_frontend_views_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_frontend_views_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_frontend_views_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_frontend_views_result = function MapD_get_frontend_views_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.TFrontendView]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_frontend_views_result.prototype = {};
MapD_get_frontend_views_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size286 = 0;
var _rtmp3290;
this.success = [];
var _etype289 = 0;
_rtmp3290 = input.readListBegin();
_etype289 = _rtmp3290.etype;
_size286 = _rtmp3290.size;
for (var _i291 = 0; _i291 < _size286; ++_i291) {
var elem292 = null;
elem292 = new ttypes.TFrontendView();
elem292.read(input);
this.success.push(elem292);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_frontend_views_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_frontend_views_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
for (var iter293 in this.success) {
if (this.success.hasOwnProperty(iter293)) {
iter293 = this.success[iter293];
iter293.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_create_frontend_view_args = function MapD_create_frontend_view_args(args) {
this.session = null;
this.view_name = null;
this.view_state = null;
this.image_hash = null;
this.view_metadata = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.view_name !== undefined && args.view_name !== null) {
this.view_name = args.view_name;
}
if (args.view_state !== undefined && args.view_state !== null) {
this.view_state = args.view_state;
}
if (args.image_hash !== undefined && args.image_hash !== null) {
this.image_hash = args.image_hash;
}
if (args.view_metadata !== undefined && args.view_metadata !== null) {
this.view_metadata = args.view_metadata;
}
}
};
MapD_create_frontend_view_args.prototype = {};
MapD_create_frontend_view_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.view_name = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.view_state = input.readString();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRING) {
this.image_hash = input.readString();
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.STRING) {
this.view_metadata = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_create_frontend_view_args.prototype.write = function (output) {
output.writeStructBegin('MapD_create_frontend_view_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.view_name !== null && this.view_name !== undefined) {
output.writeFieldBegin('view_name', Thrift.Type.STRING, 2);
output.writeString(this.view_name);
output.writeFieldEnd();
}
if (this.view_state !== null && this.view_state !== undefined) {
output.writeFieldBegin('view_state', Thrift.Type.STRING, 3);
output.writeString(this.view_state);
output.writeFieldEnd();
}
if (this.image_hash !== null && this.image_hash !== undefined) {
output.writeFieldBegin('image_hash', Thrift.Type.STRING, 4);
output.writeString(this.image_hash);
output.writeFieldEnd();
}
if (this.view_metadata !== null && this.view_metadata !== undefined) {
output.writeFieldBegin('view_metadata', Thrift.Type.STRING, 5);
output.writeString(this.view_metadata);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_create_frontend_view_result = function MapD_create_frontend_view_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_create_frontend_view_result.prototype = {};
MapD_create_frontend_view_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_create_frontend_view_result.prototype.write = function (output) {
output.writeStructBegin('MapD_create_frontend_view_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_delete_frontend_view_args = function MapD_delete_frontend_view_args(args) {
this.session = null;
this.view_name = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.view_name !== undefined && args.view_name !== null) {
this.view_name = args.view_name;
}
}
};
MapD_delete_frontend_view_args.prototype = {};
MapD_delete_frontend_view_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.view_name = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_delete_frontend_view_args.prototype.write = function (output) {
output.writeStructBegin('MapD_delete_frontend_view_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.view_name !== null && this.view_name !== undefined) {
output.writeFieldBegin('view_name', Thrift.Type.STRING, 2);
output.writeString(this.view_name);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_delete_frontend_view_result = function MapD_delete_frontend_view_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_delete_frontend_view_result.prototype = {};
MapD_delete_frontend_view_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_delete_frontend_view_result.prototype.write = function (output) {
output.writeStructBegin('MapD_delete_frontend_view_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_link_view_args = function MapD_get_link_view_args(args) {
this.session = null;
this.link = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.link !== undefined && args.link !== null) {
this.link = args.link;
}
}
};
MapD_get_link_view_args.prototype = {};
MapD_get_link_view_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.link = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_link_view_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_link_view_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.link !== null && this.link !== undefined) {
output.writeFieldBegin('link', Thrift.Type.STRING, 2);
output.writeString(this.link);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_link_view_result = function MapD_get_link_view_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TFrontendView(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_link_view_result.prototype = {};
MapD_get_link_view_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TFrontendView();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_link_view_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_link_view_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_create_link_args = function MapD_create_link_args(args) {
this.session = null;
this.view_state = null;
this.view_metadata = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.view_state !== undefined && args.view_state !== null) {
this.view_state = args.view_state;
}
if (args.view_metadata !== undefined && args.view_metadata !== null) {
this.view_metadata = args.view_metadata;
}
}
};
MapD_create_link_args.prototype = {};
MapD_create_link_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.view_state = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.view_metadata = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_create_link_args.prototype.write = function (output) {
output.writeStructBegin('MapD_create_link_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.view_state !== null && this.view_state !== undefined) {
output.writeFieldBegin('view_state', Thrift.Type.STRING, 2);
output.writeString(this.view_state);
output.writeFieldEnd();
}
if (this.view_metadata !== null && this.view_metadata !== undefined) {
output.writeFieldBegin('view_metadata', Thrift.Type.STRING, 3);
output.writeString(this.view_metadata);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_create_link_result = function MapD_create_link_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_create_link_result.prototype = {};
MapD_create_link_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRING) {
this.success = input.readString();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_create_link_result.prototype.write = function (output) {
output.writeStructBegin('MapD_create_link_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRING, 0);
output.writeString(this.success);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_load_table_binary_args = function MapD_load_table_binary_args(args) {
this.session = null;
this.table_name = null;
this.rows = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.table_name !== undefined && args.table_name !== null) {
this.table_name = args.table_name;
}
if (args.rows !== undefined && args.rows !== null) {
this.rows = Thrift.copyList(args.rows, [ttypes.TRow]);
}
}
};
MapD_load_table_binary_args.prototype = {};
MapD_load_table_binary_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.table_name = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.LIST) {
var _size294 = 0;
var _rtmp3298;
this.rows = [];
var _etype297 = 0;
_rtmp3298 = input.readListBegin();
_etype297 = _rtmp3298.etype;
_size294 = _rtmp3298.size;
for (var _i299 = 0; _i299 < _size294; ++_i299) {
var elem300 = null;
elem300 = new ttypes.TRow();
elem300.read(input);
this.rows.push(elem300);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_load_table_binary_args.prototype.write = function (output) {
output.writeStructBegin('MapD_load_table_binary_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.table_name !== null && this.table_name !== undefined) {
output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);
output.writeString(this.table_name);
output.writeFieldEnd();
}
if (this.rows !== null && this.rows !== undefined) {
output.writeFieldBegin('rows', Thrift.Type.LIST, 3);
output.writeListBegin(Thrift.Type.STRUCT, this.rows.length);
for (var iter301 in this.rows) {
if (this.rows.hasOwnProperty(iter301)) {
iter301 = this.rows[iter301];
iter301.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_load_table_binary_result = function MapD_load_table_binary_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_load_table_binary_result.prototype = {};
MapD_load_table_binary_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_load_table_binary_result.prototype.write = function (output) {
output.writeStructBegin('MapD_load_table_binary_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_load_table_binary_columnar_args = function MapD_load_table_binary_columnar_args(args) {
this.session = null;
this.table_name = null;
this.cols = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.table_name !== undefined && args.table_name !== null) {
this.table_name = args.table_name;
}
if (args.cols !== undefined && args.cols !== null) {
this.cols = Thrift.copyList(args.cols, [ttypes.TColumn]);
}
}
};
MapD_load_table_binary_columnar_args.prototype = {};
MapD_load_table_binary_columnar_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.table_name = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.LIST) {
var _size302 = 0;
var _rtmp3306;
this.cols = [];
var _etype305 = 0;
_rtmp3306 = input.readListBegin();
_etype305 = _rtmp3306.etype;
_size302 = _rtmp3306.size;
for (var _i307 = 0; _i307 < _size302; ++_i307) {
var elem308 = null;
elem308 = new ttypes.TColumn();
elem308.read(input);
this.cols.push(elem308);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_load_table_binary_columnar_args.prototype.write = function (output) {
output.writeStructBegin('MapD_load_table_binary_columnar_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.table_name !== null && this.table_name !== undefined) {
output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);
output.writeString(this.table_name);
output.writeFieldEnd();
}
if (this.cols !== null && this.cols !== undefined) {
output.writeFieldBegin('cols', Thrift.Type.LIST, 3);
output.writeListBegin(Thrift.Type.STRUCT, this.cols.length);
for (var iter309 in this.cols) {
if (this.cols.hasOwnProperty(iter309)) {
iter309 = this.cols[iter309];
iter309.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_load_table_binary_columnar_result = function MapD_load_table_binary_columnar_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_load_table_binary_columnar_result.prototype = {};
MapD_load_table_binary_columnar_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_load_table_binary_columnar_result.prototype.write = function (output) {
output.writeStructBegin('MapD_load_table_binary_columnar_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_load_table_binary_arrow_args = function MapD_load_table_binary_arrow_args(args) {
this.session = null;
this.table_name = null;
this.arrow_stream = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.table_name !== undefined && args.table_name !== null) {
this.table_name = args.table_name;
}
if (args.arrow_stream !== undefined && args.arrow_stream !== null) {
this.arrow_stream = args.arrow_stream;
}
}
};
MapD_load_table_binary_arrow_args.prototype = {};
MapD_load_table_binary_arrow_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.table_name = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.arrow_stream = input.readBinary();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_load_table_binary_arrow_args.prototype.write = function (output) {
output.writeStructBegin('MapD_load_table_binary_arrow_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.table_name !== null && this.table_name !== undefined) {
output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);
output.writeString(this.table_name);
output.writeFieldEnd();
}
if (this.arrow_stream !== null && this.arrow_stream !== undefined) {
output.writeFieldBegin('arrow_stream', Thrift.Type.STRING, 3);
output.writeBinary(this.arrow_stream);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_load_table_binary_arrow_result = function MapD_load_table_binary_arrow_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_load_table_binary_arrow_result.prototype = {};
MapD_load_table_binary_arrow_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_load_table_binary_arrow_result.prototype.write = function (output) {
output.writeStructBegin('MapD_load_table_binary_arrow_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_load_table_args = function MapD_load_table_args(args) {
this.session = null;
this.table_name = null;
this.rows = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.table_name !== undefined && args.table_name !== null) {
this.table_name = args.table_name;
}
if (args.rows !== undefined && args.rows !== null) {
this.rows = Thrift.copyList(args.rows, [ttypes.TStringRow]);
}
}
};
MapD_load_table_args.prototype = {};
MapD_load_table_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.table_name = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.LIST) {
var _size310 = 0;
var _rtmp3314;
this.rows = [];
var _etype313 = 0;
_rtmp3314 = input.readListBegin();
_etype313 = _rtmp3314.etype;
_size310 = _rtmp3314.size;
for (var _i315 = 0; _i315 < _size310; ++_i315) {
var elem316 = null;
elem316 = new ttypes.TStringRow();
elem316.read(input);
this.rows.push(elem316);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_load_table_args.prototype.write = function (output) {
output.writeStructBegin('MapD_load_table_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.table_name !== null && this.table_name !== undefined) {
output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);
output.writeString(this.table_name);
output.writeFieldEnd();
}
if (this.rows !== null && this.rows !== undefined) {
output.writeFieldBegin('rows', Thrift.Type.LIST, 3);
output.writeListBegin(Thrift.Type.STRUCT, this.rows.length);
for (var iter317 in this.rows) {
if (this.rows.hasOwnProperty(iter317)) {
iter317 = this.rows[iter317];
iter317.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_load_table_result = function MapD_load_table_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_load_table_result.prototype = {};
MapD_load_table_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_load_table_result.prototype.write = function (output) {
output.writeStructBegin('MapD_load_table_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_detect_column_types_args = function MapD_detect_column_types_args(args) {
this.session = null;
this.file_name = null;
this.copy_params = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.file_name !== undefined && args.file_name !== null) {
this.file_name = args.file_name;
}
if (args.copy_params !== undefined && args.copy_params !== null) {
this.copy_params = new ttypes.TCopyParams(args.copy_params);
}
}
};
MapD_detect_column_types_args.prototype = {};
MapD_detect_column_types_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.file_name = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRUCT) {
this.copy_params = new ttypes.TCopyParams();
this.copy_params.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_detect_column_types_args.prototype.write = function (output) {
output.writeStructBegin('MapD_detect_column_types_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.file_name !== null && this.file_name !== undefined) {
output.writeFieldBegin('file_name', Thrift.Type.STRING, 2);
output.writeString(this.file_name);
output.writeFieldEnd();
}
if (this.copy_params !== null && this.copy_params !== undefined) {
output.writeFieldBegin('copy_params', Thrift.Type.STRUCT, 3);
this.copy_params.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_detect_column_types_result = function MapD_detect_column_types_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TDetectResult(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_detect_column_types_result.prototype = {};
MapD_detect_column_types_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TDetectResult();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_detect_column_types_result.prototype.write = function (output) {
output.writeStructBegin('MapD_detect_column_types_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_create_table_args = function MapD_create_table_args(args) {
this.session = null;
this.table_name = null;
this.row_desc = null;
this.table_type = 0;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.table_name !== undefined && args.table_name !== null) {
this.table_name = args.table_name;
}
if (args.row_desc !== undefined && args.row_desc !== null) {
this.row_desc = Thrift.copyList(args.row_desc, [ttypes.TColumnType]);
}
if (args.table_type !== undefined && args.table_type !== null) {
this.table_type = args.table_type;
}
}
};
MapD_create_table_args.prototype = {};
MapD_create_table_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.table_name = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.LIST) {
var _size318 = 0;
var _rtmp3322;
this.row_desc = [];
var _etype321 = 0;
_rtmp3322 = input.readListBegin();
_etype321 = _rtmp3322.etype;
_size318 = _rtmp3322.size;
for (var _i323 = 0; _i323 < _size318; ++_i323) {
var elem324 = null;
elem324 = new ttypes.TColumnType();
elem324.read(input);
this.row_desc.push(elem324);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.I32) {
this.table_type = input.readI32();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_create_table_args.prototype.write = function (output) {
output.writeStructBegin('MapD_create_table_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.table_name !== null && this.table_name !== undefined) {
output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);
output.writeString(this.table_name);
output.writeFieldEnd();
}
if (this.row_desc !== null && this.row_desc !== undefined) {
output.writeFieldBegin('row_desc', Thrift.Type.LIST, 3);
output.writeListBegin(Thrift.Type.STRUCT, this.row_desc.length);
for (var iter325 in this.row_desc) {
if (this.row_desc.hasOwnProperty(iter325)) {
iter325 = this.row_desc[iter325];
iter325.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.table_type !== null && this.table_type !== undefined) {
output.writeFieldBegin('table_type', Thrift.Type.I32, 4);
output.writeI32(this.table_type);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_create_table_result = function MapD_create_table_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_create_table_result.prototype = {};
MapD_create_table_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_create_table_result.prototype.write = function (output) {
output.writeStructBegin('MapD_create_table_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_import_table_args = function MapD_import_table_args(args) {
this.session = null;
this.table_name = null;
this.file_name = null;
this.copy_params = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.table_name !== undefined && args.table_name !== null) {
this.table_name = args.table_name;
}
if (args.file_name !== undefined && args.file_name !== null) {
this.file_name = args.file_name;
}
if (args.copy_params !== undefined && args.copy_params !== null) {
this.copy_params = new ttypes.TCopyParams(args.copy_params);
}
}
};
MapD_import_table_args.prototype = {};
MapD_import_table_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.table_name = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.file_name = input.readString();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRUCT) {
this.copy_params = new ttypes.TCopyParams();
this.copy_params.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_import_table_args.prototype.write = function (output) {
output.writeStructBegin('MapD_import_table_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.table_name !== null && this.table_name !== undefined) {
output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);
output.writeString(this.table_name);
output.writeFieldEnd();
}
if (this.file_name !== null && this.file_name !== undefined) {
output.writeFieldBegin('file_name', Thrift.Type.STRING, 3);
output.writeString(this.file_name);
output.writeFieldEnd();
}
if (this.copy_params !== null && this.copy_params !== undefined) {
output.writeFieldBegin('copy_params', Thrift.Type.STRUCT, 4);
this.copy_params.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_import_table_result = function MapD_import_table_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_import_table_result.prototype = {};
MapD_import_table_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_import_table_result.prototype.write = function (output) {
output.writeStructBegin('MapD_import_table_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_import_geo_table_args = function MapD_import_geo_table_args(args) {
this.session = null;
this.table_name = null;
this.file_name = null;
this.copy_params = null;
this.row_desc = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.table_name !== undefined && args.table_name !== null) {
this.table_name = args.table_name;
}
if (args.file_name !== undefined && args.file_name !== null) {
this.file_name = args.file_name;
}
if (args.copy_params !== undefined && args.copy_params !== null) {
this.copy_params = new ttypes.TCopyParams(args.copy_params);
}
if (args.row_desc !== undefined && args.row_desc !== null) {
this.row_desc = Thrift.copyList(args.row_desc, [ttypes.TColumnType]);
}
}
};
MapD_import_geo_table_args.prototype = {};
MapD_import_geo_table_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.table_name = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.file_name = input.readString();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRUCT) {
this.copy_params = new ttypes.TCopyParams();
this.copy_params.read(input);
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.LIST) {
var _size326 = 0;
var _rtmp3330;
this.row_desc = [];
var _etype329 = 0;
_rtmp3330 = input.readListBegin();
_etype329 = _rtmp3330.etype;
_size326 = _rtmp3330.size;
for (var _i331 = 0; _i331 < _size326; ++_i331) {
var elem332 = null;
elem332 = new ttypes.TColumnType();
elem332.read(input);
this.row_desc.push(elem332);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_import_geo_table_args.prototype.write = function (output) {
output.writeStructBegin('MapD_import_geo_table_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.table_name !== null && this.table_name !== undefined) {
output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);
output.writeString(this.table_name);
output.writeFieldEnd();
}
if (this.file_name !== null && this.file_name !== undefined) {
output.writeFieldBegin('file_name', Thrift.Type.STRING, 3);
output.writeString(this.file_name);
output.writeFieldEnd();
}
if (this.copy_params !== null && this.copy_params !== undefined) {
output.writeFieldBegin('copy_params', Thrift.Type.STRUCT, 4);
this.copy_params.write(output);
output.writeFieldEnd();
}
if (this.row_desc !== null && this.row_desc !== undefined) {
output.writeFieldBegin('row_desc', Thrift.Type.LIST, 5);
output.writeListBegin(Thrift.Type.STRUCT, this.row_desc.length);
for (var iter333 in this.row_desc) {
if (this.row_desc.hasOwnProperty(iter333)) {
iter333 = this.row_desc[iter333];
iter333.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_import_geo_table_result = function MapD_import_geo_table_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_import_geo_table_result.prototype = {};
MapD_import_geo_table_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_import_geo_table_result.prototype.write = function (output) {
output.writeStructBegin('MapD_import_geo_table_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_import_table_status_args = function MapD_import_table_status_args(args) {
this.session = null;
this.import_id = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.import_id !== undefined && args.import_id !== null) {
this.import_id = args.import_id;
}
}
};
MapD_import_table_status_args.prototype = {};
MapD_import_table_status_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.import_id = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_import_table_status_args.prototype.write = function (output) {
output.writeStructBegin('MapD_import_table_status_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.import_id !== null && this.import_id !== undefined) {
output.writeFieldBegin('import_id', Thrift.Type.STRING, 2);
output.writeString(this.import_id);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_import_table_status_result = function MapD_import_table_status_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TImportStatus(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_import_table_status_result.prototype = {};
MapD_import_table_status_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TImportStatus();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_import_table_status_result.prototype.write = function (output) {
output.writeStructBegin('MapD_import_table_status_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_start_query_args = function MapD_start_query_args(args) {
this.session = null;
this.query_ra = null;
this.just_explain = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.query_ra !== undefined && args.query_ra !== null) {
this.query_ra = args.query_ra;
}
if (args.just_explain !== undefined && args.just_explain !== null) {
this.just_explain = args.just_explain;
}
}
};
MapD_start_query_args.prototype = {};
MapD_start_query_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.query_ra = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.BOOL) {
this.just_explain = input.readBool();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_start_query_args.prototype.write = function (output) {
output.writeStructBegin('MapD_start_query_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.query_ra !== null && this.query_ra !== undefined) {
output.writeFieldBegin('query_ra', Thrift.Type.STRING, 2);
output.writeString(this.query_ra);
output.writeFieldEnd();
}
if (this.just_explain !== null && this.just_explain !== undefined) {
output.writeFieldBegin('just_explain', Thrift.Type.BOOL, 3);
output.writeBool(this.just_explain);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_start_query_result = function MapD_start_query_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TPendingQuery(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_start_query_result.prototype = {};
MapD_start_query_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TPendingQuery();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_start_query_result.prototype.write = function (output) {
output.writeStructBegin('MapD_start_query_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_execute_first_step_args = function MapD_execute_first_step_args(args) {
this.pending_query = null;
if (args) {
if (args.pending_query !== undefined && args.pending_query !== null) {
this.pending_query = new ttypes.TPendingQuery(args.pending_query);
}
}
};
MapD_execute_first_step_args.prototype = {};
MapD_execute_first_step_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.pending_query = new ttypes.TPendingQuery();
this.pending_query.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_execute_first_step_args.prototype.write = function (output) {
output.writeStructBegin('MapD_execute_first_step_args');
if (this.pending_query !== null && this.pending_query !== undefined) {
output.writeFieldBegin('pending_query', Thrift.Type.STRUCT, 1);
this.pending_query.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_execute_first_step_result = function MapD_execute_first_step_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TStepResult(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_execute_first_step_result.prototype = {};
MapD_execute_first_step_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TStepResult();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_execute_first_step_result.prototype.write = function (output) {
output.writeStructBegin('MapD_execute_first_step_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_broadcast_serialized_rows_args = function MapD_broadcast_serialized_rows_args(args) {
this.serialized_rows = null;
this.row_desc = null;
this.query_id = null;
if (args) {
if (args.serialized_rows !== undefined && args.serialized_rows !== null) {
this.serialized_rows = args.serialized_rows;
}
if (args.row_desc !== undefined && args.row_desc !== null) {
this.row_desc = Thrift.copyList(args.row_desc, [ttypes.TColumnType]);
}
if (args.query_id !== undefined && args.query_id !== null) {
this.query_id = args.query_id;
}
}
};
MapD_broadcast_serialized_rows_args.prototype = {};
MapD_broadcast_serialized_rows_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.serialized_rows = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.LIST) {
var _size334 = 0;
var _rtmp3338;
this.row_desc = [];
var _etype337 = 0;
_rtmp3338 = input.readListBegin();
_etype337 = _rtmp3338.etype;
_size334 = _rtmp3338.size;
for (var _i339 = 0; _i339 < _size334; ++_i339) {
var elem340 = null;
elem340 = new ttypes.TColumnType();
elem340.read(input);
this.row_desc.push(elem340);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.I64) {
this.query_id = input.readI64();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_broadcast_serialized_rows_args.prototype.write = function (output) {
output.writeStructBegin('MapD_broadcast_serialized_rows_args');
if (this.serialized_rows !== null && this.serialized_rows !== undefined) {
output.writeFieldBegin('serialized_rows', Thrift.Type.STRING, 1);
output.writeString(this.serialized_rows);
output.writeFieldEnd();
}
if (this.row_desc !== null && this.row_desc !== undefined) {
output.writeFieldBegin('row_desc', Thrift.Type.LIST, 2);
output.writeListBegin(Thrift.Type.STRUCT, this.row_desc.length);
for (var iter341 in this.row_desc) {
if (this.row_desc.hasOwnProperty(iter341)) {
iter341 = this.row_desc[iter341];
iter341.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.query_id !== null && this.query_id !== undefined) {
output.writeFieldBegin('query_id', Thrift.Type.I64, 3);
output.writeI64(this.query_id);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_broadcast_serialized_rows_result = function MapD_broadcast_serialized_rows_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_broadcast_serialized_rows_result.prototype = {};
MapD_broadcast_serialized_rows_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_broadcast_serialized_rows_result.prototype.write = function (output) {
output.writeStructBegin('MapD_broadcast_serialized_rows_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_render_vega_raw_pixels_args = function MapD_render_vega_raw_pixels_args(args) {
this.session = null;
this.widget_id = null;
this.node_idx = null;
this.vega_json = null;
this.nonce = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.widget_id !== undefined && args.widget_id !== null) {
this.widget_id = args.widget_id;
}
if (args.node_idx !== undefined && args.node_idx !== null) {
this.node_idx = args.node_idx;
}
if (args.vega_json !== undefined && args.vega_json !== null) {
this.vega_json = args.vega_json;
}
if (args.nonce !== undefined && args.nonce !== null) {
this.nonce = args.nonce;
}
}
};
MapD_render_vega_raw_pixels_args.prototype = {};
MapD_render_vega_raw_pixels_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.I64) {
this.widget_id = input.readI64();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.I16) {
this.node_idx = input.readI16();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRING) {
this.vega_json = input.readString();
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.STRING) {
this.nonce = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_render_vega_raw_pixels_args.prototype.write = function (output) {
output.writeStructBegin('MapD_render_vega_raw_pixels_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.widget_id !== null && this.widget_id !== undefined) {
output.writeFieldBegin('widget_id', Thrift.Type.I64, 2);
output.writeI64(this.widget_id);
output.writeFieldEnd();
}
if (this.node_idx !== null && this.node_idx !== undefined) {
output.writeFieldBegin('node_idx', Thrift.Type.I16, 3);
output.writeI16(this.node_idx);
output.writeFieldEnd();
}
if (this.vega_json !== null && this.vega_json !== undefined) {
output.writeFieldBegin('vega_json', Thrift.Type.STRING, 4);
output.writeString(this.vega_json);
output.writeFieldEnd();
}
if (this.nonce !== null && this.nonce !== undefined) {
output.writeFieldBegin('nonce', Thrift.Type.STRING, 5);
output.writeString(this.nonce);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_render_vega_raw_pixels_result = function MapD_render_vega_raw_pixels_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TRawPixelDataResult(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_render_vega_raw_pixels_result.prototype = {};
MapD_render_vega_raw_pixels_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TRawPixelDataResult();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_render_vega_raw_pixels_result.prototype.write = function (output) {
output.writeStructBegin('MapD_render_vega_raw_pixels_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_insert_data_args = function MapD_insert_data_args(args) {
this.session = null;
this.insert_data = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.insert_data !== undefined && args.insert_data !== null) {
this.insert_data = new ttypes.TInsertData(args.insert_data);
}
}
};
MapD_insert_data_args.prototype = {};
MapD_insert_data_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.insert_data = new ttypes.TInsertData();
this.insert_data.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_insert_data_args.prototype.write = function (output) {
output.writeStructBegin('MapD_insert_data_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.insert_data !== null && this.insert_data !== undefined) {
output.writeFieldBegin('insert_data', Thrift.Type.STRUCT, 2);
this.insert_data.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_insert_data_result = function MapD_insert_data_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_insert_data_result.prototype = {};
MapD_insert_data_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_insert_data_result.prototype.write = function (output) {
output.writeStructBegin('MapD_insert_data_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_checkpoint_args = function MapD_checkpoint_args(args) {
this.session = null;
this.db_id = null;
this.table_id = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.db_id !== undefined && args.db_id !== null) {
this.db_id = args.db_id;
}
if (args.table_id !== undefined && args.table_id !== null) {
this.table_id = args.table_id;
}
}
};
MapD_checkpoint_args.prototype = {};
MapD_checkpoint_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.I32) {
this.db_id = input.readI32();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.I32) {
this.table_id = input.readI32();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_checkpoint_args.prototype.write = function (output) {
output.writeStructBegin('MapD_checkpoint_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.db_id !== null && this.db_id !== undefined) {
output.writeFieldBegin('db_id', Thrift.Type.I32, 2);
output.writeI32(this.db_id);
output.writeFieldEnd();
}
if (this.table_id !== null && this.table_id !== undefined) {
output.writeFieldBegin('table_id', Thrift.Type.I32, 3);
output.writeI32(this.table_id);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_checkpoint_result = function MapD_checkpoint_result(args) {
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_checkpoint_result.prototype = {};
MapD_checkpoint_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_checkpoint_result.prototype.write = function (output) {
output.writeStructBegin('MapD_checkpoint_result');
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_table_descriptor_args = function MapD_get_table_descriptor_args(args) {
this.session = null;
this.table_name = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.table_name !== undefined && args.table_name !== null) {
this.table_name = args.table_name;
}
}
};
MapD_get_table_descriptor_args.prototype = {};
MapD_get_table_descriptor_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.table_name = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_table_descriptor_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_table_descriptor_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.table_name !== null && this.table_name !== undefined) {
output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);
output.writeString(this.table_name);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_table_descriptor_result = function MapD_get_table_descriptor_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyMap(args.success, [ttypes.TColumnType]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_table_descriptor_result.prototype = {};
MapD_get_table_descriptor_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.MAP) {
var _size342 = 0;
var _rtmp3346;
this.success = {};
var _ktype343 = 0;
var _vtype344 = 0;
_rtmp3346 = input.readMapBegin();
_ktype343 = _rtmp3346.ktype;
_vtype344 = _rtmp3346.vtype;
_size342 = _rtmp3346.size;
for (var _i347 = 0; _i347 < _size342; ++_i347) {
var key348 = null;
var val349 = null;
key348 = input.readString();
val349 = new ttypes.TColumnType();
val349.read(input);
this.success[key348] = val349;
}
input.readMapEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_table_descriptor_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_table_descriptor_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.MAP, 0);
output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.success));
for (var kiter350 in this.success) {
if (this.success.hasOwnProperty(kiter350)) {
var viter351 = this.success[kiter350];
output.writeString(kiter350);
viter351.write(output);
}
}
output.writeMapEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_row_descriptor_args = function MapD_get_row_descriptor_args(args) {
this.session = null;
this.table_name = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.table_name !== undefined && args.table_name !== null) {
this.table_name = args.table_name;
}
}
};
MapD_get_row_descriptor_args.prototype = {};
MapD_get_row_descriptor_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.table_name = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_row_descriptor_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_row_descriptor_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.table_name !== null && this.table_name !== undefined) {
output.writeFieldBegin('table_name', Thrift.Type.STRING, 2);
output.writeString(this.table_name);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_row_descriptor_result = function MapD_get_row_descriptor_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.TColumnType]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_row_descriptor_result.prototype = {};
MapD_get_row_descriptor_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size352 = 0;
var _rtmp3356;
this.success = [];
var _etype355 = 0;
_rtmp3356 = input.readListBegin();
_etype355 = _rtmp3356.etype;
_size352 = _rtmp3356.size;
for (var _i357 = 0; _i357 < _size352; ++_i357) {
var elem358 = null;
elem358 = new ttypes.TColumnType();
elem358.read(input);
this.success.push(elem358);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_row_descriptor_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_row_descriptor_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
for (var iter359 in this.success) {
if (this.success.hasOwnProperty(iter359)) {
iter359 = this.success[iter359];
iter359.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_role_args = function MapD_get_role_args(args) {
this.session = null;
this.roleName = null;
this.userPrivateRole = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.roleName !== undefined && args.roleName !== null) {
this.roleName = args.roleName;
}
if (args.userPrivateRole !== undefined && args.userPrivateRole !== null) {
this.userPrivateRole = args.userPrivateRole;
}
}
};
MapD_get_role_args.prototype = {};
MapD_get_role_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.roleName = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.BOOL) {
this.userPrivateRole = input.readBool();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_role_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_role_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.roleName !== null && this.roleName !== undefined) {
output.writeFieldBegin('roleName', Thrift.Type.STRING, 2);
output.writeString(this.roleName);
output.writeFieldEnd();
}
if (this.userPrivateRole !== null && this.userPrivateRole !== undefined) {
output.writeFieldBegin('userPrivateRole', Thrift.Type.BOOL, 3);
output.writeBool(this.userPrivateRole);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_role_result = function MapD_get_role_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_role_result.prototype = {};
MapD_get_role_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size360 = 0;
var _rtmp3364;
this.success = [];
var _etype363 = 0;
_rtmp3364 = input.readListBegin();
_etype363 = _rtmp3364.etype;
_size360 = _rtmp3364.size;
for (var _i365 = 0; _i365 < _size360; ++_i365) {
var elem366 = null;
elem366 = input.readString();
this.success.push(elem366);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_role_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_role_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRING, this.success.length);
for (var iter367 in this.success) {
if (this.success.hasOwnProperty(iter367)) {
iter367 = this.success[iter367];
output.writeString(iter367);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_all_roles_args = function MapD_get_all_roles_args(args) {
this.session = null;
this.userPrivateRole = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.userPrivateRole !== undefined && args.userPrivateRole !== null) {
this.userPrivateRole = args.userPrivateRole;
}
}
};
MapD_get_all_roles_args.prototype = {};
MapD_get_all_roles_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.BOOL) {
this.userPrivateRole = input.readBool();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_all_roles_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_all_roles_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.userPrivateRole !== null && this.userPrivateRole !== undefined) {
output.writeFieldBegin('userPrivateRole', Thrift.Type.BOOL, 2);
output.writeBool(this.userPrivateRole);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_all_roles_result = function MapD_get_all_roles_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_all_roles_result.prototype = {};
MapD_get_all_roles_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size368 = 0;
var _rtmp3372;
this.success = [];
var _etype371 = 0;
_rtmp3372 = input.readListBegin();
_etype371 = _rtmp3372.etype;
_size368 = _rtmp3372.size;
for (var _i373 = 0; _i373 < _size368; ++_i373) {
var elem374 = null;
elem374 = input.readString();
this.success.push(elem374);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_all_roles_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_all_roles_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRING, this.success.length);
for (var iter375 in this.success) {
if (this.success.hasOwnProperty(iter375)) {
iter375 = this.success[iter375];
output.writeString(iter375);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_db_object_privileges_for_role_args = function MapD_get_db_object_privileges_for_role_args(args) {
this.session = null;
this.roleName = null;
this.objectType = null;
this.objectName = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.roleName !== undefined && args.roleName !== null) {
this.roleName = args.roleName;
}
if (args.objectType !== undefined && args.objectType !== null) {
this.objectType = args.objectType;
}
if (args.objectName !== undefined && args.objectName !== null) {
this.objectName = args.objectName;
}
}
};
MapD_get_db_object_privileges_for_role_args.prototype = {};
MapD_get_db_object_privileges_for_role_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.roleName = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.I16) {
this.objectType = input.readI16();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRING) {
this.objectName = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_db_object_privileges_for_role_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_db_object_privileges_for_role_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.roleName !== null && this.roleName !== undefined) {
output.writeFieldBegin('roleName', Thrift.Type.STRING, 2);
output.writeString(this.roleName);
output.writeFieldEnd();
}
if (this.objectType !== null && this.objectType !== undefined) {
output.writeFieldBegin('objectType', Thrift.Type.I16, 3);
output.writeI16(this.objectType);
output.writeFieldEnd();
}
if (this.objectName !== null && this.objectName !== undefined) {
output.writeFieldBegin('objectName', Thrift.Type.STRING, 4);
output.writeString(this.objectName);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_db_object_privileges_for_role_result = function MapD_get_db_object_privileges_for_role_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.TAccessPrivileges]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_db_object_privileges_for_role_result.prototype = {};
MapD_get_db_object_privileges_for_role_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size376 = 0;
var _rtmp3380;
this.success = [];
var _etype379 = 0;
_rtmp3380 = input.readListBegin();
_etype379 = _rtmp3380.etype;
_size376 = _rtmp3380.size;
for (var _i381 = 0; _i381 < _size376; ++_i381) {
var elem382 = null;
elem382 = new ttypes.TAccessPrivileges();
elem382.read(input);
this.success.push(elem382);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_db_object_privileges_for_role_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_db_object_privileges_for_role_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
for (var iter383 in this.success) {
if (this.success.hasOwnProperty(iter383)) {
iter383 = this.success[iter383];
iter383.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_db_objects_for_role_args = function MapD_get_db_objects_for_role_args(args) {
this.session = null;
this.roleName = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.roleName !== undefined && args.roleName !== null) {
this.roleName = args.roleName;
}
}
};
MapD_get_db_objects_for_role_args.prototype = {};
MapD_get_db_objects_for_role_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.roleName = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_db_objects_for_role_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_db_objects_for_role_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.roleName !== null && this.roleName !== undefined) {
output.writeFieldBegin('roleName', Thrift.Type.STRING, 2);
output.writeString(this.roleName);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_db_objects_for_role_result = function MapD_get_db_objects_for_role_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.TDBObject]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_db_objects_for_role_result.prototype = {};
MapD_get_db_objects_for_role_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size384 = 0;
var _rtmp3388;
this.success = [];
var _etype387 = 0;
_rtmp3388 = input.readListBegin();
_etype387 = _rtmp3388.etype;
_size384 = _rtmp3388.size;
for (var _i389 = 0; _i389 < _size384; ++_i389) {
var elem390 = null;
elem390 = new ttypes.TDBObject();
elem390.read(input);
this.success.push(elem390);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_db_objects_for_role_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_db_objects_for_role_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
for (var iter391 in this.success) {
if (this.success.hasOwnProperty(iter391)) {
iter391 = this.success[iter391];
iter391.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_db_object_privs_args = function MapD_get_db_object_privs_args(args) {
this.session = null;
this.objectName = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.objectName !== undefined && args.objectName !== null) {
this.objectName = args.objectName;
}
}
};
MapD_get_db_object_privs_args.prototype = {};
MapD_get_db_object_privs_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.objectName = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_db_object_privs_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_db_object_privs_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.objectName !== null && this.objectName !== undefined) {
output.writeFieldBegin('objectName', Thrift.Type.STRING, 2);
output.writeString(this.objectName);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_db_object_privs_result = function MapD_get_db_object_privs_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.TDBObject]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_db_object_privs_result.prototype = {};
MapD_get_db_object_privs_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size392 = 0;
var _rtmp3396;
this.success = [];
var _etype395 = 0;
_rtmp3396 = input.readListBegin();
_etype395 = _rtmp3396.etype;
_size392 = _rtmp3396.size;
for (var _i397 = 0; _i397 < _size392; ++_i397) {
var elem398 = null;
elem398 = new ttypes.TDBObject();
elem398.read(input);
this.success.push(elem398);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_db_object_privs_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_db_object_privs_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
for (var iter399 in this.success) {
if (this.success.hasOwnProperty(iter399)) {
iter399 = this.success[iter399];
iter399.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_all_roles_for_user_args = function MapD_get_all_roles_for_user_args(args) {
this.session = null;
this.userName = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.userName !== undefined && args.userName !== null) {
this.userName = args.userName;
}
}
};
MapD_get_all_roles_for_user_args.prototype = {};
MapD_get_all_roles_for_user_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.userName = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_all_roles_for_user_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_all_roles_for_user_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.userName !== null && this.userName !== undefined) {
output.writeFieldBegin('userName', Thrift.Type.STRING, 2);
output.writeString(this.userName);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_all_roles_for_user_result = function MapD_get_all_roles_for_user_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [null]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_all_roles_for_user_result.prototype = {};
MapD_get_all_roles_for_user_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size400 = 0;
var _rtmp3404;
this.success = [];
var _etype403 = 0;
_rtmp3404 = input.readListBegin();
_etype403 = _rtmp3404.etype;
_size400 = _rtmp3404.size;
for (var _i405 = 0; _i405 < _size400; ++_i405) {
var elem406 = null;
elem406 = input.readString();
this.success.push(elem406);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_all_roles_for_user_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_all_roles_for_user_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRING, this.success.length);
for (var iter407 in this.success) {
if (this.success.hasOwnProperty(iter407)) {
iter407 = this.success[iter407];
output.writeString(iter407);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_db_object_privileges_for_user_args = function MapD_get_db_object_privileges_for_user_args(args) {
this.session = null;
this.userName = null;
this.objectType = null;
this.objectName = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.userName !== undefined && args.userName !== null) {
this.userName = args.userName;
}
if (args.objectType !== undefined && args.objectType !== null) {
this.objectType = args.objectType;
}
if (args.objectName !== undefined && args.objectName !== null) {
this.objectName = args.objectName;
}
}
};
MapD_get_db_object_privileges_for_user_args.prototype = {};
MapD_get_db_object_privileges_for_user_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.userName = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.I16) {
this.objectType = input.readI16();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRING) {
this.objectName = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_db_object_privileges_for_user_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_db_object_privileges_for_user_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.userName !== null && this.userName !== undefined) {
output.writeFieldBegin('userName', Thrift.Type.STRING, 2);
output.writeString(this.userName);
output.writeFieldEnd();
}
if (this.objectType !== null && this.objectType !== undefined) {
output.writeFieldBegin('objectType', Thrift.Type.I16, 3);
output.writeI16(this.objectType);
output.writeFieldEnd();
}
if (this.objectName !== null && this.objectName !== undefined) {
output.writeFieldBegin('objectName', Thrift.Type.STRING, 4);
output.writeString(this.objectName);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_db_object_privileges_for_user_result = function MapD_get_db_object_privileges_for_user_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.TAccessPrivileges]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_db_object_privileges_for_user_result.prototype = {};
MapD_get_db_object_privileges_for_user_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size408 = 0;
var _rtmp3412;
this.success = [];
var _etype411 = 0;
_rtmp3412 = input.readListBegin();
_etype411 = _rtmp3412.etype;
_size408 = _rtmp3412.size;
for (var _i413 = 0; _i413 < _size408; ++_i413) {
var elem414 = null;
elem414 = new ttypes.TAccessPrivileges();
elem414.read(input);
this.success.push(elem414);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_db_object_privileges_for_user_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_db_object_privileges_for_user_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
for (var iter415 in this.success) {
if (this.success.hasOwnProperty(iter415)) {
iter415 = this.success[iter415];
iter415.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_db_objects_for_user_args = function MapD_get_db_objects_for_user_args(args) {
this.session = null;
this.userName = null;
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.userName !== undefined && args.userName !== null) {
this.userName = args.userName;
}
}
};
MapD_get_db_objects_for_user_args.prototype = {};
MapD_get_db_objects_for_user_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.userName = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_db_objects_for_user_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_db_objects_for_user_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.userName !== null && this.userName !== undefined) {
output.writeFieldBegin('userName', Thrift.Type.STRING, 2);
output.writeString(this.userName);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_db_objects_for_user_result = function MapD_get_db_objects_for_user_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = Thrift.copyList(args.success, [ttypes.TDBObject]);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_db_objects_for_user_result.prototype = {};
MapD_get_db_objects_for_user_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.LIST) {
var _size416 = 0;
var _rtmp3420;
this.success = [];
var _etype419 = 0;
_rtmp3420 = input.readListBegin();
_etype419 = _rtmp3420.etype;
_size416 = _rtmp3420.size;
for (var _i421 = 0; _i421 < _size416; ++_i421) {
var elem422 = null;
elem422 = new ttypes.TDBObject();
elem422.read(input);
this.success.push(elem422);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_db_objects_for_user_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_db_objects_for_user_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.LIST, 0);
output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
for (var iter423 in this.success) {
if (this.success.hasOwnProperty(iter423)) {
iter423 = this.success[iter423];
iter423.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_set_license_key_args = function MapD_set_license_key_args(args) {
this.session = null;
this.key = null;
this.nonce = '';
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.key !== undefined && args.key !== null) {
this.key = args.key;
}
if (args.nonce !== undefined && args.nonce !== null) {
this.nonce = args.nonce;
}
}
};
MapD_set_license_key_args.prototype = {};
MapD_set_license_key_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.key = input.readString();
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.nonce = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_set_license_key_args.prototype.write = function (output) {
output.writeStructBegin('MapD_set_license_key_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.key !== null && this.key !== undefined) {
output.writeFieldBegin('key', Thrift.Type.STRING, 2);
output.writeString(this.key);
output.writeFieldEnd();
}
if (this.nonce !== null && this.nonce !== undefined) {
output.writeFieldBegin('nonce', Thrift.Type.STRING, 3);
output.writeString(this.nonce);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_set_license_key_result = function MapD_set_license_key_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TLicenseInfo(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_set_license_key_result.prototype = {};
MapD_set_license_key_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TLicenseInfo();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_set_license_key_result.prototype.write = function (output) {
output.writeStructBegin('MapD_set_license_key_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_license_claims_args = function MapD_get_license_claims_args(args) {
this.session = null;
this.nonce = '';
if (args) {
if (args.session !== undefined && args.session !== null) {
this.session = args.session;
}
if (args.nonce !== undefined && args.nonce !== null) {
this.nonce = args.nonce;
}
}
};
MapD_get_license_claims_args.prototype = {};
MapD_get_license_claims_args.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.session = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.nonce = input.readString();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_license_claims_args.prototype.write = function (output) {
output.writeStructBegin('MapD_get_license_claims_args');
if (this.session !== null && this.session !== undefined) {
output.writeFieldBegin('session', Thrift.Type.STRING, 1);
output.writeString(this.session);
output.writeFieldEnd();
}
if (this.nonce !== null && this.nonce !== undefined) {
output.writeFieldBegin('nonce', Thrift.Type.STRING, 2);
output.writeString(this.nonce);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapD_get_license_claims_result = function MapD_get_license_claims_result(args) {
this.success = null;
this.e = null;
if (args instanceof ttypes.TMapDException) {
this.e = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TLicenseInfo(args.success);
}
if (args.e !== undefined && args.e !== null) {
this.e = args.e;
}
}
};
MapD_get_license_claims_result.prototype = {};
MapD_get_license_claims_result.prototype.read = function (input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 0:
if (ftype == Thrift.Type.STRUCT) {
this.success = new ttypes.TLicenseInfo();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.e = new ttypes.TMapDException();
this.e.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
MapD_get_license_claims_result.prototype.write = function (output) {
output.writeStructBegin('MapD_get_license_claims_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.e !== null && this.e !== undefined) {
output.writeFieldBegin('e', Thrift.Type.STRUCT, 1);
this.e.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var MapDClient = exports.Client = function (output, pClass) {
this.output = output;
this.pClass = pClass;
this._seqid = 0;
this._reqs = {};
};
MapDClient.prototype = {};
MapDClient.prototype.seqid = function () {
return this._seqid;
};
MapDClient.prototype.new_seqid = function () {
return this._seqid += 1;
};
MapDClient.prototype.connect = function (user, passwd, dbname, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_connect(user, passwd, dbname);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_connect(user, passwd, dbname);
}
};
MapDClient.prototype.send_connect = function (user, passwd, dbname) {
var output = new this.pClass(this.output);
output.writeMessageBegin('connect', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_connect_args();
args.user = user;
args.passwd = passwd;
args.dbname = dbname;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_connect = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_connect_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('connect failed: unknown result');
};
MapDClient.prototype.disconnect = function (session, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_disconnect(session);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_disconnect(session);
}
};
MapDClient.prototype.send_disconnect = function (session) {
var output = new this.pClass(this.output);
output.writeMessageBegin('disconnect', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_disconnect_args();
args.session = session;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_disconnect = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_disconnect_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
MapDClient.prototype.get_server_status = function (session, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_server_status(session);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_server_status(session);
}
};
MapDClient.prototype.send_get_server_status = function (session) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_server_status', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_server_status_args();
args.session = session;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_server_status = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_server_status_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_server_status failed: unknown result');
};
MapDClient.prototype.get_status = function (session, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_status(session);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_status(session);
}
};
MapDClient.prototype.send_get_status = function (session) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_status', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_status_args();
args.session = session;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_status = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_status_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_status failed: unknown result');
};
MapDClient.prototype.get_hardware_info = function (session, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_hardware_info(session);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_hardware_info(session);
}
};
MapDClient.prototype.send_get_hardware_info = function (session) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_hardware_info', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_hardware_info_args();
args.session = session;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_hardware_info = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_hardware_info_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_hardware_info failed: unknown result');
};
MapDClient.prototype.get_tables = function (session, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_tables(session);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_tables(session);
}
};
MapDClient.prototype.send_get_tables = function (session) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_tables', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_tables_args();
args.session = session;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_tables = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_tables_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_tables failed: unknown result');
};
MapDClient.prototype.get_table_details = function (session, table_name, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_table_details(session, table_name);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_table_details(session, table_name);
}
};
MapDClient.prototype.send_get_table_details = function (session, table_name) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_table_details', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_table_details_args();
args.session = session;
args.table_name = table_name;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_table_details = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_table_details_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_table_details failed: unknown result');
};
MapDClient.prototype.get_internal_table_details = function (session, table_name, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_internal_table_details(session, table_name);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_internal_table_details(session, table_name);
}
};
MapDClient.prototype.send_get_internal_table_details = function (session, table_name) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_internal_table_details', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_internal_table_details_args();
args.session = session;
args.table_name = table_name;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_internal_table_details = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_internal_table_details_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_internal_table_details failed: unknown result');
};
MapDClient.prototype.get_users = function (session, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_users(session);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_users(session);
}
};
MapDClient.prototype.send_get_users = function (session) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_users', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_users_args();
args.session = session;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_users = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_users_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_users failed: unknown result');
};
MapDClient.prototype.get_databases = function (session, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_databases(session);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_databases(session);
}
};
MapDClient.prototype.send_get_databases = function (session) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_databases', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_databases_args();
args.session = session;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_databases = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_databases_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_databases failed: unknown result');
};
MapDClient.prototype.get_version = function (callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_version();
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_version();
}
};
MapDClient.prototype.send_get_version = function () {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_version', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_version_args();
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_version = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_version_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_version failed: unknown result');
};
MapDClient.prototype.start_heap_profile = function (session, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_start_heap_profile(session);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_start_heap_profile(session);
}
};
MapDClient.prototype.send_start_heap_profile = function (session) {
var output = new this.pClass(this.output);
output.writeMessageBegin('start_heap_profile', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_start_heap_profile_args();
args.session = session;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_start_heap_profile = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_start_heap_profile_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
MapDClient.prototype.stop_heap_profile = function (session, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_stop_heap_profile(session);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_stop_heap_profile(session);
}
};
MapDClient.prototype.send_stop_heap_profile = function (session) {
var output = new this.pClass(this.output);
output.writeMessageBegin('stop_heap_profile', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_stop_heap_profile_args();
args.session = session;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_stop_heap_profile = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_stop_heap_profile_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
MapDClient.prototype.get_heap_profile = function (session, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_heap_profile(session);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_heap_profile(session);
}
};
MapDClient.prototype.send_get_heap_profile = function (session) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_heap_profile', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_heap_profile_args();
args.session = session;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_heap_profile = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_heap_profile_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_heap_profile failed: unknown result');
};
MapDClient.prototype.get_memory = function (session, memory_level, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_memory(session, memory_level);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_memory(session, memory_level);
}
};
MapDClient.prototype.send_get_memory = function (session, memory_level) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_memory', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_memory_args();
args.session = session;
args.memory_level = memory_level;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_memory = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_memory_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_memory failed: unknown result');
};
MapDClient.prototype.clear_cpu_memory = function (session, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_clear_cpu_memory(session);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_clear_cpu_memory(session);
}
};
MapDClient.prototype.send_clear_cpu_memory = function (session) {
var output = new this.pClass(this.output);
output.writeMessageBegin('clear_cpu_memory', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_clear_cpu_memory_args();
args.session = session;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_clear_cpu_memory = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_clear_cpu_memory_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
MapDClient.prototype.clear_gpu_memory = function (session, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_clear_gpu_memory(session);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_clear_gpu_memory(session);
}
};
MapDClient.prototype.send_clear_gpu_memory = function (session) {
var output = new this.pClass(this.output);
output.writeMessageBegin('clear_gpu_memory', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_clear_gpu_memory_args();
args.session = session;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_clear_gpu_memory = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_clear_gpu_memory_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
MapDClient.prototype.set_table_epoch = function (session, db_id, table_id, new_epoch, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_set_table_epoch(session, db_id, table_id, new_epoch);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_set_table_epoch(session, db_id, table_id, new_epoch);
}
};
MapDClient.prototype.send_set_table_epoch = function (session, db_id, table_id, new_epoch) {
var output = new this.pClass(this.output);
output.writeMessageBegin('set_table_epoch', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_set_table_epoch_args();
args.session = session;
args.db_id = db_id;
args.table_id = table_id;
args.new_epoch = new_epoch;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_set_table_epoch = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_set_table_epoch_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
MapDClient.prototype.get_table_epoch = function (session, db_id, table_id, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_table_epoch(session, db_id, table_id);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_table_epoch(session, db_id, table_id);
}
};
MapDClient.prototype.send_get_table_epoch = function (session, db_id, table_id) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_table_epoch', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_table_epoch_args();
args.session = session;
args.db_id = db_id;
args.table_id = table_id;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_table_epoch = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_table_epoch_result();
result.read(input);
input.readMessageEnd();
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_table_epoch failed: unknown result');
};
MapDClient.prototype.sql_execute = function (session, query, column_format, nonce, first_n, at_most_n, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_sql_execute(session, query, column_format, nonce, first_n, at_most_n);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_sql_execute(session, query, column_format, nonce, first_n, at_most_n);
}
};
MapDClient.prototype.send_sql_execute = function (session, query, column_format, nonce, first_n, at_most_n) {
var output = new this.pClass(this.output);
output.writeMessageBegin('sql_execute', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_sql_execute_args();
args.session = session;
args.query = query;
args.column_format = column_format;
args.nonce = nonce;
args.first_n = first_n;
args.at_most_n = at_most_n;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_sql_execute = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_sql_execute_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('sql_execute failed: unknown result');
};
MapDClient.prototype.sql_execute_df = function (session, query, device_type, device_id, first_n, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_sql_execute_df(session, query, device_type, device_id, first_n);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_sql_execute_df(session, query, device_type, device_id, first_n);
}
};
MapDClient.prototype.send_sql_execute_df = function (session, query, device_type, device_id, first_n) {
var output = new this.pClass(this.output);
output.writeMessageBegin('sql_execute_df', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_sql_execute_df_args();
args.session = session;
args.query = query;
args.device_type = device_type;
args.device_id = device_id;
args.first_n = first_n;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_sql_execute_df = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_sql_execute_df_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('sql_execute_df failed: unknown result');
};
MapDClient.prototype.sql_execute_gdf = function (session, query, device_id, first_n, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_sql_execute_gdf(session, query, device_id, first_n);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_sql_execute_gdf(session, query, device_id, first_n);
}
};
MapDClient.prototype.send_sql_execute_gdf = function (session, query, device_id, first_n) {
var output = new this.pClass(this.output);
output.writeMessageBegin('sql_execute_gdf', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_sql_execute_gdf_args();
args.session = session;
args.query = query;
args.device_id = device_id;
args.first_n = first_n;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_sql_execute_gdf = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_sql_execute_gdf_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('sql_execute_gdf failed: unknown result');
};
MapDClient.prototype.deallocate_df = function (session, df, device_type, device_id, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_deallocate_df(session, df, device_type, device_id);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_deallocate_df(session, df, device_type, device_id);
}
};
MapDClient.prototype.send_deallocate_df = function (session, df, device_type, device_id) {
var output = new this.pClass(this.output);
output.writeMessageBegin('deallocate_df', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_deallocate_df_args();
args.session = session;
args.df = df;
args.device_type = device_type;
args.device_id = device_id;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_deallocate_df = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_deallocate_df_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
MapDClient.prototype.interrupt = function (session, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_interrupt(session);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_interrupt(session);
}
};
MapDClient.prototype.send_interrupt = function (session) {
var output = new this.pClass(this.output);
output.writeMessageBegin('interrupt', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_interrupt_args();
args.session = session;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_interrupt = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_interrupt_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
MapDClient.prototype.sql_validate = function (session, query, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_sql_validate(session, query);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_sql_validate(session, query);
}
};
MapDClient.prototype.send_sql_validate = function (session, query) {
var output = new this.pClass(this.output);
output.writeMessageBegin('sql_validate', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_sql_validate_args();
args.session = session;
args.query = query;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_sql_validate = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_sql_validate_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('sql_validate failed: unknown result');
};
MapDClient.prototype.get_completion_hints = function (session, sql, cursor, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_completion_hints(session, sql, cursor);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_completion_hints(session, sql, cursor);
}
};
MapDClient.prototype.send_get_completion_hints = function (session, sql, cursor) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_completion_hints', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_completion_hints_args();
args.session = session;
args.sql = sql;
args.cursor = cursor;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_completion_hints = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_completion_hints_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_completion_hints failed: unknown result');
};
MapDClient.prototype.set_execution_mode = function (session, mode, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_set_execution_mode(session, mode);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_set_execution_mode(session, mode);
}
};
MapDClient.prototype.send_set_execution_mode = function (session, mode) {
var output = new this.pClass(this.output);
output.writeMessageBegin('set_execution_mode', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_set_execution_mode_args();
args.session = session;
args.mode = mode;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_set_execution_mode = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_set_execution_mode_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
MapDClient.prototype.render_vega = function (session, widget_id, vega_json, compression_level, nonce, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_render_vega(session, widget_id, vega_json, compression_level, nonce);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_render_vega(session, widget_id, vega_json, compression_level, nonce);
}
};
MapDClient.prototype.send_render_vega = function (session, widget_id, vega_json, compression_level, nonce) {
var output = new this.pClass(this.output);
output.writeMessageBegin('render_vega', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_render_vega_args();
args.session = session;
args.widget_id = widget_id;
args.vega_json = vega_json;
args.compression_level = compression_level;
args.nonce = nonce;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_render_vega = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_render_vega_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('render_vega failed: unknown result');
};
MapDClient.prototype.get_result_row_for_pixel = function (session, widget_id, pixel, table_col_names, column_format, pixelRadius, nonce, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_result_row_for_pixel(session, widget_id, pixel, table_col_names, column_format, pixelRadius, nonce);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_result_row_for_pixel(session, widget_id, pixel, table_col_names, column_format, pixelRadius, nonce);
}
};
MapDClient.prototype.send_get_result_row_for_pixel = function (session, widget_id, pixel, table_col_names, column_format, pixelRadius, nonce) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_result_row_for_pixel', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_result_row_for_pixel_args();
args.session = session;
args.widget_id = widget_id;
args.pixel = pixel;
args.table_col_names = table_col_names;
args.column_format = column_format;
args.pixelRadius = pixelRadius;
args.nonce = nonce;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_result_row_for_pixel = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_result_row_for_pixel_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_result_row_for_pixel failed: unknown result');
};
MapDClient.prototype.get_frontend_view = function (session, view_name, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_frontend_view(session, view_name);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_frontend_view(session, view_name);
}
};
MapDClient.prototype.send_get_frontend_view = function (session, view_name) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_frontend_view', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_frontend_view_args();
args.session = session;
args.view_name = view_name;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_frontend_view = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_frontend_view_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_frontend_view failed: unknown result');
};
MapDClient.prototype.get_frontend_views = function (session, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_frontend_views(session);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_frontend_views(session);
}
};
MapDClient.prototype.send_get_frontend_views = function (session) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_frontend_views', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_frontend_views_args();
args.session = session;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_frontend_views = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_frontend_views_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_frontend_views failed: unknown result');
};
MapDClient.prototype.create_frontend_view = function (session, view_name, view_state, image_hash, view_metadata, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_create_frontend_view(session, view_name, view_state, image_hash, view_metadata);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_create_frontend_view(session, view_name, view_state, image_hash, view_metadata);
}
};
MapDClient.prototype.send_create_frontend_view = function (session, view_name, view_state, image_hash, view_metadata) {
var output = new this.pClass(this.output);
output.writeMessageBegin('create_frontend_view', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_create_frontend_view_args();
args.session = session;
args.view_name = view_name;
args.view_state = view_state;
args.image_hash = image_hash;
args.view_metadata = view_metadata;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_create_frontend_view = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_create_frontend_view_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
MapDClient.prototype.delete_frontend_view = function (session, view_name, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_delete_frontend_view(session, view_name);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_delete_frontend_view(session, view_name);
}
};
MapDClient.prototype.send_delete_frontend_view = function (session, view_name) {
var output = new this.pClass(this.output);
output.writeMessageBegin('delete_frontend_view', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_delete_frontend_view_args();
args.session = session;
args.view_name = view_name;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_delete_frontend_view = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_delete_frontend_view_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
MapDClient.prototype.get_link_view = function (session, link, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_get_link_view(session, link);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_get_link_view(session, link);
}
};
MapDClient.prototype.send_get_link_view = function (session, link) {
var output = new this.pClass(this.output);
output.writeMessageBegin('get_link_view', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_get_link_view_args();
args.session = session;
args.link = link;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_get_link_view = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_get_link_view_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('get_link_view failed: unknown result');
};
MapDClient.prototype.create_link = function (session, view_state, view_metadata, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_create_link(session, view_state, view_metadata);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_create_link(session, view_state, view_metadata);
}
};
MapDClient.prototype.send_create_link = function (session, view_state, view_metadata) {
var output = new this.pClass(this.output);
output.writeMessageBegin('create_link', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_create_link_args();
args.session = session;
args.view_state = view_state;
args.view_metadata = view_metadata;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_create_link = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_create_link_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
if (null !== result.success) {
return callback(null, result.success);
}
return callback('create_link failed: unknown result');
};
MapDClient.prototype.load_table_binary = function (session, table_name, rows, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result) {
if (error) {
_defer.reject(error);
} else {
_defer.resolve(result);
}
};
this.send_load_table_binary(session, table_name, rows);
return _defer.promise;
} else {
this._reqs[this.seqid()] = callback;
this.send_load_table_binary(session, table_name, rows);
}
};
MapDClient.prototype.send_load_table_binary = function (session, table_name, rows) {
var output = new this.pClass(this.output);
output.writeMessageBegin('load_table_binary', Thrift.MessageType.CALL, this.seqid());
var args = new MapD_load_table_binary_args();
args.session = session;
args.table_name = table_name;
args.rows = rows;
args.write(output);
output.writeMessageEnd();
return this.output.flush();
};
MapDClient.prototype.recv_load_table_binary = function (input, mtype, rseqid) {
var callback = this._reqs[rseqid] || function () {};
delete this._reqs[rseqid];
if (mtype == Thrift.MessageType.EXCEPTION) {
var x = new Thrift.TApplicationException();
x.read(input);
input.readMessageEnd();
return callback(x);
}
var result = new MapD_load_table_binary_result();
result.read(input);
input.readMessageEnd();
if (null !== result.e) {
return callback(result.e);
}
callback(null);
};
MapDClient.prototype.load_table_binary_columnar = function (session, table_name, cols, callback) {
this._seqid = this.new_seqid();
if (callback === undefined) {
var _defer = Q.defer();
this._reqs[this.seqid()] = function (error, result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment