SET and Tuple type

Registered by Brian Aker

Reintroduce SET type, extend to have a TUPLE type.

CREATE TABLE t1 ( a SET);

INSERT INTO t1 VALUES ({'foo', 'dog'}, …);
INSERT INTO t1 VALUES ({'foo2', 'dog2'},...);

SELECT a FROM t1;
{'foo', 'dog'}
{'foo2', 'dog2'}
2 rows

// Constrained SET, where the only valid arguments would be dog, and foo.
CREATE TABLE t2 ( a SET('dog', 'foo');

INSERT INTO t2 VALUES ({'foo', 'dog'}, …);
1 row inserted

INSERT INTO t2 VALUES ({'foo', 'dog', 'fan'}, …);
error

// A un-constrained tuple
CREATE TABLE t3 (a TUPLE);

INSERT INTO t3 VALUES ({{'name' => 'Brian'}, { 'last' => 'Aker'}});
1 row inserted

INSERT INTO t3 VALUES ({{'name' => 'Brian'}, { 'last' => 'Aker'}, { 'pet' => 'Rosalynd'}});
1 row inserted

// Constrained type, only name, and last would be vald
CREATE TABLE t4 (a TUPLE('name', 'last');

INSERT INTO t4 VALUES ({{'name' => 'Brian'}, { 'last' => 'Aker'}});
1 row inserted

INSERT INTO t4 VALUES ({{'name' => 'Brian'}, { 'last' => 'Aker'}, { 'pet' => 'Rosalynd'}});
error

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
Brian Aker
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.