Skip to content
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

Skyhash list type and few other items #36

Open
igorgv opened this issue Jan 14, 2025 · 0 comments
Open

Skyhash list type and few other items #36

igorgv opened this issue Jan 14, 2025 · 0 comments

Comments

@igorgv
Copy link

igorgv commented Jan 14, 2025

While using client library (0.8.11) I encountered few issues:

  • DML Skyhash list - produces illegal query
  • DDL Alter model - fails to change type or alter more than one field

DML Skyhash list problem
Have this space and model.
CREATE SPACE spc
CREATE MODEL spc.mdl( id: string, null name: string, null field_u8: uint8, components_str: list {type: string }, width_u32: uint32, null height_u32: uint32 )
Query 1 - fails with Err(109) - using macro constructor
let y = vec!["five","six","seven","eight"]; let query_one = skytable::query!( "insert into spc.mdl(?, ?, ?,?,?,?)", "identifier", "another name", 25u8,QList::new(&y),100u32,200u32);

Query 2 - fails with Err(28) - using struct constructor
let x = vec!["one","two","three","four"]; let mut query_two = Query::new( r#"insert into spc.mdl {id: ?, name: ?, field_u8: ?, components_str: ?, width_u32: ?,height_u32: ?,}"#); query_two .push_param("identifier") .push_param("another name") .push_param(25u8) .push_param(QList::new(&x)) .push_param(100u32) .push_param(200u32);

Query 3 - fails with Err(26) - struct constructor with raw query
let query_three = Query::new("insert into spc.mdl('identifier', 'another name', 25, ['nine','ten'],100,200)");

Any of this queries in "raw" construction will work in skysh, but fail in client. Looking at library, maybe has something to do with [query.rs:382] LIST_SYM_OPEN: u8 = 0x07;

DDL Alter model

  1. Setting nullable generally works but changing type throws 105 or 106
  2. modifying more than 1 field at once results in error, same commands will run individually in skysh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant