Closed CodingDoug closed 1 year ago
I tried this and it seems to work:
╰──> ./turso db create t
Created database t to Warsaw, Poland (waw) in 11 seconds.
You can start an interactive SQL shell with:
turso db shell t
To obtain connection URL, run:
turso db show --url t
╰──> ./turso db shell t
Connected to t at https://haaawk:P5s948Yn72tr3106@t-haaawk.turso.io
Welcome to Turso SQL shell!
Type ".quit" to exit the shell, ".tables" to list all tables, and ".schema" to show table schemas.
→ CREATE TABLE IF NOT EXISTS counter(country TEXT, city TEXT, value INT, PRIMARY KEY(country, city)) WITHOUT ROWID;
→ .quit
╰──> ./turso db show t
Name: t
URL: https://haaawk:P5s948Yn72tr3106@t-haaawk.turso.io
ID: 92b096b0-b0df-11ed-bf5d-82dd9b475001
Regions: waw
Database Instances:
NAME TYPE REGION URL
endless-doll primary waw https://haaawk:P5s948Yn72tr3106@9185133f456783-t-haaawk.turso.io
╰──> curl -X POST -d '{"statements":[{"q":"insert into counter(country, city, value) values(?, ?, ?)","params":["US", "SFO", 5]}]}' https://haaawk:P5s948Yn72tr3106@9185133f456783-t-haaawk.turso.io
[{"results":{"columns":[],"rows":[]}}]%
╰──> ./turso db shell t "select * from counter"
COUNTRY CITY VALUE
US SFO 5
Closing... @CodingDoug please reopen if you still observe the problem.
If I send:
I get this error from sqld:
changing it to a string “1” works fine. But I really don’t think I should have to.