Pattern Portfolio

.hd for /database/table/row

.bd for /

Datasette Fixtures

An example SQLite database demonstrating Datasette

Data license: Apache License 2.0 · Data source: tests/fixtures.py · About: About Datasette

fixtures

1,258 rows in 24 tables, 206 rows in 5 hidden tables, 4 views

compound_three_primary_keys, sortable, facetable, roadside_attraction_characteristics, simple_primary_key, ...

data

6 rows in 2 tables

names, foo

.bd for /database

fixtures

Test tables description

Data license: Apache License 2.0 · Data source: tests/fixtures.py · About: About Datasette

Custom SQL query

123_starts_with_digits

content

0 rows

Table With Space In Name

pk, content

0 rows

attraction_characteristic

pk, name

2 rows

.bd for /database/table

roadside_attraction_characteristics

Data license: Apache License 2.0 · Data source: tests/fixtures.py · About: About Datasette

3 rows where characteristic_id = 2

View and edit SQL

Link rowid ▼ attraction_id characteristic_id
1 The Mystery Spot 1 Paranormal 2
2 Winchester Mystery House 2 Paranormal 2
3 Bigfoot Discovery Museum 4 Paranormal 2

Advanced export

JSON shape: default, array, newline-delimited

CSV options:

CREATE TABLE roadside_attraction_characteristics (
    attraction_id INTEGER REFERENCES roadside_attractions(pk),
    characteristic_id INTEGER REFERENCES attraction_characteristic(pk)
);

.bd for /database/table/row

roadside_attractions: 2

This data as json

pk name address latitude longitude
2 Winchester Mystery House 525 South Winchester Boulevard, San Jose, CA 95128 37.3184 -121.9511

Links from other tables

.ft

Powered by Datasette · Data license: Apache License 2.0 · Data source: tests/fixtures.py · About: About Datasette