This repository was archived by the owner on Jan 6, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ module encrypt
2+
3+ go 1.24.4
4+
5+ require github.com/tursodatabase/turso-go v0.1.0
6+
7+ replace github.com/tursodatabase/turso-go => ../../
8+
9+ require (
10+ github.com/ebitengine/purego v0.10.0-alpha.2 // indirect
11+ golang.org/x/sys v0.29.0 // indirect
12+ )
Original file line number Diff line number Diff line change 1+ github.com/ebitengine/purego v0.10.0-alpha.2 h1:aUB+wqQ6KpzMMOskWW4jOvxTfJEctVtFxSxUHv3md+8 =
2+ github.com/ebitengine/purego v0.10.0-alpha.2 /go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ =
3+ github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E =
4+ github.com/jinzhu/inflection v1.0.0 /go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc =
5+ github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ =
6+ github.com/jinzhu/now v1.1.5 /go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8 =
7+ github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU =
8+ github.com/mattn/go-sqlite3 v1.14.22 /go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y =
9+ golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU =
10+ golang.org/x/sys v0.29.0 /go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA =
11+ golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug =
12+ golang.org/x/text v0.20.0 /go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4 =
13+ gorm.io/driver/sqlite v1.6.0 h1:WHRRrIiulaPiPFmDcod6prc4l2VGVWHz80KspNsxSfQ =
14+ gorm.io/driver/sqlite v1.6.0 /go.mod h1:AO9V1qIQddBESngQUKWL9yoH93HIeA1X6V633rBwyT8 =
15+ gorm.io/gorm v1.31.0 h1:0VlycGreVhK7RF/Bwt51Fk8v0xLiiiFdbGDPIZQ7mJY =
16+ gorm.io/gorm v1.31.0 /go.mod h1:XyQVbO2k6YkOis7C2437jSit3SsDK72s7n7rsSHd+Gs =
Original file line number Diff line number Diff line change 1+ package main
2+
3+ import (
4+ "database/sql"
5+ "fmt"
6+ "log"
7+
8+ _ "github.com/tursodatabase/turso-go"
9+ )
10+
11+ func main () {
12+
13+ key := "5d8a8f20e33bbe37a449b473f38469229d8772aa6250d6f32c5bb2587f46224f"
14+ dbPath := fmt .Sprintf ("file:gottem.db?cipher=aegis256&hexkey=%s" , key )
15+
16+ db , err := sql .Open ("turso" , dbPath )
17+ if err != nil {
18+ log .Fatal (err )
19+ }
20+ defer db .Close ()
21+
22+ _ , err = db .Exec ("create table if not exists t(x text);" )
23+ if err != nil {
24+ log .Fatal (err )
25+ }
26+ _ , err = db .Exec (`insert into t(x) values
27+ ('thick'), ('hugge'), ('bigger');` )
28+ if err != nil {
29+ log .Fatal (err )
30+ }
31+
32+ rows , err := db .Query ("select x from t;" )
33+ if err != nil {
34+ log .Fatal (err )
35+ }
36+ defer rows .Close ()
37+
38+ fmt .Println ("In t we have:" )
39+ for rows .Next () {
40+ var val string
41+ if err := rows .Scan (& val ); err != nil {
42+ log .Println (err )
43+ continue
44+ }
45+ fmt .Println ("-" , val )
46+ }
47+ }
48+
You can’t perform that action at this time.
0 commit comments