How to use the function in RelStorage

To help you get started, we’ve selected a few RelStorage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github newtdb / db / src / newt / db / View on Github external
import ZODB.Connection

# Monkey patches, ook
def _ex_cursor(self, name=None):
    if self._stale_error is not None:
        raise self._stale_error

    with self._lock:
        return self._load_conn.cursor(name) = _ex_cursor

def _ex_connect(self):
    return = _ex_connect

def _ex_get(self, oid, ghost_pickle):
    """Return the persistent object with oid 'oid'."""
    if self.opened is None:
        raise ConnectionStateError("The database connection is closed")

    obj = self._cache.get(oid, None)
    if obj is not None:
        return obj
    obj = self._added.get(oid, None)
    if obj is not None: