Commit graph

63 commits

Author SHA1 Message Date
PThorpe92
1493d499e5
bindings/go: Add error propagation from bindings lib 2025-02-02 07:40:28 -05:00
PThorpe92
7ee52fca4d
bindings/go: update readme with example, change module name 2025-01-31 19:22:21 -05:00
PThorpe92
8d93130809
bindings/go: enable multiple connections, register all symbols at library load 2025-01-31 13:28:05 -05:00
PThorpe92
950f29daab
bindings/go: Adjust tests for multiple concurrent connections 2025-01-31 13:28:05 -05:00
PThorpe92
d03ed353dc
Free memory of strings + blobs created on the Rust side 2025-01-29 12:03:52 -05:00
PThorpe92
d9966d2dc8
Support blob types in query arguments for Go bindings 2025-01-29 12:03:47 -05:00
Pekka Enberg
e47240705c Merge 'bindings/go: Progress on Go driver, first working incremental state' from Preston Thorpe
This PR brings the Go database/sql driver to it's first working state
and adds a Go package to demonstrate.
The example pkg demonstrates (in it's most bare/naive form at this
point):
1. Open database (memory, in this case)
2. Create connection
3. Prepare statement (Create table)
4. `Exec`
5. Prepare statement (Insert, bind 3 arguments (int, string, blob) (
6. `Exec`
7. Prepare statement (Select *)
8. `Columns` -> print columns
9. `Query` -> print rows
10. Close db connection
![image](https://github.com/user-
attachments/assets/b59ec9f5-9ac6-4a59-9cad-fbb57893fbf8)
still tons of work to do but I at least wanted to get it to a state
where it's not totally broken.
I'll add some actual tests tomorrow

Closes #796
2025-01-29 13:10:52 +02:00
Glauber Costa
bf1cfe3a1d avoid potentially expensive operations on prepare, query, execute
This simple patch makes sure we can operate with a reference to the
string instead of being forced to transform it to a string, and makes
sure that the Arc doesn't have to be cloned (which can be expensive in
multi-core systems).

This doesn't really make a large difference in benchmarks, given how
expensive Parse::new() is.
2025-01-28 13:44:34 -05:00
PThorpe92
bf6b80edab
Continue progress go database/sql driver, add tests and CI 2025-01-28 11:24:57 -05:00
Pekka Enberg
0918fc40d4 bindings/go: Rename to Limbo
...we'll likely call this Turso eventually, but right now, let's keep
the code consistent.
2025-01-26 20:58:10 +02:00
Pekka Enberg
7967cc5efc core: Kill Rows wrapper struct
It's just an useless wrapper, kill it.
2025-01-26 16:27:19 +02:00
PThorpe92
32c985f9a8
Progress on Go bindings, add prepare + query statement 2025-01-25 23:01:46 -05:00
PThorpe92
4be1f9c3cc
Begin work on Go bindings (purego) 2025-01-25 11:37:12 -05:00