-
-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1881 from langyo/proxy-conn
feat: Add proxy connection type
- Loading branch information
Showing
35 changed files
with
2,466 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[package] | ||
name = "sea-orm-proxy-gluesql-example" | ||
version = "0.1.0" | ||
authors = ["Langyo <[email protected]>"] | ||
edition = "2021" | ||
publish = false | ||
|
||
[workspace] | ||
|
||
[dependencies] | ||
async-std = { version = "1.12", features = ["attributes", "tokio1"] } | ||
serde_json = { version = "1" } | ||
serde = { version = "1" } | ||
futures = { version = "0.3" } | ||
async-stream = { version = "0.3" } | ||
futures-util = { version = "0.3" } | ||
|
||
sea-orm = { path = "../../", features = [ | ||
"sqlx-all", | ||
"proxy", | ||
"runtime-async-std-native-tls", | ||
"debug-print", | ||
] } | ||
# Since it's newer version (0.14.0) locked the chrono's version to 0.4.23, | ||
# we need to lock it on older version too. | ||
# Related to https://github.com/gluesql/gluesql/pull/1427 | ||
gluesql = { version = "0.13", default-features = false, features = [ | ||
"memory-storage", | ||
] } | ||
|
||
[dev-dependencies] | ||
smol = { version = "1.2" } | ||
smol-potat = { version = "1.1" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SeaORM Proxy Demo for GlueSQL | ||
|
||
Run this demo for [GlueSQL](https://gluesql.org/) with the following command: | ||
|
||
```bash | ||
cargo run | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod post; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use sea_orm::entity::prelude::*; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Deserialize, Serialize)] | ||
#[sea_orm(table_name = "posts")] | ||
pub struct Model { | ||
#[sea_orm(primary_key)] | ||
pub id: i64, | ||
|
||
pub title: String, | ||
pub text: String, | ||
} | ||
|
||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] | ||
pub enum Relation {} | ||
|
||
impl ActiveModelBehavior for ActiveModel {} |
Oops, something went wrong.