]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Updated documenation for engines.rst
authorJim Hokanson <jim.hokanson@gmail.com>
Sun, 14 Sep 2014 04:25:41 +0000 (00:25 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 14 Sep 2014 13:04:23 +0000 (09:04 -0400)
Clarified connecting to absolute path for sqlite using Windows.

doc/build/core/engines.rst

index fb0320474c61877ba87d8ed99f49ecb2b83cdde0..17ec9416c52061c153e6f9821a52b00ae9bfeb7a 100644 (file)
@@ -151,9 +151,14 @@ For a relative file path, this requires three slashes::
     # where <path> is relative:
     engine = create_engine('sqlite:///foo.db')
 
-And for an absolute file path, *four* slashes are used::
+And for an absolute file path, the three slashes are followed by the absolute path::
 
+    #Unix/Mac - 4 initial slashes in total
     engine = create_engine('sqlite:////absolute/path/to/foo.db')
+    #Windows 
+    engine = create_engine('sqlite:///C:\\path\\to\\foo.db')
+    #Windows alternative using raw string
+    engine = create_engine(r'sqlite:///C:\path\to\foo.db')
 
 To use a SQLite ``:memory:`` database, specify an empty URL::