aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 7ee55244e22f13fc848ce4b3483a0d7e494aeeac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Datamaps in Go

Some useful queries:

### Joining and pattern matching
`select name, key, cellref from datamap_line join datamap on (datamap.id
= datamap_line.dm_id) where key like 'Total RDEL%';`

### Create return and return_data tables

`CREATE TABLE return(id INTEGER PRIMARY KEY, name TEXT, date_created TEXT);
CREATE TABLE return_data(id INTEGER PRIMARY KEY, dml_id INTEGER, value TEXT, FOREIGN KEY (dml_id) REFERENCES datamap_line(id) ON DELETE CASCADE);
`