home / bibliothek

loan

1 row where copy_id = 80

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: start_date (date), updated_at (date)

id ▼ uuid copy_id person_id direction start_date due_date returned_date updated_at deleted_at
1 906a039d3bf16dd7b7c0253b4b14490a 80 80 Person 1 1 out 2026-11-12     2026-11-12T12:35:43.376Z  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE loan (
  id            INTEGER PRIMARY KEY,
  uuid          TEXT NOT NULL UNIQUE DEFAULT (lower(hex(randomblob(16)))),
  copy_id       INTEGER NOT NULL REFERENCES copy(id),
  person_id     INTEGER NOT NULL REFERENCES person(id),
  direction     TEXT NOT NULL CHECK (direction IN ('out','in')),  -- out = verliehen, in = geliehen
  start_date    TEXT,
  due_date      TEXT,
  returned_date TEXT,
  updated_at    TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')),
  deleted_at    TEXT
);
CREATE INDEX ix_loan_copy ON loan(copy_id);
Powered by Datasette · Queries took 5.968ms