storj/satellite/satellitedb/dbx/satellitedb.dbx
aligeti d27bcddaab
Merge the irreparable DB into the master database (#777)
* initial refactoring to merge irreparabledb to master db

* refactor

* code review comment updates
2018-12-10 14:08:45 -05:00

47 lines
943 B
Plaintext

// dbx.v1 golang satellitedb.dbx .
model bwagreement (
key signature
field signature blob
field data blob
field created_at timestamp ( autoinsert )
)
create bwagreement ( )
delete bwagreement ( where bwagreement.signature = ? )
read one (
select bwagreement
where bwagreement.signature = ?
)
read limitoffset (
select bwagreement
)
read all (
select bwagreement
)
read all (
select bwagreement
where bwagreement.created_at > ?
)
// datarepair.irreparableDB
model irreparabledb (
key segmentpath
field segmentpath blob
field segmentdetail blob (updatable)
field pieces_lost_count int64 (updatable)
field seg_damaged_unix_sec int64 (updatable)
field repair_attempt_count int64 (updatable)
)
create irreparabledb ( )
update irreparabledb ( where irreparabledb.segmentpath = ? )
delete irreparabledb ( where irreparabledb.segmentpath = ? )
read one (
select irreparabledb
where irreparabledb.segmentpath = ?
)