Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcbca012

Browse files
committed
tests: Add client tests for dynlists
1 parent2048d30 commitcbca012

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

‎Cargo.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎server/src/engine/tests/client/mod.rs‎

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
use{
2828
skytable::{
2929
pipe, query,
30-
query::Pipeline,
31-
response::{Response,Rows,Value},
30+
query::{Pipeline,QList},
31+
response::{RList,Response,Rows,Value},
3232
Query,Response,
3333
},
3434
std::collections::HashMap,
@@ -157,3 +157,29 @@ fn truncate_is_root_only() {
157157
Response::Error(5)
158158
);
159159
}
160+
161+
#[sky_macros::dbtest]
162+
fninsert_list(){
163+
let data =vec!["next","ducking","level"];
164+
letmut db =db!();
165+
db.query_parse::<()>(&query!("create space dynlist"))
166+
.unwrap();
167+
db.query_parse::<()>(&query!(
168+
"create model dynlist.app(username: string, bookmarks: list {type: string})"
169+
))
170+
.unwrap();
171+
db.query_parse::<()>(&query!(
172+
"insert into dynlist.app(?, ?)",
173+
"sayan",
174+
QList::new(&data)
175+
))
176+
.unwrap();
177+
let(username, bookmarks) = db
178+
.query_parse::<(String,RList<String>)>(&query!(
179+
"select * from dynlist.app where username = ?",
180+
"sayan"
181+
))
182+
.unwrap();
183+
assert_eq!(username,"sayan");
184+
assert_eq!(bookmarks, data);
185+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp