summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2013-07-17 10:13:11 +1000
committerMichael Cahill <michael.cahill@wiredtiger.com>2013-07-17 10:13:11 +1000
commit1fb70757f2e7d5a783b389249a3bcd3149eb6fcf (patch)
tree9c84590ae3456273596f5de205efb1df19cb1ea8
parentba05f74e0d5c868b6b3b346d03c57d050305f88d (diff)
downloadmongo-1fb70757f2e7d5a783b389249a3bcd3149eb6fcf.tar.gz
Fix "make install" of Python. Remove old code and restructure the Python sources under lang/python to simplify the installation step.
--HG-- rename : lang/python/fpacking.py => lang/python/wiredtiger/fpacking.py rename : lang/python/intpack-test.py => lang/python/wiredtiger/intpack-test.py rename : lang/python/intpacking.py => lang/python/wiredtiger/intpacking.py rename : lang/python/packing-test.py => lang/python/wiredtiger/packing-test.py rename : lang/python/packing.py => lang/python/wiredtiger/packing.py
-rw-r--r--.hgignore2
-rw-r--r--build_posix/aclocal/options.m46
-rw-r--r--build_posix/configure.ac.in2
-rw-r--r--lang/python/Makefile.am14
-rw-r--r--lang/python/setup.py8
-rw-r--r--lang/python/src/server.py38
-rw-r--r--lang/python/src/wiredtiger/__init__.py241
-rw-r--r--lang/python/src/wiredtiger/impl/__init__.py219
-rwxr-xr-xlang/python/src/wiredtiger/service/WiredTiger-remote267
-rw-r--r--lang/python/src/wiredtiger/service/WiredTiger.py5200
-rw-r--r--lang/python/src/wiredtiger/service/__init__.py1
-rw-r--r--lang/python/src/wiredtiger/service/constants.py9
-rw-r--r--lang/python/src/wiredtiger/service/ttypes.py411
-rw-r--r--lang/python/src/wiredtiger/util.py13
-rw-r--r--lang/python/wiredtiger/fpacking.py (renamed from lang/python/fpacking.py)0
-rw-r--r--lang/python/wiredtiger/intpack-test.py (renamed from lang/python/intpack-test.py)0
-rw-r--r--lang/python/wiredtiger/intpacking.py (renamed from lang/python/intpacking.py)0
-rw-r--r--lang/python/wiredtiger/packing-test.py (renamed from lang/python/packing-test.py)0
-rw-r--r--lang/python/wiredtiger/packing.py (renamed from lang/python/packing.py)0
19 files changed, 23 insertions, 6408 deletions
diff --git a/.hgignore b/.hgignore
index a523a281339..724585de3ac 100644
--- a/.hgignore
+++ b/.hgignore
@@ -18,7 +18,7 @@
^docs/latex
^docs/python
^docs/swig
-^lang/python/(wiredtiger.py|wiredtiger_wrap.c)
+^lang/python/(wiredtiger/__init__.py|wiredtiger_wrap.c)
^releases
^src/server
^test/bt/(CONFIG|__rand|__wt.bdb|__wt.run|__wt.wt|db|t|vgout\..*)
diff --git a/build_posix/aclocal/options.m4 b/build_posix/aclocal/options.m4
index be9df269a9a..76776c50eb3 100644
--- a/build_posix/aclocal/options.m4
+++ b/build_posix/aclocal/options.m4
@@ -80,6 +80,12 @@ esac
AC_MSG_RESULT($wt_cv_enable_python)
AM_CONDITIONAL([PYTHON], [test x$wt_cv_enable_python = xyes])
+AC_MSG_CHECKING(if --with-python-prefix option specified)
+AC_ARG_WITH(python-prefix,
+ [AS_HELP_STRING([--with-python-prefix=DIR],
+ [Installation prefix for Python module.])])
+AC_MSG_RESULT($with_python_prefix)
+
AC_MSG_CHECKING(if --enable-snappy option specified)
AC_ARG_ENABLE(snappy,
[AS_HELP_STRING([--enable-snappy],
diff --git a/build_posix/configure.ac.in b/build_posix/configure.ac.in
index cab117b5c56..3265282358d 100644
--- a/build_posix/configure.ac.in
+++ b/build_posix/configure.ac.in
@@ -72,6 +72,8 @@ fi
if test "$wt_cv_enable_python" = "yes"; then
AM_PATH_PYTHON([2.6])
+ PYTHON_PREFIX=$with_python_prefix
+ AC_SUBST(PYTHON_PREFIX)
fi
AM_TYPES
diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
index 6ddf48cd201..49a92658b4a 100644
--- a/lang/python/Makefile.am
+++ b/lang/python/Makefile.am
@@ -5,18 +5,24 @@ if DEBUG
PY_SETUP_DEBUG = -g
endif
all-local: _wiredtiger.so
+
+# We keep generated Python sources under lang/python: that's where they live
+# in release packages.
$(PYSRC)/wiredtiger_wrap.c: $(top_srcdir)/src/include/wiredtiger.in $(PYSRC)/wiredtiger.i
- @(cd $(PYSRC) && \
- $(SWIG) -python -threads -O -Wall -nodefaultctor -nodefaultdtor -I$(abs_top_builddir) wiredtiger.i)
+ (cd $(PYSRC) && \
+ $(SWIG) -python -threads -O -Wall -nodefaultctor -nodefaultdtor -I$(abs_top_builddir) wiredtiger.i && \
+ mv wiredtiger.py wiredtiger/__init__.py)
_wiredtiger.so: $(top_builddir)/libwiredtiger.la $(PYSRC)/wiredtiger_wrap.c
$(PYTHON) $(PYSRC)/setup.py build_ext -b . -t . -f $(PY_SETUP_DEBUG)
install-exec-local:
- $(PYTHON) $(PYSRC)/setup.py install_lib -b . --skip-build
+ $(PYTHON) $(PYSRC)/setup.py build_py -d build
+ $(PYTHON) $(PYSRC)/setup.py build_ext -b build -t . -f $(PY_SETUP_DEBUG)
+ $(PYTHON) $(PYSRC)/setup.py install_lib -b build --skip-build
clean-local:
$(PYTHON) $(PYSRC)/setup.py clean
- rm -rf _wiredtiger.so WT_TEST
+ rm -rf _wiredtiger.so WT_TEST build wiredtiger
TESTS = run-ex_access
diff --git a/lang/python/setup.py b/lang/python/setup.py
index 5bf81970f60..e62c37e3b9b 100644
--- a/lang/python/setup.py
+++ b/lang/python/setup.py
@@ -21,8 +21,7 @@ extra_cflags = [
dir = os.path.dirname(__file__)
# Read the version information from the RELEASE file
-top = os.path.dirname(os.path.dirname(dir))
-for l in open(os.path.join(top, 'RELEASE')):
+for l in open(os.path.join(dir, '..', '..', 'RELEASE')):
if re.match(r'WIREDTIGER_VERSION_(?:MAJOR|MINOR|PATCH)=', l):
exec(l)
@@ -30,11 +29,12 @@ wt_ver = '%d.%d' % (WIREDTIGER_VERSION_MAJOR, WIREDTIGER_VERSION_MINOR)
setup(name='wiredtiger', version=wt_ver,
ext_modules=[Extension('_wiredtiger',
- [os.path.join(dir, 'wiredtiger_wrap.c')],
+ [os.path.join(dir, 'wiredtiger_wrap.c')],
include_dirs=['../..'],
library_dirs=['../../.libs'],
libraries=['wiredtiger'],
extra_compile_args=extra_cflags,
)],
- py_modules=['wiredtiger'],
+ package_dir={'' : dir},
+ packages=['wiredtiger'],
)
diff --git a/lang/python/src/server.py b/lang/python/src/server.py
deleted file mode 100644
index 73f75016342..00000000000
--- a/lang/python/src/server.py
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2008-2013 WiredTiger, Inc.
-# All rights reserved.
-#
-# See the file LICENSE for redistribution information.
-#
-# WiredTiger Python RPC server for testing and tutorials.
-
-import sys
-
-from wiredtiger.service import WiredTiger
-from wiredtiger.service.ttypes import *
-
-from wiredtiger.impl import *
-
-from thrift.transport import TSocket
-from thrift.transport import TTransport
-from thrift.protocol import TBinaryProtocol
-from thrift.server import TServer
-
-class WiredTigerHandler:
-
-handler = WiredTigerHandler()
-processor = WiredTiger.Processor(handler)
-transport = TSocket.TServerSocket(9090)
-tfactory = TTransport.TBufferedTransportFactory()
-pfactory = TBinaryProtocol.TBinaryProtocolFactory()
-
-server = TServer.TSimpleServer(processor, transport, tfactory, pfactory)
-
-# We could do one of these for a multithreaded server
-#server = TServer.TThreadedServer(processor, transport, tfactory, pfactory)
-#server = TServer.TThreadPoolServer(processor, transport, tfactory, pfactory)
-
-print 'Starting the server...'
-server.serve()
-print 'done.'
diff --git a/lang/python/src/wiredtiger/__init__.py b/lang/python/src/wiredtiger/__init__.py
deleted file mode 100644
index db7f2aefbc2..00000000000
--- a/lang/python/src/wiredtiger/__init__.py
+++ /dev/null
@@ -1,241 +0,0 @@
-#
-#
-# Copyright (c) 2008-2013 WiredTiger, Inc.
-# All rights reserved.
-#
-# See the file LICENSE for redistribution information.
-#
-# WiredTiger public interface
-
-'''
-WiredTiger Python API.
-
-This module exports several functions and classes.
-'''
-
-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
- sizebytes = 0
- for offset, f in enumerate(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':
- if offset == len(fmt) - 1:
- result += (s,)
- else:
- 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 offset, f in enumerate(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 and offset != len(fmt) - 1:
- 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.client = session.client
- 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 unpack(self.keyfmt, self.key)
-
- def get_value(self):
- return unpack(self.keyfmt, self.value)
-
- def set_key(self, *args):
- self.key = pack(self.keyfmt, *args)
-
- def set_value(self, *args):
- self.value = pack(self.valuefmt, *args)
-
- def first(self):
- result = self.client.move_first(self.id)
- self.key, self.value = result.record.key, result.record.value
- return result.exact
-
- def last(self):
- result = self.client.move_last(self.id)
- self.key, self.value = result.record.key, result.record.value
- return result.exact
-
- def next(self):
- result = self.client.move_next(self.id)
- self.key, self.value = result.record.key, result.record.value
- return result.exact
-
- def prev(self):
- result = self.client.move_prev(self.id)
- self.key, self.value = result.record.key, result.record.value
- return result.exact
-
- def search(self):
- result = self.client.search(self.id, WT_RECORD(self.key, self.value))
- self.key, self.value = result.record.key, result.record.value
- return result.exact
-
- 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 dup_cursor(self, c, config=''):
- return Cursor(self, self.client.dup_cursor(self.id, c.id, 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/impl/__init__.py b/lang/python/src/wiredtiger/impl/__init__.py
deleted file mode 100644
index 20501c97063..00000000000
--- a/lang/python/src/wiredtiger/impl/__init__.py
+++ /dev/null
@@ -1,219 +0,0 @@
-#
-#
-# Copyright (c) 2008-2013 WiredTiger, Inc.
-# All rights reserved.
-#
-# See the file LICENSE for redistribution information.
-#
-# WiredTiger API implementation
-
-'''
-WiredTiger Python API implementation.
-'''
-
-import struct
-from urlparse import urlparse
-from wiredtiger import pack, unpack
-from wiredtiger.util import parse_config
-
-# Import the BDB symbols with the 'db.' prefix, it avoids polluting the
-# namespace of this package
-from bsddb3 import db
-
-class Table:
- def __init__(self, db, name, key_format='u', value_format='u', columns=(,), colgroups=(,), indices=(,)):
- self.db = db
- self.name = name
- self.key_format = key_format
- self.value_format = value_format
- self.columns = columns
- self.colgroups = colgroups
- self.indices = indices
-
- def close(self):
- self.db.close(db.DB_NOSYNC)
-
- def check_schema(self, key_format='u', value_format='u', columns=(,), colgroups=(,), indices=(,)):
- if (self.key_format != key_format or
- self.value_format != value_format or
- self.columns != columns or
- self.colgroups != colgroups or
- self.indices != indices):
- raise 'Schemas don\'t match for table "' + self.name + '"'
-
-class Cursor:
- def __init__(self, session, table):
- self.session = session
- self.table = table
- self.key_format = table.key_format
- self.value_format = table.value_format
- self.dbc = table.db.cursor()
-
- def close(self, config=''):
- self.dbc.close()
- self.session.cursors.remove(self)
-
- def get_key(self):
- return unpack(self.key_format, self.key)
-
- def get_value(self):
- return unpack(self.key_format, self.value)
-
- def set_key(self, *args):
- self.key = pack(self.key_format, *args)
-
- def set_value(self, *args):
- self.value = pack(self.value_format, *args)
-
- def first(self):
- self.key, self.value = self.dbc.first()
-
- def last(self):
- self.key, self.value = self.dbc.last()
-
- def next(self):
- self.key, self.value = self.dbc.next()
-
- def prev(self):
- self.key, self.value = self.dbc.prev()
-
- def search(self):
- searchkey = self.key
- self.key, self.value = self.dbc.set_range(self.key)
- return (self.key == searchkey)
-
- def insert(self):
- self.dbc.put(self.key, self.value)
- return self.key
-
- def update(self):
- self.dbc.put(self.key, self.value, db.DB_CURRENT)
-
- def delete(self):
- self.dbc.delete()
-
-
-class Session:
- def __init__(self, conn, id):
- self.conn = conn
- self.cursors = []
- self.tables = {'schema' : conn.schematab}
-
- def _close_cursors(self):
- # Work on a copy of the list because Cursor.close removes itself
- for c in self.cursors[:]:
- c.close()
-
- def close(self, config=''):
- self._close_cursors()
- self.conn.sessions.remove(self)
-
- def open_cursor(self, uri, config=''):
- c = self.conn._open_cursor(self, uri, config)
- self.cursors.append(c)
- return c
-
- def dup_cursor(self, c, config=''):
- dupc = c.dup()
- self.cursors.append(dupc)
- return dupc
-
- def _open_table(self, name):
- schema_cur = Cursor(self, self.conn.schematab)
- schema_cur.set_key(name)
- if schema_cur.search():
- k, v, c, cset, idx = schema_cur.get_value()
- c = tuple(parse_config(c))
- cset = tuple(parse_config(cset))
- idx = tuple(parse_config(idx))
- self.tables[name] = Table(k, v, c, cset, idx)
-
- def create_table(self, name, config=''):
- schema = {}
- for k, v in parse_config(config):
- if k in ('key_format', 'value_format', 'columns'):
- schema[k] = v
- elif k.startswith('colgroup'):
- schema['colgroup'] = schema.get('colgroup', (,)) + (k[len('colgroup')+1:], v)
- elif k.startswith('index'):
- schema['indices'] = schema.get('indices', (,)) + (k[len('index')+1:], v)
- else:
- raise 'Unknown configuration "' + k + '"'
- if name in self.tables:
- self.tables[name].check_schema(**schema)
- # XXX else try to open the table and retry
-
- def rename_table(self, oldname, newname, config=''):
- pass
-
- def drop_table(self, name, config=''):
- pass
-
- def truncate_table(self, name, start=None, end=None, config=''):
- pass
-
- def verify_table(self, name, config=''):
- pass
-
- def begin_transaction(self, config=''):
- if self.cursors:
- raise 'Transactions cannot be started with cursors open'
-
- def commit_transaction(self):
- self._close_cursors()
- pass
-
- def rollback_transaction(self):
- self._close_cursors()
- pass
-
- def checkpoint(self, config=''):
- pass
-
-
-class Connection:
- def __init__(self, uri, config=''):
- url = urlparse(uri)
- parts = url[1].split(':')
- self.host = parts[0]
- if len(parts) > 1:
- port = int(parts[1])
- else:
- port = 9090
-
- self.home = url[2]
- self.sessions = []
-
- self.env = db.DBEnv();
- self.env.open(self.home,
- db.DB_PRIVATE | db.DB_CREATE | db.DB_INIT_MPOOL | db.DB_THREAD)
- schemadb = db.DB(self.env);
- schemadb.open("__wt_schema.db", None, db.DB_BTREE, db.DB_CREATE)
-
- # The schema of the schema table.
- self.schematab = Table(schemadb, key_format='S', value_format='SSSSS',
- columns=('name', 'key_format', 'value_format', 'colgroups', 'indices'))
-
- def close(self, config=''):
- # Work on a copy of the list because Session.close removes itself
- for s in self.sessions[:]:
- s.close()
- self.schematab.close()
- self.env.close()
-
- def version(self):
- return ("WiredTiger Python API 0.0.1", 0, 0, 1)
-
- def open_session(self, config=''):
- s = Session(self, config)
- self.sessions.append(s)
- return s
-
- def _open_cursor(self, session, uri, config):
- if uri == 'table:':
- return Cursor(session, self.schematab)
- elif uri.startswith('table:'):
- # XXX projections
- return Cursor(session, session._get_table(uri[6:]))
- # XXX application-specific cursor types?
- raise 'Unknown cursor type for "' + uri + '"'
diff --git a/lang/python/src/wiredtiger/service/WiredTiger-remote b/lang/python/src/wiredtiger/service/WiredTiger-remote
deleted file mode 100755
index 027792c9c55..00000000000
--- a/lang/python/src/wiredtiger/service/WiredTiger-remote
+++ /dev/null
@@ -1,267 +0,0 @@
-#!/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 ' bool is_new(WT_HANDLE connection)'
- print ' void close_session(WT_HANDLE session, string config)'
- print ' WT_CURSOR_HANDLE open_cursor(WT_HANDLE session, string uri, WT_HANDLE to_dup, 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, string config)'
- print ' void rollback_transaction(WT_HANDLE session, string config)'
- print ' void checkpoint(WT_HANDLE session, string config)'
- print ' WT_MOVE_RESULT move_first(WT_HANDLE cursor)'
- print ' WT_MOVE_RESULT move_last(WT_HANDLE cursor)'
- print ' WT_MOVE_RESULT move_next(WT_HANDLE cursor)'
- print ' WT_MOVE_RESULT move_prev(WT_HANDLE cursor)'
- print ' WT_MOVE_RESULT search(WT_HANDLE cursor, WT_RECORD record)'
- print ' WT_MOVE_RESULT search_near(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 == 'is_new':
- if len(args) != 1:
- print 'is_new requires 1 args'
- sys.exit(1)
- pp.pprint(client.is_new(eval(args[0]),))
-
-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) != 4:
- print 'open_cursor requires 4 args'
- sys.exit(1)
- pp.pprint(client.open_cursor(eval(args[0]),args[1],eval(args[2]),args[3],))
-
-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) != 2:
- print 'commit_transaction requires 2 args'
- sys.exit(1)
- pp.pprint(client.commit_transaction(eval(args[0]),args[1],))
-
-elif cmd == 'rollback_transaction':
- if len(args) != 2:
- print 'rollback_transaction requires 2 args'
- sys.exit(1)
- pp.pprint(client.rollback_transaction(eval(args[0]),args[1],))
-
-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 == 'search_near':
- if len(args) != 2:
- print 'search_near requires 2 args'
- sys.exit(1)
- pp.pprint(client.search_near(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
deleted file mode 100644
index e6689cf2714..00000000000
--- a/lang/python/src/wiredtiger/service/WiredTiger.py
+++ /dev/null
@@ -1,5200 +0,0 @@
-#
-# 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 is_new(self, connection):
- """
- Parameters:
- - connection
- """
- pass
-
- def close_session(self, session, config):
- """
- Parameters:
- - session
- - config
- """
- pass
-
- def open_cursor(self, session, uri, to_dup, config):
- """
- Parameters:
- - session
- - uri
- - to_dup
- - 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, config):
- """
- Parameters:
- - session
- - config
- """
- pass
-
- def rollback_transaction(self, session, config):
- """
- Parameters:
- - session
- - config
- """
- 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 search_near(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 is_new(self, connection):
- """
- Parameters:
- - connection
- """
- self.send_is_new(connection)
- return self.recv_is_new()
-
- def send_is_new(self, connection):
- self._oprot.writeMessageBegin('is_new', TMessageType.CALL, self._seqid)
- args = is_new_args()
- args.connection = connection
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_is_new(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = is_new_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- if result.success != None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "is_new failed: unknown result");
-
- 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, to_dup, config):
- """
- Parameters:
- - session
- - uri
- - to_dup
- - config
- """
- self.send_open_cursor(session, uri, to_dup, config)
- return self.recv_open_cursor()
-
- def send_open_cursor(self, session, uri, to_dup, config):
- self._oprot.writeMessageBegin('open_cursor', TMessageType.CALL, self._seqid)
- args = open_cursor_args()
- args.session = session
- args.uri = uri
- args.to_dup = to_dup
- 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 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, config):
- """
- Parameters:
- - session
- - config
- """
- self.send_commit_transaction(session, config)
- self.recv_commit_transaction()
-
- def send_commit_transaction(self, session, config):
- self._oprot.writeMessageBegin('commit_transaction', TMessageType.CALL, self._seqid)
- args = commit_transaction_args()
- args.session = session
- args.config = config
- 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, config):
- """
- Parameters:
- - session
- - config
- """
- self.send_rollback_transaction(session, config)
- self.recv_rollback_transaction()
-
- def send_rollback_transaction(self, session, config):
- self._oprot.writeMessageBegin('rollback_transaction', TMessageType.CALL, self._seqid)
- args = rollback_transaction_args()
- args.session = session
- args.config = config
- 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 search_near(self, cursor, record):
- """
- Parameters:
- - cursor
- - record
- """
- self.send_search_near(cursor, record)
- return self.recv_search_near()
-
- def send_search_near(self, cursor, record):
- self._oprot.writeMessageBegin('search_near', TMessageType.CALL, self._seqid)
- args = search_near_args()
- args.cursor = cursor
- args.record = record
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_search_near(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = search_near_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_near 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["is_new"] = Processor.process_is_new
- self._processMap["close_session"] = Processor.process_close_session
- self._processMap["open_cursor"] = Processor.process_open_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["search_near"] = Processor.process_search_near
- 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_is_new(self, seqid, iprot, oprot):
- args = is_new_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = is_new_result()
- result.success = self._handler.is_new(args.connection)
- oprot.writeMessageBegin("is_new", 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.to_dup, 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_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, args.config)
- 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, args.config)
- 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_search_near(self, seqid, iprot, oprot):
- args = search_near_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = search_near_result()
- try:
- result.success = self._handler.search_near(args.cursor, args.record)
- except WT_ERROR, err:
- result.err = err
- oprot.writeMessageBegin("search_near", 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 is_new_args:
- """
- Attributes:
- - connection
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.I32, 'connection', None, None, ), # 1
- )
-
- def __init__(self, connection=None,):
- self.connection = connection
-
- 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)
- 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('is_new_args')
- if self.connection != None:
- oprot.writeFieldBegin('connection', TType.I32, 1)
- oprot.writeI32(self.connection)
- 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 is_new_result:
- """
- Attributes:
- - success
- """
-
- thrift_spec = (
- (0, TType.BOOL, '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.BOOL:
- self.success = iprot.readBool();
- 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('is_new_result')
- if self.success != None:
- oprot.writeFieldBegin('success', TType.BOOL, 0)
- oprot.writeBool(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 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
- - to_dup
- - config
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.I32, 'session', None, None, ), # 1
- (2, TType.STRING, 'uri', None, None, ), # 2
- (3, TType.I32, 'to_dup', None, None, ), # 3
- (4, TType.STRING, 'config', None, None, ), # 4
- )
-
- def __init__(self, session=None, uri=None, to_dup=None, config=None,):
- self.session = session
- self.uri = uri
- self.to_dup = to_dup
- 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.I32:
- self.to_dup = iprot.readI32();
- 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('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.to_dup != None:
- oprot.writeFieldBegin('to_dup', TType.I32, 3)
- oprot.writeI32(self.to_dup)
- 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 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 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
- - 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('commit_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 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
- - 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('rollback_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 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_MOVE_RESULT, WT_MOVE_RESULT.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_MOVE_RESULT()
- 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_MOVE_RESULT, WT_MOVE_RESULT.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_MOVE_RESULT()
- 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_MOVE_RESULT, WT_MOVE_RESULT.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_MOVE_RESULT()
- 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_MOVE_RESULT, WT_MOVE_RESULT.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_MOVE_RESULT()
- 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.STRUCT, 'success', (WT_MOVE_RESULT, WT_MOVE_RESULT.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_MOVE_RESULT()
- 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('search_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_near_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_near_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_near_result:
- """
- Attributes:
- - success
- - err
- """
-
- thrift_spec = (
- (0, TType.STRUCT, 'success', (WT_MOVE_RESULT, WT_MOVE_RESULT.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_MOVE_RESULT()
- 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('search_near_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 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
deleted file mode 100644
index 35e1b55e02b..00000000000
--- a/lang/python/src/wiredtiger/service/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-__all__ = ['ttypes', 'constants', 'WiredTiger']
diff --git a/lang/python/src/wiredtiger/service/constants.py b/lang/python/src/wiredtiger/service/constants.py
deleted file mode 100644
index 2f17ec34fee..00000000000
--- a/lang/python/src/wiredtiger/service/constants.py
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# 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
deleted file mode 100644
index 6e7c7f6c2c3..00000000000
--- a/lang/python/src/wiredtiger/service/ttypes.py
+++ /dev/null
@@ -1,411 +0,0 @@
-#
-# 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_MOVE_RESULT:
- """
- Attributes:
- - exact
- - record
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.I32, 'exact', None, None, ), # 1
- (2, TType.STRUCT, 'record', (WT_RECORD, WT_RECORD.thrift_spec), None, ), # 2
- )
-
- def __init__(self, exact=None, record=None,):
- self.exact = exact
- 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.exact = 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('WT_MOVE_RESULT')
- if self.exact != None:
- oprot.writeFieldBegin('exact', TType.I32, 1)
- oprot.writeI32(self.exact)
- 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 WT_CURSOR_HANDLE:
- """
- Attributes:
- - id
- - key_format
- - value_format
- """
-
- thrift_spec = (
- None, # 0
- (1, TType.I32, 'id', None, None, ), # 1
- (2, TType.STRING, 'key_format', None, None, ), # 2
- (3, TType.STRING, 'value_format', None, None, ), # 3
- )
-
- def __init__(self, id=None, key_format=None, value_format=None,):
- self.id = id
- self.key_format = key_format
- self.value_format = value_format
-
- 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.key_format = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.value_format = 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.key_format != None:
- oprot.writeFieldBegin('key_format', TType.STRING, 2)
- oprot.writeString(self.key_format)
- oprot.writeFieldEnd()
- if self.value_format != None:
- oprot.writeFieldBegin('value_format', TType.STRING, 3)
- oprot.writeString(self.value_format)
- 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/lang/python/src/wiredtiger/util.py b/lang/python/src/wiredtiger/util.py
deleted file mode 100644
index a992efe6901..00000000000
--- a/lang/python/src/wiredtiger/util.py
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-#
-# Copyright (c) 2008-2013 WiredTiger, Inc.
-# All rights reserved.
-#
-# See the file LICENSE for redistribution information.
-
-import re
-
-def parse_config(config):
- for l in re.findall(r'(?:\(.*?\)|[^,])+', config):
- for k, v in (l+"=yes").split('=')[0:2]:
- yield (k.strip(), v.strip())
diff --git a/lang/python/fpacking.py b/lang/python/wiredtiger/fpacking.py
index 1922047edde..1922047edde 100644
--- a/lang/python/fpacking.py
+++ b/lang/python/wiredtiger/fpacking.py
diff --git a/lang/python/intpack-test.py b/lang/python/wiredtiger/intpack-test.py
index 78399a24deb..78399a24deb 100644
--- a/lang/python/intpack-test.py
+++ b/lang/python/wiredtiger/intpack-test.py
diff --git a/lang/python/intpacking.py b/lang/python/wiredtiger/intpacking.py
index e41b4ad9b3d..e41b4ad9b3d 100644
--- a/lang/python/intpacking.py
+++ b/lang/python/wiredtiger/intpacking.py
diff --git a/lang/python/packing-test.py b/lang/python/wiredtiger/packing-test.py
index ffbb049c8eb..ffbb049c8eb 100644
--- a/lang/python/packing-test.py
+++ b/lang/python/wiredtiger/packing-test.py
diff --git a/lang/python/packing.py b/lang/python/wiredtiger/packing.py
index 397207778cb..397207778cb 100644
--- a/lang/python/packing.py
+++ b/lang/python/wiredtiger/packing.py