-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more tests and handle more features.
- Loading branch information
1 parent
be2af63
commit 0885a10
Showing
6 changed files
with
429 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
insert `Whitespace Name` {name := 'space'}; | ||
insert `~~~Not-alpha=numeric*]name` {name := 'alnum'};; | ||
insert `3.14!=0` {name := 'digital'};; | ||
insert Child {num := 0}; | ||
insert Child {num := 1}; | ||
|
||
insert OddProps { | ||
`has space`:= 0, | ||
`ascii/\/\/\/art:)`:= 1, | ||
`123`:= 2, | ||
}; | ||
with child := (select Child filter .num = 0) | ||
insert OddLink { | ||
`a child` := child, | ||
}; | ||
|
||
insert HasLinkPropsA; | ||
update HasLinkPropsA | ||
set { | ||
children += (select Child{@a := 'hello'} filter .num = 0) | ||
}; | ||
update HasLinkPropsA | ||
set { | ||
children += (select Child{@a := 'world'} filter .num = 1) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
abstract type Named { | ||
required name: str; | ||
} | ||
|
||
type `Whitespace Name` extending Named; | ||
type `~~~Not-alpha=numeric*]name` extending Named; | ||
type `3.14!=0` extending Named; | ||
|
||
type OddProps { | ||
property `has space`: int64; | ||
property `ascii/\/\/\/art:)`: int64; | ||
property `123`: int64; | ||
}; | ||
|
||
type Child { | ||
required property num: int64 { | ||
constraint exclusive; | ||
} | ||
}; | ||
|
||
type OddLink { | ||
link `a child`: Child; | ||
# multi links with weird names not implemented yet | ||
}; | ||
|
||
type HasLinkPropsA { | ||
multi link children: Child { | ||
property a: str; | ||
} | ||
}; |
Oops, something went wrong.