Initial implementation of facets, plus tests and docs

Refs #255
This commit is contained in:
Simon Willison 2018-05-12 19:29:06 -03:00
commit eaaa3ea149
No known key found for this signature in database
GPG key ID: 17E2DEA2588B7F52
7 changed files with 217 additions and 4 deletions

View file

@ -267,6 +267,29 @@ CREATE TABLE [select] (
);
INSERT INTO [select] VALUES ('group', 'having', 'and');
CREATE TABLE facetable (
pk integer primary key,
state text,
city text,
neighborhood text
);
INSERT INTO facetable (state, city, neighborhood) VALUES
('CA', 'San Francisco', 'Mission'),
('CA', 'San Francisco', 'Dogpatch'),
('CA', 'San Francisco', 'SOMA'),
('CA', 'San Francisco', 'Tenderloin'),
('CA', 'San Francisco', 'Bernal Heights'),
('CA', 'San Francisco', 'Hayes Valley'),
('CA', 'Los Angeles', 'Hollywood'),
('CA', 'Los Angeles', 'Downtown'),
('CA', 'Los Angeles', 'Los Feliz'),
('CA', 'Los Angeles', 'Koreatown'),
('MI', 'Detroit', 'Downtown'),
('MI', 'Detroit', 'Greektown'),
('MI', 'Detroit', 'Corktown'),
('MI', 'Detroit', 'Mexicantown')
;
INSERT INTO simple_primary_key VALUES (1, 'hello');
INSERT INTO simple_primary_key VALUES (2, 'world');
INSERT INTO simple_primary_key VALUES (3, '');