chai
chai copied to clipboard
strict schema for ARRAY during CREATE TABLE possible?
Version: require github.com/genjidb/genji v0.15.1
This is a question but probably also a feature request: Looking at the documentation, its syntax diagrams and the sqltests I found no way to provide a strict schema for the document- or primitive-type of an ARRAY. (How) can this be done?
The for me most natural way would be sth like this (think of a property list):
CREATE TABLE pl (
name TEXT PRIMARY KEY,
contributors ARRAY [OF] TEXT,
vals ARRAY [OF] (itemname TEXT, itemvalue INT)
)
Thanks, Martin
Indeed, as of today there are no ways to enforce an array elements to be of a certain type, but it is planned.