storj/multinode/multinodedb/dbx/multinodedb.dbx
crawter 4a11ec2826 multinode/nodes: package created, api tests added, small restructuring
Change-Id: I9f8146760a2676a204eb1bd3410079c5fa017d70
2020-12-14 14:16:45 +02:00

52 lines
887 B
Plaintext

// dbx.v1 golang multinodedb.dbx .
model node (
key id
field id blob
field name text ( updatable )
field public_address text
field api_secret blob
)
create node ( )
delete node ( where node.id = ? )
update node ( where node.id = ? )
read one (
select node
where node.id = ?
)
read all(
select node
)
update node (
where node.id = ?
noreturn
)
model member (
key id
field id blob
field email text ( updatable )
field name text ( updatable )
field password_hash blob ( updatable )
field created_at timestamp ( autoinsert )
)
create member ( )
delete member ( where member.id = ? )
update member ( where member.id = ? )
read one (
select member
where member.email = ?
)
read one (
select member
where member.id = ?
)