ForbesLindesay/atdatabases

[Inquiry]: Supported SQLite connection protocols

ruheni opened this issue ยท 1 comments

Hey ๐Ÿ‘‹๐Ÿฝ

What protocols does @adatabases support when connecting to an SQLite database?

The information doesn't seem to be documented on the website.

Is file:../dev.db supported? Should it be supported (if not)?

SQLite only supports files. The string passed to connect is the file name of the SQLite database e.g.

const db = connect(`../dev.db`)

Documentation here: https://www.atdatabases.org/docs/sqlite

You can also have an in-memory database by passing no filename to connect.

SQLite does not have a standardised network/wire protocol like Postgres/MySQL etc. so it doesn't really make sense to support other protocols. If you did want to connect to a remote SQLite database you could use something like postlite to expose an SQLite database using the Postgres protocol. If you do this , you can then connect to the SQLite database using @databases/pg as it's effectively a Postgres database at that point.