def __init__(self, ctxt):
                    self.impl = impl = PyTransactional_storage(ctxt)

                    def wrap_with_proxy(r):
                        result, conn = r
                        if result[0] == Storage.SUCCESS:
                            return (result, PyTransactionalConnectionProxy(conn))
                        else:
                            return (result, None)

                    self.get_connection = create_method(impl.get_connection,
                                                        wrap_with_proxy)
示例#2
0
                def __init__(self, ctxt):
                    self.impl = impl = PyTransactional_storage(ctxt)

                    def wrap_with_proxy(r):
                        result, conn = r
                        if result[0] == Storage.SUCCESS:
                            return (result,
                                    PyTransactionalConnectionProxy(conn))
                        else:
                            return (result, None)

                    self.get_connection = create_method(
                        impl.get_connection, wrap_with_proxy)
                def __init__(self, impl):
                    self.create_table = create_method(impl.create_table)
                    self.drop_table = create_method(impl.drop_table)

                    def wrap_with_proxy(r):
                        result, cursor = r
                        if result[0] == Storage.SUCCESS:
                            return (result, PyTransactionalCursorProxy(cursor))
                        else:
                            return (result, None)

                    self.get = create_method(impl.get, wrap_with_proxy)
                    self.put = create_method(impl.put)
                    self.modify = create_method(impl.modify)
                    self.remove = create_method(impl.remove)
                    self.begin = create_method(impl.begin)
                    self.commit = create_method(impl.commit)
                    self.rollback = create_method(impl.rollback)
                    self.get_transaction_mode = impl.get_transaction_mode
                    self.put_row_trigger = \
                        create_method(impl.put_row_trigger)
                    self.put_table_trigger = \
                        create_method(impl.put_table_trigger)
                    self.remove_trigger = create_method(impl.remove_trigger)
 def __init__(self, impl):
     self.get_next = create_method(impl.get_next)
     self.close = create_method(impl.close)
示例#5
0
                def __init__(self, impl):
                    self.create_table = create_method(impl.create_table)
                    self.drop_table = create_method(impl.drop_table)

                    def wrap_with_proxy(r):
                        result, cursor = r
                        if result[0] == Storage.SUCCESS:
                            return (result, PyTransactionalCursorProxy(cursor))
                        else:
                            return (result, None)

                    self.get = create_method(impl.get, wrap_with_proxy)
                    self.put = create_method(impl.put)
                    self.modify = create_method(impl.modify)
                    self.remove = create_method(impl.remove)
                    self.begin = create_method(impl.begin)
                    self.commit = create_method(impl.commit)
                    self.rollback = create_method(impl.rollback)
                    self.get_transaction_mode = impl.get_transaction_mode
                    self.put_row_trigger = \
                        create_method(impl.put_row_trigger)
                    self.put_table_trigger = \
                        create_method(impl.put_table_trigger)
                    self.remove_trigger = create_method(impl.remove_trigger)
示例#6
0
 def __init__(self, impl):
     self.get_next = create_method(impl.get_next)
     self.close = create_method(impl.close)