This is extremely useful for testing. In order to do this I needed to actually deploy the migration to a bob fork so I could start to add support for behaviors I really want. Specifically the ability to search for ids in a slice.
122 lines
2.6 KiB
Go
122 lines
2.6 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 ArcgisUserPrivileges = Table[
|
|
arcgisUserPrivilegeColumns,
|
|
arcgisUserPrivilegeIndexes,
|
|
arcgisUserPrivilegeForeignKeys,
|
|
arcgisUserPrivilegeUniques,
|
|
arcgisUserPrivilegeChecks,
|
|
]{
|
|
Schema: "arcgis",
|
|
Name: "user_privilege",
|
|
Columns: arcgisUserPrivilegeColumns{
|
|
UserID: column{
|
|
Name: "user_id",
|
|
DBType: "text",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Privilege: column{
|
|
Name: "privilege",
|
|
DBType: "text",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
},
|
|
Indexes: arcgisUserPrivilegeIndexes{
|
|
UserPrivilegePkey: index{
|
|
Type: "btree",
|
|
Name: "user_privilege_pkey",
|
|
Columns: []indexColumn{
|
|
{
|
|
Name: "user_id",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
{
|
|
Name: "privilege",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
},
|
|
Unique: true,
|
|
Comment: "",
|
|
NullsFirst: []bool{false, false},
|
|
NullsDistinct: false,
|
|
Where: "",
|
|
Include: []string{},
|
|
},
|
|
},
|
|
PrimaryKey: &constraint{
|
|
Name: "user_privilege_pkey",
|
|
Columns: []string{"user_id", "privilege"},
|
|
Comment: "",
|
|
},
|
|
ForeignKeys: arcgisUserPrivilegeForeignKeys{
|
|
ArcgisUserPrivilegeUserPrivilegeUserIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "arcgis.user_privilege.user_privilege_user_id_fkey",
|
|
Columns: []string{"user_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "arcgis.user_",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
},
|
|
|
|
Comment: "",
|
|
}
|
|
|
|
type arcgisUserPrivilegeColumns struct {
|
|
UserID column
|
|
Privilege column
|
|
}
|
|
|
|
func (c arcgisUserPrivilegeColumns) AsSlice() []column {
|
|
return []column{
|
|
c.UserID, c.Privilege,
|
|
}
|
|
}
|
|
|
|
type arcgisUserPrivilegeIndexes struct {
|
|
UserPrivilegePkey index
|
|
}
|
|
|
|
func (i arcgisUserPrivilegeIndexes) AsSlice() []index {
|
|
return []index{
|
|
i.UserPrivilegePkey,
|
|
}
|
|
}
|
|
|
|
type arcgisUserPrivilegeForeignKeys struct {
|
|
ArcgisUserPrivilegeUserPrivilegeUserIDFkey foreignKey
|
|
}
|
|
|
|
func (f arcgisUserPrivilegeForeignKeys) AsSlice() []foreignKey {
|
|
return []foreignKey{
|
|
f.ArcgisUserPrivilegeUserPrivilegeUserIDFkey,
|
|
}
|
|
}
|
|
|
|
type arcgisUserPrivilegeUniques struct{}
|
|
|
|
func (u arcgisUserPrivilegeUniques) AsSlice() []constraint {
|
|
return []constraint{}
|
|
}
|
|
|
|
type arcgisUserPrivilegeChecks struct{}
|
|
|
|
func (c arcgisUserPrivilegeChecks) AsSlice() []check {
|
|
return []check{}
|
|
}
|