proofrock / sqliterg Goto Github PK
View Code? Open in Web Editor NEWA SQLite Remote Gateway - query SQLite via HTTP
Home Page: https://docs.sqliterg.dev
License: Apache License 2.0
A SQLite Remote Gateway - query SQLite via HTTP
Home Page: https://docs.sqliterg.dev
License: Apache License 2.0
Hi!
Suppose I have this table:
CREATE TABLE `folders` (
`id` text PRIMARY KEY NOT NULL,
`name` text NOT NULL,
`position` real DEFAULT 1 NOT NULL,
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL
);
And this data:
INSERT INTO `folders`(id, name, position)
VALUES ('default', 'Default', 0)
ON CONFLICT(id) DO NOTHING;
SELECT * FROM folders
would return:
{
"results": [
{
"success": true,
"resultSet": [
{
"created_at": "2024-02-04 12:23:08",
"id": "default",
"name": "Default",
"position": 0.0,
"updated_at": "2024-02-04 12:23:08"
}
]
}
]
}
I think it should follow creation order`, which returns:
id
name
position
updated_at
created_at
It is the behavior of the behavior of sqlite3
as well:
default|Default|0.0|2024-02-04 12:54:32|2024-02-04 12:54:32
Thanks!
Currently, only named params are supported:
{
"transaction": [{
"statement": "INSERT INTO TEST_TABLE (ID, VAL, VAL2) VALUES (:id, :val, :val2)",
"values": { "id": 1, "val": "hello", "val2": null }
}]
}
Implement also:
{
"transaction": [{
"statement": "INSERT INTO TEST_TABLE (ID, VAL, VAL2) VALUES (?, ?, ?)",
"values": [ 1, "hello", null ]
}]
}
Any chance of supporting more dbs like mariadb? Great repos!
Consider allowing load_extension
statements in macro
.
The purpose is the load sqlite extensions onStartup: true
Hi!
I'm trying to wrap Drizzle's around sqliterg. It works well if there is only one statement involved in one sqliterg transaction. However, if there are multiple statements, only the first one gets executed. For example, I have this SQL migration file that is generated by Drizzle:
CREATE TABLE `folders` (
...
);
--> statement-breakpoint
CREATE TABLE `snippet_tags` (
...
);
--> statement-breakpoint
CREATE TABLE `snippets` (
...
);
Then only CREATE TABLE folders
gets executed. What do you think I should do in this case? Must I parse the SQL myself and split it to multiple transaction before passing it to sqliterg?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.