You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package allows for querying data from [RONIN](https://ronin.co) with ease.
8
-
9
-
## Setup
10
-
11
-
First, install the [package](https://www.npmjs.com/package/blade-client) with a package manager of your choice:
12
-
13
-
```bash
14
-
# Bun
15
-
bun add blade-client
16
-
17
-
# npm
18
-
npm install blade-client
19
-
```
20
-
21
-
Next, create a new app token on the [RONIN dashboard](http://ronin.co) (under "Apps" in the sidebar), and add it as a environment variable named `RONIN_TOKEN` to your project.
22
-
23
-
Afterward, you can start invoking RONIN from anywhere in your code:
24
-
25
-
```typescript
26
-
import { get } from'blade-client';
27
-
28
-
const posts =awaitget.posts();
29
-
```
30
-
31
-
That's it! 🎉
32
-
33
-
You can now start inserting records with the [RONIN query syntax](https://ronin.co/docs/queries), or add them on the [RONIN dashboard](http://ronin.co). Everything you can do with the RONIN client, you can also do on the dashboard (creating records, retrieving them, filtering them, updating them, etc).
Copy file name to clipboardExpand all lines: packages/blade-client/tests/integration/triggers.test.ts
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ describe('triggers', () => {
17
17
accounts: {
18
18
with: {
19
19
email: {
20
-
endingWith: 'ronin.co',
20
+
endingWith: 'example.com',
21
21
},
22
22
},
23
23
},
@@ -53,7 +53,7 @@ describe('triggers', () => {
53
53
if(multipleRecords){
54
54
query.with={
55
55
email: {
56
-
endingWith: '@ronin.co',
56
+
endingWith: '@example.com',
57
57
},
58
58
};
59
59
}else{
@@ -87,10 +87,10 @@ describe('triggers', () => {
87
87
88
88
awaitfactory.get.accounts();
89
89
// Make sure the email address of all resolved accounts ends with the
90
-
// `@ronin.co` domain name.
90
+
// `@example.com` domain name.
91
91
expect(mockStatements?.[0]).toMatchObject({
92
92
sql: 'SELECT "id", "ronin.createdAt", "ronin.createdBy", "ronin.updatedAt", "ronin.updatedBy", "handle", "email" FROM "accounts" WHERE "email" LIKE ?1',
// Make sure the email address of all resolved accounts ends with the
180
-
// `@ronin.co` domain name.
180
+
// `@example.com` domain name.
181
181
expect(mockStatements?.[0]).toMatchObject({
182
182
sql: 'SELECT "id", "ronin.createdAt", "ronin.createdBy", "ronin.updatedAt", "ronin.updatedBy", "handle", "email" FROM "accounts" WHERE "email" LIKE ?1',
This package compiles [RONIN queries](https://ronin.co/docs/queries) to [SQLite](https://www.sqlite.org) statements.
8
-
9
-
## Setup
10
-
11
-
You don't need to install this package explicitly, as it is already included in the [RONIN client](https://github.com/ronin-co/client).
12
-
13
-
However, we would be excited to welcome your feature suggestions or bug fixes for the RONIN compiler. Read on to learn more about how to suggest changes.
7
+
This package compiles [Blade queries](https://blade.im/queries) to [SQLite](https://www.sqlite.org) statements.
This package makes it possible to define [RONIN](https://ronin.co) queries and schemas in TypeScript code.
8
-
9
-
## Setup
10
-
11
-
You don't need to install this package explicitly, as it is already included in the [RONIN client](https://github.com/ronin-co/client).
12
-
13
-
However, we would be excited to welcome your feature suggestions or bug fixes for the RONIN schema. Read on to learn more about how to suggest changes.
7
+
This package makes it possible to define [Blade](https://blade.im) queries and schemas in TypeScript code.
Copy file name to clipboardExpand all lines: packages/blade/README.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,10 +18,6 @@ A [React](https://react.dev) framework for building instant web apps.
18
18
-**Automatic REST API** (Blade auto-generates a REST API at `/api` for you, for models that you want to expose)
19
19
-**Zero Config Deployments** (Vercel, Cloudflare, containers, and more)
20
20
21
-
Blade works most efficiently when using SQLite databases provided by [RONIN](https://ronin.co). You can also use any other data source, however you will see performance drawbacks if that data source isn't globally fast (replicated).
22
-
23
-
The first and currently largest known implementation of Blade is the UI of [RONIN](https://ronin.co), which has been implemented with Blade since its inception.
24
-
25
21
## Considerations
26
22
27
23
Blade purposefully does not (and likely won't ever) comply with the official specification for React Server Components, because it provides different solutions to the problems that RSC aims to solve.
0 commit comments