Michael Bayer wrote:
> well, the url is broken out like this:
> 
> dbtype://  /  <database>

Why is the third slash necessary if its not part of the path? I think the 
conventional way is to parse paths like this:

dbtype://<database>

Examples:

linux absolute (relative to root of current drive on windows):

  dbtype:///tmp/foo.db

windows absolute with drive spec:

  dbtype:///x:/tmp/foo.db

alternate windows absolute (non-standard):

  dbtype://x:/tmp/foo.db

relative (any OS):

  dbtype://tmp/foo.db

old absolute still works (extra leading slashes are combined):

  dbtype:////tmp/foo.db

old relative breaks:

  dbtype:///tmp/foo.db -> not relative

The most significant change here is not requiring an extra ./ for the relative 
path, which seems more intuitive to me (and I believe is standard).

~ Daniel

> 
> so when you put four slashes, your database is  "/tmp/foo.db".  three  
> slashes, your database is "tmp/foo.db".  that gets sent to the sqlite  
> engine as the file to use.
> 
> we can just say, sqlite databases get a slash prepended, unless it  
> starts with a period.  for backwards compatibility, extra slashes at  
> the front get munged down to one.
> 
> so absolute:
> 
>       dbtype:///tmp/foo.db
> 
> relative:
> 
>       dbtype:///./tmp/foo.db
> 
> old absolute way still works:
> 
>       dbtype:////tmp/foo.db
> 
> old relative way breaks:
> 
>       dbtype:///tmp/foo.db -> no longer relative.
> 
> can sqlite users handle that relatively small level of pain for  
> release 0.2.5 ?
> 


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to