qail-wasm 0.8.0 → 0.8.1
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.
- package/README.md +58 -0
- package/package.json +2 -1
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# 🪝 QAIL — Universal Query Transpiler
|
|
2
|
+
|
|
3
|
+
> Write one syntax. Compile to **19 databases**.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm i qail-wasm
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```javascript
|
|
14
|
+
import init, { transpile, transpile_with_dialect, validate, parse_json } from 'qail-wasm';
|
|
15
|
+
|
|
16
|
+
await init();
|
|
17
|
+
|
|
18
|
+
// Basic transpile (PostgreSQL by default)
|
|
19
|
+
const sql = transpile("get::users:'id'email[active=true][lim=10]");
|
|
20
|
+
// → SELECT "id", "email" FROM "users" WHERE "active" = true LIMIT 10
|
|
21
|
+
|
|
22
|
+
// Specific dialect
|
|
23
|
+
const mysql = transpile_with_dialect("get::users:'_", "mysql");
|
|
24
|
+
// → SELECT * FROM `users`
|
|
25
|
+
|
|
26
|
+
// Validate syntax
|
|
27
|
+
const isValid = validate("get::users:'_");
|
|
28
|
+
// → true
|
|
29
|
+
|
|
30
|
+
// Get AST as JSON
|
|
31
|
+
const ast = parse_json("get::users:'_");
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Supported Dialects
|
|
35
|
+
|
|
36
|
+
**SQL:** PostgreSQL, MySQL, SQLite, SQL Server, Oracle, BigQuery, Snowflake, Redshift, DuckDB, MariaDB, InfluxDB
|
|
37
|
+
|
|
38
|
+
**NoSQL:** MongoDB, DynamoDB, Redis, Cassandra, Elasticsearch, Neo4j, Qdrant
|
|
39
|
+
|
|
40
|
+
## Quick Reference
|
|
41
|
+
|
|
42
|
+
| QAIL | SQL |
|
|
43
|
+
|------|-----|
|
|
44
|
+
| `get::users:'_` | `SELECT * FROM users` |
|
|
45
|
+
| `get::users:'id'name[active=true]` | `SELECT id, name FROM users WHERE active = true` |
|
|
46
|
+
| `set::users:[status=active][id=1]` | `UPDATE users SET status = 'active' WHERE id = 1` |
|
|
47
|
+
| `del::users:[id=1]` | `DELETE FROM users WHERE id = 1` |
|
|
48
|
+
| `add::users:[name=John]` | `INSERT INTO users (name) VALUES ('John')` |
|
|
49
|
+
|
|
50
|
+
## Links
|
|
51
|
+
|
|
52
|
+
- **Website:** https://qail.rs
|
|
53
|
+
- **GitHub:** https://github.com/qail-rs/qail
|
|
54
|
+
- **Docs:** https://qail.rs/docs
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
MIT © 2025 QAIL Contributors
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qail-wasm",
|
|
3
3
|
"description": "🪝 QAIL - Universal Query Transpiler. Write one syntax, compile to 19 databases: PostgreSQL, MySQL, SQLite, SQL Server, Oracle, BigQuery, Snowflake, MongoDB, DynamoDB, Redis, Cassandra, Elasticsearch, Neo4j, and more.",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"keywords": [
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"url": "https://github.com/qail-rs/qail/issues"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
|
+
"README.md",
|
|
38
39
|
"qail_wasm_bg.wasm",
|
|
39
40
|
"qail_wasm.js",
|
|
40
41
|
"qail_wasm.d.ts"
|