Skip to content

Support Query and DML in both of ExecuteStreamingSql and ExecuteSql #92

@apstndb

Description

@apstndb

Currently, handy-spanner supports only DML for ExecuteSql and only queries for ExecuteStreamingSql.
In the real instance, the both of ExecuteSql and ExecuteStreamingSql can execute the both of queries and DMLs.

It makes handy-spanner incompatible with the current behavior of spanner-cli.
(THEN RETURN support needs to execute DMLs using ExecuteStreamingSql in the current Cloud Spanner client library.)
cloudspannerecosystem/spanner-cli#151

spanner> INSERT INTO Counter(pk, col) VALUES(0, 0);
ERROR: spanner: code = "InvalidArgument", desc = "Syntax error: \"INSERT INTO Counter(pk, col) VALUES(0, 0)\": syntax error::1:1: expected token: SELECT, but: <ident>\n\n  1:  INSERT INTO Counter(pk, col) VALUES(0, 0)\n      ^~~~~~\n"

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