storj/pkg/statdb/dbx/statdb.dbx
Maximillian von Briesen 40b210f604
Fix statdb query to avoid sql injection (#562)
* fix statdb query to avoid sql injection

* use byte array instead of string for node ids in statdb
2018-10-31 12:18:51 -04:00

26 lines
568 B
Plaintext

// dbx.v1 golang statdb.dbx .
model node (
key id
field id blob
field audit_success_count int64 (updatable)
field total_audit_count int64 (updatable)
field audit_success_ratio float64 (updatable)
field uptime_success_count int64 (updatable)
field total_uptime_count int64 (updatable)
field uptime_ratio float64 (updatable)
field created_at timestamp ( autoinsert )
field updated_at timestamp ( autoinsert, autoupdate )
)
create node ( )
update node ( where node.id = ? )
delete node ( where node.id = ? )
read one (
select node
where node.id = ?
)