-
-
Notifications
You must be signed in to change notification settings - Fork 132
Nostr SQL databases #855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Nostr SQL databases #855
Conversation
This implements a basic driver for using Postgres, SQLite or MySQL as storage engine for nostr-database. Uses async Diesel as driver and Diesel migrations to set up the schema. Pull-Request: #835 Pull-Request: #855 Signed-off-by: Yuki Kishimoto <[email protected]>
@tompro, during local tests, I noticed that I found also |
You probably mean for generating/updating the rust bindings (ORM mappings)? The thing is in Diesel this is done reverse. So first you run your migrations in a db instance and then re-import the bindings (diesel print-schema). This approach allows you to import a foreign schema from an existing db but it always requires a running database.
I have been using |
This implements a basic driver for using Postgres, SQLite or MySQL as storage engine for nostr-database. Uses async Diesel as driver and Diesel migrations to set up the schema. Pull-Request: #835 Pull-Request: #855 Signed-off-by: Yuki Kishimoto <[email protected]>
This implements a basic driver for using Postgres, SQLite or MySQL as storage engine for nostr-database. Uses async Diesel as driver and Diesel migrations to set up the schema. Pull-Request: #835 Pull-Request: #855 Signed-off-by: Yuki Kishimoto <[email protected]>
Signed-off-by: Yuki Kishimoto <[email protected]>
Signed-off-by: Yuki Kishimoto <[email protected]>
Signed-off-by: Yuki Kishimoto <[email protected]>
} | ||
|
||
/// Query stored events. | ||
fn query(&self, filter: Filter) -> BoxedFuture<Result<Events, DatabaseError>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if we could return a async iterator here and let nostr-relay-builder consume it without allocating all the events in memory.
Adds support for PostgreSQL, MySQL and SQLite backends.