db structure abstraction; async collection; update/insert queries; model saving

This commit is contained in:
garrettmills
2020-07-06 09:53:03 -05:00
parent eddb4f1fbe
commit e4f5da7ac6
73 changed files with 3301 additions and 57 deletions

View File

@@ -1,15 +1,17 @@
const STATUS_STOPPED = Symbol('status stopped')
const STATUS_STARTING = Symbol('status starting')
const STATUS_RUNNING = Symbol('status running')
const STATUS_STOPPING = Symbol('status stopping')
const STATUS_ERROR = Symbol('status error')
enum Status {
Stopped = 'stopped',
Starting = 'starting',
Running = 'running',
Stopping = 'stopping',
Error = 'error',
}
const isStatus = (something: any) => [
STATUS_STOPPED,
STATUS_STARTING,
STATUS_RUNNING,
STATUS_STOPPING,
STATUS_ERROR,
Status.Stopped,
Status.Starting,
Status.Running,
Status.Stopping,
Status.Error,
].includes(something)
export { STATUS_STOPPED, STATUS_STARTING, STATUS_RUNNING, STATUS_STOPPING, STATUS_ERROR, isStatus }
export { Status, isStatus }