turso 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c46fb14c7a5e67e4ea6443ceb0d85f63f6759cf6367d08b5c398ae571172a70b
4
- data.tar.gz: 41e96a29b5a885e0ae0fc84c28723cc10231d7a9813dcd2aaff86632cf97ba9a
3
+ metadata.gz: d819cbe53dc4a69a552a98c9bc7f896aec2059c52e6ac2b9342381b5e499f50e
4
+ data.tar.gz: b3db7c4e0e15bd29cabfd6ae4c2fd2c1258e8551867fa5da667af8c3b6688681
5
5
  SHA512:
6
- metadata.gz: 901580da790ee2b6fa1a59e6e391a6f340743c45be115604358fa0375f79cefc069421f36a30dbfba106d260670cb0f280e82c554ca259e928e359a3f5d56aaf
7
- data.tar.gz: c7af406e10d77625d5317ff528eb1953deb4b45a2ede9c6671174651eb944c0322cae3ebf33f80d57fbaa40a98be336d33c327311657f6b777a4a0888f91bb38
6
+ metadata.gz: baa15d2603ba1058c4070d8093703cad17efd16d525efe81481def07c4764745c5407c6bd65e0c6c43cd93da8581401cd4f41fd1b93193a9574de2389e76b922
7
+ data.tar.gz: 15735070276b8ad1a36a6557d007c4d19bd8d1a61ac9a47efd7e201f661bd61371030a931e2d3ecd3bc7c7a76f1a66608dc6331e5c13ee1ce6de0212db8369ab
data/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # Turso Ruby Gem
2
+
3
+ Ruby bindings for [Turso](https://turso.tech), the SQLite-compatible database built for production workloads.
4
+
5
+ **Requires Ruby >= 3.2.0**
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ gem install turso
11
+ ```
12
+
13
+ Platform-specific native gems are available for Linux, macOS, and Windows.
14
+
15
+ ## Quick Start
16
+
17
+ ```ruby
18
+ require "turso"
19
+
20
+ db = Turso::Database.new(":memory:")
21
+ db.execute("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)")
22
+ db.execute("INSERT INTO users (name) VALUES (?)", "Alice")
23
+ row = db.get_first_row("SELECT * FROM users WHERE id = ?", 1)
24
+ p row
25
+ ```
26
+
27
+ ## Open Options
28
+
29
+ | Option | Type | Description |
30
+ |--------|------|-------------|
31
+ | `readonly` | Boolean | Open database in read-only mode |
32
+ | `file_must_exist` | Boolean | Fail if database file does not exist |
33
+ | `busy_timeout` | Integer | Busy timeout in milliseconds |
34
+ | `query_timeout` | Integer | Query timeout in milliseconds |
35
+ | `experimental_features` | String | Comma-separated experimental features |
36
+ | `encryption` | Hash | Encryption config: `{ cipher: "aes256", hexkey: "..." }` |
37
+ | `vfs` | Symbol/String | VFS backend: `:memory`, `:syscall`, `:io_uring` |
38
+
39
+ ```ruby
40
+ db = Turso::Database.new("my.db", readonly: true, busy_timeout: 5000)
41
+ ```
42
+
43
+ ## Named Parameters
44
+
45
+ ```ruby
46
+ db.execute("INSERT INTO users (name) VALUES (:name)", name: "Alice")
47
+ row = db.get_first_row("SELECT * FROM users WHERE x = :name", name: "Alice")
48
+ ```
49
+
50
+ ## Exception Hierarchy
51
+
52
+ ```
53
+ Turso::Exception (base)
54
+ ├── Turso::BusyException
55
+ ├── Turso::ConstraintException
56
+ ├── Turso::CorruptException
57
+ ├── Turso::MisuseException
58
+ ├── Turso::ReadonlyException
59
+ ├── Turso::InterruptException
60
+ ├── Turso::DatabaseFullException
61
+ ├── Turso::NotADatabaseException
62
+ ├── Turso::BusySnapshotException
63
+ └── Turso::IoException
64
+ ```
65
+
66
+ `Turso::Error` is an alias for `Turso::Exception`.
67
+
68
+ ## License
69
+
70
+ MIT License. See [LICENSE](LICENSE).
71
+
72
+ ## Contributing
73
+
74
+ Bug reports and pull requests are welcome on GitHub at https://github.com/tursodatabase/turso.