Skip to content

Add support for vectors and complex data types #41

Open
@tglman

Description

@tglman

Hi,

Would be cool have support for other DBMS not strictly purely SQL based DBMS, the API defined so far are generic enough that could be used also with some NoSql DBMS, the missing part at this stage I think is the support for more advanced types, in the specific I think would be enough to add a collection type so adding to ResultSet:

    fn get_vec_i8(&self, i: u64) -> Result<Option<Vec<i8>>>;
    fn get_vec_i16(&self, i: u64) -> Result<Option<Vec<i16>>>;
    fn get_vec_i32(&self, i: u64) -> Result<Option<Vec<i32>>>;
    fn get_vec_i64(&self, i: u64) -> Result<Option<Vec<i64>>>;
    fn get_vec_f32(&self, i: u64) -> Result<Option<Vec<f32>>>;
    fn get_vec_f64(&self, i: u64) -> Result<Option<Vec<f64>>>;
    fn get_vec_string(&self, i: u64) -> Result<Option<Vec<String>>>;
    fn get_vec_bytes(&self, i: u64) -> Result<Option<Vec<Vec<u8>>>>;

As well adding a sort of nested type

   // ResultSet
   fn get_vec_value(&self, i: u64) -> Result<Option<Vec<Value>>>;
   fn get_vec_value(&self, i: u64) -> Result<Option<Value>>;
  // Nested Type
  trait Value {
     //Same signatures of ResultSet for access values
  }

Another important part i think is the named access to values, often there is also a name associate to a value and may not be there at all a position.
So maybe would be cool to have also the relative methods:

    fn get_named_i8(&self, name: &str) -> Result<Option<i8>>;
    // And all the other types combinations.

If you are interested to this I can also write a PR for this cases.
Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions