orm

package
v0.0.0-...-359db49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go

generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go

generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go

generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go

generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go

generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go

generated by stacks/gong/go/models/orm_file_per_struct_back_repo.go

do not modify, generated file

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

generated code - do not edit

Index

Constants

This section is empty.

Variables

View Source
var AstructBstruct2Use_Fields = []string{

	"ID",
	"Name",
}
View Source
var AstructBstructUse_Fields = []string{

	"ID",
	"Name",
}
View Source
var Astruct_Fields = []string{

	"ID",
	"Name",
	"Date",
	"Date2",
	"Booleanfield",
	"Aenum",
	"Aenum_2",
	"Benum",
	"CEnum",
	"CName",
	"CFloatfield",
	"Floatfield",
	"Intfield",
	"Anotherbooleanfield",
	"Duration1",
	"StructRef",
	"FieldRef",
	"EnumIntRef",
	"EnumStringRef",
	"EnumValue",
	"ConstIdentifierValue",
	"TextFieldBespokeSize",
	"TextArea",
}
View Source
var BackRepoAstructBstruct2Useid_atBckpTime_newID map[uint]uint

this field is used during the restauration process. it stores the ID at the backup time and is used for renumbering

View Source
var BackRepoAstructBstructUseid_atBckpTime_newID map[uint]uint

this field is used during the restauration process. it stores the ID at the backup time and is used for renumbering

View Source
var BackRepoAstructid_atBckpTime_newID map[uint]uint

this field is used during the restauration process. it stores the ID at the backup time and is used for renumbering

View Source
var BackRepoBstructid_atBckpTime_newID map[uint]uint

this field is used during the restauration process. it stores the ID at the backup time and is used for renumbering

View Source
var BackRepoDstructid_atBckpTime_newID map[uint]uint

this field is used during the restauration process. it stores the ID at the backup time and is used for renumbering

View Source
var BackRepoFstructid_atBckpTime_newID map[uint]uint

this field is used during the restauration process. it stores the ID at the backup time and is used for renumbering

View Source
var BackRepoGstructid_atBckpTime_newID map[uint]uint

this field is used during the restauration process. it stores the ID at the backup time and is used for renumbering

View Source
var Bstruct_Fields = []string{

	"ID",
	"Name",
	"Floatfield",
	"Floatfield2",
	"Intfield",
}
View Source
var Dstruct_Fields = []string{

	"ID",
	"Name",
}
View Source
var Fstruct_Fields = []string{

	"ID",
	"Name",
	"Date",
}
View Source
var Gstruct_Fields = []string{

	"ID",
	"Name",
	"Floatfield",
	"Floatfield2",
	"Intfield",
}

Functions

func CopyBackRepoToBackRepoData

func CopyBackRepoToBackRepoData(backRepo *BackRepoStruct, backRepoData *BackRepoData)

func GetID

func GetID[T models.Gongstruct](
	stage *models.StageStruct,
	backRepo *BackRepoStruct,
	instance *T) (id int)

func GetIDPointer

func GetIDPointer[T models.PointerToGongstruct](
	stage *models.StageStruct,
	backRepo *BackRepoStruct,
	instance T) (id int)

func GetInstanceDBFromInstance

func GetInstanceDBFromInstance[T models.Gongstruct, T2 GongstructDB](
	stage *models.StageStruct,
	backRepo *BackRepoStruct,
	instance *T) (ret *T2)

func GetReverseFieldOwner

func GetReverseFieldOwner[T models.Gongstruct](
	stage *models.StageStruct,
	backRepo *BackRepoStruct,
	instance *T,
	reverseField *models.ReverseField) (res any)

func GetReverseFieldOwnerName

func GetReverseFieldOwnerName[T models.Gongstruct](
	stage *models.StageStruct,
	backRepo *BackRepoStruct,
	instance *T,
	reverseField *models.ReverseField) (res string)

Types

type AstructAPI

type AstructAPI struct {
	gorm.Model

	models.Astruct_WOP

	// encoding of pointers
	// for API, it cannot be embedded
	AstructPointersEncoding AstructPointersEncoding
}

AstructAPI is the input in POST API

for POST, API, one needs the fields of the model as well as the fields from associations ("Has One" and "Has Many") that are generated to fullfill the ORM requirements for associations

swagger:model astructAPI

type AstructBstruct2UseAPI

type AstructBstruct2UseAPI struct {
	gorm.Model

	models.AstructBstruct2Use_WOP

	// encoding of pointers
	// for API, it cannot be embedded
	AstructBstruct2UsePointersEncoding AstructBstruct2UsePointersEncoding
}

AstructBstruct2UseAPI is the input in POST API

for POST, API, one needs the fields of the model as well as the fields from associations ("Has One" and "Has Many") that are generated to fullfill the ORM requirements for associations

swagger:model astructbstruct2useAPI

type AstructBstruct2UseDB

type AstructBstruct2UseDB struct {
	gorm.Model

	// Declation for basic field astructbstruct2useDB.Name
	Name_Data sql.NullString

	// encoding of pointers
	// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
	AstructBstruct2UsePointersEncoding
}

AstructBstruct2UseDB describes a astructbstruct2use in the database

It incorporates the GORM ID, basic fields from the model (because they can be serialized), the encoded version of pointers

swagger:model astructbstruct2useDB

func (*AstructBstruct2UseDB) CopyBasicFieldsFromAstructBstruct2Use

func (astructbstruct2useDB *AstructBstruct2UseDB) CopyBasicFieldsFromAstructBstruct2Use(astructbstruct2use *models.AstructBstruct2Use)

CopyBasicFieldsFromAstructBstruct2Use

func (*AstructBstruct2UseDB) CopyBasicFieldsFromAstructBstruct2UseWOP

func (astructbstruct2useDB *AstructBstruct2UseDB) CopyBasicFieldsFromAstructBstruct2UseWOP(astructbstruct2use *AstructBstruct2UseWOP)

CopyBasicFieldsFromAstructBstruct2UseWOP

func (*AstructBstruct2UseDB) CopyBasicFieldsFromAstructBstruct2Use_WOP

func (astructbstruct2useDB *AstructBstruct2UseDB) CopyBasicFieldsFromAstructBstruct2Use_WOP(astructbstruct2use *models.AstructBstruct2Use_WOP)

CopyBasicFieldsFromAstructBstruct2Use_WOP

func (*AstructBstruct2UseDB) CopyBasicFieldsToAstructBstruct2Use

func (astructbstruct2useDB *AstructBstruct2UseDB) CopyBasicFieldsToAstructBstruct2Use(astructbstruct2use *models.AstructBstruct2Use)

CopyBasicFieldsToAstructBstruct2Use

func (*AstructBstruct2UseDB) CopyBasicFieldsToAstructBstruct2UseWOP

func (astructbstruct2useDB *AstructBstruct2UseDB) CopyBasicFieldsToAstructBstruct2UseWOP(astructbstruct2use *AstructBstruct2UseWOP)

CopyBasicFieldsToAstructBstruct2UseWOP

func (*AstructBstruct2UseDB) CopyBasicFieldsToAstructBstruct2Use_WOP

func (astructbstruct2useDB *AstructBstruct2UseDB) CopyBasicFieldsToAstructBstruct2Use_WOP(astructbstruct2use *models.AstructBstruct2Use_WOP)

CopyBasicFieldsToAstructBstruct2Use_WOP

func (*AstructBstruct2UseDB) DecodePointers

func (astructbstruct2useDB *AstructBstruct2UseDB) DecodePointers(backRepo *BackRepoStruct, astructbstruct2use *models.AstructBstruct2Use)

type AstructBstruct2UseDBResponse

type AstructBstruct2UseDBResponse struct {
	AstructBstruct2UseDB
}

AstructBstruct2UseDBResponse provides response swagger:response astructbstruct2useDBResponse

type AstructBstruct2UseDBs

type AstructBstruct2UseDBs []AstructBstruct2UseDB

AstructBstruct2UseDBs arrays astructbstruct2useDBs swagger:response astructbstruct2useDBsResponse

type AstructBstruct2UsePointersEncoding

type AstructBstruct2UsePointersEncoding struct {

	// field Bstrcut2 is a pointer to another Struct (optional or 0..1)
	// This field is generated into another field to enable AS ONE association
	Bstrcut2ID sql.NullInt64
}

AstructBstruct2UsePointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct

type AstructBstruct2UseWOP

type AstructBstruct2UseWOP struct {
	ID int `xlsx:"0"`

	Name string `xlsx:"1"`
}

AstructBstruct2UseWOP is a AstructBstruct2Use without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint

type AstructBstructUseAPI

type AstructBstructUseAPI struct {
	gorm.Model

	models.AstructBstructUse_WOP

	// encoding of pointers
	// for API, it cannot be embedded
	AstructBstructUsePointersEncoding AstructBstructUsePointersEncoding
}

AstructBstructUseAPI is the input in POST API

for POST, API, one needs the fields of the model as well as the fields from associations ("Has One" and "Has Many") that are generated to fullfill the ORM requirements for associations

swagger:model astructbstructuseAPI

type AstructBstructUseDB

type AstructBstructUseDB struct {
	gorm.Model

	// Declation for basic field astructbstructuseDB.Name
	Name_Data sql.NullString

	// encoding of pointers
	// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
	AstructBstructUsePointersEncoding
}

AstructBstructUseDB describes a astructbstructuse in the database

It incorporates the GORM ID, basic fields from the model (because they can be serialized), the encoded version of pointers

swagger:model astructbstructuseDB

func (*AstructBstructUseDB) CopyBasicFieldsFromAstructBstructUse

func (astructbstructuseDB *AstructBstructUseDB) CopyBasicFieldsFromAstructBstructUse(astructbstructuse *models.AstructBstructUse)

CopyBasicFieldsFromAstructBstructUse

func (*AstructBstructUseDB) CopyBasicFieldsFromAstructBstructUseWOP

func (astructbstructuseDB *AstructBstructUseDB) CopyBasicFieldsFromAstructBstructUseWOP(astructbstructuse *AstructBstructUseWOP)

CopyBasicFieldsFromAstructBstructUseWOP

func (*AstructBstructUseDB) CopyBasicFieldsFromAstructBstructUse_WOP

func (astructbstructuseDB *AstructBstructUseDB) CopyBasicFieldsFromAstructBstructUse_WOP(astructbstructuse *models.AstructBstructUse_WOP)

CopyBasicFieldsFromAstructBstructUse_WOP

func (*AstructBstructUseDB) CopyBasicFieldsToAstructBstructUse

func (astructbstructuseDB *AstructBstructUseDB) CopyBasicFieldsToAstructBstructUse(astructbstructuse *models.AstructBstructUse)

CopyBasicFieldsToAstructBstructUse

func (*AstructBstructUseDB) CopyBasicFieldsToAstructBstructUseWOP

func (astructbstructuseDB *AstructBstructUseDB) CopyBasicFieldsToAstructBstructUseWOP(astructbstructuse *AstructBstructUseWOP)

CopyBasicFieldsToAstructBstructUseWOP

func (*AstructBstructUseDB) CopyBasicFieldsToAstructBstructUse_WOP

func (astructbstructuseDB *AstructBstructUseDB) CopyBasicFieldsToAstructBstructUse_WOP(astructbstructuse *models.AstructBstructUse_WOP)

CopyBasicFieldsToAstructBstructUse_WOP

func (*AstructBstructUseDB) DecodePointers

func (astructbstructuseDB *AstructBstructUseDB) DecodePointers(backRepo *BackRepoStruct, astructbstructuse *models.AstructBstructUse)

type AstructBstructUseDBResponse

type AstructBstructUseDBResponse struct {
	AstructBstructUseDB
}

AstructBstructUseDBResponse provides response swagger:response astructbstructuseDBResponse

type AstructBstructUseDBs

type AstructBstructUseDBs []AstructBstructUseDB

AstructBstructUseDBs arrays astructbstructuseDBs swagger:response astructbstructuseDBsResponse

type AstructBstructUsePointersEncoding

type AstructBstructUsePointersEncoding struct {

	// field Bstruct2 is a pointer to another Struct (optional or 0..1)
	// This field is generated into another field to enable AS ONE association
	Bstruct2ID sql.NullInt64
}

AstructBstructUsePointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct

type AstructBstructUseWOP

type AstructBstructUseWOP struct {
	ID int `xlsx:"0"`

	Name string `xlsx:"1"`
}

AstructBstructUseWOP is a AstructBstructUse without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint

type AstructDB

type AstructDB struct {
	gorm.Model

	// Declation for basic field astructDB.Name
	Name_Data sql.NullString

	// Declation for basic field astructDB.Date
	Date_Data sql.NullTime

	// Declation for basic field astructDB.Date2
	Date2_Data sql.NullTime

	// Declation for basic field astructDB.Booleanfield
	// provide the sql storage for the boolan
	Booleanfield_Data sql.NullBool

	// Declation for basic field astructDB.Aenum
	Aenum_Data sql.NullString

	// Declation for basic field astructDB.Aenum_2
	Aenum_2_Data sql.NullString

	// Declation for basic field astructDB.Benum
	Benum_Data sql.NullString

	// Declation for basic field astructDB.CEnum
	CEnum_Data sql.NullInt64

	// Declation for basic field astructDB.CName
	CName_Data sql.NullString

	// Declation for basic field astructDB.CFloatfield
	CFloatfield_Data sql.NullFloat64

	// Declation for basic field astructDB.Floatfield
	Floatfield_Data sql.NullFloat64

	// Declation for basic field astructDB.Intfield
	Intfield_Data sql.NullInt64

	// Declation for basic field astructDB.Anotherbooleanfield
	// provide the sql storage for the boolan
	Anotherbooleanfield_Data sql.NullBool

	// Declation for basic field astructDB.Duration1
	Duration1_Data sql.NullInt64

	// Declation for basic field astructDB.StructRef
	StructRef_Data sql.NullString

	// Declation for basic field astructDB.FieldRef
	FieldRef_Data sql.NullString

	// Declation for basic field astructDB.EnumIntRef
	EnumIntRef_Data sql.NullString

	// Declation for basic field astructDB.EnumStringRef
	EnumStringRef_Data sql.NullString

	// Declation for basic field astructDB.EnumValue
	EnumValue_Data sql.NullString

	// Declation for basic field astructDB.ConstIdentifierValue
	ConstIdentifierValue_Data sql.NullString

	// Declation for basic field astructDB.TextFieldBespokeSize
	TextFieldBespokeSize_Data sql.NullString

	// Declation for basic field astructDB.TextArea
	TextArea_Data sql.NullString

	// encoding of pointers
	// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
	AstructPointersEncoding
}

AstructDB describes a astruct in the database

It incorporates the GORM ID, basic fields from the model (because they can be serialized), the encoded version of pointers

swagger:model astructDB

func (*AstructDB) CopyBasicFieldsFromAstruct

func (astructDB *AstructDB) CopyBasicFieldsFromAstruct(astruct *models.Astruct)

CopyBasicFieldsFromAstruct

func (*AstructDB) CopyBasicFieldsFromAstructWOP

func (astructDB *AstructDB) CopyBasicFieldsFromAstructWOP(astruct *AstructWOP)

CopyBasicFieldsFromAstructWOP

func (*AstructDB) CopyBasicFieldsFromAstruct_WOP

func (astructDB *AstructDB) CopyBasicFieldsFromAstruct_WOP(astruct *models.Astruct_WOP)

CopyBasicFieldsFromAstruct_WOP

func (*AstructDB) CopyBasicFieldsToAstruct

func (astructDB *AstructDB) CopyBasicFieldsToAstruct(astruct *models.Astruct)

CopyBasicFieldsToAstruct

func (*AstructDB) CopyBasicFieldsToAstructWOP

func (astructDB *AstructDB) CopyBasicFieldsToAstructWOP(astruct *AstructWOP)

CopyBasicFieldsToAstructWOP

func (*AstructDB) CopyBasicFieldsToAstruct_WOP

func (astructDB *AstructDB) CopyBasicFieldsToAstruct_WOP(astruct *models.Astruct_WOP)

CopyBasicFieldsToAstruct_WOP

func (*AstructDB) DecodePointers

func (astructDB *AstructDB) DecodePointers(backRepo *BackRepoStruct, astruct *models.Astruct)

type AstructDBResponse

type AstructDBResponse struct {
	AstructDB
}

AstructDBResponse provides response swagger:response astructDBResponse

type AstructDBs

type AstructDBs []AstructDB

AstructDBs arrays astructDBs swagger:response astructDBsResponse

type AstructPointersEncoding

type AstructPointersEncoding struct {

	// field Associationtob is a pointer to another Struct (optional or 0..1)
	// This field is generated into another field to enable AS ONE association
	AssociationtobID sql.NullInt64

	// field Anarrayofb is a slice of pointers to another Struct (optional or 0..1)
	Anarrayofb IntSlice `gorm:"type:TEXT"`

	// field Anotherassociationtob_2 is a pointer to another Struct (optional or 0..1)
	// This field is generated into another field to enable AS ONE association
	Anotherassociationtob_2ID sql.NullInt64

	// field Bstruct is a pointer to another Struct (optional or 0..1)
	// This field is generated into another field to enable AS ONE association
	BstructID sql.NullInt64

	// field Bstruct2 is a pointer to another Struct (optional or 0..1)
	// This field is generated into another field to enable AS ONE association
	Bstruct2ID sql.NullInt64

	// field Dstruct is a pointer to another Struct (optional or 0..1)
	// This field is generated into another field to enable AS ONE association
	DstructID sql.NullInt64

	// field Dstruct2 is a pointer to another Struct (optional or 0..1)
	// This field is generated into another field to enable AS ONE association
	Dstruct2ID sql.NullInt64

	// field Dstruct3 is a pointer to another Struct (optional or 0..1)
	// This field is generated into another field to enable AS ONE association
	Dstruct3ID sql.NullInt64

	// field Dstruct4 is a pointer to another Struct (optional or 0..1)
	// This field is generated into another field to enable AS ONE association
	Dstruct4ID sql.NullInt64

	// field Dstruct4s is a slice of pointers to another Struct (optional or 0..1)
	Dstruct4s IntSlice `gorm:"type:TEXT"`

	// field Anarrayofa is a slice of pointers to another Struct (optional or 0..1)
	Anarrayofa IntSlice `gorm:"type:TEXT"`

	// field Anotherarrayofb is a slice of pointers to another Struct (optional or 0..1)
	Anotherarrayofb IntSlice `gorm:"type:TEXT"`

	// field AnarrayofbUse is a slice of pointers to another Struct (optional or 0..1)
	AnarrayofbUse IntSlice `gorm:"type:TEXT"`

	// field Anarrayofb2Use is a slice of pointers to another Struct (optional or 0..1)
	Anarrayofb2Use IntSlice `gorm:"type:TEXT"`

	// field AnAstruct is a pointer to another Struct (optional or 0..1)
	// This field is generated into another field to enable AS ONE association
	AnAstructID sql.NullInt64
}

AstructPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct

type AstructWOP

type AstructWOP struct {
	ID int `xlsx:"0"`

	Name string `xlsx:"1"`

	Date time.Time `xlsx:"2"`

	Date2 time.Time `xlsx:"3"`

	Booleanfield bool `xlsx:"4"`

	Aenum models.AEnumType `xlsx:"5"`

	Aenum_2 models.AEnumType `xlsx:"6"`

	Benum models.BEnumType `xlsx:"7"`

	CEnum models.CEnumTypeInt `xlsx:"8"`

	CName string `xlsx:"9"`

	CFloatfield float64 `xlsx:"10"`

	Floatfield float64 `xlsx:"11"`

	Intfield int `xlsx:"12"`

	Anotherbooleanfield bool `xlsx:"13"`

	Duration1 time.Duration `xlsx:"14"`

	StructRef string `xlsx:"15"`

	FieldRef string `xlsx:"16"`

	EnumIntRef string `xlsx:"17"`

	EnumStringRef string `xlsx:"18"`

	EnumValue string `xlsx:"19"`

	ConstIdentifierValue string `xlsx:"20"`

	TextFieldBespokeSize string `xlsx:"21"`

	TextArea string `xlsx:"22"`
}

AstructWOP is a Astruct without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint

type BackRepoAstructBstruct2UseStruct

type BackRepoAstructBstruct2UseStruct struct {
	// stores AstructBstruct2UseDB according to their gorm ID
	Map_AstructBstruct2UseDBID_AstructBstruct2UseDB map[uint]*AstructBstruct2UseDB

	// stores AstructBstruct2UseDB ID according to AstructBstruct2Use address
	Map_AstructBstruct2UsePtr_AstructBstruct2UseDBID map[*models.AstructBstruct2Use]uint

	// stores AstructBstruct2Use according to their gorm ID
	Map_AstructBstruct2UseDBID_AstructBstruct2UsePtr map[uint]*models.AstructBstruct2Use
	// contains filtered or unexported fields
}

func (*BackRepoAstructBstruct2UseStruct) Backup

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) Backup(dirPath string)

Backup generates a json file from a slice of all AstructBstruct2UseDB instances in the backrepo

func (*BackRepoAstructBstruct2UseStruct) BackupXL

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) BackupXL(file *xlsx.File)

Backup generates a json file from a slice of all AstructBstruct2UseDB instances in the backrepo

func (*BackRepoAstructBstruct2UseStruct) CheckoutPhaseOne

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) CheckoutPhaseOne() (Error error)

BackRepoAstructBstruct2Use.CheckoutPhaseOne Checkouts all BackRepo instances to the Stage

Phase One will result in having instances on the stage aligned with the back repo pointers are not initialized yet (this is for phase two)

func (*BackRepoAstructBstruct2UseStruct) CheckoutPhaseOneInstance

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) CheckoutPhaseOneInstance(astructbstruct2useDB *AstructBstruct2UseDB) (Error error)

CheckoutPhaseOneInstance takes a astructbstruct2useDB that has been found in the DB, updates the backRepo and stages the models version of the astructbstruct2useDB

func (*BackRepoAstructBstruct2UseStruct) CheckoutPhaseTwo

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoAstructBstruct2Use.CheckoutPhaseTwo Checkouts all staged instances of AstructBstruct2Use to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAstructBstruct2UseStruct) CheckoutPhaseTwoInstance

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, astructbstruct2useDB *AstructBstruct2UseDB) (Error error)

BackRepoAstructBstruct2Use.CheckoutPhaseTwoInstance Checkouts staged instances of AstructBstruct2Use to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAstructBstruct2UseStruct) CommitDeleteInstance

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoAstructBstruct2Use.CommitDeleteInstance commits deletion of AstructBstruct2Use to the BackRepo

func (*BackRepoAstructBstruct2UseStruct) CommitPhaseOne

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoAstructBstruct2Use.CommitPhaseOne commits all staged instances of AstructBstruct2Use to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance

func (*BackRepoAstructBstruct2UseStruct) CommitPhaseOneInstance

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) CommitPhaseOneInstance(astructbstruct2use *models.AstructBstruct2Use) (Error error)

BackRepoAstructBstruct2Use.CommitPhaseOneInstance commits astructbstruct2use staged instances of AstructBstruct2Use to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance

func (*BackRepoAstructBstruct2UseStruct) CommitPhaseTwo

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoAstructBstruct2Use.CommitPhaseTwo commits all staged instances of AstructBstruct2Use to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAstructBstruct2UseStruct) CommitPhaseTwoInstance

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, astructbstruct2use *models.AstructBstruct2Use) (Error error)

BackRepoAstructBstruct2Use.CommitPhaseTwoInstance commits {{structname }} of models.AstructBstruct2Use to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAstructBstruct2UseStruct) GetAstructBstruct2UseDBFromAstructBstruct2UsePtr

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) GetAstructBstruct2UseDBFromAstructBstruct2UsePtr(astructbstruct2use *models.AstructBstruct2Use) (astructbstruct2useDB *AstructBstruct2UseDB)

GetAstructBstruct2UseDBFromAstructBstruct2UsePtr is a handy function to access the back repo instance from the stage instance

func (*BackRepoAstructBstruct2UseStruct) GetDB

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) GetDB() db.DBInterface

func (*BackRepoAstructBstruct2UseStruct) GetStage

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) GetStage() (stage *models.StageStruct)

func (*BackRepoAstructBstruct2UseStruct) ResetReversePointers

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)

BackRepoAstructBstruct2Use.ResetReversePointers commits all staged instances of AstructBstruct2Use to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAstructBstruct2UseStruct) ResetReversePointersInstance

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, astructbstruct2use *models.AstructBstruct2Use) (Error error)

func (*BackRepoAstructBstruct2UseStruct) RestorePhaseOne

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) RestorePhaseOne(dirPath string)

RestorePhaseOne read the file "AstructBstruct2UseDB.json" in dirPath that stores an array of AstructBstruct2UseDB and stores it in the database the map BackRepoAstructBstruct2Useid_atBckpTime_newID is updated accordingly

func (*BackRepoAstructBstruct2UseStruct) RestorePhaseTwo

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) RestorePhaseTwo()

RestorePhaseTwo uses all map BackRepo<AstructBstruct2Use>id_atBckpTime_newID to compute new index

func (*BackRepoAstructBstruct2UseStruct) RestoreXLPhaseOne

func (backRepoAstructBstruct2Use *BackRepoAstructBstruct2UseStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "AstructBstruct2Use" sheet all AstructBstruct2UseDB instances

type BackRepoAstructBstructUseStruct

type BackRepoAstructBstructUseStruct struct {
	// stores AstructBstructUseDB according to their gorm ID
	Map_AstructBstructUseDBID_AstructBstructUseDB map[uint]*AstructBstructUseDB

	// stores AstructBstructUseDB ID according to AstructBstructUse address
	Map_AstructBstructUsePtr_AstructBstructUseDBID map[*models.AstructBstructUse]uint

	// stores AstructBstructUse according to their gorm ID
	Map_AstructBstructUseDBID_AstructBstructUsePtr map[uint]*models.AstructBstructUse
	// contains filtered or unexported fields
}

func (*BackRepoAstructBstructUseStruct) Backup

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) Backup(dirPath string)

Backup generates a json file from a slice of all AstructBstructUseDB instances in the backrepo

func (*BackRepoAstructBstructUseStruct) BackupXL

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) BackupXL(file *xlsx.File)

Backup generates a json file from a slice of all AstructBstructUseDB instances in the backrepo

func (*BackRepoAstructBstructUseStruct) CheckoutPhaseOne

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) CheckoutPhaseOne() (Error error)

BackRepoAstructBstructUse.CheckoutPhaseOne Checkouts all BackRepo instances to the Stage

Phase One will result in having instances on the stage aligned with the back repo pointers are not initialized yet (this is for phase two)

func (*BackRepoAstructBstructUseStruct) CheckoutPhaseOneInstance

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) CheckoutPhaseOneInstance(astructbstructuseDB *AstructBstructUseDB) (Error error)

CheckoutPhaseOneInstance takes a astructbstructuseDB that has been found in the DB, updates the backRepo and stages the models version of the astructbstructuseDB

func (*BackRepoAstructBstructUseStruct) CheckoutPhaseTwo

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoAstructBstructUse.CheckoutPhaseTwo Checkouts all staged instances of AstructBstructUse to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAstructBstructUseStruct) CheckoutPhaseTwoInstance

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, astructbstructuseDB *AstructBstructUseDB) (Error error)

BackRepoAstructBstructUse.CheckoutPhaseTwoInstance Checkouts staged instances of AstructBstructUse to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAstructBstructUseStruct) CommitDeleteInstance

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoAstructBstructUse.CommitDeleteInstance commits deletion of AstructBstructUse to the BackRepo

func (*BackRepoAstructBstructUseStruct) CommitPhaseOne

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoAstructBstructUse.CommitPhaseOne commits all staged instances of AstructBstructUse to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance

func (*BackRepoAstructBstructUseStruct) CommitPhaseOneInstance

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) CommitPhaseOneInstance(astructbstructuse *models.AstructBstructUse) (Error error)

BackRepoAstructBstructUse.CommitPhaseOneInstance commits astructbstructuse staged instances of AstructBstructUse to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance

func (*BackRepoAstructBstructUseStruct) CommitPhaseTwo

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoAstructBstructUse.CommitPhaseTwo commits all staged instances of AstructBstructUse to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAstructBstructUseStruct) CommitPhaseTwoInstance

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, astructbstructuse *models.AstructBstructUse) (Error error)

BackRepoAstructBstructUse.CommitPhaseTwoInstance commits {{structname }} of models.AstructBstructUse to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAstructBstructUseStruct) GetAstructBstructUseDBFromAstructBstructUsePtr

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) GetAstructBstructUseDBFromAstructBstructUsePtr(astructbstructuse *models.AstructBstructUse) (astructbstructuseDB *AstructBstructUseDB)

GetAstructBstructUseDBFromAstructBstructUsePtr is a handy function to access the back repo instance from the stage instance

func (*BackRepoAstructBstructUseStruct) GetDB

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) GetDB() db.DBInterface

func (*BackRepoAstructBstructUseStruct) GetStage

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) GetStage() (stage *models.StageStruct)

func (*BackRepoAstructBstructUseStruct) ResetReversePointers

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)

BackRepoAstructBstructUse.ResetReversePointers commits all staged instances of AstructBstructUse to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAstructBstructUseStruct) ResetReversePointersInstance

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, astructbstructuse *models.AstructBstructUse) (Error error)

func (*BackRepoAstructBstructUseStruct) RestorePhaseOne

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) RestorePhaseOne(dirPath string)

RestorePhaseOne read the file "AstructBstructUseDB.json" in dirPath that stores an array of AstructBstructUseDB and stores it in the database the map BackRepoAstructBstructUseid_atBckpTime_newID is updated accordingly

func (*BackRepoAstructBstructUseStruct) RestorePhaseTwo

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) RestorePhaseTwo()

RestorePhaseTwo uses all map BackRepo<AstructBstructUse>id_atBckpTime_newID to compute new index

func (*BackRepoAstructBstructUseStruct) RestoreXLPhaseOne

func (backRepoAstructBstructUse *BackRepoAstructBstructUseStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "AstructBstructUse" sheet all AstructBstructUseDB instances

type BackRepoAstructStruct

type BackRepoAstructStruct struct {
	// stores AstructDB according to their gorm ID
	Map_AstructDBID_AstructDB map[uint]*AstructDB

	// stores AstructDB ID according to Astruct address
	Map_AstructPtr_AstructDBID map[*models.Astruct]uint

	// stores Astruct according to their gorm ID
	Map_AstructDBID_AstructPtr map[uint]*models.Astruct
	// contains filtered or unexported fields
}

func (*BackRepoAstructStruct) Backup

func (backRepoAstruct *BackRepoAstructStruct) Backup(dirPath string)

Backup generates a json file from a slice of all AstructDB instances in the backrepo

func (*BackRepoAstructStruct) BackupXL

func (backRepoAstruct *BackRepoAstructStruct) BackupXL(file *xlsx.File)

Backup generates a json file from a slice of all AstructDB instances in the backrepo

func (*BackRepoAstructStruct) CheckoutPhaseOne

func (backRepoAstruct *BackRepoAstructStruct) CheckoutPhaseOne() (Error error)

BackRepoAstruct.CheckoutPhaseOne Checkouts all BackRepo instances to the Stage

Phase One will result in having instances on the stage aligned with the back repo pointers are not initialized yet (this is for phase two)

func (*BackRepoAstructStruct) CheckoutPhaseOneInstance

func (backRepoAstruct *BackRepoAstructStruct) CheckoutPhaseOneInstance(astructDB *AstructDB) (Error error)

CheckoutPhaseOneInstance takes a astructDB that has been found in the DB, updates the backRepo and stages the models version of the astructDB

func (*BackRepoAstructStruct) CheckoutPhaseTwo

func (backRepoAstruct *BackRepoAstructStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoAstruct.CheckoutPhaseTwo Checkouts all staged instances of Astruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAstructStruct) CheckoutPhaseTwoInstance

func (backRepoAstruct *BackRepoAstructStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, astructDB *AstructDB) (Error error)

BackRepoAstruct.CheckoutPhaseTwoInstance Checkouts staged instances of Astruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAstructStruct) CommitDeleteInstance

func (backRepoAstruct *BackRepoAstructStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoAstruct.CommitDeleteInstance commits deletion of Astruct to the BackRepo

func (*BackRepoAstructStruct) CommitPhaseOne

func (backRepoAstruct *BackRepoAstructStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoAstruct.CommitPhaseOne commits all staged instances of Astruct to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance

func (*BackRepoAstructStruct) CommitPhaseOneInstance

func (backRepoAstruct *BackRepoAstructStruct) CommitPhaseOneInstance(astruct *models.Astruct) (Error error)

BackRepoAstruct.CommitPhaseOneInstance commits astruct staged instances of Astruct to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance

func (*BackRepoAstructStruct) CommitPhaseTwo

func (backRepoAstruct *BackRepoAstructStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoAstruct.CommitPhaseTwo commits all staged instances of Astruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAstructStruct) CommitPhaseTwoInstance

func (backRepoAstruct *BackRepoAstructStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, astruct *models.Astruct) (Error error)

BackRepoAstruct.CommitPhaseTwoInstance commits {{structname }} of models.Astruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAstructStruct) GetAstructDBFromAstructPtr

func (backRepoAstruct *BackRepoAstructStruct) GetAstructDBFromAstructPtr(astruct *models.Astruct) (astructDB *AstructDB)

GetAstructDBFromAstructPtr is a handy function to access the back repo instance from the stage instance

func (*BackRepoAstructStruct) GetDB

func (backRepoAstruct *BackRepoAstructStruct) GetDB() db.DBInterface

func (*BackRepoAstructStruct) GetStage

func (backRepoAstruct *BackRepoAstructStruct) GetStage() (stage *models.StageStruct)

func (*BackRepoAstructStruct) ResetReversePointers

func (backRepoAstruct *BackRepoAstructStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)

BackRepoAstruct.ResetReversePointers commits all staged instances of Astruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoAstructStruct) ResetReversePointersInstance

func (backRepoAstruct *BackRepoAstructStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, astruct *models.Astruct) (Error error)

func (*BackRepoAstructStruct) RestorePhaseOne

func (backRepoAstruct *BackRepoAstructStruct) RestorePhaseOne(dirPath string)

RestorePhaseOne read the file "AstructDB.json" in dirPath that stores an array of AstructDB and stores it in the database the map BackRepoAstructid_atBckpTime_newID is updated accordingly

func (*BackRepoAstructStruct) RestorePhaseTwo

func (backRepoAstruct *BackRepoAstructStruct) RestorePhaseTwo()

RestorePhaseTwo uses all map BackRepo<Astruct>id_atBckpTime_newID to compute new index

func (*BackRepoAstructStruct) RestoreXLPhaseOne

func (backRepoAstruct *BackRepoAstructStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "Astruct" sheet all AstructDB instances

type BackRepoBstructStruct

type BackRepoBstructStruct struct {
	// stores BstructDB according to their gorm ID
	Map_BstructDBID_BstructDB map[uint]*BstructDB

	// stores BstructDB ID according to Bstruct address
	Map_BstructPtr_BstructDBID map[*models.Bstruct]uint

	// stores Bstruct according to their gorm ID
	Map_BstructDBID_BstructPtr map[uint]*models.Bstruct
	// contains filtered or unexported fields
}

func (*BackRepoBstructStruct) Backup

func (backRepoBstruct *BackRepoBstructStruct) Backup(dirPath string)

Backup generates a json file from a slice of all BstructDB instances in the backrepo

func (*BackRepoBstructStruct) BackupXL

func (backRepoBstruct *BackRepoBstructStruct) BackupXL(file *xlsx.File)

Backup generates a json file from a slice of all BstructDB instances in the backrepo

func (*BackRepoBstructStruct) CheckoutPhaseOne

func (backRepoBstruct *BackRepoBstructStruct) CheckoutPhaseOne() (Error error)

BackRepoBstruct.CheckoutPhaseOne Checkouts all BackRepo instances to the Stage

Phase One will result in having instances on the stage aligned with the back repo pointers are not initialized yet (this is for phase two)

func (*BackRepoBstructStruct) CheckoutPhaseOneInstance

func (backRepoBstruct *BackRepoBstructStruct) CheckoutPhaseOneInstance(bstructDB *BstructDB) (Error error)

CheckoutPhaseOneInstance takes a bstructDB that has been found in the DB, updates the backRepo and stages the models version of the bstructDB

func (*BackRepoBstructStruct) CheckoutPhaseTwo

func (backRepoBstruct *BackRepoBstructStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoBstruct.CheckoutPhaseTwo Checkouts all staged instances of Bstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoBstructStruct) CheckoutPhaseTwoInstance

func (backRepoBstruct *BackRepoBstructStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, bstructDB *BstructDB) (Error error)

BackRepoBstruct.CheckoutPhaseTwoInstance Checkouts staged instances of Bstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoBstructStruct) CommitDeleteInstance

func (backRepoBstruct *BackRepoBstructStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoBstruct.CommitDeleteInstance commits deletion of Bstruct to the BackRepo

func (*BackRepoBstructStruct) CommitPhaseOne

func (backRepoBstruct *BackRepoBstructStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoBstruct.CommitPhaseOne commits all staged instances of Bstruct to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance

func (*BackRepoBstructStruct) CommitPhaseOneInstance

func (backRepoBstruct *BackRepoBstructStruct) CommitPhaseOneInstance(bstruct *models.Bstruct) (Error error)

BackRepoBstruct.CommitPhaseOneInstance commits bstruct staged instances of Bstruct to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance

func (*BackRepoBstructStruct) CommitPhaseTwo

func (backRepoBstruct *BackRepoBstructStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoBstruct.CommitPhaseTwo commits all staged instances of Bstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoBstructStruct) CommitPhaseTwoInstance

func (backRepoBstruct *BackRepoBstructStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, bstruct *models.Bstruct) (Error error)

BackRepoBstruct.CommitPhaseTwoInstance commits {{structname }} of models.Bstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoBstructStruct) GetBstructDBFromBstructPtr

func (backRepoBstruct *BackRepoBstructStruct) GetBstructDBFromBstructPtr(bstruct *models.Bstruct) (bstructDB *BstructDB)

GetBstructDBFromBstructPtr is a handy function to access the back repo instance from the stage instance

func (*BackRepoBstructStruct) GetDB

func (backRepoBstruct *BackRepoBstructStruct) GetDB() db.DBInterface

func (*BackRepoBstructStruct) GetStage

func (backRepoBstruct *BackRepoBstructStruct) GetStage() (stage *models.StageStruct)

func (*BackRepoBstructStruct) ResetReversePointers

func (backRepoBstruct *BackRepoBstructStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)

BackRepoBstruct.ResetReversePointers commits all staged instances of Bstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoBstructStruct) ResetReversePointersInstance

func (backRepoBstruct *BackRepoBstructStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, bstruct *models.Bstruct) (Error error)

func (*BackRepoBstructStruct) RestorePhaseOne

func (backRepoBstruct *BackRepoBstructStruct) RestorePhaseOne(dirPath string)

RestorePhaseOne read the file "BstructDB.json" in dirPath that stores an array of BstructDB and stores it in the database the map BackRepoBstructid_atBckpTime_newID is updated accordingly

func (*BackRepoBstructStruct) RestorePhaseTwo

func (backRepoBstruct *BackRepoBstructStruct) RestorePhaseTwo()

RestorePhaseTwo uses all map BackRepo<Bstruct>id_atBckpTime_newID to compute new index

func (*BackRepoBstructStruct) RestoreXLPhaseOne

func (backRepoBstruct *BackRepoBstructStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "Bstruct" sheet all BstructDB instances

type BackRepoData

type BackRepoData struct {
	AstructAPIs []*AstructAPI

	AstructBstruct2UseAPIs []*AstructBstruct2UseAPI

	AstructBstructUseAPIs []*AstructBstructUseAPI

	BstructAPIs []*BstructAPI

	DstructAPIs []*DstructAPI

	FstructAPIs []*FstructAPI

	GstructAPIs []*GstructAPI
}

type BackRepoDstructStruct

type BackRepoDstructStruct struct {
	// stores DstructDB according to their gorm ID
	Map_DstructDBID_DstructDB map[uint]*DstructDB

	// stores DstructDB ID according to Dstruct address
	Map_DstructPtr_DstructDBID map[*models.Dstruct]uint

	// stores Dstruct according to their gorm ID
	Map_DstructDBID_DstructPtr map[uint]*models.Dstruct
	// contains filtered or unexported fields
}

func (*BackRepoDstructStruct) Backup

func (backRepoDstruct *BackRepoDstructStruct) Backup(dirPath string)

Backup generates a json file from a slice of all DstructDB instances in the backrepo

func (*BackRepoDstructStruct) BackupXL

func (backRepoDstruct *BackRepoDstructStruct) BackupXL(file *xlsx.File)

Backup generates a json file from a slice of all DstructDB instances in the backrepo

func (*BackRepoDstructStruct) CheckoutPhaseOne

func (backRepoDstruct *BackRepoDstructStruct) CheckoutPhaseOne() (Error error)

BackRepoDstruct.CheckoutPhaseOne Checkouts all BackRepo instances to the Stage

Phase One will result in having instances on the stage aligned with the back repo pointers are not initialized yet (this is for phase two)

func (*BackRepoDstructStruct) CheckoutPhaseOneInstance

func (backRepoDstruct *BackRepoDstructStruct) CheckoutPhaseOneInstance(dstructDB *DstructDB) (Error error)

CheckoutPhaseOneInstance takes a dstructDB that has been found in the DB, updates the backRepo and stages the models version of the dstructDB

func (*BackRepoDstructStruct) CheckoutPhaseTwo

func (backRepoDstruct *BackRepoDstructStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoDstruct.CheckoutPhaseTwo Checkouts all staged instances of Dstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoDstructStruct) CheckoutPhaseTwoInstance

func (backRepoDstruct *BackRepoDstructStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, dstructDB *DstructDB) (Error error)

BackRepoDstruct.CheckoutPhaseTwoInstance Checkouts staged instances of Dstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoDstructStruct) CommitDeleteInstance

func (backRepoDstruct *BackRepoDstructStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoDstruct.CommitDeleteInstance commits deletion of Dstruct to the BackRepo

func (*BackRepoDstructStruct) CommitPhaseOne

func (backRepoDstruct *BackRepoDstructStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoDstruct.CommitPhaseOne commits all staged instances of Dstruct to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance

func (*BackRepoDstructStruct) CommitPhaseOneInstance

func (backRepoDstruct *BackRepoDstructStruct) CommitPhaseOneInstance(dstruct *models.Dstruct) (Error error)

BackRepoDstruct.CommitPhaseOneInstance commits dstruct staged instances of Dstruct to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance

func (*BackRepoDstructStruct) CommitPhaseTwo

func (backRepoDstruct *BackRepoDstructStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoDstruct.CommitPhaseTwo commits all staged instances of Dstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoDstructStruct) CommitPhaseTwoInstance

func (backRepoDstruct *BackRepoDstructStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, dstruct *models.Dstruct) (Error error)

BackRepoDstruct.CommitPhaseTwoInstance commits {{structname }} of models.Dstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoDstructStruct) GetDB

func (backRepoDstruct *BackRepoDstructStruct) GetDB() db.DBInterface

func (*BackRepoDstructStruct) GetDstructDBFromDstructPtr

func (backRepoDstruct *BackRepoDstructStruct) GetDstructDBFromDstructPtr(dstruct *models.Dstruct) (dstructDB *DstructDB)

GetDstructDBFromDstructPtr is a handy function to access the back repo instance from the stage instance

func (*BackRepoDstructStruct) GetStage

func (backRepoDstruct *BackRepoDstructStruct) GetStage() (stage *models.StageStruct)

func (*BackRepoDstructStruct) ResetReversePointers

func (backRepoDstruct *BackRepoDstructStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)

BackRepoDstruct.ResetReversePointers commits all staged instances of Dstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoDstructStruct) ResetReversePointersInstance

func (backRepoDstruct *BackRepoDstructStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, dstruct *models.Dstruct) (Error error)

func (*BackRepoDstructStruct) RestorePhaseOne

func (backRepoDstruct *BackRepoDstructStruct) RestorePhaseOne(dirPath string)

RestorePhaseOne read the file "DstructDB.json" in dirPath that stores an array of DstructDB and stores it in the database the map BackRepoDstructid_atBckpTime_newID is updated accordingly

func (*BackRepoDstructStruct) RestorePhaseTwo

func (backRepoDstruct *BackRepoDstructStruct) RestorePhaseTwo()

RestorePhaseTwo uses all map BackRepo<Dstruct>id_atBckpTime_newID to compute new index

func (*BackRepoDstructStruct) RestoreXLPhaseOne

func (backRepoDstruct *BackRepoDstructStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "Dstruct" sheet all DstructDB instances

type BackRepoFstructStruct

type BackRepoFstructStruct struct {
	// stores FstructDB according to their gorm ID
	Map_FstructDBID_FstructDB map[uint]*FstructDB

	// stores FstructDB ID according to Fstruct address
	Map_FstructPtr_FstructDBID map[*models.Fstruct]uint

	// stores Fstruct according to their gorm ID
	Map_FstructDBID_FstructPtr map[uint]*models.Fstruct
	// contains filtered or unexported fields
}

func (*BackRepoFstructStruct) Backup

func (backRepoFstruct *BackRepoFstructStruct) Backup(dirPath string)

Backup generates a json file from a slice of all FstructDB instances in the backrepo

func (*BackRepoFstructStruct) BackupXL

func (backRepoFstruct *BackRepoFstructStruct) BackupXL(file *xlsx.File)

Backup generates a json file from a slice of all FstructDB instances in the backrepo

func (*BackRepoFstructStruct) CheckoutPhaseOne

func (backRepoFstruct *BackRepoFstructStruct) CheckoutPhaseOne() (Error error)

BackRepoFstruct.CheckoutPhaseOne Checkouts all BackRepo instances to the Stage

Phase One will result in having instances on the stage aligned with the back repo pointers are not initialized yet (this is for phase two)

func (*BackRepoFstructStruct) CheckoutPhaseOneInstance

func (backRepoFstruct *BackRepoFstructStruct) CheckoutPhaseOneInstance(fstructDB *FstructDB) (Error error)

CheckoutPhaseOneInstance takes a fstructDB that has been found in the DB, updates the backRepo and stages the models version of the fstructDB

func (*BackRepoFstructStruct) CheckoutPhaseTwo

func (backRepoFstruct *BackRepoFstructStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoFstruct.CheckoutPhaseTwo Checkouts all staged instances of Fstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoFstructStruct) CheckoutPhaseTwoInstance

func (backRepoFstruct *BackRepoFstructStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, fstructDB *FstructDB) (Error error)

BackRepoFstruct.CheckoutPhaseTwoInstance Checkouts staged instances of Fstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoFstructStruct) CommitDeleteInstance

func (backRepoFstruct *BackRepoFstructStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoFstruct.CommitDeleteInstance commits deletion of Fstruct to the BackRepo

func (*BackRepoFstructStruct) CommitPhaseOne

func (backRepoFstruct *BackRepoFstructStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoFstruct.CommitPhaseOne commits all staged instances of Fstruct to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance

func (*BackRepoFstructStruct) CommitPhaseOneInstance

func (backRepoFstruct *BackRepoFstructStruct) CommitPhaseOneInstance(fstruct *models.Fstruct) (Error error)

BackRepoFstruct.CommitPhaseOneInstance commits fstruct staged instances of Fstruct to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance

func (*BackRepoFstructStruct) CommitPhaseTwo

func (backRepoFstruct *BackRepoFstructStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoFstruct.CommitPhaseTwo commits all staged instances of Fstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoFstructStruct) CommitPhaseTwoInstance

func (backRepoFstruct *BackRepoFstructStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, fstruct *models.Fstruct) (Error error)

BackRepoFstruct.CommitPhaseTwoInstance commits {{structname }} of models.Fstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoFstructStruct) GetDB

func (backRepoFstruct *BackRepoFstructStruct) GetDB() db.DBInterface

func (*BackRepoFstructStruct) GetFstructDBFromFstructPtr

func (backRepoFstruct *BackRepoFstructStruct) GetFstructDBFromFstructPtr(fstruct *models.Fstruct) (fstructDB *FstructDB)

GetFstructDBFromFstructPtr is a handy function to access the back repo instance from the stage instance

func (*BackRepoFstructStruct) GetStage

func (backRepoFstruct *BackRepoFstructStruct) GetStage() (stage *models.StageStruct)

func (*BackRepoFstructStruct) ResetReversePointers

func (backRepoFstruct *BackRepoFstructStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)

BackRepoFstruct.ResetReversePointers commits all staged instances of Fstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoFstructStruct) ResetReversePointersInstance

func (backRepoFstruct *BackRepoFstructStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, fstruct *models.Fstruct) (Error error)

func (*BackRepoFstructStruct) RestorePhaseOne

func (backRepoFstruct *BackRepoFstructStruct) RestorePhaseOne(dirPath string)

RestorePhaseOne read the file "FstructDB.json" in dirPath that stores an array of FstructDB and stores it in the database the map BackRepoFstructid_atBckpTime_newID is updated accordingly

func (*BackRepoFstructStruct) RestorePhaseTwo

func (backRepoFstruct *BackRepoFstructStruct) RestorePhaseTwo()

RestorePhaseTwo uses all map BackRepo<Fstruct>id_atBckpTime_newID to compute new index

func (*BackRepoFstructStruct) RestoreXLPhaseOne

func (backRepoFstruct *BackRepoFstructStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "Fstruct" sheet all FstructDB instances

type BackRepoGstructStruct

type BackRepoGstructStruct struct {
	// stores GstructDB according to their gorm ID
	Map_GstructDBID_GstructDB map[uint]*GstructDB

	// stores GstructDB ID according to Gstruct address
	Map_GstructPtr_GstructDBID map[*models.Gstruct]uint

	// stores Gstruct according to their gorm ID
	Map_GstructDBID_GstructPtr map[uint]*models.Gstruct
	// contains filtered or unexported fields
}

func (*BackRepoGstructStruct) Backup

func (backRepoGstruct *BackRepoGstructStruct) Backup(dirPath string)

Backup generates a json file from a slice of all GstructDB instances in the backrepo

func (*BackRepoGstructStruct) BackupXL

func (backRepoGstruct *BackRepoGstructStruct) BackupXL(file *xlsx.File)

Backup generates a json file from a slice of all GstructDB instances in the backrepo

func (*BackRepoGstructStruct) CheckoutPhaseOne

func (backRepoGstruct *BackRepoGstructStruct) CheckoutPhaseOne() (Error error)

BackRepoGstruct.CheckoutPhaseOne Checkouts all BackRepo instances to the Stage

Phase One will result in having instances on the stage aligned with the back repo pointers are not initialized yet (this is for phase two)

func (*BackRepoGstructStruct) CheckoutPhaseOneInstance

func (backRepoGstruct *BackRepoGstructStruct) CheckoutPhaseOneInstance(gstructDB *GstructDB) (Error error)

CheckoutPhaseOneInstance takes a gstructDB that has been found in the DB, updates the backRepo and stages the models version of the gstructDB

func (*BackRepoGstructStruct) CheckoutPhaseTwo

func (backRepoGstruct *BackRepoGstructStruct) CheckoutPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoGstruct.CheckoutPhaseTwo Checkouts all staged instances of Gstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoGstructStruct) CheckoutPhaseTwoInstance

func (backRepoGstruct *BackRepoGstructStruct) CheckoutPhaseTwoInstance(backRepo *BackRepoStruct, gstructDB *GstructDB) (Error error)

BackRepoGstruct.CheckoutPhaseTwoInstance Checkouts staged instances of Gstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoGstructStruct) CommitDeleteInstance

func (backRepoGstruct *BackRepoGstructStruct) CommitDeleteInstance(id uint) (Error error)

BackRepoGstruct.CommitDeleteInstance commits deletion of Gstruct to the BackRepo

func (*BackRepoGstructStruct) CommitPhaseOne

func (backRepoGstruct *BackRepoGstructStruct) CommitPhaseOne(stage *models.StageStruct) (Error error)

BackRepoGstruct.CommitPhaseOne commits all staged instances of Gstruct to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance

func (*BackRepoGstructStruct) CommitPhaseOneInstance

func (backRepoGstruct *BackRepoGstructStruct) CommitPhaseOneInstance(gstruct *models.Gstruct) (Error error)

BackRepoGstruct.CommitPhaseOneInstance commits gstruct staged instances of Gstruct to the BackRepo Phase One is the creation of instance in the database if it is not yet done to get the unique ID for each staged instance

func (*BackRepoGstructStruct) CommitPhaseTwo

func (backRepoGstruct *BackRepoGstructStruct) CommitPhaseTwo(backRepo *BackRepoStruct) (Error error)

BackRepoGstruct.CommitPhaseTwo commits all staged instances of Gstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoGstructStruct) CommitPhaseTwoInstance

func (backRepoGstruct *BackRepoGstructStruct) CommitPhaseTwoInstance(backRepo *BackRepoStruct, idx uint, gstruct *models.Gstruct) (Error error)

BackRepoGstruct.CommitPhaseTwoInstance commits {{structname }} of models.Gstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoGstructStruct) GetDB

func (backRepoGstruct *BackRepoGstructStruct) GetDB() db.DBInterface

func (*BackRepoGstructStruct) GetGstructDBFromGstructPtr

func (backRepoGstruct *BackRepoGstructStruct) GetGstructDBFromGstructPtr(gstruct *models.Gstruct) (gstructDB *GstructDB)

GetGstructDBFromGstructPtr is a handy function to access the back repo instance from the stage instance

func (*BackRepoGstructStruct) GetStage

func (backRepoGstruct *BackRepoGstructStruct) GetStage() (stage *models.StageStruct)

func (*BackRepoGstructStruct) ResetReversePointers

func (backRepoGstruct *BackRepoGstructStruct) ResetReversePointers(backRepo *BackRepoStruct) (Error error)

BackRepoGstruct.ResetReversePointers commits all staged instances of Gstruct to the BackRepo Phase Two is the update of instance with the field in the database

func (*BackRepoGstructStruct) ResetReversePointersInstance

func (backRepoGstruct *BackRepoGstructStruct) ResetReversePointersInstance(backRepo *BackRepoStruct, idx uint, gstruct *models.Gstruct) (Error error)

func (*BackRepoGstructStruct) RestorePhaseOne

func (backRepoGstruct *BackRepoGstructStruct) RestorePhaseOne(dirPath string)

RestorePhaseOne read the file "GstructDB.json" in dirPath that stores an array of GstructDB and stores it in the database the map BackRepoGstructid_atBckpTime_newID is updated accordingly

func (*BackRepoGstructStruct) RestorePhaseTwo

func (backRepoGstruct *BackRepoGstructStruct) RestorePhaseTwo()

RestorePhaseTwo uses all map BackRepo<Gstruct>id_atBckpTime_newID to compute new index

func (*BackRepoGstructStruct) RestoreXLPhaseOne

func (backRepoGstruct *BackRepoGstructStruct) RestoreXLPhaseOne(file *xlsx.File)

RestoreXL from the "Gstruct" sheet all GstructDB instances

type BackRepoStruct

type BackRepoStruct struct {
	// insertion point for per struct back repo declarations
	BackRepoAstruct BackRepoAstructStruct

	BackRepoAstructBstruct2Use BackRepoAstructBstruct2UseStruct

	BackRepoAstructBstructUse BackRepoAstructBstructUseStruct

	BackRepoBstruct BackRepoBstructStruct

	BackRepoDstruct BackRepoDstructStruct

	BackRepoFstruct BackRepoFstructStruct

	BackRepoGstruct BackRepoGstructStruct

	CommitFromBackNb uint // records commit increments when performed by the back

	PushFromFrontNb uint // records commit increments when performed by the front
	// contains filtered or unexported fields
}

BackRepoStruct supports callback functions

func NewBackRepo

func NewBackRepo(stage *models.StageStruct, filename string) (backRepo *BackRepoStruct)

func (*BackRepoStruct) Backup

func (backRepo *BackRepoStruct) Backup(stage *models.StageStruct, dirPath string)

Backup the BackRepoStruct

func (*BackRepoStruct) BackupXL

func (backRepo *BackRepoStruct) BackupXL(stage *models.StageStruct, dirPath string)

Backup in XL the BackRepoStruct

func (*BackRepoStruct) Checkout

func (backRepo *BackRepoStruct) Checkout(stage *models.StageStruct)

Checkout the database into the stage

func (*BackRepoStruct) CheckoutAstruct

func (backRepo *BackRepoStruct) CheckoutAstruct(astruct *models.Astruct)

CommitAstruct allows checkout of a single astruct (if already staged and with a BackRepo id)

func (*BackRepoStruct) CheckoutAstructBstruct2Use

func (backRepo *BackRepoStruct) CheckoutAstructBstruct2Use(astructbstruct2use *models.AstructBstruct2Use)

CommitAstructBstruct2Use allows checkout of a single astructbstruct2use (if already staged and with a BackRepo id)

func (*BackRepoStruct) CheckoutAstructBstructUse

func (backRepo *BackRepoStruct) CheckoutAstructBstructUse(astructbstructuse *models.AstructBstructUse)

CommitAstructBstructUse allows checkout of a single astructbstructuse (if already staged and with a BackRepo id)

func (*BackRepoStruct) CheckoutBstruct

func (backRepo *BackRepoStruct) CheckoutBstruct(bstruct *models.Bstruct)

CommitBstruct allows checkout of a single bstruct (if already staged and with a BackRepo id)

func (*BackRepoStruct) CheckoutDstruct

func (backRepo *BackRepoStruct) CheckoutDstruct(dstruct *models.Dstruct)

CommitDstruct allows checkout of a single dstruct (if already staged and with a BackRepo id)

func (*BackRepoStruct) CheckoutFstruct

func (backRepo *BackRepoStruct) CheckoutFstruct(fstruct *models.Fstruct)

CommitFstruct allows checkout of a single fstruct (if already staged and with a BackRepo id)

func (*BackRepoStruct) CheckoutGstruct

func (backRepo *BackRepoStruct) CheckoutGstruct(gstruct *models.Gstruct)

CommitGstruct allows checkout of a single gstruct (if already staged and with a BackRepo id)

func (*BackRepoStruct) Commit

func (backRepo *BackRepoStruct) Commit(stage *models.StageStruct)

Commit the BackRepoStruct inner variables and link to the database

func (*BackRepoStruct) CommitAstruct

func (backRepo *BackRepoStruct) CommitAstruct(astruct *models.Astruct)

CommitAstruct allows commit of a single astruct (if already staged)

func (*BackRepoStruct) CommitAstructBstruct2Use

func (backRepo *BackRepoStruct) CommitAstructBstruct2Use(astructbstruct2use *models.AstructBstruct2Use)

CommitAstructBstruct2Use allows commit of a single astructbstruct2use (if already staged)

func (*BackRepoStruct) CommitAstructBstructUse

func (backRepo *BackRepoStruct) CommitAstructBstructUse(astructbstructuse *models.AstructBstructUse)

CommitAstructBstructUse allows commit of a single astructbstructuse (if already staged)

func (*BackRepoStruct) CommitBstruct

func (backRepo *BackRepoStruct) CommitBstruct(bstruct *models.Bstruct)

CommitBstruct allows commit of a single bstruct (if already staged)

func (*BackRepoStruct) CommitDstruct

func (backRepo *BackRepoStruct) CommitDstruct(dstruct *models.Dstruct)

CommitDstruct allows commit of a single dstruct (if already staged)

func (*BackRepoStruct) CommitFstruct

func (backRepo *BackRepoStruct) CommitFstruct(fstruct *models.Fstruct)

CommitFstruct allows commit of a single fstruct (if already staged)

func (*BackRepoStruct) CommitGstruct

func (backRepo *BackRepoStruct) CommitGstruct(gstruct *models.Gstruct)

CommitGstruct allows commit of a single gstruct (if already staged)

func (*BackRepoStruct) GetLastCommitFromBackNb

func (backRepo *BackRepoStruct) GetLastCommitFromBackNb() uint

func (*BackRepoStruct) GetLastPushFromFrontNb

func (backRepo *BackRepoStruct) GetLastPushFromFrontNb() uint

func (*BackRepoStruct) GetStage

func (backRepo *BackRepoStruct) GetStage() (stage *models.StageStruct)

func (*BackRepoStruct) IncrementCommitFromBackNb

func (backRepo *BackRepoStruct) IncrementCommitFromBackNb() uint

func (*BackRepoStruct) IncrementPushFromFrontNb

func (backRepo *BackRepoStruct) IncrementPushFromFrontNb() uint

func (*BackRepoStruct) Restore

func (backRepo *BackRepoStruct) Restore(stage *models.StageStruct, dirPath string)

Restore the database into the back repo

func (*BackRepoStruct) RestoreXL

func (backRepo *BackRepoStruct) RestoreXL(stage *models.StageStruct, dirPath string)

Restore the database into the back repo

func (*BackRepoStruct) SubscribeToCommitNb

func (backRepoStruct *BackRepoStruct) SubscribeToCommitNb(ctx context.Context) <-chan int

type BstructAPI

type BstructAPI struct {
	gorm.Model

	models.Bstruct_WOP

	// encoding of pointers
	// for API, it cannot be embedded
	BstructPointersEncoding BstructPointersEncoding
}

BstructAPI is the input in POST API

for POST, API, one needs the fields of the model as well as the fields from associations ("Has One" and "Has Many") that are generated to fullfill the ORM requirements for associations

swagger:model bstructAPI

type BstructDB

type BstructDB struct {
	gorm.Model

	// Declation for basic field bstructDB.Name
	Name_Data sql.NullString

	// Declation for basic field bstructDB.Floatfield
	Floatfield_Data sql.NullFloat64

	// Declation for basic field bstructDB.Floatfield2
	Floatfield2_Data sql.NullFloat64

	// Declation for basic field bstructDB.Intfield
	Intfield_Data sql.NullInt64

	// encoding of pointers
	// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
	BstructPointersEncoding
}

BstructDB describes a bstruct in the database

It incorporates the GORM ID, basic fields from the model (because they can be serialized), the encoded version of pointers

swagger:model bstructDB

func (*BstructDB) CopyBasicFieldsFromBstruct

func (bstructDB *BstructDB) CopyBasicFieldsFromBstruct(bstruct *models.Bstruct)

CopyBasicFieldsFromBstruct

func (*BstructDB) CopyBasicFieldsFromBstructWOP

func (bstructDB *BstructDB) CopyBasicFieldsFromBstructWOP(bstruct *BstructWOP)

CopyBasicFieldsFromBstructWOP

func (*BstructDB) CopyBasicFieldsFromBstruct_WOP

func (bstructDB *BstructDB) CopyBasicFieldsFromBstruct_WOP(bstruct *models.Bstruct_WOP)

CopyBasicFieldsFromBstruct_WOP

func (*BstructDB) CopyBasicFieldsToBstruct

func (bstructDB *BstructDB) CopyBasicFieldsToBstruct(bstruct *models.Bstruct)

CopyBasicFieldsToBstruct

func (*BstructDB) CopyBasicFieldsToBstructWOP

func (bstructDB *BstructDB) CopyBasicFieldsToBstructWOP(bstruct *BstructWOP)

CopyBasicFieldsToBstructWOP

func (*BstructDB) CopyBasicFieldsToBstruct_WOP

func (bstructDB *BstructDB) CopyBasicFieldsToBstruct_WOP(bstruct *models.Bstruct_WOP)

CopyBasicFieldsToBstruct_WOP

func (*BstructDB) DecodePointers

func (bstructDB *BstructDB) DecodePointers(backRepo *BackRepoStruct, bstruct *models.Bstruct)

type BstructDBResponse

type BstructDBResponse struct {
	BstructDB
}

BstructDBResponse provides response swagger:response bstructDBResponse

type BstructDBs

type BstructDBs []BstructDB

BstructDBs arrays bstructDBs swagger:response bstructDBsResponse

type BstructPointersEncoding

type BstructPointersEncoding struct {
}

BstructPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct

type BstructWOP

type BstructWOP struct {
	ID int `xlsx:"0"`

	Name string `xlsx:"1"`

	Floatfield float64 `xlsx:"2"`

	Floatfield2 float64 `xlsx:"3"`

	Intfield int `xlsx:"4"`
}

BstructWOP is a Bstruct without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint

type DBLite

type DBLite struct {
	// contains filtered or unexported fields
}

DBLite is an in-memory database implementation of DBInterface

func NewDBLite

func NewDBLite() *DBLite

NewDBLite creates a new instance of DBLite

func (*DBLite) Create

func (db *DBLite) Create(instanceDB any) (db.DBInterface, error)

Create inserts a new record into the database

func (*DBLite) Delete

func (db *DBLite) Delete(instanceDB any) (db.DBInterface, error)

Delete removes a record from the database

func (*DBLite) Find

func (db *DBLite) Find(instanceDBs any) (db.DBInterface, error)

Find retrieves all records of a type from the database

func (*DBLite) First

func (db *DBLite) First(instanceDB any, conds ...any) (db.DBInterface, error)

First retrieves the first record of a type from the database

func (*DBLite) Model

func (db *DBLite) Model(instanceDB any) (db.DBInterface, error)

Model is a placeholder in this implementation

func (*DBLite) Save

func (db *DBLite) Save(instanceDB any) (db.DBInterface, error)

Save updates or inserts a record into the database

func (*DBLite) Unscoped

func (db *DBLite) Unscoped() (db.DBInterface, error)

Unscoped sets the unscoped flag for soft-deletes (not used in this implementation)

func (*DBLite) Updates

func (db *DBLite) Updates(instanceDB any) (db.DBInterface, error)

Updates modifies an existing record in the database

type DstructAPI

type DstructAPI struct {
	gorm.Model

	models.Dstruct_WOP

	// encoding of pointers
	// for API, it cannot be embedded
	DstructPointersEncoding DstructPointersEncoding
}

DstructAPI is the input in POST API

for POST, API, one needs the fields of the model as well as the fields from associations ("Has One" and "Has Many") that are generated to fullfill the ORM requirements for associations

swagger:model dstructAPI

type DstructDB

type DstructDB struct {
	gorm.Model

	// Declation for basic field dstructDB.Name
	Name_Data sql.NullString

	// encoding of pointers
	// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
	DstructPointersEncoding
}

DstructDB describes a dstruct in the database

It incorporates the GORM ID, basic fields from the model (because they can be serialized), the encoded version of pointers

swagger:model dstructDB

func (*DstructDB) CopyBasicFieldsFromDstruct

func (dstructDB *DstructDB) CopyBasicFieldsFromDstruct(dstruct *models.Dstruct)

CopyBasicFieldsFromDstruct

func (*DstructDB) CopyBasicFieldsFromDstructWOP

func (dstructDB *DstructDB) CopyBasicFieldsFromDstructWOP(dstruct *DstructWOP)

CopyBasicFieldsFromDstructWOP

func (*DstructDB) CopyBasicFieldsFromDstruct_WOP

func (dstructDB *DstructDB) CopyBasicFieldsFromDstruct_WOP(dstruct *models.Dstruct_WOP)

CopyBasicFieldsFromDstruct_WOP

func (*DstructDB) CopyBasicFieldsToDstruct

func (dstructDB *DstructDB) CopyBasicFieldsToDstruct(dstruct *models.Dstruct)

CopyBasicFieldsToDstruct

func (*DstructDB) CopyBasicFieldsToDstructWOP

func (dstructDB *DstructDB) CopyBasicFieldsToDstructWOP(dstruct *DstructWOP)

CopyBasicFieldsToDstructWOP

func (*DstructDB) CopyBasicFieldsToDstruct_WOP

func (dstructDB *DstructDB) CopyBasicFieldsToDstruct_WOP(dstruct *models.Dstruct_WOP)

CopyBasicFieldsToDstruct_WOP

func (*DstructDB) DecodePointers

func (dstructDB *DstructDB) DecodePointers(backRepo *BackRepoStruct, dstruct *models.Dstruct)

type DstructDBResponse

type DstructDBResponse struct {
	DstructDB
}

DstructDBResponse provides response swagger:response dstructDBResponse

type DstructDBs

type DstructDBs []DstructDB

DstructDBs arrays dstructDBs swagger:response dstructDBsResponse

type DstructPointersEncoding

type DstructPointersEncoding struct {

	// field Anarrayofb is a slice of pointers to another Struct (optional or 0..1)
	Anarrayofb IntSlice `gorm:"type:TEXT"`

	// field Gstruct is a pointer to another Struct (optional or 0..1)
	// This field is generated into another field to enable AS ONE association
	GstructID sql.NullInt64

	// field Gstructs is a slice of pointers to another Struct (optional or 0..1)
	Gstructs IntSlice `gorm:"type:TEXT"`
}

DstructPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct

type DstructWOP

type DstructWOP struct {
	ID int `xlsx:"0"`

	Name string `xlsx:"1"`
}

DstructWOP is a Dstruct without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint

type FstructAPI

type FstructAPI struct {
	gorm.Model

	models.Fstruct_WOP

	// encoding of pointers
	// for API, it cannot be embedded
	FstructPointersEncoding FstructPointersEncoding
}

FstructAPI is the input in POST API

for POST, API, one needs the fields of the model as well as the fields from associations ("Has One" and "Has Many") that are generated to fullfill the ORM requirements for associations

swagger:model fstructAPI

type FstructDB

type FstructDB struct {
	gorm.Model

	// Declation for basic field fstructDB.Name
	Name_Data sql.NullString

	// Declation for basic field fstructDB.Date
	Date_Data sql.NullTime

	// encoding of pointers
	// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
	FstructPointersEncoding
}

FstructDB describes a fstruct in the database

It incorporates the GORM ID, basic fields from the model (because they can be serialized), the encoded version of pointers

swagger:model fstructDB

func (*FstructDB) CopyBasicFieldsFromFstruct

func (fstructDB *FstructDB) CopyBasicFieldsFromFstruct(fstruct *models.Fstruct)

CopyBasicFieldsFromFstruct

func (*FstructDB) CopyBasicFieldsFromFstructWOP

func (fstructDB *FstructDB) CopyBasicFieldsFromFstructWOP(fstruct *FstructWOP)

CopyBasicFieldsFromFstructWOP

func (*FstructDB) CopyBasicFieldsFromFstruct_WOP

func (fstructDB *FstructDB) CopyBasicFieldsFromFstruct_WOP(fstruct *models.Fstruct_WOP)

CopyBasicFieldsFromFstruct_WOP

func (*FstructDB) CopyBasicFieldsToFstruct

func (fstructDB *FstructDB) CopyBasicFieldsToFstruct(fstruct *models.Fstruct)

CopyBasicFieldsToFstruct

func (*FstructDB) CopyBasicFieldsToFstructWOP

func (fstructDB *FstructDB) CopyBasicFieldsToFstructWOP(fstruct *FstructWOP)

CopyBasicFieldsToFstructWOP

func (*FstructDB) CopyBasicFieldsToFstruct_WOP

func (fstructDB *FstructDB) CopyBasicFieldsToFstruct_WOP(fstruct *models.Fstruct_WOP)

CopyBasicFieldsToFstruct_WOP

func (*FstructDB) DecodePointers

func (fstructDB *FstructDB) DecodePointers(backRepo *BackRepoStruct, fstruct *models.Fstruct)

type FstructDBResponse

type FstructDBResponse struct {
	FstructDB
}

FstructDBResponse provides response swagger:response fstructDBResponse

type FstructDBs

type FstructDBs []FstructDB

FstructDBs arrays fstructDBs swagger:response fstructDBsResponse

type FstructPointersEncoding

type FstructPointersEncoding struct {
}

FstructPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct

type FstructWOP

type FstructWOP struct {
	ID int `xlsx:"0"`

	Name string `xlsx:"1"`

	Date time.Time `xlsx:"2"`
}

FstructWOP is a Fstruct without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint

type GongstructDB

type GongstructDB interface {
}

type GstructAPI

type GstructAPI struct {
	gorm.Model

	models.Gstruct_WOP

	// encoding of pointers
	// for API, it cannot be embedded
	GstructPointersEncoding GstructPointersEncoding
}

GstructAPI is the input in POST API

for POST, API, one needs the fields of the model as well as the fields from associations ("Has One" and "Has Many") that are generated to fullfill the ORM requirements for associations

swagger:model gstructAPI

type GstructDB

type GstructDB struct {
	gorm.Model

	// Declation for basic field gstructDB.Name
	Name_Data sql.NullString

	// Declation for basic field gstructDB.Floatfield
	Floatfield_Data sql.NullFloat64

	// Declation for basic field gstructDB.Floatfield2
	Floatfield2_Data sql.NullFloat64

	// Declation for basic field gstructDB.Intfield
	Intfield_Data sql.NullInt64

	// encoding of pointers
	// for GORM serialization, it is necessary to embed to Pointer Encoding declaration
	GstructPointersEncoding
}

GstructDB describes a gstruct in the database

It incorporates the GORM ID, basic fields from the model (because they can be serialized), the encoded version of pointers

swagger:model gstructDB

func (*GstructDB) CopyBasicFieldsFromGstruct

func (gstructDB *GstructDB) CopyBasicFieldsFromGstruct(gstruct *models.Gstruct)

CopyBasicFieldsFromGstruct

func (*GstructDB) CopyBasicFieldsFromGstructWOP

func (gstructDB *GstructDB) CopyBasicFieldsFromGstructWOP(gstruct *GstructWOP)

CopyBasicFieldsFromGstructWOP

func (*GstructDB) CopyBasicFieldsFromGstruct_WOP

func (gstructDB *GstructDB) CopyBasicFieldsFromGstruct_WOP(gstruct *models.Gstruct_WOP)

CopyBasicFieldsFromGstruct_WOP

func (*GstructDB) CopyBasicFieldsToGstruct

func (gstructDB *GstructDB) CopyBasicFieldsToGstruct(gstruct *models.Gstruct)

CopyBasicFieldsToGstruct

func (*GstructDB) CopyBasicFieldsToGstructWOP

func (gstructDB *GstructDB) CopyBasicFieldsToGstructWOP(gstruct *GstructWOP)

CopyBasicFieldsToGstructWOP

func (*GstructDB) CopyBasicFieldsToGstruct_WOP

func (gstructDB *GstructDB) CopyBasicFieldsToGstruct_WOP(gstruct *models.Gstruct_WOP)

CopyBasicFieldsToGstruct_WOP

func (*GstructDB) DecodePointers

func (gstructDB *GstructDB) DecodePointers(backRepo *BackRepoStruct, gstruct *models.Gstruct)

type GstructDBResponse

type GstructDBResponse struct {
	GstructDB
}

GstructDBResponse provides response swagger:response gstructDBResponse

type GstructDBs

type GstructDBs []GstructDB

GstructDBs arrays gstructDBs swagger:response gstructDBsResponse

type GstructPointersEncoding

type GstructPointersEncoding struct {
}

GstructPointersEncoding encodes pointers to Struct and reverse pointers of slice of poitners to Struct

type GstructWOP

type GstructWOP struct {
	ID int `xlsx:"0"`

	Name string `xlsx:"1"`

	Floatfield float64 `xlsx:"2"`

	Floatfield2 float64 `xlsx:"3"`

	Intfield int `xlsx:"4"`
}

GstructWOP is a Gstruct without pointers (WOP is an acronym for "Without Pointers") it holds the same basic fields but pointers are encoded into uint

type IntSlice

type IntSlice []int

func (*IntSlice) Scan

func (s *IntSlice) Scan(value interface{}) error

Scan makes IntSlice implement the sql.Scanner interface.

func (IntSlice) Value

func (s IntSlice) Value() (driver.Value, error)

Value makes IntSlice implement the driver.Valuer interface.

Directories

Path Synopsis
generated code - do not edit
generated code - do not edit

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL