Last active
August 12, 2018 20:00
-
-
Save thosakwe/e79f6025b9ff804f82c5674ba11f3af2 to your computer and use it in GitHub Desktop.
SpartanDB
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
from users where {distinct username} select { username } |
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
table users (id) { | |
id: Id | |
name: String | |
balance: Float | |
} | |
table todos (id) { | |
id: BigId | |
text: String | |
status: enum TodoStatus { | |
COMPLETE | |
INCOMPLETE | |
} | |
} |
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
from users select { | |
id | |
username | |
password | |
salt | |
} |
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
union { | |
users where { status = UserStatus.CONFIRMED }, | |
users where { status = UserStatus.UNKNOWN } | |
} |
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
let completedTodos = todos where { status = TodoStatus.COMPLETE }; | |
from completedTodos select { | |
id | |
text | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment