I have started evaluating Zumero with the Zumero Cloud Hosting option.

I have followed the 'Getting Started' guide to the dot.

Once I have created a virtual table, I have tried to insert data via a SQLite Gui Management tool, but the command failed. I have tried 'manually' with 'INSERT INTO' commands but got a error on every field that the Field doesn't exists. It took me quite a while until I figured out that I cannot insert data with the option of specifying Field Names.

So, if I want to insert data, the only option is to do so without specifying field names (and providing values for all fields, of course).

I wonder if this is normal behavior for a Zumero Virtual Table? For any SQLite Virtual table?

I have not taken it to next stage, accessing the table from within a development SDK, but it's hard to believe for me, that inserting any data through the SQLite library will not occur by the library specifying the Field name in his INSERT INTO command implementation.

Any comments is much appreciated.

Thanks.

有帮助吗?

解决方案

Looks like you've uncovered a limitation of Zumero's parser. The short answer is, don't use MSSQL-style square brackets to delimit fields when talking to Zumero cloud DBs, instead use standard-SQL-style double quotes.

So:

create virtual table foo using zumero ("Id", "FirstName", "LastName", "Address");

instead of:

create virtual table foo using zumero ([Id], [FirstName], [LastName], [Address]);

Using the first example, you can then insert via:

insert into foo (FirstName, LastName) values ('Fred', 'Flintstone');

or

insert into foo ("FirstName", "LastName") values ('Barney', 'Rubble');

or any combination thereof.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top