diff --git a/.gitignore b/.gitignore index 8a0e48d..c219728 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ *.exe *.dll *.o + +# VSCode +.vscode diff --git a/README.md b/README.md index f146c2c..1f51f29 100644 --- a/README.md +++ b/README.md @@ -19,15 +19,15 @@ Supported Golang version: - [Installation](#installation) - [API Reference](#api-reference) +- [Connection String](#connection-string) - [Features](#features) - [Compilation](#compilation) - [Android](#android) - [ARM](#arm) - [Cross Compile](#cross-compile) - - [Docker](#docker) - - [Alpine](#alpine) - [Google Cloud Platform](#google-cloud-platform) - [Linux](#linux) + - [Alpine](#alpine) - [Fedora](#fedora) - [Ubuntu](#ubuntu) - [Mac OSX](#mac-osx) @@ -54,6 +54,36 @@ API documentation can be found here: http://godoc.org/github.com/mattn/go-sqlite Examples can be found under the [examples](./_example) directory +# Connection String + +When creating a new SQLite database or connection to an existing one, with the file name additional options can be given. +This is also known as a DSN string. (Data Source Name). + +Options are append after the filename of the SQLite database. +The database filename and options are seperated by an `?` (Question Mark). + +This also applies when using an in-memory database instead of a file. + +Options can be given using the following format: `KEYWORD=VALUE` and multiple options can be combined with the `&` ampersand. + +This library supports dsn options of SQLite itself and provides additional options. + +| Name | Key | Value(s) | Description | +|------|-----|----------|-------------| +| Shared-Cache Mode | cache |