From 024b514d393c0e1db5fddf364d6ea76c8a31d114 Mon Sep 17 00:00:00 2001 From: Michael Cahill Date: Thu, 2 Dec 2010 13:24:06 +1100 Subject: [PATCH] Beginnings of a Java client API implementation. --HG-- branch : mjc rename : Doxyfile => docs/Doxyfile extra : transplant_source : O%FA%B3%84%98%D2%10%B4%B5%B7%BD%CA%86V%F4b%3Ff%0Cu --- .hgignore | 1 + Doxyfile => docs/Doxyfile | 18 +- include/wiredtiger.h | 2 +- lang/python/src/wiredtiger/__init__.py | 210 + .../src/wiredtiger/service/WiredTiger-remote | 260 + .../src/wiredtiger/service/WiredTiger.py | 5002 +++++++++++++++++ .../python/src/wiredtiger/service/__init__.py | 1 + .../src/wiredtiger/service/constants.py | 9 + lang/python/src/wiredtiger/service/ttypes.py | 339 ++ src/api/api.c | 2 +- 10 files changed, 5833 insertions(+), 11 deletions(-) rename Doxyfile => docs/Doxyfile (99%) create mode 100644 lang/python/src/wiredtiger/__init__.py create mode 100755 lang/python/src/wiredtiger/service/WiredTiger-remote create mode 100644 lang/python/src/wiredtiger/service/WiredTiger.py create mode 100644 lang/python/src/wiredtiger/service/__init__.py create mode 100644 lang/python/src/wiredtiger/service/constants.py create mode 100644 lang/python/src/wiredtiger/service/ttypes.py diff --git a/.hgignore b/.hgignore index d6c78b3fa45..4c9891f87a0 100644 --- a/.hgignore +++ b/.hgignore @@ -1,6 +1,7 @@ doxygen.log /classes/ docs/html +docs/java docs/latex \.o$ src/server/WiredTiger_server diff --git a/Doxyfile b/docs/Doxyfile similarity index 99% rename from Doxyfile rename to docs/Doxyfile index a14aa1c1ad2..f2ce6c01010 100644 --- a/Doxyfile +++ b/docs/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NUMBER = 1.0 # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = docs +OUTPUT_DIRECTORY = . # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -133,7 +133,7 @@ STRIP_FROM_PATH = # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. -STRIP_FROM_INC_PATH = include/ +STRIP_FROM_INC_PATH = ../include/ # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful if your file system @@ -590,8 +590,8 @@ WARN_LOGFILE = doxygen.log # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = include \ - docs/src +INPUT = ../include \ + src # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -651,7 +651,7 @@ RECURSIVE = YES # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = docs/src/bdb-map.dox +EXCLUDE = src/bdb-map.dox # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded @@ -679,7 +679,7 @@ EXCLUDE_SYMBOLS = __F # directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = examples/c +EXAMPLE_PATH = ../examples/c # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp @@ -829,13 +829,13 @@ HTML_FILE_EXTENSION = .html # each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = docs/style/header.html +HTML_HEADER = style/header.html # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = docs/style/footer.html +HTML_FOOTER = style/footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to @@ -844,7 +844,7 @@ HTML_FOOTER = docs/style/footer.html # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = docs/style/wiredtiger.css +HTML_STYLESHEET = style/wiredtiger.css # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. # Doxygen will adjust the colors in the stylesheet and background images diff --git a/include/wiredtiger.h b/include/wiredtiger.h index 75b03384b9e..9806fc38090 100644 --- a/include/wiredtiger.h +++ b/include/wiredtiger.h @@ -172,7 +172,7 @@ struct WT_SESSION { int __F(open_cursor)(WT_SESSION *session, const char *uri, const char *config, WT_CURSOR **cursorp); /*! Duplicate a cursor. */ - int __F(dup_cursor)(WT_SESSION *, WT_CURSOR *cursor, const char *config, WT_CURSOR *dupp); + int __F(dup_cursor)(WT_SESSION *, WT_CURSOR *cursor, const char *config, WT_CURSOR **dupp); /*! @} */ /*! \name Table operations diff --git a/lang/python/src/wiredtiger/__init__.py b/lang/python/src/wiredtiger/__init__.py new file mode 100644 index 00000000000..3197df27481 --- /dev/null +++ b/lang/python/src/wiredtiger/__init__.py @@ -0,0 +1,210 @@ +# WiredTiger public interface + +import struct +from urlparse import urlparse + +from wiredtiger.service import WiredTiger +from service.ttypes import WT_RECORD +from thrift.transport import TSocket, TTransport +from thrift.protocol import TBinaryProtocol + +def __wt2struct(fmt): + if not fmt: + return None, fmt + # Big endian with no alignment is the default + if fmt[0] in '@=<>!': + tfmt = fmt[0] + fmt = fmt[1:] + else: + tfmt = '>' + return tfmt, fmt.replace('r', 'Q') + +def unpack(fmt, s): + tfmt, fmt = __wt2struct(fmt) + if not fmt: + return () + result = () + pfmt = tfmt + for f in fmt: + if f.isdigit(): + sizebytes += 1 + # With a fixed size, everything is encoded as a string + if f in 'Su' and sizebytes > 0: + f = 's' + if f not in 'Su': + pfmt += f + sizebytes = 0 + continue + + # We've hit something that needs special handling, split any fixed-size + # values we've already passed + if len(pfmt) > 1: + size = struct.calcsize(pfmt) + result += struct.unpack_from(pfmt, s) + s = s[size:] + if f == 'S': + l = s.find('\0') + result += (s[:l],) + s = s[l+1:] + if f == 'u': + l = struct.unpack_from(tfmt + 'l', s)[0] + s = s[struct.calcsize(tfmt + 'l'):] + result += (s[:l],) + s = s[l:] + pfmt = tfmt + sizebytes = 0 + + if len(pfmt) > 1: + result += struct.unpack(pfmt, s) + return result + +def pack(fmt, *values): + pfmt, fmt = __wt2struct(fmt) + if not fmt: + return '' + i = sizebytes = 0 + for f in fmt: + if f == 'S': + # Note: this code is being careful about embedded NUL characters + if sizebytes == 0: + l = values[i].find('\0') + 1 + if not l: + l = len(values[i]) + 1 + pfmt += str(l) + sizebytes = len(str(l)) + f = 's' + elif f == 'u': + if sizebytes == 0: + l = len(values[i]) + pfmt += 'l' + str(l) + values = values[:i] + (l,) + values[i:] + sizebytes = len(str(l)) + f = 's' + pfmt += f + if f.isdigit(): + sizebytes += 1 + continue + if f != 's' and sizebytes > 0: + i += int(pfmt[-sizebytes:]) + else: + i += 1 + sizebytes = 0 + return struct.pack(pfmt, *values) + +class Cursor: + def __init__(self, session, handle): + self.session = session + self.id = handle.id + self.keyfmt = handle.keyfmt + self.valuefmt = handle.valuefmt + + def close(self, config=''): + return self.client.close_cursor(self.id, config) + + def get_key(self): + return None + + def get_value(self): + return None + + def set_key(self, *args): + pass + + def set_value(self, *args): + pass + + def first(self): + self.client.move_first(self.id) + + def last(self): + self.client.move_last(self.id) + + def next(self): + self.client.move_next(self.id) + + def prev(self): + self.client.move_prev(self.id) + + def search(self): + return self.client.search(self.id, WT_RECORD(self.key, self.value)) + + def insert(self): + self.key = self.client.insert_record(self.id, WT_RECORD(self.key, self.value)) + + def update(self): + return self.client.update_record(self.id, self.value) + + def delete(self): + return self.client.delete_record(self.id) + + +class Session: + def __init__(self, conn, id): + self.conn = conn + self.client = conn.client + self.id = id + + def close(self, config=''): + self.client.close_session(self.id, config) + + def open_cursor(self, uri, config=''): + return Cursor(self, self.client.open_cursor(self.id, uri, config)) + + def create_table(self, name, config=''): + self.client.create_table(self.id, name, config) + + def rename_table(self, oldname, newname, config=''): + self.client.rename_table(self.id, oldname, newname, config) + + def drop_table(self, name, config=''): + self.client.drop_table(self.id, name, config) + + def truncate_table(self, name, start=None, end=None, config=''): + self.client.truncate_table(self.id, name, name, start and start.id or 0, end and end.id or 0, config) + + def verify_table(self, name, config=''): + self.client.verify_table(self.id, name, config) + + def begin_transaction(self, config=''): + self.client.begin_transaction(self.id, config) + + def commit_transaction(self): + self.client.begin_transaction(self.id) + + def rollback_transaction(self): + self.client.rollback_transaction(self.id) + + def checkpoint(self, config=''): + self.client.checkpoint(self.id, config) + + +class Connection: + def __init__(self, uri, config=''): + url = urlparse(uri) + parts = url[1].split(':') + host = parts[0] + if len(parts) > 1: + port = int(parts[1]) + else: + port = 9090 + home = url[2] + + socket = TSocket.TSocket(host, port) + self.transport = TTransport.TBufferedTransport(socket) + protocol = TBinaryProtocol.TBinaryProtocol(self.transport) + self.client = WiredTiger.Client(protocol) + self.transport.open() + + self.id = self.client.open(home, config) + + def close(self, config=''): + self.client.close_connection(self.id, config) + self.transport.close() + + def version(self): + v = self.client.version(self.id, config) + return v.version_string, v.major, v.minor, v.patch + + def open_session(self, config=''): + id = self.client.open_session(self.id, config) + return Session(self, id) diff --git a/lang/python/src/wiredtiger/service/WiredTiger-remote b/lang/python/src/wiredtiger/service/WiredTiger-remote new file mode 100755 index 00000000000..3cbd4490493 --- /dev/null +++ b/lang/python/src/wiredtiger/service/WiredTiger-remote @@ -0,0 +1,260 @@ +#!/usr/bin/env python +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +import sys +import pprint +from urlparse import urlparse +from thrift.transport import TTransport +from thrift.transport import TSocket +from thrift.transport import THttpClient +from thrift.protocol import TBinaryProtocol + +import WiredTiger +from ttypes import * + +if len(sys.argv) <= 1 or sys.argv[1] == '--help': + print '' + print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]' + print '' + print 'Functions:' + print ' string strerror(i32 err)' + print ' WT_VERSION version()' + print ' WT_HANDLE open(string home, string config)' + print ' WT_HANDLE open_session(WT_HANDLE connection, string config)' + print ' void close_connection(WT_HANDLE connection, string config)' + print ' void close_session(WT_HANDLE session, string config)' + print ' WT_CURSOR_HANDLE open_cursor(WT_HANDLE session, string uri, string config)' + print ' WT_CURSOR_HANDLE dup_cursor(WT_HANDLE session, WT_HANDLE cursor, string config)' + print ' void create_table(WT_HANDLE session, string name, string config)' + print ' void rename_table(WT_HANDLE session, string oldname, string newname, string config)' + print ' void drop_table(WT_HANDLE session, string name, string config)' + print ' void truncate_table(WT_HANDLE session, string name, WT_HANDLE cursor_start, WT_HANDLE cursor_end, string config)' + print ' void verify_table(WT_HANDLE session, string name, string config)' + print ' void begin_transaction(WT_HANDLE session, string config)' + print ' void commit_transaction(WT_HANDLE session)' + print ' void rollback_transaction(WT_HANDLE session)' + print ' void checkpoint(WT_HANDLE session, string config)' + print ' WT_RECORD move_first(WT_HANDLE cursor)' + print ' WT_RECORD move_last(WT_HANDLE cursor)' + print ' WT_RECORD move_next(WT_HANDLE cursor)' + print ' WT_RECORD move_prev(WT_HANDLE cursor)' + print ' i32 search(WT_HANDLE cursor, WT_RECORD record)' + print ' string insert_record(WT_HANDLE cursor, WT_RECORD record)' + print ' void update_record(WT_HANDLE cursor, string value)' + print ' void delete_record(WT_HANDLE cursor)' + print ' void close_cursor(WT_HANDLE cursor, string config)' + print '' + sys.exit(0) + +pp = pprint.PrettyPrinter(indent = 2) +host = 'localhost' +port = 9090 +uri = '' +framed = False +http = False +argi = 1 + +if sys.argv[argi] == '-h': + parts = sys.argv[argi+1].split(':') + host = parts[0] + port = int(parts[1]) + argi += 2 + +if sys.argv[argi] == '-u': + url = urlparse(sys.argv[argi+1]) + parts = url[1].split(':') + host = parts[0] + if len(parts) > 1: + port = int(parts[1]) + else: + port = 80 + uri = url[2] + if url[4]: + uri += '?%s' % url[4] + http = True + argi += 2 + +if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': + framed = True + argi += 1 + +cmd = sys.argv[argi] +args = sys.argv[argi+1:] + +if http: + transport = THttpClient.THttpClient(host, port, uri) +else: + socket = TSocket.TSocket(host, port) + if framed: + transport = TTransport.TFramedTransport(socket) + else: + transport = TTransport.TBufferedTransport(socket) +protocol = TBinaryProtocol.TBinaryProtocol(transport) +client = WiredTiger.Client(protocol) +transport.open() + +if cmd == 'strerror': + if len(args) != 1: + print 'strerror requires 1 args' + sys.exit(1) + pp.pprint(client.strerror(eval(args[0]),)) + +elif cmd == 'version': + if len(args) != 0: + print 'version requires 0 args' + sys.exit(1) + pp.pprint(client.version()) + +elif cmd == 'open': + if len(args) != 2: + print 'open requires 2 args' + sys.exit(1) + pp.pprint(client.open(args[0],args[1],)) + +elif cmd == 'open_session': + if len(args) != 2: + print 'open_session requires 2 args' + sys.exit(1) + pp.pprint(client.open_session(eval(args[0]),args[1],)) + +elif cmd == 'close_connection': + if len(args) != 2: + print 'close_connection requires 2 args' + sys.exit(1) + pp.pprint(client.close_connection(eval(args[0]),args[1],)) + +elif cmd == 'close_session': + if len(args) != 2: + print 'close_session requires 2 args' + sys.exit(1) + pp.pprint(client.close_session(eval(args[0]),args[1],)) + +elif cmd == 'open_cursor': + if len(args) != 3: + print 'open_cursor requires 3 args' + sys.exit(1) + pp.pprint(client.open_cursor(eval(args[0]),args[1],args[2],)) + +elif cmd == 'dup_cursor': + if len(args) != 3: + print 'dup_cursor requires 3 args' + sys.exit(1) + pp.pprint(client.dup_cursor(eval(args[0]),eval(args[1]),args[2],)) + +elif cmd == 'create_table': + if len(args) != 3: + print 'create_table requires 3 args' + sys.exit(1) + pp.pprint(client.create_table(eval(args[0]),args[1],args[2],)) + +elif cmd == 'rename_table': + if len(args) != 4: + print 'rename_table requires 4 args' + sys.exit(1) + pp.pprint(client.rename_table(eval(args[0]),args[1],args[2],args[3],)) + +elif cmd == 'drop_table': + if len(args) != 3: + print 'drop_table requires 3 args' + sys.exit(1) + pp.pprint(client.drop_table(eval(args[0]),args[1],args[2],)) + +elif cmd == 'truncate_table': + if len(args) != 5: + print 'truncate_table requires 5 args' + sys.exit(1) + pp.pprint(client.truncate_table(eval(args[0]),args[1],eval(args[2]),eval(args[3]),args[4],)) + +elif cmd == 'verify_table': + if len(args) != 3: + print 'verify_table requires 3 args' + sys.exit(1) + pp.pprint(client.verify_table(eval(args[0]),args[1],args[2],)) + +elif cmd == 'begin_transaction': + if len(args) != 2: + print 'begin_transaction requires 2 args' + sys.exit(1) + pp.pprint(client.begin_transaction(eval(args[0]),args[1],)) + +elif cmd == 'commit_transaction': + if len(args) != 1: + print 'commit_transaction requires 1 args' + sys.exit(1) + pp.pprint(client.commit_transaction(eval(args[0]),)) + +elif cmd == 'rollback_transaction': + if len(args) != 1: + print 'rollback_transaction requires 1 args' + sys.exit(1) + pp.pprint(client.rollback_transaction(eval(args[0]),)) + +elif cmd == 'checkpoint': + if len(args) != 2: + print 'checkpoint requires 2 args' + sys.exit(1) + pp.pprint(client.checkpoint(eval(args[0]),args[1],)) + +elif cmd == 'move_first': + if len(args) != 1: + print 'move_first requires 1 args' + sys.exit(1) + pp.pprint(client.move_first(eval(args[0]),)) + +elif cmd == 'move_last': + if len(args) != 1: + print 'move_last requires 1 args' + sys.exit(1) + pp.pprint(client.move_last(eval(args[0]),)) + +elif cmd == 'move_next': + if len(args) != 1: + print 'move_next requires 1 args' + sys.exit(1) + pp.pprint(client.move_next(eval(args[0]),)) + +elif cmd == 'move_prev': + if len(args) != 1: + print 'move_prev requires 1 args' + sys.exit(1) + pp.pprint(client.move_prev(eval(args[0]),)) + +elif cmd == 'search': + if len(args) != 2: + print 'search requires 2 args' + sys.exit(1) + pp.pprint(client.search(eval(args[0]),eval(args[1]),)) + +elif cmd == 'insert_record': + if len(args) != 2: + print 'insert_record requires 2 args' + sys.exit(1) + pp.pprint(client.insert_record(eval(args[0]),eval(args[1]),)) + +elif cmd == 'update_record': + if len(args) != 2: + print 'update_record requires 2 args' + sys.exit(1) + pp.pprint(client.update_record(eval(args[0]),args[1],)) + +elif cmd == 'delete_record': + if len(args) != 1: + print 'delete_record requires 1 args' + sys.exit(1) + pp.pprint(client.delete_record(eval(args[0]),)) + +elif cmd == 'close_cursor': + if len(args) != 2: + print 'close_cursor requires 2 args' + sys.exit(1) + pp.pprint(client.close_cursor(eval(args[0]),args[1],)) + +else: + print 'Unrecognized method %s' % cmd + sys.exit(1) + +transport.close() diff --git a/lang/python/src/wiredtiger/service/WiredTiger.py b/lang/python/src/wiredtiger/service/WiredTiger.py new file mode 100644 index 00000000000..146baefc7ee --- /dev/null +++ b/lang/python/src/wiredtiger/service/WiredTiger.py @@ -0,0 +1,5002 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +from thrift.Thrift import * +from ttypes import * +from thrift.Thrift import TProcessor +from thrift.transport import TTransport +from thrift.protocol import TBinaryProtocol, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + +class Iface: + def strerror(self, err): + """ + Parameters: + - err + """ + pass + + def version(self, ): + pass + + def open(self, home, config): + """ + Parameters: + - home + - config + """ + pass + + def open_session(self, connection, config): + """ + Parameters: + - connection + - config + """ + pass + + def close_connection(self, connection, config): + """ + Parameters: + - connection + - config + """ + pass + + def close_session(self, session, config): + """ + Parameters: + - session + - config + """ + pass + + def open_cursor(self, session, uri, config): + """ + Parameters: + - session + - uri + - config + """ + pass + + def dup_cursor(self, session, cursor, config): + """ + Parameters: + - session + - cursor + - config + """ + pass + + def create_table(self, session, name, config): + """ + Parameters: + - session + - name + - config + """ + pass + + def rename_table(self, session, oldname, newname, config): + """ + Parameters: + - session + - oldname + - newname + - config + """ + pass + + def drop_table(self, session, name, config): + """ + Parameters: + - session + - name + - config + """ + pass + + def truncate_table(self, session, name, cursor_start, cursor_end, config): + """ + Parameters: + - session + - name + - cursor_start + - cursor_end + - config + """ + pass + + def verify_table(self, session, name, config): + """ + Parameters: + - session + - name + - config + """ + pass + + def begin_transaction(self, session, config): + """ + Parameters: + - session + - config + """ + pass + + def commit_transaction(self, session): + """ + Parameters: + - session + """ + pass + + def rollback_transaction(self, session): + """ + Parameters: + - session + """ + pass + + def checkpoint(self, session, config): + """ + Parameters: + - session + - config + """ + pass + + def move_first(self, cursor): + """ + Parameters: + - cursor + """ + pass + + def move_last(self, cursor): + """ + Parameters: + - cursor + """ + pass + + def move_next(self, cursor): + """ + Parameters: + - cursor + """ + pass + + def move_prev(self, cursor): + """ + Parameters: + - cursor + """ + pass + + def search(self, cursor, record): + """ + Parameters: + - cursor + - record + """ + pass + + def insert_record(self, cursor, record): + """ + Parameters: + - cursor + - record + """ + pass + + def update_record(self, cursor, value): + """ + Parameters: + - cursor + - value + """ + pass + + def delete_record(self, cursor): + """ + Parameters: + - cursor + """ + pass + + def close_cursor(self, cursor, config): + """ + Parameters: + - cursor + - config + """ + pass + + +class Client(Iface): + def __init__(self, iprot, oprot=None): + self._iprot = self._oprot = iprot + if oprot != None: + self._oprot = oprot + self._seqid = 0 + + def strerror(self, err): + """ + Parameters: + - err + """ + self.send_strerror(err) + return self.recv_strerror() + + def send_strerror(self, err): + self._oprot.writeMessageBegin('strerror', TMessageType.CALL, self._seqid) + args = strerror_args() + args.err = err + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_strerror(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = strerror_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "strerror failed: unknown result"); + + def version(self, ): + self.send_version() + return self.recv_version() + + def send_version(self, ): + self._oprot.writeMessageBegin('version', TMessageType.CALL, self._seqid) + args = version_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_version(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = version_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "version failed: unknown result"); + + def open(self, home, config): + """ + Parameters: + - home + - config + """ + self.send_open(home, config) + return self.recv_open() + + def send_open(self, home, config): + self._oprot.writeMessageBegin('open', TMessageType.CALL, self._seqid) + args = open_args() + args.home = home + args.config = config + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_open(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = open_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.err != None: + raise result.err + raise TApplicationException(TApplicationException.MISSING_RESULT, "open failed: unknown result"); + + def open_session(self, connection, config): + """ + Parameters: + - connection + - config + """ + self.send_open_session(connection, config) + return self.recv_open_session() + + def send_open_session(self, connection, config): + self._oprot.writeMessageBegin('open_session', TMessageType.CALL, self._seqid) + args = open_session_args() + args.connection = connection + args.config = config + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_open_session(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = open_session_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.err != None: + raise result.err + raise TApplicationException(TApplicationException.MISSING_RESULT, "open_session failed: unknown result"); + + def close_connection(self, connection, config): + """ + Parameters: + - connection + - config + """ + self.send_close_connection(connection, config) + self.recv_close_connection() + + def send_close_connection(self, connection, config): + self._oprot.writeMessageBegin('close_connection', TMessageType.CALL, self._seqid) + args = close_connection_args() + args.connection = connection + args.config = config + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_close_connection(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = close_connection_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.err != None: + raise result.err + return + + def close_session(self, session, config): + """ + Parameters: + - session + - config + """ + self.send_close_session(session, config) + self.recv_close_session() + + def send_close_session(self, session, config): + self._oprot.writeMessageBegin('close_session', TMessageType.CALL, self._seqid) + args = close_session_args() + args.session = session + args.config = config + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_close_session(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = close_session_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.err != None: + raise result.err + return + + def open_cursor(self, session, uri, config): + """ + Parameters: + - session + - uri + - config + """ + self.send_open_cursor(session, uri, config) + return self.recv_open_cursor() + + def send_open_cursor(self, session, uri, config): + self._oprot.writeMessageBegin('open_cursor', TMessageType.CALL, self._seqid) + args = open_cursor_args() + args.session = session + args.uri = uri + args.config = config + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_open_cursor(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = open_cursor_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.err != None: + raise result.err + raise TApplicationException(TApplicationException.MISSING_RESULT, "open_cursor failed: unknown result"); + + def dup_cursor(self, session, cursor, config): + """ + Parameters: + - session + - cursor + - config + """ + self.send_dup_cursor(session, cursor, config) + return self.recv_dup_cursor() + + def send_dup_cursor(self, session, cursor, config): + self._oprot.writeMessageBegin('dup_cursor', TMessageType.CALL, self._seqid) + args = dup_cursor_args() + args.session = session + args.cursor = cursor + args.config = config + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_dup_cursor(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = dup_cursor_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.err != None: + raise result.err + raise TApplicationException(TApplicationException.MISSING_RESULT, "dup_cursor failed: unknown result"); + + def create_table(self, session, name, config): + """ + Parameters: + - session + - name + - config + """ + self.send_create_table(session, name, config) + self.recv_create_table() + + def send_create_table(self, session, name, config): + self._oprot.writeMessageBegin('create_table', TMessageType.CALL, self._seqid) + args = create_table_args() + args.session = session + args.name = name + args.config = config + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_create_table(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = create_table_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.err != None: + raise result.err + return + + def rename_table(self, session, oldname, newname, config): + """ + Parameters: + - session + - oldname + - newname + - config + """ + self.send_rename_table(session, oldname, newname, config) + self.recv_rename_table() + + def send_rename_table(self, session, oldname, newname, config): + self._oprot.writeMessageBegin('rename_table', TMessageType.CALL, self._seqid) + args = rename_table_args() + args.session = session + args.oldname = oldname + args.newname = newname + args.config = config + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_rename_table(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = rename_table_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.err != None: + raise result.err + return + + def drop_table(self, session, name, config): + """ + Parameters: + - session + - name + - config + """ + self.send_drop_table(session, name, config) + self.recv_drop_table() + + def send_drop_table(self, session, name, config): + self._oprot.writeMessageBegin('drop_table', TMessageType.CALL, self._seqid) + args = drop_table_args() + args.session = session + args.name = name + args.config = config + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_table(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = drop_table_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.err != None: + raise result.err + return + + def truncate_table(self, session, name, cursor_start, cursor_end, config): + """ + Parameters: + - session + - name + - cursor_start + - cursor_end + - config + """ + self.send_truncate_table(session, name, cursor_start, cursor_end, config) + self.recv_truncate_table() + + def send_truncate_table(self, session, name, cursor_start, cursor_end, config): + self._oprot.writeMessageBegin('truncate_table', TMessageType.CALL, self._seqid) + args = truncate_table_args() + args.session = session + args.name = name + args.cursor_start = cursor_start + args.cursor_end = cursor_end + args.config = config + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_truncate_table(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = truncate_table_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.err != None: + raise result.err + return + + def verify_table(self, session, name, config): + """ + Parameters: + - session + - name + - config + """ + self.send_verify_table(session, name, config) + self.recv_verify_table() + + def send_verify_table(self, session, name, config): + self._oprot.writeMessageBegin('verify_table', TMessageType.CALL, self._seqid) + args = verify_table_args() + args.session = session + args.name = name + args.config = config + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_verify_table(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = verify_table_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.err != None: + raise result.err + return + + def begin_transaction(self, session, config): + """ + Parameters: + - session + - config + """ + self.send_begin_transaction(session, config) + self.recv_begin_transaction() + + def send_begin_transaction(self, session, config): + self._oprot.writeMessageBegin('begin_transaction', TMessageType.CALL, self._seqid) + args = begin_transaction_args() + args.session = session + args.config = config + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_begin_transaction(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = begin_transaction_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.err != None: + raise result.err + return + + def commit_transaction(self, session): + """ + Parameters: + - session + """ + self.send_commit_transaction(session) + self.recv_commit_transaction() + + def send_commit_transaction(self, session): + self._oprot.writeMessageBegin('commit_transaction', TMessageType.CALL, self._seqid) + args = commit_transaction_args() + args.session = session + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_commit_transaction(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = commit_transaction_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.err != None: + raise result.err + return + + def rollback_transaction(self, session): + """ + Parameters: + - session + """ + self.send_rollback_transaction(session) + self.recv_rollback_transaction() + + def send_rollback_transaction(self, session): + self._oprot.writeMessageBegin('rollback_transaction', TMessageType.CALL, self._seqid) + args = rollback_transaction_args() + args.session = session + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_rollback_transaction(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = rollback_transaction_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.err != None: + raise result.err + return + + def checkpoint(self, session, config): + """ + Parameters: + - session + - config + """ + self.send_checkpoint(session, config) + self.recv_checkpoint() + + def send_checkpoint(self, session, config): + self._oprot.writeMessageBegin('checkpoint', TMessageType.CALL, self._seqid) + args = checkpoint_args() + args.session = session + args.config = config + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_checkpoint(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = checkpoint_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.err != None: + raise result.err + return + + def move_first(self, cursor): + """ + Parameters: + - cursor + """ + self.send_move_first(cursor) + return self.recv_move_first() + + def send_move_first(self, cursor): + self._oprot.writeMessageBegin('move_first', TMessageType.CALL, self._seqid) + args = move_first_args() + args.cursor = cursor + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_move_first(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = move_first_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.err != None: + raise result.err + raise TApplicationException(TApplicationException.MISSING_RESULT, "move_first failed: unknown result"); + + def move_last(self, cursor): + """ + Parameters: + - cursor + """ + self.send_move_last(cursor) + return self.recv_move_last() + + def send_move_last(self, cursor): + self._oprot.writeMessageBegin('move_last', TMessageType.CALL, self._seqid) + args = move_last_args() + args.cursor = cursor + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_move_last(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = move_last_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.err != None: + raise result.err + raise TApplicationException(TApplicationException.MISSING_RESULT, "move_last failed: unknown result"); + + def move_next(self, cursor): + """ + Parameters: + - cursor + """ + self.send_move_next(cursor) + return self.recv_move_next() + + def send_move_next(self, cursor): + self._oprot.writeMessageBegin('move_next', TMessageType.CALL, self._seqid) + args = move_next_args() + args.cursor = cursor + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_move_next(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = move_next_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.err != None: + raise result.err + raise TApplicationException(TApplicationException.MISSING_RESULT, "move_next failed: unknown result"); + + def move_prev(self, cursor): + """ + Parameters: + - cursor + """ + self.send_move_prev(cursor) + return self.recv_move_prev() + + def send_move_prev(self, cursor): + self._oprot.writeMessageBegin('move_prev', TMessageType.CALL, self._seqid) + args = move_prev_args() + args.cursor = cursor + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_move_prev(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = move_prev_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.err != None: + raise result.err + raise TApplicationException(TApplicationException.MISSING_RESULT, "move_prev failed: unknown result"); + + def search(self, cursor, record): + """ + Parameters: + - cursor + - record + """ + self.send_search(cursor, record) + return self.recv_search() + + def send_search(self, cursor, record): + self._oprot.writeMessageBegin('search', TMessageType.CALL, self._seqid) + args = search_args() + args.cursor = cursor + args.record = record + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_search(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = search_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.err != None: + raise result.err + raise TApplicationException(TApplicationException.MISSING_RESULT, "search failed: unknown result"); + + def insert_record(self, cursor, record): + """ + Parameters: + - cursor + - record + """ + self.send_insert_record(cursor, record) + return self.recv_insert_record() + + def send_insert_record(self, cursor, record): + self._oprot.writeMessageBegin('insert_record', TMessageType.CALL, self._seqid) + args = insert_record_args() + args.cursor = cursor + args.record = record + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_insert_record(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = insert_record_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.err != None: + raise result.err + raise TApplicationException(TApplicationException.MISSING_RESULT, "insert_record failed: unknown result"); + + def update_record(self, cursor, value): + """ + Parameters: + - cursor + - value + """ + self.send_update_record(cursor, value) + self.recv_update_record() + + def send_update_record(self, cursor, value): + self._oprot.writeMessageBegin('update_record', TMessageType.CALL, self._seqid) + args = update_record_args() + args.cursor = cursor + args.value = value + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_update_record(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = update_record_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.err != None: + raise result.err + return + + def delete_record(self, cursor): + """ + Parameters: + - cursor + """ + self.send_delete_record(cursor) + self.recv_delete_record() + + def send_delete_record(self, cursor): + self._oprot.writeMessageBegin('delete_record', TMessageType.CALL, self._seqid) + args = delete_record_args() + args.cursor = cursor + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_delete_record(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = delete_record_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.err != None: + raise result.err + return + + def close_cursor(self, cursor, config): + """ + Parameters: + - cursor + - config + """ + self.send_close_cursor(cursor, config) + self.recv_close_cursor() + + def send_close_cursor(self, cursor, config): + self._oprot.writeMessageBegin('close_cursor', TMessageType.CALL, self._seqid) + args = close_cursor_args() + args.cursor = cursor + args.config = config + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_close_cursor(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = close_cursor_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.err != None: + raise result.err + return + + +class Processor(Iface, TProcessor): + def __init__(self, handler): + self._handler = handler + self._processMap = {} + self._processMap["strerror"] = Processor.process_strerror + self._processMap["version"] = Processor.process_version + self._processMap["open"] = Processor.process_open + self._processMap["open_session"] = Processor.process_open_session + self._processMap["close_connection"] = Processor.process_close_connection + self._processMap["close_session"] = Processor.process_close_session + self._processMap["open_cursor"] = Processor.process_open_cursor + self._processMap["dup_cursor"] = Processor.process_dup_cursor + self._processMap["create_table"] = Processor.process_create_table + self._processMap["rename_table"] = Processor.process_rename_table + self._processMap["drop_table"] = Processor.process_drop_table + self._processMap["truncate_table"] = Processor.process_truncate_table + self._processMap["verify_table"] = Processor.process_verify_table + self._processMap["begin_transaction"] = Processor.process_begin_transaction + self._processMap["commit_transaction"] = Processor.process_commit_transaction + self._processMap["rollback_transaction"] = Processor.process_rollback_transaction + self._processMap["checkpoint"] = Processor.process_checkpoint + self._processMap["move_first"] = Processor.process_move_first + self._processMap["move_last"] = Processor.process_move_last + self._processMap["move_next"] = Processor.process_move_next + self._processMap["move_prev"] = Processor.process_move_prev + self._processMap["search"] = Processor.process_search + self._processMap["insert_record"] = Processor.process_insert_record + self._processMap["update_record"] = Processor.process_update_record + self._processMap["delete_record"] = Processor.process_delete_record + self._processMap["close_cursor"] = Processor.process_close_cursor + + def process(self, iprot, oprot): + (name, type, seqid) = iprot.readMessageBegin() + if name not in self._processMap: + iprot.skip(TType.STRUCT) + iprot.readMessageEnd() + x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) + oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) + x.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + return + else: + self._processMap[name](self, seqid, iprot, oprot) + return True + + def process_strerror(self, seqid, iprot, oprot): + args = strerror_args() + args.read(iprot) + iprot.readMessageEnd() + result = strerror_result() + result.success = self._handler.strerror(args.err) + oprot.writeMessageBegin("strerror", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_version(self, seqid, iprot, oprot): + args = version_args() + args.read(iprot) + iprot.readMessageEnd() + result = version_result() + result.success = self._handler.version() + oprot.writeMessageBegin("version", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_open(self, seqid, iprot, oprot): + args = open_args() + args.read(iprot) + iprot.readMessageEnd() + result = open_result() + try: + result.success = self._handler.open(args.home, args.config) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("open", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_open_session(self, seqid, iprot, oprot): + args = open_session_args() + args.read(iprot) + iprot.readMessageEnd() + result = open_session_result() + try: + result.success = self._handler.open_session(args.connection, args.config) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("open_session", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_close_connection(self, seqid, iprot, oprot): + args = close_connection_args() + args.read(iprot) + iprot.readMessageEnd() + result = close_connection_result() + try: + self._handler.close_connection(args.connection, args.config) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("close_connection", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_close_session(self, seqid, iprot, oprot): + args = close_session_args() + args.read(iprot) + iprot.readMessageEnd() + result = close_session_result() + try: + self._handler.close_session(args.session, args.config) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("close_session", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_open_cursor(self, seqid, iprot, oprot): + args = open_cursor_args() + args.read(iprot) + iprot.readMessageEnd() + result = open_cursor_result() + try: + result.success = self._handler.open_cursor(args.session, args.uri, args.config) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("open_cursor", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_dup_cursor(self, seqid, iprot, oprot): + args = dup_cursor_args() + args.read(iprot) + iprot.readMessageEnd() + result = dup_cursor_result() + try: + result.success = self._handler.dup_cursor(args.session, args.cursor, args.config) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("dup_cursor", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_table(self, seqid, iprot, oprot): + args = create_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_table_result() + try: + self._handler.create_table(args.session, args.name, args.config) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("create_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_rename_table(self, seqid, iprot, oprot): + args = rename_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = rename_table_result() + try: + self._handler.rename_table(args.session, args.oldname, args.newname, args.config) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("rename_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_table(self, seqid, iprot, oprot): + args = drop_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_table_result() + try: + self._handler.drop_table(args.session, args.name, args.config) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("drop_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_truncate_table(self, seqid, iprot, oprot): + args = truncate_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = truncate_table_result() + try: + self._handler.truncate_table(args.session, args.name, args.cursor_start, args.cursor_end, args.config) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("truncate_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_verify_table(self, seqid, iprot, oprot): + args = verify_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = verify_table_result() + try: + self._handler.verify_table(args.session, args.name, args.config) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("verify_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_begin_transaction(self, seqid, iprot, oprot): + args = begin_transaction_args() + args.read(iprot) + iprot.readMessageEnd() + result = begin_transaction_result() + try: + self._handler.begin_transaction(args.session, args.config) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("begin_transaction", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_commit_transaction(self, seqid, iprot, oprot): + args = commit_transaction_args() + args.read(iprot) + iprot.readMessageEnd() + result = commit_transaction_result() + try: + self._handler.commit_transaction(args.session) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("commit_transaction", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_rollback_transaction(self, seqid, iprot, oprot): + args = rollback_transaction_args() + args.read(iprot) + iprot.readMessageEnd() + result = rollback_transaction_result() + try: + self._handler.rollback_transaction(args.session) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("rollback_transaction", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_checkpoint(self, seqid, iprot, oprot): + args = checkpoint_args() + args.read(iprot) + iprot.readMessageEnd() + result = checkpoint_result() + try: + self._handler.checkpoint(args.session, args.config) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("checkpoint", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_move_first(self, seqid, iprot, oprot): + args = move_first_args() + args.read(iprot) + iprot.readMessageEnd() + result = move_first_result() + try: + result.success = self._handler.move_first(args.cursor) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("move_first", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_move_last(self, seqid, iprot, oprot): + args = move_last_args() + args.read(iprot) + iprot.readMessageEnd() + result = move_last_result() + try: + result.success = self._handler.move_last(args.cursor) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("move_last", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_move_next(self, seqid, iprot, oprot): + args = move_next_args() + args.read(iprot) + iprot.readMessageEnd() + result = move_next_result() + try: + result.success = self._handler.move_next(args.cursor) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("move_next", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_move_prev(self, seqid, iprot, oprot): + args = move_prev_args() + args.read(iprot) + iprot.readMessageEnd() + result = move_prev_result() + try: + result.success = self._handler.move_prev(args.cursor) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("move_prev", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_search(self, seqid, iprot, oprot): + args = search_args() + args.read(iprot) + iprot.readMessageEnd() + result = search_result() + try: + result.success = self._handler.search(args.cursor, args.record) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("search", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_insert_record(self, seqid, iprot, oprot): + args = insert_record_args() + args.read(iprot) + iprot.readMessageEnd() + result = insert_record_result() + try: + result.success = self._handler.insert_record(args.cursor, args.record) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("insert_record", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_update_record(self, seqid, iprot, oprot): + args = update_record_args() + args.read(iprot) + iprot.readMessageEnd() + result = update_record_result() + try: + self._handler.update_record(args.cursor, args.value) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("update_record", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_delete_record(self, seqid, iprot, oprot): + args = delete_record_args() + args.read(iprot) + iprot.readMessageEnd() + result = delete_record_result() + try: + self._handler.delete_record(args.cursor) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("delete_record", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_close_cursor(self, seqid, iprot, oprot): + args = close_cursor_args() + args.read(iprot) + iprot.readMessageEnd() + result = close_cursor_result() + try: + self._handler.close_cursor(args.cursor, args.config) + except WT_ERROR, err: + result.err = err + oprot.writeMessageBegin("close_cursor", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + +# HELPER FUNCTIONS AND STRUCTURES + +class strerror_args: + """ + Attributes: + - err + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'err', None, None, ), # 1 + ) + + def __init__(self, err=None,): + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.err = iprot.readI32(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('strerror_args') + if self.err != None: + oprot.writeFieldBegin('err', TType.I32, 1) + oprot.writeI32(self.err) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class strerror_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRING, 'success', None, None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('strerror_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class version_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('version_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class version_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (WT_VERSION, WT_VERSION.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WT_VERSION() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('version_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class open_args: + """ + Attributes: + - home + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'home', None, None, ), # 1 + (2, TType.STRING, 'config', None, None, ), # 2 + ) + + def __init__(self, home=None, config=None,): + self.home = home + self.config = config + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.home = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.config = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('open_args') + if self.home != None: + oprot.writeFieldBegin('home', TType.STRING, 1) + oprot.writeString(self.home) + oprot.writeFieldEnd() + if self.config != None: + oprot.writeFieldBegin('config', TType.STRING, 2) + oprot.writeString(self.config) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class open_result: + """ + Attributes: + - success + - err + """ + + thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, err=None,): + self.success = success + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('open_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class open_session_args: + """ + Attributes: + - connection + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'connection', None, None, ), # 1 + (2, TType.STRING, 'config', None, None, ), # 2 + ) + + def __init__(self, connection=None, config=None,): + self.connection = connection + self.config = config + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.connection = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.config = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('open_session_args') + if self.connection != None: + oprot.writeFieldBegin('connection', TType.I32, 1) + oprot.writeI32(self.connection) + oprot.writeFieldEnd() + if self.config != None: + oprot.writeFieldBegin('config', TType.STRING, 2) + oprot.writeString(self.config) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class open_session_result: + """ + Attributes: + - success + - err + """ + + thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, err=None,): + self.success = success + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('open_session_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class close_connection_args: + """ + Attributes: + - connection + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'connection', None, None, ), # 1 + (2, TType.STRING, 'config', None, None, ), # 2 + ) + + def __init__(self, connection=None, config=None,): + self.connection = connection + self.config = config + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.connection = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.config = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('close_connection_args') + if self.connection != None: + oprot.writeFieldBegin('connection', TType.I32, 1) + oprot.writeI32(self.connection) + oprot.writeFieldEnd() + if self.config != None: + oprot.writeFieldBegin('config', TType.STRING, 2) + oprot.writeString(self.config) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class close_connection_result: + """ + Attributes: + - err + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, err=None,): + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('close_connection_result') + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class close_session_args: + """ + Attributes: + - session + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'session', None, None, ), # 1 + (2, TType.STRING, 'config', None, None, ), # 2 + ) + + def __init__(self, session=None, config=None,): + self.session = session + self.config = config + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.session = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.config = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('close_session_args') + if self.session != None: + oprot.writeFieldBegin('session', TType.I32, 1) + oprot.writeI32(self.session) + oprot.writeFieldEnd() + if self.config != None: + oprot.writeFieldBegin('config', TType.STRING, 2) + oprot.writeString(self.config) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class close_session_result: + """ + Attributes: + - err + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, err=None,): + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('close_session_result') + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class open_cursor_args: + """ + Attributes: + - session + - uri + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'session', None, None, ), # 1 + (2, TType.STRING, 'uri', None, None, ), # 2 + (3, TType.STRING, 'config', None, None, ), # 3 + ) + + def __init__(self, session=None, uri=None, config=None,): + self.session = session + self.uri = uri + self.config = config + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.session = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.uri = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.config = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('open_cursor_args') + if self.session != None: + oprot.writeFieldBegin('session', TType.I32, 1) + oprot.writeI32(self.session) + oprot.writeFieldEnd() + if self.uri != None: + oprot.writeFieldBegin('uri', TType.STRING, 2) + oprot.writeString(self.uri) + oprot.writeFieldEnd() + if self.config != None: + oprot.writeFieldBegin('config', TType.STRING, 3) + oprot.writeString(self.config) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class open_cursor_result: + """ + Attributes: + - success + - err + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (WT_CURSOR_HANDLE, WT_CURSOR_HANDLE.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, err=None,): + self.success = success + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WT_CURSOR_HANDLE() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('open_cursor_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class dup_cursor_args: + """ + Attributes: + - session + - cursor + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'session', None, None, ), # 1 + (2, TType.I32, 'cursor', None, None, ), # 2 + (3, TType.STRING, 'config', None, None, ), # 3 + ) + + def __init__(self, session=None, cursor=None, config=None,): + self.session = session + self.cursor = cursor + self.config = config + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.session = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.cursor = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.config = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('dup_cursor_args') + if self.session != None: + oprot.writeFieldBegin('session', TType.I32, 1) + oprot.writeI32(self.session) + oprot.writeFieldEnd() + if self.cursor != None: + oprot.writeFieldBegin('cursor', TType.I32, 2) + oprot.writeI32(self.cursor) + oprot.writeFieldEnd() + if self.config != None: + oprot.writeFieldBegin('config', TType.STRING, 3) + oprot.writeString(self.config) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class dup_cursor_result: + """ + Attributes: + - success + - err + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (WT_CURSOR_HANDLE, WT_CURSOR_HANDLE.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, err=None,): + self.success = success + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WT_CURSOR_HANDLE() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('dup_cursor_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_table_args: + """ + Attributes: + - session + - name + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'session', None, None, ), # 1 + (2, TType.STRING, 'name', None, None, ), # 2 + (3, TType.STRING, 'config', None, None, ), # 3 + ) + + def __init__(self, session=None, name=None, config=None,): + self.session = session + self.name = name + self.config = config + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.session = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.config = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_table_args') + if self.session != None: + oprot.writeFieldBegin('session', TType.I32, 1) + oprot.writeI32(self.session) + oprot.writeFieldEnd() + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.config != None: + oprot.writeFieldBegin('config', TType.STRING, 3) + oprot.writeString(self.config) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_table_result: + """ + Attributes: + - err + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, err=None,): + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_table_result') + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class rename_table_args: + """ + Attributes: + - session + - oldname + - newname + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'session', None, None, ), # 1 + (2, TType.STRING, 'oldname', None, None, ), # 2 + (3, TType.STRING, 'newname', None, None, ), # 3 + (4, TType.STRING, 'config', None, None, ), # 4 + ) + + def __init__(self, session=None, oldname=None, newname=None, config=None,): + self.session = session + self.oldname = oldname + self.newname = newname + self.config = config + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.session = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.oldname = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.newname = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.config = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('rename_table_args') + if self.session != None: + oprot.writeFieldBegin('session', TType.I32, 1) + oprot.writeI32(self.session) + oprot.writeFieldEnd() + if self.oldname != None: + oprot.writeFieldBegin('oldname', TType.STRING, 2) + oprot.writeString(self.oldname) + oprot.writeFieldEnd() + if self.newname != None: + oprot.writeFieldBegin('newname', TType.STRING, 3) + oprot.writeString(self.newname) + oprot.writeFieldEnd() + if self.config != None: + oprot.writeFieldBegin('config', TType.STRING, 4) + oprot.writeString(self.config) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class rename_table_result: + """ + Attributes: + - err + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, err=None,): + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('rename_table_result') + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_table_args: + """ + Attributes: + - session + - name + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'session', None, None, ), # 1 + (2, TType.STRING, 'name', None, None, ), # 2 + (3, TType.STRING, 'config', None, None, ), # 3 + ) + + def __init__(self, session=None, name=None, config=None,): + self.session = session + self.name = name + self.config = config + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.session = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.config = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_table_args') + if self.session != None: + oprot.writeFieldBegin('session', TType.I32, 1) + oprot.writeI32(self.session) + oprot.writeFieldEnd() + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.config != None: + oprot.writeFieldBegin('config', TType.STRING, 3) + oprot.writeString(self.config) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_table_result: + """ + Attributes: + - err + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, err=None,): + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_table_result') + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class truncate_table_args: + """ + Attributes: + - session + - name + - cursor_start + - cursor_end + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'session', None, None, ), # 1 + (2, TType.STRING, 'name', None, None, ), # 2 + (3, TType.I32, 'cursor_start', None, None, ), # 3 + (4, TType.I32, 'cursor_end', None, None, ), # 4 + (5, TType.STRING, 'config', None, None, ), # 5 + ) + + def __init__(self, session=None, name=None, cursor_start=None, cursor_end=None, config=None,): + self.session = session + self.name = name + self.cursor_start = cursor_start + self.cursor_end = cursor_end + self.config = config + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.session = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.cursor_start = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.cursor_end = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.config = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('truncate_table_args') + if self.session != None: + oprot.writeFieldBegin('session', TType.I32, 1) + oprot.writeI32(self.session) + oprot.writeFieldEnd() + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.cursor_start != None: + oprot.writeFieldBegin('cursor_start', TType.I32, 3) + oprot.writeI32(self.cursor_start) + oprot.writeFieldEnd() + if self.cursor_end != None: + oprot.writeFieldBegin('cursor_end', TType.I32, 4) + oprot.writeI32(self.cursor_end) + oprot.writeFieldEnd() + if self.config != None: + oprot.writeFieldBegin('config', TType.STRING, 5) + oprot.writeString(self.config) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class truncate_table_result: + """ + Attributes: + - err + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, err=None,): + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('truncate_table_result') + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class verify_table_args: + """ + Attributes: + - session + - name + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'session', None, None, ), # 1 + (2, TType.STRING, 'name', None, None, ), # 2 + (3, TType.STRING, 'config', None, None, ), # 3 + ) + + def __init__(self, session=None, name=None, config=None,): + self.session = session + self.name = name + self.config = config + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.session = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.config = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('verify_table_args') + if self.session != None: + oprot.writeFieldBegin('session', TType.I32, 1) + oprot.writeI32(self.session) + oprot.writeFieldEnd() + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.config != None: + oprot.writeFieldBegin('config', TType.STRING, 3) + oprot.writeString(self.config) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class verify_table_result: + """ + Attributes: + - err + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, err=None,): + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('verify_table_result') + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class begin_transaction_args: + """ + Attributes: + - session + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'session', None, None, ), # 1 + (2, TType.STRING, 'config', None, None, ), # 2 + ) + + def __init__(self, session=None, config=None,): + self.session = session + self.config = config + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.session = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.config = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('begin_transaction_args') + if self.session != None: + oprot.writeFieldBegin('session', TType.I32, 1) + oprot.writeI32(self.session) + oprot.writeFieldEnd() + if self.config != None: + oprot.writeFieldBegin('config', TType.STRING, 2) + oprot.writeString(self.config) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class begin_transaction_result: + """ + Attributes: + - err + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, err=None,): + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('begin_transaction_result') + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class commit_transaction_args: + """ + Attributes: + - session + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'session', None, None, ), # 1 + ) + + def __init__(self, session=None,): + self.session = session + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.session = iprot.readI32(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('commit_transaction_args') + if self.session != None: + oprot.writeFieldBegin('session', TType.I32, 1) + oprot.writeI32(self.session) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class commit_transaction_result: + """ + Attributes: + - err + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, err=None,): + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('commit_transaction_result') + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class rollback_transaction_args: + """ + Attributes: + - session + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'session', None, None, ), # 1 + ) + + def __init__(self, session=None,): + self.session = session + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.session = iprot.readI32(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('rollback_transaction_args') + if self.session != None: + oprot.writeFieldBegin('session', TType.I32, 1) + oprot.writeI32(self.session) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class rollback_transaction_result: + """ + Attributes: + - err + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, err=None,): + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('rollback_transaction_result') + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class checkpoint_args: + """ + Attributes: + - session + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'session', None, None, ), # 1 + (2, TType.STRING, 'config', None, None, ), # 2 + ) + + def __init__(self, session=None, config=None,): + self.session = session + self.config = config + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.session = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.config = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('checkpoint_args') + if self.session != None: + oprot.writeFieldBegin('session', TType.I32, 1) + oprot.writeI32(self.session) + oprot.writeFieldEnd() + if self.config != None: + oprot.writeFieldBegin('config', TType.STRING, 2) + oprot.writeString(self.config) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class checkpoint_result: + """ + Attributes: + - err + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, err=None,): + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('checkpoint_result') + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class move_first_args: + """ + Attributes: + - cursor + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'cursor', None, None, ), # 1 + ) + + def __init__(self, cursor=None,): + self.cursor = cursor + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.cursor = iprot.readI32(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('move_first_args') + if self.cursor != None: + oprot.writeFieldBegin('cursor', TType.I32, 1) + oprot.writeI32(self.cursor) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class move_first_result: + """ + Attributes: + - success + - err + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (WT_RECORD, WT_RECORD.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, err=None,): + self.success = success + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WT_RECORD() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('move_first_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class move_last_args: + """ + Attributes: + - cursor + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'cursor', None, None, ), # 1 + ) + + def __init__(self, cursor=None,): + self.cursor = cursor + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.cursor = iprot.readI32(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('move_last_args') + if self.cursor != None: + oprot.writeFieldBegin('cursor', TType.I32, 1) + oprot.writeI32(self.cursor) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class move_last_result: + """ + Attributes: + - success + - err + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (WT_RECORD, WT_RECORD.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, err=None,): + self.success = success + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WT_RECORD() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('move_last_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class move_next_args: + """ + Attributes: + - cursor + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'cursor', None, None, ), # 1 + ) + + def __init__(self, cursor=None,): + self.cursor = cursor + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.cursor = iprot.readI32(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('move_next_args') + if self.cursor != None: + oprot.writeFieldBegin('cursor', TType.I32, 1) + oprot.writeI32(self.cursor) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class move_next_result: + """ + Attributes: + - success + - err + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (WT_RECORD, WT_RECORD.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, err=None,): + self.success = success + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WT_RECORD() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('move_next_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class move_prev_args: + """ + Attributes: + - cursor + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'cursor', None, None, ), # 1 + ) + + def __init__(self, cursor=None,): + self.cursor = cursor + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.cursor = iprot.readI32(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('move_prev_args') + if self.cursor != None: + oprot.writeFieldBegin('cursor', TType.I32, 1) + oprot.writeI32(self.cursor) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class move_prev_result: + """ + Attributes: + - success + - err + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (WT_RECORD, WT_RECORD.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, err=None,): + self.success = success + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = WT_RECORD() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('move_prev_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class search_args: + """ + Attributes: + - cursor + - record + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'cursor', None, None, ), # 1 + (2, TType.STRUCT, 'record', (WT_RECORD, WT_RECORD.thrift_spec), None, ), # 2 + ) + + def __init__(self, cursor=None, record=None,): + self.cursor = cursor + self.record = record + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.cursor = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.record = WT_RECORD() + self.record.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('search_args') + if self.cursor != None: + oprot.writeFieldBegin('cursor', TType.I32, 1) + oprot.writeI32(self.cursor) + oprot.writeFieldEnd() + if self.record != None: + oprot.writeFieldBegin('record', TType.STRUCT, 2) + self.record.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class search_result: + """ + Attributes: + - success + - err + """ + + thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, err=None,): + self.success = success + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('search_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class insert_record_args: + """ + Attributes: + - cursor + - record + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'cursor', None, None, ), # 1 + (2, TType.STRUCT, 'record', (WT_RECORD, WT_RECORD.thrift_spec), None, ), # 2 + ) + + def __init__(self, cursor=None, record=None,): + self.cursor = cursor + self.record = record + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.cursor = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.record = WT_RECORD() + self.record.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('insert_record_args') + if self.cursor != None: + oprot.writeFieldBegin('cursor', TType.I32, 1) + oprot.writeI32(self.cursor) + oprot.writeFieldEnd() + if self.record != None: + oprot.writeFieldBegin('record', TType.STRUCT, 2) + self.record.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class insert_record_result: + """ + Attributes: + - success + - err + """ + + thrift_spec = ( + (0, TType.STRING, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, err=None,): + self.success = success + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('insert_record_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success) + oprot.writeFieldEnd() + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class update_record_args: + """ + Attributes: + - cursor + - value + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'cursor', None, None, ), # 1 + (2, TType.STRING, 'value', None, None, ), # 2 + ) + + def __init__(self, cursor=None, value=None,): + self.cursor = cursor + self.value = value + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.cursor = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.value = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('update_record_args') + if self.cursor != None: + oprot.writeFieldBegin('cursor', TType.I32, 1) + oprot.writeI32(self.cursor) + oprot.writeFieldEnd() + if self.value != None: + oprot.writeFieldBegin('value', TType.STRING, 2) + oprot.writeString(self.value) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class update_record_result: + """ + Attributes: + - err + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, err=None,): + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('update_record_result') + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class delete_record_args: + """ + Attributes: + - cursor + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'cursor', None, None, ), # 1 + ) + + def __init__(self, cursor=None,): + self.cursor = cursor + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.cursor = iprot.readI32(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('delete_record_args') + if self.cursor != None: + oprot.writeFieldBegin('cursor', TType.I32, 1) + oprot.writeI32(self.cursor) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class delete_record_result: + """ + Attributes: + - err + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, err=None,): + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('delete_record_result') + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class close_cursor_args: + """ + Attributes: + - cursor + - config + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'cursor', None, None, ), # 1 + (2, TType.STRING, 'config', None, None, ), # 2 + ) + + def __init__(self, cursor=None, config=None,): + self.cursor = cursor + self.config = config + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.cursor = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.config = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('close_cursor_args') + if self.cursor != None: + oprot.writeFieldBegin('cursor', TType.I32, 1) + oprot.writeI32(self.cursor) + oprot.writeFieldEnd() + if self.config != None: + oprot.writeFieldBegin('config', TType.STRING, 2) + oprot.writeString(self.config) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class close_cursor_result: + """ + Attributes: + - err + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'err', (WT_ERROR, WT_ERROR.thrift_spec), None, ), # 1 + ) + + def __init__(self, err=None,): + self.err = err + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.err = WT_ERROR() + self.err.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('close_cursor_result') + if self.err != None: + oprot.writeFieldBegin('err', TType.STRUCT, 1) + self.err.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) diff --git a/lang/python/src/wiredtiger/service/__init__.py b/lang/python/src/wiredtiger/service/__init__.py new file mode 100644 index 00000000000..35e1b55e02b --- /dev/null +++ b/lang/python/src/wiredtiger/service/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants', 'WiredTiger'] diff --git a/lang/python/src/wiredtiger/service/constants.py b/lang/python/src/wiredtiger/service/constants.py new file mode 100644 index 00000000000..2f17ec34fee --- /dev/null +++ b/lang/python/src/wiredtiger/service/constants.py @@ -0,0 +1,9 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +from thrift.Thrift import * +from ttypes import * + diff --git a/lang/python/src/wiredtiger/service/ttypes.py b/lang/python/src/wiredtiger/service/ttypes.py new file mode 100644 index 00000000000..bfa08e814e7 --- /dev/null +++ b/lang/python/src/wiredtiger/service/ttypes.py @@ -0,0 +1,339 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +from thrift.Thrift import * + +from thrift.transport import TTransport +from thrift.protocol import TBinaryProtocol, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + + +class WT_RECORD: + """ + Attributes: + - key + - value + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'key', None, None, ), # 1 + (2, TType.STRING, 'value', None, None, ), # 2 + ) + + def __init__(self, key=None, value=None,): + self.key = key + self.value = value + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.key = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.value = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('WT_RECORD') + if self.key != None: + oprot.writeFieldBegin('key', TType.STRING, 1) + oprot.writeString(self.key) + oprot.writeFieldEnd() + if self.value != None: + oprot.writeFieldBegin('value', TType.STRING, 2) + oprot.writeString(self.value) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class WT_CURSOR_HANDLE: + """ + Attributes: + - id + - keyfmt + - valuefmt + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'id', None, None, ), # 1 + (2, TType.STRING, 'keyfmt', None, None, ), # 2 + (3, TType.STRING, 'valuefmt', None, None, ), # 3 + ) + + def __init__(self, id=None, keyfmt=None, valuefmt=None,): + self.id = id + self.keyfmt = keyfmt + self.valuefmt = valuefmt + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.id = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.keyfmt = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.valuefmt = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('WT_CURSOR_HANDLE') + if self.id != None: + oprot.writeFieldBegin('id', TType.I32, 1) + oprot.writeI32(self.id) + oprot.writeFieldEnd() + if self.keyfmt != None: + oprot.writeFieldBegin('keyfmt', TType.STRING, 2) + oprot.writeString(self.keyfmt) + oprot.writeFieldEnd() + if self.valuefmt != None: + oprot.writeFieldBegin('valuefmt', TType.STRING, 3) + oprot.writeString(self.valuefmt) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class WT_VERSION: + """ + Attributes: + - version_string + - major + - minor + - patch + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'version_string', None, None, ), # 1 + (2, TType.I32, 'major', None, None, ), # 2 + (3, TType.I32, 'minor', None, None, ), # 3 + (4, TType.I32, 'patch', None, None, ), # 4 + ) + + def __init__(self, version_string=None, major=None, minor=None, patch=None,): + self.version_string = version_string + self.major = major + self.minor = minor + self.patch = patch + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.version_string = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.major = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.minor = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.patch = iprot.readI32(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('WT_VERSION') + if self.version_string != None: + oprot.writeFieldBegin('version_string', TType.STRING, 1) + oprot.writeString(self.version_string) + oprot.writeFieldEnd() + if self.major != None: + oprot.writeFieldBegin('major', TType.I32, 2) + oprot.writeI32(self.major) + oprot.writeFieldEnd() + if self.minor != None: + oprot.writeFieldBegin('minor', TType.I32, 3) + oprot.writeI32(self.minor) + oprot.writeFieldEnd() + if self.patch != None: + oprot.writeFieldBegin('patch', TType.I32, 4) + oprot.writeI32(self.patch) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class WT_ERROR(Exception): + """ + Attributes: + - err + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'err', None, None, ), # 1 + (2, TType.STRING, 'message', None, None, ), # 2 + ) + + def __init__(self, err=None, message=None,): + self.err = err + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.err = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('WT_ERROR') + if self.err != None: + oprot.writeFieldBegin('err', TType.I32, 1) + oprot.writeI32(self.err) + oprot.writeFieldEnd() + if self.message != None: + oprot.writeFieldBegin('message', TType.STRING, 2) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) diff --git a/src/api/api.c b/src/api/api.c index e5c2945f9ea..d1a35477ea1 100644 --- a/src/api/api.c +++ b/src/api/api.c @@ -109,7 +109,7 @@ static int __session_open_cursor(WT_SESSION *session, const char *uri, const cha return 0; } -static int __session_dup_cursor(WT_SESSION *, WT_CURSOR *cursor, const char *config, WT_CURSOR *dupp) +static int __session_dup_cursor(WT_SESSION *, WT_CURSOR *cursor, const char *config, WT_CURSOR **dupp) { return ENOTSUP; }