Skip to content

Commit

Permalink
improve docs for sqlite memory db
Browse files Browse the repository at this point in the history
Change-Id: Icdbc13bdad3fb5ae69e79605bb7e6cb82d538c80
References: sqlalchemy#10968
  • Loading branch information
CaselIT committed Mar 12, 2024
1 parent f992095 commit e560794
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions lib/sqlalchemy/dialects/sqlite/pysqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@
# absolute path on Windows
e = create_engine('sqlite:///C:\\path\\to\\database.db')
The sqlite ``:memory:`` identifier is the default if no filepath is
present. Specify ``sqlite://`` and nothing else::
To use sqlite ``:memory:`` database specify it as the filename using
``sqlite://:memory:``. It's also the default if no filepath is
present, specifying only ``sqlite://`` and nothing else::
# in-memory database
e = create_engine('sqlite://')
e = create_engine('sqlite://:memory:')
# also in-memory database
e2 = create_engine('sqlite://')
.. _pysqlite_uri_connections:
Expand Down
2 changes: 1 addition & 1 deletion lib/sqlalchemy/ext/automap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ class that is produced by the :func:`.declarative.declarative_base`
:class:`.util.Properties`, such as ``items()``, the getitem form
is also supported::
Item = Base.classes["item"]
Item = Base.classes["items"]
"""

Expand Down

0 comments on commit e560794

Please sign in to comment.