nidus-sync/db/dbinfo/note_audio.bob.go
Eli Ribble 2538638c9d
Create generic backend process, fix background interdependencies
This refactor was born out of the inter-dependency cycles developing
between the "background" module and just about every other module which
was caused by the background module becoming a dependency of every
module that needed to background work and the fact that the background
module was also supposedly responsible for the logic for processing
those tasks.

Instead the "background" module is now very, very shallow and relies
entirely on the Postgres NOTIFY logic for triggering jobs. There's a new
table, `job` which holds just a type and single row ID.

All told, this means that jobs can be added to the queue as part of the
API-level or platform-level transaction, ensuring atomicity, and
processing coordination is handled by the platform module, which can
depend on anything.
2026-03-16 19:52:29 +00:00

261 lines
5.7 KiB
Go

// Code generated by BobGen psql v0.42.5. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package dbinfo
import "github.com/aarondl/opt/null"
var NoteAudios = Table[
noteAudioColumns,
noteAudioIndexes,
noteAudioForeignKeys,
noteAudioUniques,
noteAudioChecks,
]{
Schema: "",
Name: "note_audio",
Columns: noteAudioColumns{
Created: column{
Name: "created",
DBType: "timestamp without time zone",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
CreatorID: column{
Name: "creator_id",
DBType: "integer",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Deleted: column{
Name: "deleted",
DBType: "timestamp without time zone",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
DeletorID: column{
Name: "deletor_id",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Duration: column{
Name: "duration",
DBType: "real",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
OrganizationID: column{
Name: "organization_id",
DBType: "integer",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Transcription: column{
Name: "transcription",
DBType: "text",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
TranscriptionUserEdited: column{
Name: "transcription_user_edited",
DBType: "boolean",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Version: column{
Name: "version",
DBType: "integer",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
UUID: column{
Name: "uuid",
DBType: "uuid",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
ID: column{
Name: "id",
DBType: "integer",
Default: "IDENTITY",
Comment: "",
Nullable: false,
Generated: true,
AutoIncr: false,
},
},
Indexes: noteAudioIndexes{
NoteAudioPkey: index{
Type: "btree",
Name: "note_audio_pkey",
Columns: []indexColumn{
{
Name: "version",
Desc: null.FromCond(false, true),
IsExpression: false,
},
{
Name: "uuid",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false, false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
NoteAudioIDUnique: index{
Type: "btree",
Name: "note_audio_id_unique",
Columns: []indexColumn{
{
Name: "id",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
},
PrimaryKey: &constraint{
Name: "note_audio_pkey",
Columns: []string{"version", "uuid"},
Comment: "",
},
ForeignKeys: noteAudioForeignKeys{
NoteAudioNoteAudioCreatorIDFkey: foreignKey{
constraint: constraint{
Name: "note_audio.note_audio_creator_id_fkey",
Columns: []string{"creator_id"},
Comment: "",
},
ForeignTable: "user_",
ForeignColumns: []string{"id"},
},
NoteAudioNoteAudioDeletorIDFkey: foreignKey{
constraint: constraint{
Name: "note_audio.note_audio_deletor_id_fkey",
Columns: []string{"deletor_id"},
Comment: "",
},
ForeignTable: "user_",
ForeignColumns: []string{"id"},
},
NoteAudioNoteAudioOrganizationIDFkey: foreignKey{
constraint: constraint{
Name: "note_audio.note_audio_organization_id_fkey",
Columns: []string{"organization_id"},
Comment: "",
},
ForeignTable: "organization",
ForeignColumns: []string{"id"},
},
},
Uniques: noteAudioUniques{
NoteAudioIDUnique: constraint{
Name: "note_audio_id_unique",
Columns: []string{"id"},
Comment: "",
},
},
Comment: "",
}
type noteAudioColumns struct {
Created column
CreatorID column
Deleted column
DeletorID column
Duration column
OrganizationID column
Transcription column
TranscriptionUserEdited column
Version column
UUID column
ID column
}
func (c noteAudioColumns) AsSlice() []column {
return []column{
c.Created, c.CreatorID, c.Deleted, c.DeletorID, c.Duration, c.OrganizationID, c.Transcription, c.TranscriptionUserEdited, c.Version, c.UUID, c.ID,
}
}
type noteAudioIndexes struct {
NoteAudioPkey index
NoteAudioIDUnique index
}
func (i noteAudioIndexes) AsSlice() []index {
return []index{
i.NoteAudioPkey, i.NoteAudioIDUnique,
}
}
type noteAudioForeignKeys struct {
NoteAudioNoteAudioCreatorIDFkey foreignKey
NoteAudioNoteAudioDeletorIDFkey foreignKey
NoteAudioNoteAudioOrganizationIDFkey foreignKey
}
func (f noteAudioForeignKeys) AsSlice() []foreignKey {
return []foreignKey{
f.NoteAudioNoteAudioCreatorIDFkey, f.NoteAudioNoteAudioDeletorIDFkey, f.NoteAudioNoteAudioOrganizationIDFkey,
}
}
type noteAudioUniques struct {
NoteAudioIDUnique constraint
}
func (u noteAudioUniques) AsSlice() []constraint {
return []constraint{
u.NoteAudioIDUnique,
}
}
type noteAudioChecks struct{}
func (c noteAudioChecks) AsSlice() []check {
return []check{}
}