nosqldb-oraclejs
Version:
Oracle NoSQL Database JS Driver
1,917 lines (1,868 loc) • 374 kB
JavaScript
//
// Autogenerated by Thrift Compiler (0.12.0)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
"use strict";
var thrift = require('thrift');
var Thrift = thrift.Thrift;
var Q = thrift.Q;
var ttypes = require('./ondb_types');
//HELPER FUNCTIONS AND STRUCTURES
var ONDB_ping_args = function(args) {
};
ONDB_ping_args.prototype = {};
ONDB_ping_args.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var ftype = ret.ftype;
if (ftype == Thrift.Type.STOP) {
break;
}
input.skip(ftype);
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_ping_args.prototype.write = function(output) {
output.writeStructBegin('ONDB_ping_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_ping_result = function(args) {
};
ONDB_ping_result.prototype = {};
ONDB_ping_result.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var ftype = ret.ftype;
if (ftype == Thrift.Type.STOP) {
break;
}
input.skip(ftype);
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_ping_result.prototype.write = function(output) {
output.writeStructBegin('ONDB_ping_result');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_version_args = function(args) {
this.whichModule = null;
if (args) {
if (args.whichModule !== undefined && args.whichModule !== null) {
this.whichModule = args.whichModule;
}
}
};
ONDB_version_args.prototype = {};
ONDB_version_args.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.I32) {
this.whichModule = input.readI32();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_version_args.prototype.write = function(output) {
output.writeStructBegin('ONDB_version_args');
if (this.whichModule !== null && this.whichModule !== undefined) {
output.writeFieldBegin('whichModule', Thrift.Type.I32, 1);
output.writeI32(this.whichModule);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_version_result = function(args) {
this.success = null;
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
}
};
ONDB_version_result.prototype = {};
ONDB_version_result.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
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 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_version_result.prototype.write = function(output) {
output.writeStructBegin('ONDB_version_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRING, 0);
output.writeString(this.success);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_status_args = function(args) {
this.whichModule = null;
if (args) {
if (args.whichModule !== undefined && args.whichModule !== null) {
this.whichModule = args.whichModule;
}
}
};
ONDB_status_args.prototype = {};
ONDB_status_args.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.I32) {
this.whichModule = input.readI32();
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_status_args.prototype.write = function(output) {
output.writeStructBegin('ONDB_status_args');
if (this.whichModule !== null && this.whichModule !== undefined) {
output.writeFieldBegin('whichModule', Thrift.Type.I32, 1);
output.writeI32(this.whichModule);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_status_result = function(args) {
this.success = null;
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = args.success;
}
}
};
ONDB_status_result.prototype = {};
ONDB_status_result.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
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 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_status_result.prototype.write = function(output) {
output.writeStructBegin('ONDB_status_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRING, 0);
output.writeString(this.success);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_shutdown_args = function(args) {
};
ONDB_shutdown_args.prototype = {};
ONDB_shutdown_args.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var ftype = ret.ftype;
if (ftype == Thrift.Type.STOP) {
break;
}
input.skip(ftype);
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_shutdown_args.prototype.write = function(output) {
output.writeStructBegin('ONDB_shutdown_args');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_shutdown_result = function(args) {
};
ONDB_shutdown_result.prototype = {};
ONDB_shutdown_result.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var ftype = ret.ftype;
if (ftype == Thrift.Type.STOP) {
break;
}
input.skip(ftype);
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_shutdown_result.prototype.write = function(output) {
output.writeStructBegin('ONDB_shutdown_result');
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_verify_args = function(args) {
this.properties = null;
if (args) {
if (args.properties !== undefined && args.properties !== null) {
this.properties = new ttypes.TVerifyProperties(args.properties);
}
}
};
ONDB_verify_args.prototype = {};
ONDB_verify_args.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.properties = new ttypes.TVerifyProperties();
this.properties.read(input);
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_verify_args.prototype.write = function(output) {
output.writeStructBegin('ONDB_verify_args');
if (this.properties !== null && this.properties !== undefined) {
output.writeFieldBegin('properties', Thrift.Type.STRUCT, 1);
this.properties.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_verify_result = function(args) {
this.success = null;
this.uve = null;
if (args instanceof ttypes.TUnverifiedConnectionException) {
this.uve = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TVerifyResult(args.success);
}
if (args.uve !== undefined && args.uve !== null) {
this.uve = args.uve;
}
}
};
ONDB_verify_result.prototype = {};
ONDB_verify_result.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
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.TVerifyResult();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.uve = new ttypes.TUnverifiedConnectionException();
this.uve.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_verify_result.prototype.write = function(output) {
output.writeStructBegin('ONDB_verify_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.uve !== null && this.uve !== undefined) {
output.writeFieldBegin('uve', Thrift.Type.STRUCT, 1);
this.uve.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_put_args = function(args) {
this.tableName = null;
this.row = null;
this.writeOptions = null;
if (args) {
if (args.tableName !== undefined && args.tableName !== null) {
this.tableName = args.tableName;
}
if (args.row !== undefined && args.row !== null) {
this.row = new ttypes.TRow(args.row);
}
if (args.writeOptions !== undefined && args.writeOptions !== null) {
this.writeOptions = new ttypes.TWriteOptions(args.writeOptions);
}
}
};
ONDB_put_args.prototype = {};
ONDB_put_args.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.tableName = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.row = new ttypes.TRow();
this.row.read(input);
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRUCT) {
this.writeOptions = new ttypes.TWriteOptions();
this.writeOptions.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_put_args.prototype.write = function(output) {
output.writeStructBegin('ONDB_put_args');
if (this.tableName !== null && this.tableName !== undefined) {
output.writeFieldBegin('tableName', Thrift.Type.STRING, 1);
output.writeString(this.tableName);
output.writeFieldEnd();
}
if (this.row !== null && this.row !== undefined) {
output.writeFieldBegin('row', Thrift.Type.STRUCT, 2);
this.row.write(output);
output.writeFieldEnd();
}
if (this.writeOptions !== null && this.writeOptions !== undefined) {
output.writeFieldBegin('writeOptions', Thrift.Type.STRUCT, 3);
this.writeOptions.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_put_result = function(args) {
this.success = null;
this.de = null;
this.re = null;
this.fe = null;
this.pe = null;
this.iae = null;
if (args instanceof ttypes.TDurabilityException) {
this.de = args;
return;
}
if (args instanceof ttypes.TRequestTimeoutException) {
this.re = args;
return;
}
if (args instanceof ttypes.TFaultException) {
this.fe = args;
return;
}
if (args instanceof ttypes.TProxyException) {
this.pe = args;
return;
}
if (args instanceof ttypes.TIllegalArgumentException) {
this.iae = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TWriteResult(args.success);
}
if (args.de !== undefined && args.de !== null) {
this.de = args.de;
}
if (args.re !== undefined && args.re !== null) {
this.re = args.re;
}
if (args.fe !== undefined && args.fe !== null) {
this.fe = args.fe;
}
if (args.pe !== undefined && args.pe !== null) {
this.pe = args.pe;
}
if (args.iae !== undefined && args.iae !== null) {
this.iae = args.iae;
}
}
};
ONDB_put_result.prototype = {};
ONDB_put_result.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
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.TWriteResult();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.de = new ttypes.TDurabilityException();
this.de.read(input);
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.re = new ttypes.TRequestTimeoutException();
this.re.read(input);
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRUCT) {
this.fe = new ttypes.TFaultException();
this.fe.read(input);
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRUCT) {
this.pe = new ttypes.TProxyException();
this.pe.read(input);
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.STRUCT) {
this.iae = new ttypes.TIllegalArgumentException();
this.iae.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_put_result.prototype.write = function(output) {
output.writeStructBegin('ONDB_put_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.de !== null && this.de !== undefined) {
output.writeFieldBegin('de', Thrift.Type.STRUCT, 1);
this.de.write(output);
output.writeFieldEnd();
}
if (this.re !== null && this.re !== undefined) {
output.writeFieldBegin('re', Thrift.Type.STRUCT, 2);
this.re.write(output);
output.writeFieldEnd();
}
if (this.fe !== null && this.fe !== undefined) {
output.writeFieldBegin('fe', Thrift.Type.STRUCT, 3);
this.fe.write(output);
output.writeFieldEnd();
}
if (this.pe !== null && this.pe !== undefined) {
output.writeFieldBegin('pe', Thrift.Type.STRUCT, 4);
this.pe.write(output);
output.writeFieldEnd();
}
if (this.iae !== null && this.iae !== undefined) {
output.writeFieldBegin('iae', Thrift.Type.STRUCT, 5);
this.iae.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_putIfAbsent_args = function(args) {
this.tableName = null;
this.row = null;
this.writeOptions = null;
if (args) {
if (args.tableName !== undefined && args.tableName !== null) {
this.tableName = args.tableName;
}
if (args.row !== undefined && args.row !== null) {
this.row = new ttypes.TRow(args.row);
}
if (args.writeOptions !== undefined && args.writeOptions !== null) {
this.writeOptions = new ttypes.TWriteOptions(args.writeOptions);
}
}
};
ONDB_putIfAbsent_args.prototype = {};
ONDB_putIfAbsent_args.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.tableName = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.row = new ttypes.TRow();
this.row.read(input);
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRUCT) {
this.writeOptions = new ttypes.TWriteOptions();
this.writeOptions.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_putIfAbsent_args.prototype.write = function(output) {
output.writeStructBegin('ONDB_putIfAbsent_args');
if (this.tableName !== null && this.tableName !== undefined) {
output.writeFieldBegin('tableName', Thrift.Type.STRING, 1);
output.writeString(this.tableName);
output.writeFieldEnd();
}
if (this.row !== null && this.row !== undefined) {
output.writeFieldBegin('row', Thrift.Type.STRUCT, 2);
this.row.write(output);
output.writeFieldEnd();
}
if (this.writeOptions !== null && this.writeOptions !== undefined) {
output.writeFieldBegin('writeOptions', Thrift.Type.STRUCT, 3);
this.writeOptions.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_putIfAbsent_result = function(args) {
this.success = null;
this.de = null;
this.re = null;
this.fe = null;
this.pe = null;
this.iae = null;
if (args instanceof ttypes.TDurabilityException) {
this.de = args;
return;
}
if (args instanceof ttypes.TRequestTimeoutException) {
this.re = args;
return;
}
if (args instanceof ttypes.TFaultException) {
this.fe = args;
return;
}
if (args instanceof ttypes.TProxyException) {
this.pe = args;
return;
}
if (args instanceof ttypes.TIllegalArgumentException) {
this.iae = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TWriteResult(args.success);
}
if (args.de !== undefined && args.de !== null) {
this.de = args.de;
}
if (args.re !== undefined && args.re !== null) {
this.re = args.re;
}
if (args.fe !== undefined && args.fe !== null) {
this.fe = args.fe;
}
if (args.pe !== undefined && args.pe !== null) {
this.pe = args.pe;
}
if (args.iae !== undefined && args.iae !== null) {
this.iae = args.iae;
}
}
};
ONDB_putIfAbsent_result.prototype = {};
ONDB_putIfAbsent_result.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
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.TWriteResult();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.de = new ttypes.TDurabilityException();
this.de.read(input);
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.re = new ttypes.TRequestTimeoutException();
this.re.read(input);
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRUCT) {
this.fe = new ttypes.TFaultException();
this.fe.read(input);
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRUCT) {
this.pe = new ttypes.TProxyException();
this.pe.read(input);
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.STRUCT) {
this.iae = new ttypes.TIllegalArgumentException();
this.iae.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_putIfAbsent_result.prototype.write = function(output) {
output.writeStructBegin('ONDB_putIfAbsent_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.de !== null && this.de !== undefined) {
output.writeFieldBegin('de', Thrift.Type.STRUCT, 1);
this.de.write(output);
output.writeFieldEnd();
}
if (this.re !== null && this.re !== undefined) {
output.writeFieldBegin('re', Thrift.Type.STRUCT, 2);
this.re.write(output);
output.writeFieldEnd();
}
if (this.fe !== null && this.fe !== undefined) {
output.writeFieldBegin('fe', Thrift.Type.STRUCT, 3);
this.fe.write(output);
output.writeFieldEnd();
}
if (this.pe !== null && this.pe !== undefined) {
output.writeFieldBegin('pe', Thrift.Type.STRUCT, 4);
this.pe.write(output);
output.writeFieldEnd();
}
if (this.iae !== null && this.iae !== undefined) {
output.writeFieldBegin('iae', Thrift.Type.STRUCT, 5);
this.iae.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_putIfPresent_args = function(args) {
this.tableName = null;
this.row = null;
this.writeOptions = null;
if (args) {
if (args.tableName !== undefined && args.tableName !== null) {
this.tableName = args.tableName;
}
if (args.row !== undefined && args.row !== null) {
this.row = new ttypes.TRow(args.row);
}
if (args.writeOptions !== undefined && args.writeOptions !== null) {
this.writeOptions = new ttypes.TWriteOptions(args.writeOptions);
}
}
};
ONDB_putIfPresent_args.prototype = {};
ONDB_putIfPresent_args.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.tableName = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.row = new ttypes.TRow();
this.row.read(input);
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRUCT) {
this.writeOptions = new ttypes.TWriteOptions();
this.writeOptions.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_putIfPresent_args.prototype.write = function(output) {
output.writeStructBegin('ONDB_putIfPresent_args');
if (this.tableName !== null && this.tableName !== undefined) {
output.writeFieldBegin('tableName', Thrift.Type.STRING, 1);
output.writeString(this.tableName);
output.writeFieldEnd();
}
if (this.row !== null && this.row !== undefined) {
output.writeFieldBegin('row', Thrift.Type.STRUCT, 2);
this.row.write(output);
output.writeFieldEnd();
}
if (this.writeOptions !== null && this.writeOptions !== undefined) {
output.writeFieldBegin('writeOptions', Thrift.Type.STRUCT, 3);
this.writeOptions.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_putIfPresent_result = function(args) {
this.success = null;
this.de = null;
this.re = null;
this.fe = null;
this.pe = null;
this.iae = null;
if (args instanceof ttypes.TDurabilityException) {
this.de = args;
return;
}
if (args instanceof ttypes.TRequestTimeoutException) {
this.re = args;
return;
}
if (args instanceof ttypes.TFaultException) {
this.fe = args;
return;
}
if (args instanceof ttypes.TProxyException) {
this.pe = args;
return;
}
if (args instanceof ttypes.TIllegalArgumentException) {
this.iae = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TWriteResult(args.success);
}
if (args.de !== undefined && args.de !== null) {
this.de = args.de;
}
if (args.re !== undefined && args.re !== null) {
this.re = args.re;
}
if (args.fe !== undefined && args.fe !== null) {
this.fe = args.fe;
}
if (args.pe !== undefined && args.pe !== null) {
this.pe = args.pe;
}
if (args.iae !== undefined && args.iae !== null) {
this.iae = args.iae;
}
}
};
ONDB_putIfPresent_result.prototype = {};
ONDB_putIfPresent_result.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
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.TWriteResult();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.de = new ttypes.TDurabilityException();
this.de.read(input);
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.re = new ttypes.TRequestTimeoutException();
this.re.read(input);
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRUCT) {
this.fe = new ttypes.TFaultException();
this.fe.read(input);
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRUCT) {
this.pe = new ttypes.TProxyException();
this.pe.read(input);
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.STRUCT) {
this.iae = new ttypes.TIllegalArgumentException();
this.iae.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_putIfPresent_result.prototype.write = function(output) {
output.writeStructBegin('ONDB_putIfPresent_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.de !== null && this.de !== undefined) {
output.writeFieldBegin('de', Thrift.Type.STRUCT, 1);
this.de.write(output);
output.writeFieldEnd();
}
if (this.re !== null && this.re !== undefined) {
output.writeFieldBegin('re', Thrift.Type.STRUCT, 2);
this.re.write(output);
output.writeFieldEnd();
}
if (this.fe !== null && this.fe !== undefined) {
output.writeFieldBegin('fe', Thrift.Type.STRUCT, 3);
this.fe.write(output);
output.writeFieldEnd();
}
if (this.pe !== null && this.pe !== undefined) {
output.writeFieldBegin('pe', Thrift.Type.STRUCT, 4);
this.pe.write(output);
output.writeFieldEnd();
}
if (this.iae !== null && this.iae !== undefined) {
output.writeFieldBegin('iae', Thrift.Type.STRUCT, 5);
this.iae.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_putIfVersion_args = function(args) {
this.tableName = null;
this.row = null;
this.matchVersion = null;
this.writeOptions = null;
if (args) {
if (args.tableName !== undefined && args.tableName !== null) {
this.tableName = args.tableName;
}
if (args.row !== undefined && args.row !== null) {
this.row = new ttypes.TRow(args.row);
}
if (args.matchVersion !== undefined && args.matchVersion !== null) {
this.matchVersion = args.matchVersion;
}
if (args.writeOptions !== undefined && args.writeOptions !== null) {
this.writeOptions = new ttypes.TWriteOptions(args.writeOptions);
}
}
};
ONDB_putIfVersion_args.prototype = {};
ONDB_putIfVersion_args.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.tableName = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.row = new ttypes.TRow();
this.row.read(input);
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.matchVersion = input.readBinary();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRUCT) {
this.writeOptions = new ttypes.TWriteOptions();
this.writeOptions.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_putIfVersion_args.prototype.write = function(output) {
output.writeStructBegin('ONDB_putIfVersion_args');
if (this.tableName !== null && this.tableName !== undefined) {
output.writeFieldBegin('tableName', Thrift.Type.STRING, 1);
output.writeString(this.tableName);
output.writeFieldEnd();
}
if (this.row !== null && this.row !== undefined) {
output.writeFieldBegin('row', Thrift.Type.STRUCT, 2);
this.row.write(output);
output.writeFieldEnd();
}
if (this.matchVersion !== null && this.matchVersion !== undefined) {
output.writeFieldBegin('matchVersion', Thrift.Type.STRING, 3);
output.writeBinary(this.matchVersion);
output.writeFieldEnd();
}
if (this.writeOptions !== null && this.writeOptions !== undefined) {
output.writeFieldBegin('writeOptions', Thrift.Type.STRUCT, 4);
this.writeOptions.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_putIfVersion_result = function(args) {
this.success = null;
this.de = null;
this.re = null;
this.fe = null;
this.pe = null;
this.iae = null;
if (args instanceof ttypes.TDurabilityException) {
this.de = args;
return;
}
if (args instanceof ttypes.TRequestTimeoutException) {
this.re = args;
return;
}
if (args instanceof ttypes.TFaultException) {
this.fe = args;
return;
}
if (args instanceof ttypes.TProxyException) {
this.pe = args;
return;
}
if (args instanceof ttypes.TIllegalArgumentException) {
this.iae = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TWriteResult(args.success);
}
if (args.de !== undefined && args.de !== null) {
this.de = args.de;
}
if (args.re !== undefined && args.re !== null) {
this.re = args.re;
}
if (args.fe !== undefined && args.fe !== null) {
this.fe = args.fe;
}
if (args.pe !== undefined && args.pe !== null) {
this.pe = args.pe;
}
if (args.iae !== undefined && args.iae !== null) {
this.iae = args.iae;
}
}
};
ONDB_putIfVersion_result.prototype = {};
ONDB_putIfVersion_result.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
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.TWriteResult();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.de = new ttypes.TDurabilityException();
this.de.read(input);
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.re = new ttypes.TRequestTimeoutException();
this.re.read(input);
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRUCT) {
this.fe = new ttypes.TFaultException();
this.fe.read(input);
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRUCT) {
this.pe = new ttypes.TProxyException();
this.pe.read(input);
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.STRUCT) {
this.iae = new ttypes.TIllegalArgumentException();
this.iae.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_putIfVersion_result.prototype.write = function(output) {
output.writeStructBegin('ONDB_putIfVersion_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.de !== null && this.de !== undefined) {
output.writeFieldBegin('de', Thrift.Type.STRUCT, 1);
this.de.write(output);
output.writeFieldEnd();
}
if (this.re !== null && this.re !== undefined) {
output.writeFieldBegin('re', Thrift.Type.STRUCT, 2);
this.re.write(output);
output.writeFieldEnd();
}
if (this.fe !== null && this.fe !== undefined) {
output.writeFieldBegin('fe', Thrift.Type.STRUCT, 3);
this.fe.write(output);
output.writeFieldEnd();
}
if (this.pe !== null && this.pe !== undefined) {
output.writeFieldBegin('pe', Thrift.Type.STRUCT, 4);
this.pe.write(output);
output.writeFieldEnd();
}
if (this.iae !== null && this.iae !== undefined) {
output.writeFieldBegin('iae', Thrift.Type.STRUCT, 5);
this.iae.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_get_args = function(args) {
this.tableName = null;
this.key = null;
this.readOptions = null;
if (args) {
if (args.tableName !== undefined && args.tableName !== null) {
this.tableName = args.tableName;
}
if (args.key !== undefined && args.key !== null) {
this.key = new ttypes.TRow(args.key);
}
if (args.readOptions !== undefined && args.readOptions !== null) {
this.readOptions = new ttypes.TReadOptions(args.readOptions);
}
}
};
ONDB_get_args.prototype = {};
ONDB_get_args.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.tableName = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.key = new ttypes.TRow();
this.key.read(input);
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRUCT) {
this.readOptions = new ttypes.TReadOptions();
this.readOptions.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_get_args.prototype.write = function(output) {
output.writeStructBegin('ONDB_get_args');
if (this.tableName !== null && this.tableName !== undefined) {
output.writeFieldBegin('tableName', Thrift.Type.STRING, 1);
output.writeString(this.tableName);
output.writeFieldEnd();
}
if (this.key !== null && this.key !== undefined) {
output.writeFieldBegin('key', Thrift.Type.STRUCT, 2);
this.key.write(output);
output.writeFieldEnd();
}
if (this.readOptions !== null && this.readOptions !== undefined) {
output.writeFieldBegin('readOptions', Thrift.Type.STRUCT, 3);
this.readOptions.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_get_result = function(args) {
this.success = null;
this.ce = null;
this.re = null;
this.fe = null;
this.pe = null;
this.iae = null;
if (args instanceof ttypes.TConsistencyException) {
this.ce = args;
return;
}
if (args instanceof ttypes.TRequestTimeoutException) {
this.re = args;
return;
}
if (args instanceof ttypes.TFaultException) {
this.fe = args;
return;
}
if (args instanceof ttypes.TProxyException) {
this.pe = args;
return;
}
if (args instanceof ttypes.TIllegalArgumentException) {
this.iae = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TGetResult(args.success);
}
if (args.ce !== undefined && args.ce !== null) {
this.ce = args.ce;
}
if (args.re !== undefined && args.re !== null) {
this.re = args.re;
}
if (args.fe !== undefined && args.fe !== null) {
this.fe = args.fe;
}
if (args.pe !== undefined && args.pe !== null) {
this.pe = args.pe;
}
if (args.iae !== undefined && args.iae !== null) {
this.iae = args.iae;
}
}
};
ONDB_get_result.prototype = {};
ONDB_get_result.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
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.TGetResult();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.ce = new ttypes.TConsistencyException();
this.ce.read(input);
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.re = new ttypes.TRequestTimeoutException();
this.re.read(input);
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRUCT) {
this.fe = new ttypes.TFaultException();
this.fe.read(input);
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRUCT) {
this.pe = new ttypes.TProxyException();
this.pe.read(input);
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.STRUCT) {
this.iae = new ttypes.TIllegalArgumentException();
this.iae.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_get_result.prototype.write = function(output) {
output.writeStructBegin('ONDB_get_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.ce !== null && this.ce !== undefined) {
output.writeFieldBegin('ce', Thrift.Type.STRUCT, 1);
this.ce.write(output);
output.writeFieldEnd();
}
if (this.re !== null && this.re !== undefined) {
output.writeFieldBegin('re', Thrift.Type.STRUCT, 2);
this.re.write(output);
output.writeFieldEnd();
}
if (this.fe !== null && this.fe !== undefined) {
output.writeFieldBegin('fe', Thrift.Type.STRUCT, 3);
this.fe.write(output);
output.writeFieldEnd();
}
if (this.pe !== null && this.pe !== undefined) {
output.writeFieldBegin('pe', Thrift.Type.STRUCT, 4);
this.pe.write(output);
output.writeFieldEnd();
}
if (this.iae !== null && this.iae !== undefined) {
output.writeFieldBegin('iae', Thrift.Type.STRUCT, 5);
this.iae.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_deleteRow_args = function(args) {
this.tableName = null;
this.key = null;
this.writeOptions = null;
if (args) {
if (args.tableName !== undefined && args.tableName !== null) {
this.tableName = args.tableName;
}
if (args.key !== undefined && args.key !== null) {
this.key = new ttypes.TRow(args.key);
}
if (args.writeOptions !== undefined && args.writeOptions !== null) {
this.writeOptions = new ttypes.TWriteOptions(args.writeOptions);
}
}
};
ONDB_deleteRow_args.prototype = {};
ONDB_deleteRow_args.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.tableName = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.key = new ttypes.TRow();
this.key.read(input);
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRUCT) {
this.writeOptions = new ttypes.TWriteOptions();
this.writeOptions.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_deleteRow_args.prototype.write = function(output) {
output.writeStructBegin('ONDB_deleteRow_args');
if (this.tableName !== null && this.tableName !== undefined) {
output.writeFieldBegin('tableName', Thrift.Type.STRING, 1);
output.writeString(this.tableName);
output.writeFieldEnd();
}
if (this.key !== null && this.key !== undefined) {
output.writeFieldBegin('key', Thrift.Type.STRUCT, 2);
this.key.write(output);
output.writeFieldEnd();
}
if (this.writeOptions !== null && this.writeOptions !== undefined) {
output.writeFieldBegin('writeOptions', Thrift.Type.STRUCT, 3);
this.writeOptions.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_deleteRow_result = function(args) {
this.success = null;
this.de = null;
this.re = null;
this.fe = null;
this.pe = null;
this.iae = null;
if (args instanceof ttypes.TDurabilityException) {
this.de = args;
return;
}
if (args instanceof ttypes.TRequestTimeoutException) {
this.re = args;
return;
}
if (args instanceof ttypes.TFaultException) {
this.fe = args;
return;
}
if (args instanceof ttypes.TProxyException) {
this.pe = args;
return;
}
if (args instanceof ttypes.TIllegalArgumentException) {
this.iae = args;
return;
}
if (args) {
if (args.success !== undefined && args.success !== null) {
this.success = new ttypes.TWriteResult(args.success);
}
if (args.de !== undefined && args.de !== null) {
this.de = args.de;
}
if (args.re !== undefined && args.re !== null) {
this.re = args.re;
}
if (args.fe !== undefined && args.fe !== null) {
this.fe = args.fe;
}
if (args.pe !== undefined && args.pe !== null) {
this.pe = args.pe;
}
if (args.iae !== undefined && args.iae !== null) {
this.iae = args.iae;
}
}
};
ONDB_deleteRow_result.prototype = {};
ONDB_deleteRow_result.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
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.TWriteResult();
this.success.read(input);
} else {
input.skip(ftype);
}
break;
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.de = new ttypes.TDurabilityException();
this.de.read(input);
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.re = new ttypes.TRequestTimeoutException();
this.re.read(input);
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRUCT) {
this.fe = new ttypes.TFaultException();
this.fe.read(input);
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRUCT) {
this.pe = new ttypes.TProxyException();
this.pe.read(input);
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.STRUCT) {
this.iae = new ttypes.TIllegalArgumentException();
this.iae.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
ONDB_deleteRow_result.prototype.write = function(output) {
output.writeStructBegin('ONDB_deleteRow_result');
if (this.success !== null && this.success !== undefined) {
output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
this.success.write(output);
output.writeFieldEnd();
}
if (this.de !== null && this.de !== undefined) {
output.writeFieldBegin('de', Thrift.Type.STRUCT, 1);
this.de.write(output);
output.writeFieldEnd();
}
if (this.re !== null && this.re !== undefined) {
output.writeFieldBegin('re', Thrift.Type.STRUCT, 2);
this.re.write(output);
output.writeFieldEnd();
}
if (this.fe !== null && this.fe !== undefined) {
output.writeFieldBegin('fe', Thrift.Type.STRUCT, 3);
this.fe.write(output);
output.writeFieldEnd();
}
if (this.pe !== null && this.pe !== undefined) {
output.writeFieldBegin('pe', Thrift.Type.STRUCT, 4);
this.pe.write(output);
output.writeFieldEnd();
}
if (this.iae !== null && this.iae !== undefined) {
output.writeFieldBegin('iae', Thrift.Type.STRUCT, 5);
this.iae.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
var ONDB_deleteRowIfVersion_args = function(args) {
this.tableName = null;
this.key = null;
this.matchVersion = null;
this.writeOptions = null;
if (args) {
if (args.tableName !== undefined && args.tableName !== null) {
this.tableName = args.tableName;
}
if (args.key !== undefined && args.key !== null) {
this.key = new ttypes.TRow(args.key);
}
if (args.matchVersion !== undefined && args.matchVersion !== null) {
this.matchVersion = args.matchVersion;
}
if (args.writeOptions !== undefined && args.writeOptions !== null) {
this.writeOptions = new ttypes.TWriteOptions(args.writeOptions);
}
}
};
ONDB_deleteRowIfVersion_args.prototype = {};
ONDB_deleteRowIfVersion_args.prototype.read = function(input) {
input.readStructBegin();
while (true) {
var ret = input.readFieldBegin();
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid) {
case 1:
if (ftype == Thrift.Type.STRING) {
this.tableName = input.readString();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.key = new ttypes.TRow();
this.key.read(input);
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.matchVersion = input.readBinary();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRUCT) {
this.writeOptions = new ttypes.TWriteOptions();
this.writeOptions.read(input);
} else {
input.skip(ftype);
}
break;