mirror of
https://github.com/NexVeridian/wikidata-to-surrealdb.git
synced 2025-09-02 01:49:13 +00:00
feat!: surrealdb 2.0, remove CreateVersion::Single, fix OVERWRITE_DB
This commit is contained in:
parent
6dcb9fd043
commit
4663a862a4
13 changed files with 328 additions and 245 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue