feat!: surrealdb 2.0, remove CreateVersion::Single, fix OVERWRITE_DB

This commit is contained in:
Elijah McMorris 2024-09-18 20:05:37 -07:00
parent 6dcb9fd043
commit 4663a862a4
Signed by: NexVeridian
SSH key fingerprint: SHA256:bsA1SKZxuEcEVHAy3gY1HUeM5ykRJl0U0kQHQn0hMg8
13 changed files with 328 additions and 245 deletions

View file

@ -11,6 +11,23 @@ delete $claims;
delete $entity;
```
# Create a view for media
```
DEFINE TABLE Media TYPE NORMAL AS
SELECT
*,
# Number of episodes
(claims.claims[WHERE id = Property:1113].value.ClaimValueData.Quantity.amount)[0] AS episodes,
# Part of the series (parent)
(claims.claims[WHERE id = Property:179].value.Thing)[0] AS parent,
# Has part(s) (children)
claims.claims[WHERE id = Property:527].value.Thing AS children
FROM Entity;
# Full-Text Search
DEFINE ANALYZER OVERWRITE blank_english TOKENIZERS blank FILTERS lowercase, ascii, snowball(english);
```
# Select for media
```
SELECT