Exemple #1
0
    def __init__(self, database=None, cache=None):
        """
        Creates a new store

        :param database: the database to connect to or ``None``
        :param cache: storm cache to use or ``None``
        """
        self._savepoints = []
        self.retval = None
        self.needs_retval = False
        self.obsolete = False

        if database is None:
            database = get_default_store().get_database()
        Store.__init__(self, database=database, cache=cache)
        _stores.add(self)
        trace('transaction_create', self)
        self._reset_pending_objs()
Exemple #2
0
    def __init__(self, database=None, cache=None):
        """
        Creates a new store

        :param database: the database to connect to or ``None``
        :param cache: storm cache to use or ``None``
        """
        self._committing = False
        self._savepoints = []
        self._pending_count = [0]
        self.retval = True
        self.obsolete = False

        if database is None:
            database = get_default_store().get_database()
        Store.__init__(self, database=database, cache=cache)
        _stores.add(self)
        trace('transaction_create', self)
        self._setup_application_name()
Exemple #3
0
    def __init__(self, database=None, cache=None):
        """
        Creates a new store

        :param database: the database to connect to or ``None``
        :param cache: storm cache to use or ``None``
        """
        self._savepoints = []
        self.retval = None
        self.needs_retval = False
        self.obsolete = False

        if database is None:
            database = get_default_store().get_database()
        Store.__init__(self, database=database, cache=cache)
        # FIXME: Use weakref.WeakSet when we can depend on Python 2.7
        _stores[self] = None
        trace('transaction_create', self)
        self._reset_pending_objs()
Exemple #4
0
    def __init__(self, database=None, cache=None):
        """
        Creates a new store

        :param database: the database to connect to or ``None``
        :param cache: storm cache to use or ``None``
        """
        self._savepoints = []
        self.retval = None
        self.needs_retval = False
        self.obsolete = False

        if database is None:
            database = get_default_store().get_database()
        Store.__init__(self, database=database, cache=cache)
        # FIXME: Use weakref.WeakSet when we can depend on Python 2.7
        _stores[self] = None
        trace("transaction_create", self)
        self._reset_pending_objs()
Exemple #5
0
    def __init__(self, database=None, cache=None):
        """
        Creates a new store

        :param database: the database to connect to or ``None``
        :param cache: storm cache to use or ``None``
        """
        self._committing = False
        self._savepoints = []
        self._pending_count = [0]
        self.retval = True
        self.obsolete = False

        if database is None:
            database = get_default_store().get_database()
        Store.__init__(self, database=database, cache=cache)
        _stores.add(self)
        trace('transaction_create', self)
        self._setup_application_name()
Exemple #6
0
    def __init__(self, database=None, cache=None):
        """
        Creates a new store

        :param database: the database to connect to or ``None``
        :param cache: storm cache to use or ``None``
        """
        self._committing = False
        self._savepoints = []
        # When using savepoints, this stack will hold what objects were changed
        # (created, deleted or edited) inside that savepoint.
        self._dirties = [[]]
        self.retval = True
        self.obsolete = False

        if database is None:
            database = get_default_store().get_database()
        Store.__init__(self, database=database, cache=cache)
        _stores.add(self)
        trace('transaction_create', self)
        self._setup_application_name()
Exemple #7
0
    def __init__(self, database=None, cache=None):
        """
        Creates a new store

        :param database: the database to connect to or ``None``
        :param cache: storm cache to use or ``None``
        """
        self._committing = False
        self._savepoints = []
        # When using savepoints, this stack will hold what objects were changed
        # (created, deleted or edited) inside that savepoint.
        self._dirties = [[]]
        self.retval = True
        self.obsolete = False

        if database is None:
            database = get_default_store().get_database()
        Store.__init__(self, database=database, cache=cache)
        _stores.add(self)
        trace('transaction_create', self)
        self._setup_application_name()
Exemple #8
0
 def __init__(self, database):
     StormStore.__init__(self, database)
Exemple #9
0
 def __init__(self, database):
     StormStore.__init__(self, database)