Skip to content

Allow writting numeric vectors as BLOBs #12

@pr0m1th3as

Description

@pr0m1th3as

The current implementation only allows numeric scalars in a dbtable to be written in sqlite table.
The following results in error

>> db = sqlite ("newdb", 'create')
>> t = dbtable (1, [1, 2], 'VariableNames', {'idx','vector_data'})
t =

  1x2 table

  idx  vector_data
  ___  ___________

  1    1  2

>> sqlwrite (db, "vector", t, 'ColumnType', {'numeric', 'numeric'});
error: error executing statement `INSERT INTO vector (idx,vector_data) VALUES
(1,1  2)` - near "2": syntax error
error: called from
    execute at line 58 column 3
    sqlwrite at line 184 column 3

It would be very convenient if we could do something like

 sqlwrite (db, "vector", t, 'ColumnType', {'numeric', 'blob'});

which currently returns the same error as above, and be able to write/read/fetch non-scalar numeric data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions