-
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use Uuid::from_str instead of Uuid::from_slice (#389)
- Loading branch information
1 parent
f53484c
commit d4ee744
Showing
9 changed files
with
73 additions
and
12 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,2 @@ | ||
[alias] | ||
prisma = "run -p prisma-cli --features mssql --" |
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,25 @@ | ||
[package] | ||
name = "sqlserver-tests" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[[test]] | ||
name = "integration_tests" | ||
path = "tests/lib.rs" | ||
harness = true | ||
|
||
[dependencies] | ||
prisma-client-rust = { workspace = true, features = [ | ||
"mssql", | ||
"migrations", | ||
] } | ||
serde = { version = "1.0", features = ["derive"] } | ||
|
||
[dev-dependencies] | ||
tokio = { version = "1.17.0", features = ["rt", "macros"] } | ||
prisma-client-rust = { workspace = true, features = [ | ||
"mssql", | ||
"migrations", | ||
] } |
Empty file.
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,16 @@ | ||
datasource db { | ||
provider = "sqlserver" | ||
url = env("DATABASE_URL") | ||
} | ||
|
||
generator client { | ||
provider = "cargo prisma" | ||
output = "../tests/db" | ||
module_path = "crate::db" | ||
client_format = "folder" | ||
} | ||
|
||
model TestTable { | ||
id String @id @default(uuid()) @db.UniqueIdentifier | ||
} |
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,19 @@ | ||
use prisma_client_rust::raw; | ||
|
||
use crate::db::{test_table, PrismaClient}; | ||
|
||
#[allow(warnings)] | ||
mod db; | ||
|
||
#[tokio::test] | ||
async fn issue_378() -> Result<(), Box<dyn std::error::Error>> { | ||
let client = PrismaClient::_builder().build().await?; | ||
|
||
client.test_table().create(vec![]).exec().await?; | ||
let _: Vec<test_table::Data> = client | ||
._query_raw(raw!("SELECT id FROM TestTable")) | ||
.exec() | ||
.await?; | ||
|
||
Ok(()) | ||
} |
d4ee744
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.
Successfully deployed to the following URLs:
prisma-client-rust – ./
prisma-client-rust-git-main-brendonovich.vercel.app
prisma-client-rust-brendonovich.vercel.app
prisma-client-rust.vercel.app
prisma.brendonovich.dev