@blitznocode/blitz-orm 0.11.0 → 0.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blitznocode/blitz-orm",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "author": "blitznocode.com",
5
5
  "description": "Blitz-orm is an Object Relational Mapper (ORM) for graph databases that uses a JSON query language called Blitz Query Language (BQL). BQL is similar to GraphQL but uses JSON instead of strings. This makes it easier to build dynamic queries.",
6
6
  "main": "dist/index.mjs",
@@ -92,6 +92,7 @@
92
92
  "test:surrealdb-query:refs": "cross-env BORM_TEST_ADAPTER=surrealDB BORM_TEST_SURREALDB_LINK_MODE=refs ./tests/test.sh tests/unit/queries/query.test.ts",
93
93
  "test:surrealdb-mutation:edges": "cross-env BORM_TEST_ADAPTER=surrealDB BORM_TEST_SURREALDB_LINK_MODE=edges ./tests/test.sh tests/unit/mutations",
94
94
  "test:surrealdb-mutation:refs": "cross-env BORM_TEST_ADAPTER=surrealDB BORM_TEST_SURREALDB_LINK_MODE=refs ./tests/test.sh tests/unit/mutations",
95
+ "test:surrealdb-schema": "cross-env BORM_TEST_ADAPTER=surrealDB BORM_TEST_SURREALDB_LINK_MODE=refs ./tests/test.sh tests/unit/schema",
95
96
  "test:typedb-ignoreTodo": "cross-env BORM_TEST_ADAPTER=typeDB vitest run tests/unit/allTests.test.ts -t \"^(?!.*TODO{.*[T].*}:).*\" ",
96
97
  "test:typedb-mutation": "cross-env BORM_TEST_ADAPTER=typeDB vitest run unit/mutations",
97
98
  "test:typedb-query": "cross-env BORM_TEST_ADAPTER=typeDB vitest run tests/unit/queries --watch",
package/readme.md CHANGED
@@ -2,17 +2,36 @@
2
2
 
3
3
  Blitz-orm is an Object Relational Mapper (ORM) for graph databases that uses a JSON query language called Blitz Query Language (BQL). BQL is similar to GraphQL but uses JSON instead of strings. This makes it easier to build dynamic queries.
4
4
 
5
- Blitz-orm is similar to other ORM packages such as Prisma. You define a BQL schema and it gets translated to different databases (currently only compatible with TypeDB but a dgraph adapter in the oven).
5
+ Blitz-orm is similar to other ORM packages such as Prisma. You define a BQL schema and it gets translated to different databases (currently only compatible with TypeDB and SurrealDB).
6
6
 
7
7
  ## Compatibility
8
8
 
9
- Currently, it works with TypeDB and surrealDB
9
+ TypeDB
10
+
11
+ - Schema (working with issues)
12
+ - Queries (stable)
13
+ - Mutations (some issues)
14
+
15
+ SurrealDB
16
+
17
+ - Schema (to-do)
18
+ - Queries (stable)
19
+ - Mutations (some issues)
20
+
21
+ MultiDB
22
+
23
+ - Basic queries work and are correctly routed to different databases
24
+ - Nested queries with references to different dbs are not supported yet
25
+
26
+ Next-auth
27
+
28
+ - Fully compatible with next-auth (Auth.js) but we need to publish the adapter
10
29
 
11
30
  ## How to Use
12
31
 
13
32
  1. Install the package using your package manager, for example:
14
33
  `yarn add @blitznocode/blitz-orm`
15
- 2. Create a Borm schema. You can find an example in the test folder.
34
+ 2. Create a Borm schema. You can find an example in the test folder.
16
35
  3. The borm.define() function is currently not working, so you will need to manually translate your BQL schema into a TypeQL schema (an example can be found in the test folder).
17
36
  4. Create a configuration file with the database name that you have created in TypeDB.
18
37
  5. Initialize Blitz-orm in a file like this: