~cjwatson/storm/py39

« back to all changes in this revision

Viewing changes to storm/database.py

  • Committer: Colin Watson
  • Date: 2020-05-26 12:26:41 UTC
  • mfrom: (554.1.3 docstring-syntax)
  • Revision ID: cjwatson@canonical.com-20200526122641-591kmbjqf24em97w
Improve various docstrings, mainly fixing reST/epytext syntax. [r=ilasc,doismellburning]

Show diffs side-by-side

added added

removed removed

Lines of Context:
377
377
            self._check_disconnect(trace, "connection_commit", self, xid)
378
378
 
379
379
    def recover(self):
380
 
        """Return a list of L{Xid}s representing pending transactions."""
 
380
        """Return a list of L{Xid}\ s representing pending transactions."""
381
381
        self._ensure_connected()
382
382
        raw_xids = self._check_disconnect(self._raw_connection.tpc_recover)
383
383
        return [Xid(raw_xid[0], raw_xid[1], raw_xid[2])
422
422
        It is acceptable to override this method in subclasses, but it
423
423
        is not intended to be used externally.
424
424
 
425
 
        This delegates conversion to any L{Variable}s in the parameter
426
 
        list, and passes through all other values untouched.
 
425
        This delegates conversion to any
 
426
        L{Variable <storm.variable.Variable>}\ s in the parameter list, and
 
427
        passes through all other values untouched.
427
428
        """
428
429
        for param in params:
429
430
            if isinstance(param, Variable):
671
672
    """Create a database instance.
672
673
 
673
674
    @param uri: An URI instance, or a string describing the URI. Some examples:
674
 
        - "sqlite:" An in memory sqlite database.
675
 
        - "sqlite:example.db" A SQLite database called example.db
676
 
        - "postgres:test" The database 'test' from the local postgres server.
677
 
        - "postgres://user:password@host/test" The database test on machine host
678
 
          with supplied user credentials, using postgres.
679
 
        - "anything:..." Where 'anything' has previously been registered
680
 
          with L{register_scheme}.
 
675
 
 
676
    "sqlite:"
 
677
        An in memory sqlite database.
 
678
 
 
679
    "sqlite:example.db"
 
680
        A SQLite database called example.db
 
681
 
 
682
    "postgres:test"
 
683
        The database 'test' from the local postgres server.
 
684
 
 
685
    "postgres://user:password@host/test"
 
686
        The database test on machine host with supplied user credentials,
 
687
        using postgres.
 
688
 
 
689
    "anything:..."
 
690
        Where 'anything' has previously been registered with
 
691
        L{register_scheme}.
681
692
    """
682
693
    if isinstance(uri, six.string_types):
683
694
        uri = URI(uri)