Fuse SQLite bindings
Library to use SQLite in Fuse.
Currently supports ios
, android
and dotnet
(Fuse Preview).
Issues, feature requests and pull requests are welcome.
Install
Using npm
$ npm install fuse-sqlite
(Legacy) Using fusepm
$ fusepm install https://github.com/fuse-open/fuse-sqlite
Usage:
Check out the example app for a complete example project using TypeScript.
UX
`
JS or TypeScript
;
const db = sqlite;db;db;const r = db;console;
It returns an array:
"field1":"value1""field2":"value2" "field1":"value1""field2":"value2"
API
import
;
require (legacy)
const sqlite = ;
sqlite.open
Opens a file that contains a SQLite database
const db = sqlite;
sqlite.openFromBundle
Opens a file that contains a SQLite database, possibly from the bundle
const db = sqlite;
And in the unoproj
:
"Packages": ,"Includes":
db.execute
Executes a query. Does not return anything.
db;db;
db.query
Executes a query. Returns an array of hashes with the result.
const result = db;const result = db;
db.prepare
Prepares a query. Returns a prepared statement.
const statement = db;statement;
db.close
Closes the database.
db;
Possible future functionality
- Cursor support
- Async support
- Bundled pre-made databases
Known Issues
- Error messages is a bit different between the targets
- Support for JavaScript and CMake Fuse targets is not planned.
Windows
- The sqlite3.dll is downloaded from http://www.sqlite.org/download.html
- Mono.Data.Sqlite.dll is included from Mono.
Errors:
-
Failed to load assembly . . . have caused the assembly to be sandboxed . . .
You need to Unblock dll's that you downloaded.