Skip to content

multiple statements fail - expected behavior? #99

@samhatchett

Description

@samhatchett

I've noticed that when feeding in multiple semicolon-delimited statements as part of a single string, only the first statement is actually executed. for example:

database db("test.db");
db << "create table 'data'('col' integer); create table 'meta'('col' integer);";
// only the first table is created

The practical use case here is executing a whole bunch of statements to setup the schema when creating a new db.

if I split the string on semicolons and feed each string in, everything works. If this is expected behavior, it should probably be documented - even though I notice the the usage idioms only show examples of single statements.

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