@ronin/compiler 0.1.0

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 ADDED
@@ -0,0 +1,35 @@
1
+ # RONIN Compiler
2
+
3
+ This package compiles RONIN queries to SQL statements.
4
+
5
+ ## Usage
6
+
7
+ ```typescript
8
+ import { compileQueryInput } from '@ronin/compiler';
9
+
10
+ const query = {
11
+ get: {
12
+ accounts: null,
13
+ },
14
+ };
15
+
16
+ const schemas = [
17
+ {
18
+ pluralSlug: 'accounts',
19
+ slug: 'account',
20
+ },
21
+ ];
22
+
23
+ const { writeStatements, readStatement } = compileQueryInput(query, schemas);
24
+
25
+ console.log(readStatement);
26
+ // SELECT * FROM "accounts" ORDER BY "ronin.createdAt" DESC LIMIT 101
27
+ ```
28
+
29
+ ## Testing
30
+
31
+ Use the following command to run the test suite:
32
+
33
+ ```
34
+ bun test
35
+ ```