Skip to content

sqlite none field,write none field int or text,soci read soci::rowset<soci::row> soci::data_type always is soci::dt_integer [sqlite3] [select] [none] #1298

@stan1334

Description

@stan1334

windows 10
MVSC 2022
X64
sociversion 4.0.3
dbtype sqlite3

"CREATE TABLE IF NOT EXISTS ritdb (sequence INTEGER PRIMARY KEY,name TEXT, value NONE,value2 TEXT);

insert into ritdb (sequence,name, value, value2) VALUES (100000000,'11111111',111,'1'),(100000001,'11111111','string123','00000000001')".
fisrt insert value is INTEGER ,seconde insert value is text
read soci::row soci::data_type always is soci::dt_integer

example code:
soci::rowsetsoci::row rowDatas;

for (const auto& data : rowDatas)
{
soci::data_type datatype = data.get_properties(i).get_data_type();

}

how can i select sqlite none dynamic type from soci::row,Please guide me, thank you very much.
@vadz

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions