Function createBetterSqliteAdapter

Factory helper for creating a BetterSqliteAdapter.

Path Resolution:

  • Absolute paths are used as-is.
  • Relative paths are resolved against the current working directory instead of the adapter file location (simpler & bundler neutral).
  • Special values like ':memory:' and 'file:' URIs are passed through.
  • With options.segment, the file's name carries the segment (app.sqlite3 becomes app-agentos.sqlite3).

When options.segment is not a name a segment can take.