models

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountIDField       string = "id"
	AccountNameField     string = "name"
	AccountSurnameField  string = "surname"
	AccountDenemeIDField string = "deneme_id"
	AccountSerialField   string = "serial"
)
View Source
const (
	DenemeIDField         string = "id"
	DenemeTestIDField     string = "test_id"
	DenemeCountField      string = "count"
	DenemeIsActiveField   string = "is_active"
	DenemeDenemeTypeField string = "deneme_type"
)
View Source
const (
	GroupIDField      string = "id"
	GroupNameField    string = "name"
	GroupSurnameField string = "surname"
	GroupDataField    string = "data"
)
View Source
const (
	TestIDField        string = "id"
	TestNameField      string = "name"
	TestCreatedAtField string = "created_at"
	TestInfoField      string = "info"
)
View Source
const AccountTableName = "account"
View Source
const DenemeTableName = "deneme"
View Source
const GroupTableName = "group"
View Source
const TestTableName = "test"

Variables

This section is empty.

Functions

func SetDatabaseAccountListOperationHook

func SetDatabaseAccountListOperationHook(f func(operationInfo *client.OperationInfo, model *AccountList, operationFunc func() error) error)

func SetDatabaseAccountOperationHook

func SetDatabaseAccountOperationHook(f func(operationInfo *client.OperationInfo, model *Account, operationFunc func() error) error)

func SetDatabaseDenemeListOperationHook

func SetDatabaseDenemeListOperationHook(f func(operationInfo *client.OperationInfo, model *DenemeList, operationFunc func() error) error)

func SetDatabaseDenemeOperationHook

func SetDatabaseDenemeOperationHook(f func(operationInfo *client.OperationInfo, model *Deneme, operationFunc func() error) error)

func SetDatabaseGroupListOperationHook

func SetDatabaseGroupListOperationHook(f func(operationInfo *client.OperationInfo, model *GroupList, operationFunc func() error) error)

func SetDatabaseGroupOperationHook

func SetDatabaseGroupOperationHook(f func(operationInfo *client.OperationInfo, model *Group, operationFunc func() error) error)

func SetDatabaseTestListOperationHook

func SetDatabaseTestListOperationHook(f func(operationInfo *client.OperationInfo, model *TestList, operationFunc func() error) error)

func SetDatabaseTestOperationHook

func SetDatabaseTestOperationHook(f func(operationInfo *client.OperationInfo, model *Test, operationFunc func() error) error)

Types

type Account

type Account struct {
	AccountPredicate

	Deneme    *Deneme
	GroupList *GroupList
	// contains filtered or unexported fields
}

func NewAccount

func NewAccount(ctx context.Context, dc client.DatabaseClient) *Account

func NewRelationAccount

func NewRelationAccount(ctx context.Context, dc client.DatabaseClient) *Account

func (*Account) AddIntoGroup

func (t *Account) AddIntoGroup(relationship *Group) error

func (*Account) CheckPrimaryKey

func (t *Account) CheckPrimaryKey(v uuid.UUID) bool

func (*Account) Create

func (t *Account) Create() error

func (*Account) Delete

func (t *Account) Delete() error

func (*Account) Get

func (t *Account) Get() error

func (*Account) GetContext

func (t *Account) GetContext() context.Context

func (*Account) GetDBName

func (t *Account) GetDBName() string

func (*Account) GetDenemeID

func (t *Account) GetDenemeID() *uuid.UUID

func (*Account) GetID

func (t *Account) GetID() uuid.UUID

func (*Account) GetName

func (t *Account) GetName() string

func (*Account) GetPrimaryKey

func (t *Account) GetPrimaryKey() uuid.UUID

func (*Account) GetRelationList

func (t *Account) GetRelationList() *client.RelationList

func (*Account) GetSelector

func (t *Account) GetSelector() *AccountResult

func (*Account) GetSerial

func (t *Account) GetSerial() uint

func (*Account) GetSurname

func (t *Account) GetSurname() string

func (*Account) IsExist

func (t *Account) IsExist() bool

func (*Account) IsInGroup

func (t *Account) IsInGroup(relationship *Group) (bool, error)

func (*Account) NameIN

func (t *Account) NameIN(v ...string) bool

func (*Account) NameNotIN

func (t *Account) NameNotIN(v ...string) bool

func (*Account) ParseDenemeID

func (t *Account) ParseDenemeID(v string) error

func (*Account) ParseID

func (t *Account) ParseID(v string) error

func (*Account) Refresh

func (t *Account) Refresh() error

func (*Account) RemoveFromGroup

func (t *Account) RemoveFromGroup(relationship *Group) error

func (*Account) ScanResult

func (t *Account) ScanResult()

func (*Account) SerialIN

func (t *Account) SerialIN(v ...uint) bool

func (*Account) SerialNotIN

func (t *Account) SerialNotIN(v ...uint) bool

func (*Account) SetClient added in v0.5.0

func (t *Account) SetClient(client *client.Client)

func (*Account) SetDefaults added in v0.2.0

func (t *Account) SetDefaults()

func (*Account) SetDenemeID

func (t *Account) SetDenemeID(v *uuid.UUID)

func (*Account) SetDenemeIDField

func (t *Account) SetDenemeIDField()

func (*Account) SetDenemeIDValue

func (t *Account) SetDenemeIDValue(v uuid.UUID)

func (*Account) SetID

func (t *Account) SetID(v uuid.UUID)

func (*Account) SetIDField

func (t *Account) SetIDField()

func (*Account) SetIDNillable

func (t *Account) SetIDNillable(v *uuid.UUID)

func (*Account) SetName

func (t *Account) SetName(v string)

func (*Account) SetNameField

func (t *Account) SetNameField()

func (*Account) SetNameNillable

func (t *Account) SetNameNillable(v *string)

func (*Account) SetResult

func (t *Account) SetResult(result client.Result)

func (*Account) SetSerial

func (t *Account) SetSerial(v uint)

func (*Account) SetSerialField

func (t *Account) SetSerialField()

func (*Account) SetSerialNillable

func (t *Account) SetSerialNillable(v *uint)

func (*Account) SetSurname

func (t *Account) SetSurname(v string)

func (*Account) SetSurnameField

func (t *Account) SetSurnameField()

func (*Account) SetSurnameNillable

func (t *Account) SetSurnameNillable(v *string)

func (*Account) SurnameIN

func (t *Account) SurnameIN(v ...string) bool

func (*Account) SurnameNotIN

func (t *Account) SurnameNotIN(v ...string) bool

func (*Account) Update

func (t *Account) Update() error

func (*Account) WithDeneme

func (t *Account) WithDeneme(opts ...func(*Deneme)) *client.Relation

func (*Account) WithGroupList

func (t *Account) WithGroupList(opts ...func(*GroupList)) *client.Relation

type AccountList

type AccountList struct {
	Items []*Account

	AccountPredicate
	// contains filtered or unexported fields
}

func NewAccountList

func NewAccountList(ctx context.Context, dc client.DatabaseClient) *AccountList

func NewRelationAccountList

func NewRelationAccountList(ctx context.Context, dc client.DatabaseClient) *AccountList

func (*AccountList) Aggregate

func (t *AccountList) Aggregate(f func(aggregate *client.Aggregate)) (func() error, error)

func (*AccountList) Create added in v0.2.0

func (t *AccountList) Create(list ...*Account) error

func (*AccountList) Delete added in v0.2.0

func (t *AccountList) Delete(list ...*Account) error

func (*AccountList) GetDBName

func (t *AccountList) GetDBName() string

func (*AccountList) GetRelationList

func (t *AccountList) GetRelationList() *client.RelationList

func (*AccountList) IsExist

func (t *AccountList) IsExist() bool

func (*AccountList) List

func (t *AccountList) List() error

func (*AccountList) Order

func (t *AccountList) Order(field string) *AccountList

func (*AccountList) OrderDesc

func (t *AccountList) OrderDesc(field string) *AccountList

func (*AccountList) Paging

func (t *AccountList) Paging(skip, limit int) *AccountList

func (*AccountList) ScanResult

func (t *AccountList) ScanResult()

func (*AccountList) SetClient added in v0.5.0

func (t *AccountList) SetClient(client *client.Client)

func (*AccountList) SetResult

func (t *AccountList) SetResult(result client.Result)

func (*AccountList) Update added in v0.2.0

func (t *AccountList) Update(list ...*Account) error

func (*AccountList) WithDeneme

func (t *AccountList) WithDeneme(opts ...func(*Deneme)) *client.Relation

func (*AccountList) WithGroupList

func (t *AccountList) WithGroupList(opts ...func(*GroupList)) *client.Relation

type AccountPredicate

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

func (*AccountPredicate) GetWhereInfoString

func (t *AccountPredicate) GetWhereInfoString() string

func (*AccountPredicate) IsDenemeIDEqual

func (t *AccountPredicate) IsDenemeIDEqual(v uuid.UUID) *client.Where

func (*AccountPredicate) IsDenemeIDIN

func (t *AccountPredicate) IsDenemeIDIN(v ...uuid.UUID) *client.Where

func (*AccountPredicate) IsDenemeIDNil

func (t *AccountPredicate) IsDenemeIDNil() *client.Where

func (*AccountPredicate) IsDenemeIDNotEqual

func (t *AccountPredicate) IsDenemeIDNotEqual(v uuid.UUID) *client.Where

func (*AccountPredicate) IsDenemeIDNotIN

func (t *AccountPredicate) IsDenemeIDNotIN(v ...uuid.UUID) *client.Where

func (*AccountPredicate) IsDenemeIDNotNil

func (t *AccountPredicate) IsDenemeIDNotNil() *client.Where

func (*AccountPredicate) IsIDEqual

func (t *AccountPredicate) IsIDEqual(v uuid.UUID) *client.Where

func (*AccountPredicate) IsIDIN

func (t *AccountPredicate) IsIDIN(v ...uuid.UUID) *client.Where

func (*AccountPredicate) IsIDNotEqual

func (t *AccountPredicate) IsIDNotEqual(v uuid.UUID) *client.Where

func (*AccountPredicate) IsIDNotIN

func (t *AccountPredicate) IsIDNotIN(v ...uuid.UUID) *client.Where

func (*AccountPredicate) IsNameEqual

func (t *AccountPredicate) IsNameEqual(v string) *client.Where

func (*AccountPredicate) IsNameIN

func (t *AccountPredicate) IsNameIN(v ...string) *client.Where

func (*AccountPredicate) IsNameNotEqual

func (t *AccountPredicate) IsNameNotEqual(v string) *client.Where

func (*AccountPredicate) IsNameNotIN

func (t *AccountPredicate) IsNameNotIN(v ...string) *client.Where

func (*AccountPredicate) IsSerialEqual

func (t *AccountPredicate) IsSerialEqual(v uint) *client.Where

func (*AccountPredicate) IsSerialIN

func (t *AccountPredicate) IsSerialIN(v ...uint) *client.Where

func (*AccountPredicate) IsSerialNotEqual

func (t *AccountPredicate) IsSerialNotEqual(v uint) *client.Where

func (*AccountPredicate) IsSerialNotIN

func (t *AccountPredicate) IsSerialNotIN(v ...uint) *client.Where

func (*AccountPredicate) IsSurnameEqual

func (t *AccountPredicate) IsSurnameEqual(v string) *client.Where

func (*AccountPredicate) IsSurnameIN

func (t *AccountPredicate) IsSurnameIN(v ...string) *client.Where

func (*AccountPredicate) IsSurnameNotEqual

func (t *AccountPredicate) IsSurnameNotEqual(v string) *client.Where

func (*AccountPredicate) IsSurnameNotIN

func (t *AccountPredicate) IsSurnameNotIN(v ...string) *client.Where

func (*AccountPredicate) ORWhere

func (t *AccountPredicate) ORWhere(w ...*client.Where)

func (*AccountPredicate) SerialGreaterEqualThan

func (t *AccountPredicate) SerialGreaterEqualThan(v uint) *client.Where

func (*AccountPredicate) SerialGreaterThan

func (t *AccountPredicate) SerialGreaterThan(v uint) *client.Where

func (*AccountPredicate) SerialLowerEqualThan

func (t *AccountPredicate) SerialLowerEqualThan(v uint) *client.Where

func (*AccountPredicate) SerialLowerThan

func (t *AccountPredicate) SerialLowerThan(v uint) *client.Where

func (*AccountPredicate) Where

func (t *AccountPredicate) Where(w ...*client.Where)

type AccountResult

type AccountResult struct {
	Deneme *DenemeResult
	Group  *GroupResult
	// contains filtered or unexported fields
}

func (*AccountResult) GetDBName

func (t *AccountResult) GetDBName() string

func (*AccountResult) GetRelations

func (t *AccountResult) GetRelations() []client.Result

func (*AccountResult) GetSelectedFields

func (t *AccountResult) GetSelectedFields() []*client.SelectedField

func (*AccountResult) Init

func (t *AccountResult) Init()

func (*AccountResult) IsExist

func (t *AccountResult) IsExist() bool

func (*AccountResult) SelectAll

func (t *AccountResult) SelectAll()

func (*AccountResult) SelectDenemeID

func (t *AccountResult) SelectDenemeID()

func (*AccountResult) SelectID

func (t *AccountResult) SelectID()

func (*AccountResult) SelectName

func (t *AccountResult) SelectName()

func (*AccountResult) SelectSerial

func (t *AccountResult) SelectSerial()

func (*AccountResult) SelectSurname

func (t *AccountResult) SelectSurname()

type Database

type Database struct {
	Options *Options
	Logger  logger.Logger
	// contains filtered or unexported fields
}

func (*Database) Exec added in v0.8.0

func (d *Database) Exec(ctx context.Context, sql string, arguments ...any) (commandTag pgconn.CommandTag, err error)

func (*Database) Exit

func (d *Database) Exit()

func (*Database) NewTransaction

func (d *Database) NewTransaction(ctx context.Context, options ...pgx.TxOptions) (client.DatabaseTransactionClient, error)

func (*Database) Query added in v0.8.0

func (d *Database) Query(ctx context.Context, sql string, args ...any) (rows pgx.Rows, err error)

func (*Database) QueryRow added in v0.8.0

func (d *Database) QueryRow(ctx context.Context, sql string, args ...any) (row pgx.Row)

func (*Database) SetupPostgres

func (d *Database) SetupPostgres(dbUrl string) error

type Deneme

type Deneme struct {
	DenemePredicate

	Test        *Test
	AccountList *AccountList
	// contains filtered or unexported fields
}

func NewDeneme

func NewDeneme(ctx context.Context, dc client.DatabaseClient) *Deneme

func NewRelationDeneme

func NewRelationDeneme(ctx context.Context, dc client.DatabaseClient) *Deneme

func (*Deneme) CheckPrimaryKey

func (t *Deneme) CheckPrimaryKey(v uuid.UUID) bool

func (*Deneme) CountIN

func (t *Deneme) CountIN(v ...int) bool

func (*Deneme) CountNotIN

func (t *Deneme) CountNotIN(v ...int) bool

func (*Deneme) Create

func (t *Deneme) Create() error

func (*Deneme) Delete

func (t *Deneme) Delete() error

func (*Deneme) DenemeTypeIN

func (t *Deneme) DenemeTypeIN(v ...DenemeType) bool

func (*Deneme) DenemeTypeNotIN

func (t *Deneme) DenemeTypeNotIN(v ...DenemeType) bool

func (*Deneme) Get

func (t *Deneme) Get() error

func (*Deneme) GetContext

func (t *Deneme) GetContext() context.Context

func (*Deneme) GetCount

func (t *Deneme) GetCount() int

func (*Deneme) GetDBName

func (t *Deneme) GetDBName() string

func (*Deneme) GetDenemeType

func (t *Deneme) GetDenemeType() DenemeType

func (*Deneme) GetID

func (t *Deneme) GetID() uuid.UUID

func (*Deneme) GetIsActive

func (t *Deneme) GetIsActive() bool

func (*Deneme) GetPrimaryKey

func (t *Deneme) GetPrimaryKey() uuid.UUID

func (*Deneme) GetRelationList

func (t *Deneme) GetRelationList() *client.RelationList

func (*Deneme) GetSelector

func (t *Deneme) GetSelector() *DenemeResult

func (*Deneme) GetTestID

func (t *Deneme) GetTestID() *uuid.UUID

func (*Deneme) IsExist

func (t *Deneme) IsExist() bool

func (*Deneme) ParseID

func (t *Deneme) ParseID(v string) error

func (*Deneme) ParseTestID

func (t *Deneme) ParseTestID(v string) error

func (*Deneme) Refresh

func (t *Deneme) Refresh() error

func (*Deneme) ScanResult

func (t *Deneme) ScanResult()

func (*Deneme) SetClient added in v0.5.0

func (t *Deneme) SetClient(client *client.Client)

func (*Deneme) SetCount

func (t *Deneme) SetCount(v int)

func (*Deneme) SetCountField

func (t *Deneme) SetCountField()

func (*Deneme) SetCountNillable

func (t *Deneme) SetCountNillable(v *int)

func (*Deneme) SetDefaults added in v0.2.0

func (t *Deneme) SetDefaults()

func (*Deneme) SetDenemeType

func (t *Deneme) SetDenemeType(v DenemeType)

func (*Deneme) SetDenemeTypeField

func (t *Deneme) SetDenemeTypeField()

func (*Deneme) SetDenemeTypeNillable

func (t *Deneme) SetDenemeTypeNillable(v *DenemeType)

func (*Deneme) SetID

func (t *Deneme) SetID(v uuid.UUID)

func (*Deneme) SetIDField

func (t *Deneme) SetIDField()

func (*Deneme) SetIDNillable

func (t *Deneme) SetIDNillable(v *uuid.UUID)

func (*Deneme) SetIsActive

func (t *Deneme) SetIsActive(v bool)

func (*Deneme) SetIsActiveField

func (t *Deneme) SetIsActiveField()

func (*Deneme) SetIsActiveNillable

func (t *Deneme) SetIsActiveNillable(v *bool)

func (*Deneme) SetResult

func (t *Deneme) SetResult(result client.Result)

func (*Deneme) SetTestID

func (t *Deneme) SetTestID(v *uuid.UUID)

func (*Deneme) SetTestIDField

func (t *Deneme) SetTestIDField()

func (*Deneme) SetTestIDValue

func (t *Deneme) SetTestIDValue(v uuid.UUID)

func (*Deneme) Update

func (t *Deneme) Update() error

func (*Deneme) WithAccountList

func (t *Deneme) WithAccountList(opts ...func(*AccountList)) *client.Relation

func (*Deneme) WithTest

func (t *Deneme) WithTest(opts ...func(*Test)) *client.Relation

type DenemeList

type DenemeList struct {
	Items []*Deneme

	DenemePredicate
	// contains filtered or unexported fields
}

func NewDenemeList

func NewDenemeList(ctx context.Context, dc client.DatabaseClient) *DenemeList

func NewRelationDenemeList

func NewRelationDenemeList(ctx context.Context, dc client.DatabaseClient) *DenemeList

func (*DenemeList) Aggregate

func (t *DenemeList) Aggregate(f func(aggregate *client.Aggregate)) (func() error, error)

func (*DenemeList) Create added in v0.2.0

func (t *DenemeList) Create(list ...*Deneme) error

func (*DenemeList) Delete added in v0.2.0

func (t *DenemeList) Delete(list ...*Deneme) error

func (*DenemeList) GetDBName

func (t *DenemeList) GetDBName() string

func (*DenemeList) GetRelationList

func (t *DenemeList) GetRelationList() *client.RelationList

func (*DenemeList) IsExist

func (t *DenemeList) IsExist() bool

func (*DenemeList) List

func (t *DenemeList) List() error

func (*DenemeList) Order

func (t *DenemeList) Order(field string) *DenemeList

func (*DenemeList) OrderDesc

func (t *DenemeList) OrderDesc(field string) *DenemeList

func (*DenemeList) Paging

func (t *DenemeList) Paging(skip, limit int) *DenemeList

func (*DenemeList) ScanResult

func (t *DenemeList) ScanResult()

func (*DenemeList) SetClient added in v0.5.0

func (t *DenemeList) SetClient(client *client.Client)

func (*DenemeList) SetResult

func (t *DenemeList) SetResult(result client.Result)

func (*DenemeList) Update added in v0.2.0

func (t *DenemeList) Update(list ...*Deneme) error

func (*DenemeList) WithAccountList

func (t *DenemeList) WithAccountList(opts ...func(*AccountList)) *client.Relation

func (*DenemeList) WithTest

func (t *DenemeList) WithTest(opts ...func(*Test)) *client.Relation

type DenemePredicate

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

func (*DenemePredicate) CountGreaterEqualThan

func (t *DenemePredicate) CountGreaterEqualThan(v int) *client.Where

func (*DenemePredicate) CountGreaterThan

func (t *DenemePredicate) CountGreaterThan(v int) *client.Where

func (*DenemePredicate) CountLowerEqualThan

func (t *DenemePredicate) CountLowerEqualThan(v int) *client.Where

func (*DenemePredicate) CountLowerThan

func (t *DenemePredicate) CountLowerThan(v int) *client.Where

func (*DenemePredicate) GetWhereInfoString

func (t *DenemePredicate) GetWhereInfoString() string

func (*DenemePredicate) IsCountEqual

func (t *DenemePredicate) IsCountEqual(v int) *client.Where

func (*DenemePredicate) IsCountIN

func (t *DenemePredicate) IsCountIN(v ...int) *client.Where

func (*DenemePredicate) IsCountNotEqual

func (t *DenemePredicate) IsCountNotEqual(v int) *client.Where

func (*DenemePredicate) IsCountNotIN

func (t *DenemePredicate) IsCountNotIN(v ...int) *client.Where

func (*DenemePredicate) IsDenemeTypeEqual

func (t *DenemePredicate) IsDenemeTypeEqual(v DenemeType) *client.Where

func (*DenemePredicate) IsDenemeTypeIN

func (t *DenemePredicate) IsDenemeTypeIN(v ...DenemeType) *client.Where

func (*DenemePredicate) IsDenemeTypeNotEqual

func (t *DenemePredicate) IsDenemeTypeNotEqual(v DenemeType) *client.Where

func (*DenemePredicate) IsDenemeTypeNotIN

func (t *DenemePredicate) IsDenemeTypeNotIN(v ...DenemeType) *client.Where

func (*DenemePredicate) IsIDEqual

func (t *DenemePredicate) IsIDEqual(v uuid.UUID) *client.Where

func (*DenemePredicate) IsIDIN

func (t *DenemePredicate) IsIDIN(v ...uuid.UUID) *client.Where

func (*DenemePredicate) IsIDNotEqual

func (t *DenemePredicate) IsIDNotEqual(v uuid.UUID) *client.Where

func (*DenemePredicate) IsIDNotIN

func (t *DenemePredicate) IsIDNotIN(v ...uuid.UUID) *client.Where

func (*DenemePredicate) IsIsActiveEqual

func (t *DenemePredicate) IsIsActiveEqual(v bool) *client.Where

func (*DenemePredicate) IsIsActiveIN

func (t *DenemePredicate) IsIsActiveIN(v ...bool) *client.Where

func (*DenemePredicate) IsIsActiveNotEqual

func (t *DenemePredicate) IsIsActiveNotEqual(v bool) *client.Where

func (*DenemePredicate) IsIsActiveNotIN

func (t *DenemePredicate) IsIsActiveNotIN(v ...bool) *client.Where

func (*DenemePredicate) IsTestIDEqual

func (t *DenemePredicate) IsTestIDEqual(v uuid.UUID) *client.Where

func (*DenemePredicate) IsTestIDIN

func (t *DenemePredicate) IsTestIDIN(v ...uuid.UUID) *client.Where

func (*DenemePredicate) IsTestIDNil

func (t *DenemePredicate) IsTestIDNil() *client.Where

func (*DenemePredicate) IsTestIDNotEqual

func (t *DenemePredicate) IsTestIDNotEqual(v uuid.UUID) *client.Where

func (*DenemePredicate) IsTestIDNotIN

func (t *DenemePredicate) IsTestIDNotIN(v ...uuid.UUID) *client.Where

func (*DenemePredicate) IsTestIDNotNil

func (t *DenemePredicate) IsTestIDNotNil() *client.Where

func (*DenemePredicate) ORWhere

func (t *DenemePredicate) ORWhere(w ...*client.Where)

func (*DenemePredicate) Where

func (t *DenemePredicate) Where(w ...*client.Where)

type DenemeResult

type DenemeResult struct {
	Test    *TestResult
	Account *AccountResult
	// contains filtered or unexported fields
}

func (*DenemeResult) GetDBName

func (t *DenemeResult) GetDBName() string

func (*DenemeResult) GetRelations

func (t *DenemeResult) GetRelations() []client.Result

func (*DenemeResult) GetSelectedFields

func (t *DenemeResult) GetSelectedFields() []*client.SelectedField

func (*DenemeResult) Init

func (t *DenemeResult) Init()

func (*DenemeResult) IsExist

func (t *DenemeResult) IsExist() bool

func (*DenemeResult) SelectAll

func (t *DenemeResult) SelectAll()

func (*DenemeResult) SelectCount

func (t *DenemeResult) SelectCount()

func (*DenemeResult) SelectDenemeType

func (t *DenemeResult) SelectDenemeType()

func (*DenemeResult) SelectID

func (t *DenemeResult) SelectID()

func (*DenemeResult) SelectIsActive

func (t *DenemeResult) SelectIsActive()

func (*DenemeResult) SelectTestID

func (t *DenemeResult) SelectTestID()

type DenemeType

type DenemeType string
const (
	DenemeTypeTestType   DenemeType = "Test"
	DenemeTypeDenemeType DenemeType = "Deneme"
)

type Group

type Group struct {
	GroupPredicate

	AccountList *AccountList
	// contains filtered or unexported fields
}

func NewGroup

func NewGroup(ctx context.Context, dc client.DatabaseClient) *Group

func NewRelationGroup

func NewRelationGroup(ctx context.Context, dc client.DatabaseClient) *Group

func (*Group) AddIntoAccount

func (t *Group) AddIntoAccount(relationship *Account) error

func (*Group) CheckPrimaryKey

func (t *Group) CheckPrimaryKey(v uuid.UUID) bool

func (*Group) Create

func (t *Group) Create() error

func (*Group) Delete

func (t *Group) Delete() error

func (*Group) Get

func (t *Group) Get() error

func (*Group) GetContext

func (t *Group) GetContext() context.Context

func (*Group) GetDBName

func (t *Group) GetDBName() string

func (*Group) GetData added in v0.4.0

func (t *Group) GetData() map[string]any

func (*Group) GetID

func (t *Group) GetID() uuid.UUID

func (*Group) GetName

func (t *Group) GetName() string

func (*Group) GetPrimaryKey

func (t *Group) GetPrimaryKey() uuid.UUID

func (*Group) GetRelationList

func (t *Group) GetRelationList() *client.RelationList

func (*Group) GetSelector

func (t *Group) GetSelector() *GroupResult

func (*Group) GetSurname

func (t *Group) GetSurname() string

func (*Group) IsExist

func (t *Group) IsExist() bool

func (*Group) IsInAccount

func (t *Group) IsInAccount(relationship *Account) (bool, error)

func (*Group) NameIN

func (t *Group) NameIN(v ...string) bool

func (*Group) NameNotIN

func (t *Group) NameNotIN(v ...string) bool

func (*Group) ParseID

func (t *Group) ParseID(v string) error

func (*Group) Refresh

func (t *Group) Refresh() error

func (*Group) RemoveFromAccount

func (t *Group) RemoveFromAccount(relationship *Account) error

func (*Group) ScanResult

func (t *Group) ScanResult()

func (*Group) SetClient added in v0.5.0

func (t *Group) SetClient(client *client.Client)

func (*Group) SetData added in v0.4.0

func (t *Group) SetData(v map[string]any)

func (*Group) SetDataField added in v0.4.0

func (t *Group) SetDataField()

func (*Group) SetDataNillable added in v0.4.0

func (t *Group) SetDataNillable(v *map[string]any)

func (*Group) SetDefaults added in v0.2.0

func (t *Group) SetDefaults()

func (*Group) SetID

func (t *Group) SetID(v uuid.UUID)

func (*Group) SetIDField

func (t *Group) SetIDField()

func (*Group) SetIDNillable

func (t *Group) SetIDNillable(v *uuid.UUID)

func (*Group) SetName

func (t *Group) SetName(v string)

func (*Group) SetNameField

func (t *Group) SetNameField()

func (*Group) SetNameNillable

func (t *Group) SetNameNillable(v *string)

func (*Group) SetResult

func (t *Group) SetResult(result client.Result)

func (*Group) SetSurname

func (t *Group) SetSurname(v string)

func (*Group) SetSurnameField

func (t *Group) SetSurnameField()

func (*Group) SetSurnameNillable

func (t *Group) SetSurnameNillable(v *string)

func (*Group) SurnameIN

func (t *Group) SurnameIN(v ...string) bool

func (*Group) SurnameNotIN

func (t *Group) SurnameNotIN(v ...string) bool

func (*Group) Update

func (t *Group) Update() error

func (*Group) WithAccountList

func (t *Group) WithAccountList(opts ...func(*AccountList)) *client.Relation

type GroupList

type GroupList struct {
	Items []*Group

	GroupPredicate
	// contains filtered or unexported fields
}

func NewGroupList

func NewGroupList(ctx context.Context, dc client.DatabaseClient) *GroupList

func NewRelationGroupList

func NewRelationGroupList(ctx context.Context, dc client.DatabaseClient) *GroupList

func (*GroupList) Aggregate

func (t *GroupList) Aggregate(f func(aggregate *client.Aggregate)) (func() error, error)

func (*GroupList) Create added in v0.2.0

func (t *GroupList) Create(list ...*Group) error

func (*GroupList) Delete added in v0.2.0

func (t *GroupList) Delete(list ...*Group) error

func (*GroupList) GetDBName

func (t *GroupList) GetDBName() string

func (*GroupList) GetRelationList

func (t *GroupList) GetRelationList() *client.RelationList

func (*GroupList) IsExist

func (t *GroupList) IsExist() bool

func (*GroupList) List

func (t *GroupList) List() error

func (*GroupList) Order

func (t *GroupList) Order(field string) *GroupList

func (*GroupList) OrderDesc

func (t *GroupList) OrderDesc(field string) *GroupList

func (*GroupList) Paging

func (t *GroupList) Paging(skip, limit int) *GroupList

func (*GroupList) ScanResult

func (t *GroupList) ScanResult()

func (*GroupList) SetClient added in v0.5.0

func (t *GroupList) SetClient(client *client.Client)

func (*GroupList) SetResult

func (t *GroupList) SetResult(result client.Result)

func (*GroupList) Update added in v0.2.0

func (t *GroupList) Update(list ...*Group) error

func (*GroupList) WithAccountList

func (t *GroupList) WithAccountList(opts ...func(*AccountList)) *client.Relation

type GroupPredicate

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

func (*GroupPredicate) GetWhereInfoString

func (t *GroupPredicate) GetWhereInfoString() string

func (*GroupPredicate) IsDataEqual added in v0.4.0

func (t *GroupPredicate) IsDataEqual(v map[string]any) *client.Where

func (*GroupPredicate) IsDataIN added in v0.4.0

func (t *GroupPredicate) IsDataIN(v ...map[string]any) *client.Where

func (*GroupPredicate) IsDataNotEqual added in v0.4.0

func (t *GroupPredicate) IsDataNotEqual(v map[string]any) *client.Where

func (*GroupPredicate) IsDataNotIN added in v0.4.0

func (t *GroupPredicate) IsDataNotIN(v ...map[string]any) *client.Where

func (*GroupPredicate) IsIDEqual

func (t *GroupPredicate) IsIDEqual(v uuid.UUID) *client.Where

func (*GroupPredicate) IsIDIN

func (t *GroupPredicate) IsIDIN(v ...uuid.UUID) *client.Where

func (*GroupPredicate) IsIDNotEqual

func (t *GroupPredicate) IsIDNotEqual(v uuid.UUID) *client.Where

func (*GroupPredicate) IsIDNotIN

func (t *GroupPredicate) IsIDNotIN(v ...uuid.UUID) *client.Where

func (*GroupPredicate) IsNameEqual

func (t *GroupPredicate) IsNameEqual(v string) *client.Where

func (*GroupPredicate) IsNameIN

func (t *GroupPredicate) IsNameIN(v ...string) *client.Where

func (*GroupPredicate) IsNameNotEqual

func (t *GroupPredicate) IsNameNotEqual(v string) *client.Where

func (*GroupPredicate) IsNameNotIN

func (t *GroupPredicate) IsNameNotIN(v ...string) *client.Where

func (*GroupPredicate) IsSurnameEqual

func (t *GroupPredicate) IsSurnameEqual(v string) *client.Where

func (*GroupPredicate) IsSurnameIN

func (t *GroupPredicate) IsSurnameIN(v ...string) *client.Where

func (*GroupPredicate) IsSurnameNotEqual

func (t *GroupPredicate) IsSurnameNotEqual(v string) *client.Where

func (*GroupPredicate) IsSurnameNotIN

func (t *GroupPredicate) IsSurnameNotIN(v ...string) *client.Where

func (*GroupPredicate) ORWhere

func (t *GroupPredicate) ORWhere(w ...*client.Where)

func (*GroupPredicate) Where

func (t *GroupPredicate) Where(w ...*client.Where)

type GroupResult

type GroupResult struct {
	Account *AccountResult
	// contains filtered or unexported fields
}

func (*GroupResult) GetDBName

func (t *GroupResult) GetDBName() string

func (*GroupResult) GetRelations

func (t *GroupResult) GetRelations() []client.Result

func (*GroupResult) GetSelectedFields

func (t *GroupResult) GetSelectedFields() []*client.SelectedField

func (*GroupResult) Init

func (t *GroupResult) Init()

func (*GroupResult) IsExist

func (t *GroupResult) IsExist() bool

func (*GroupResult) SelectAll

func (t *GroupResult) SelectAll()

func (*GroupResult) SelectData added in v0.4.0

func (t *GroupResult) SelectData()

func (*GroupResult) SelectID

func (t *GroupResult) SelectID()

func (*GroupResult) SelectName

func (t *GroupResult) SelectName()

func (*GroupResult) SelectSurname

func (t *GroupResult) SelectSurname()

type IDatabase

type IDatabase interface {
	NewTransaction(ctx context.Context, options ...pgx.TxOptions) (client.DatabaseTransactionClient, error)
	Exit()
	client.DatabaseClient
}

func NewDB

func NewDB(options *Options) (IDatabase, error)

type Options added in v0.8.0

type Options struct {
	Url   string
	Debug bool
}

type Test

type Test struct {
	TestPredicate

	DenemeList *DenemeList
	// contains filtered or unexported fields
}

func NewRelationTest

func NewRelationTest(ctx context.Context, dc client.DatabaseClient) *Test

func NewTest

func NewTest(ctx context.Context, dc client.DatabaseClient) *Test

func (*Test) CheckPrimaryKey

func (t *Test) CheckPrimaryKey(v uuid.UUID) bool

func (*Test) Create

func (t *Test) Create() error

func (*Test) Delete

func (t *Test) Delete() error

func (*Test) FormatCreatedAt

func (t *Test) FormatCreatedAt(v string) string

func (*Test) Get

func (t *Test) Get() error

func (*Test) GetContext

func (t *Test) GetContext() context.Context

func (*Test) GetCreatedAt

func (t *Test) GetCreatedAt() time.Time

func (*Test) GetDBName

func (t *Test) GetDBName() string

func (*Test) GetID

func (t *Test) GetID() uuid.UUID

func (*Test) GetInfo added in v0.6.0

func (t *Test) GetInfo() *custom_data_type.Custom

func (*Test) GetName

func (t *Test) GetName() string

func (*Test) GetPrimaryKey

func (t *Test) GetPrimaryKey() uuid.UUID

func (*Test) GetRelationList

func (t *Test) GetRelationList() *client.RelationList

func (*Test) GetSelector

func (t *Test) GetSelector() *TestResult

func (*Test) IsExist

func (t *Test) IsExist() bool

func (*Test) NameIN

func (t *Test) NameIN(v ...string) bool

func (*Test) NameNotIN

func (t *Test) NameNotIN(v ...string) bool

func (*Test) ParseCreatedAt

func (t *Test) ParseCreatedAt(layout, value string) error

func (*Test) ParseID

func (t *Test) ParseID(v string) error

func (*Test) Refresh

func (t *Test) Refresh() error

func (*Test) ScanResult

func (t *Test) ScanResult()

func (*Test) SetClient added in v0.5.0

func (t *Test) SetClient(client *client.Client)

func (*Test) SetCreatedAt

func (t *Test) SetCreatedAt(v time.Time)

func (*Test) SetCreatedAtField

func (t *Test) SetCreatedAtField()

func (*Test) SetCreatedAtNillable

func (t *Test) SetCreatedAtNillable(v *time.Time)

func (*Test) SetDefaults added in v0.2.0

func (t *Test) SetDefaults()

func (*Test) SetID

func (t *Test) SetID(v uuid.UUID)

func (*Test) SetIDField

func (t *Test) SetIDField()

func (*Test) SetIDNillable

func (t *Test) SetIDNillable(v *uuid.UUID)

func (*Test) SetInfo added in v0.6.0

func (t *Test) SetInfo(v *custom_data_type.Custom)

func (*Test) SetInfoField added in v0.6.0

func (t *Test) SetInfoField()

func (*Test) SetInfoValue added in v0.6.0

func (t *Test) SetInfoValue(v custom_data_type.Custom)

func (*Test) SetName

func (t *Test) SetName(v string)

func (*Test) SetNameField

func (t *Test) SetNameField()

func (*Test) SetNameNillable

func (t *Test) SetNameNillable(v *string)

func (*Test) SetResult

func (t *Test) SetResult(result client.Result)

func (*Test) Update

func (t *Test) Update() error

func (*Test) WithDenemeList

func (t *Test) WithDenemeList(opts ...func(*DenemeList)) *client.Relation

type TestList

type TestList struct {
	Items []*Test

	TestPredicate
	// contains filtered or unexported fields
}

func NewRelationTestList

func NewRelationTestList(ctx context.Context, dc client.DatabaseClient) *TestList

func NewTestList

func NewTestList(ctx context.Context, dc client.DatabaseClient) *TestList

func (*TestList) Aggregate

func (t *TestList) Aggregate(f func(aggregate *client.Aggregate)) (func() error, error)

func (*TestList) Create added in v0.2.0

func (t *TestList) Create(list ...*Test) error

func (*TestList) Delete added in v0.2.0

func (t *TestList) Delete(list ...*Test) error

func (*TestList) GetDBName

func (t *TestList) GetDBName() string

func (*TestList) GetRelationList

func (t *TestList) GetRelationList() *client.RelationList

func (*TestList) IsExist

func (t *TestList) IsExist() bool

func (*TestList) List

func (t *TestList) List() error

func (*TestList) Order

func (t *TestList) Order(field string) *TestList

func (*TestList) OrderDesc

func (t *TestList) OrderDesc(field string) *TestList

func (*TestList) Paging

func (t *TestList) Paging(skip, limit int) *TestList

func (*TestList) ScanResult

func (t *TestList) ScanResult()

func (*TestList) SetClient added in v0.5.0

func (t *TestList) SetClient(client *client.Client)

func (*TestList) SetResult

func (t *TestList) SetResult(result client.Result)

func (*TestList) Update added in v0.2.0

func (t *TestList) Update(list ...*Test) error

func (*TestList) WithDenemeList

func (t *TestList) WithDenemeList(opts ...func(*DenemeList)) *client.Relation

type TestPredicate

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

func (*TestPredicate) CreatedAtGreaterEqualThan

func (t *TestPredicate) CreatedAtGreaterEqualThan(v time.Time) *client.Where

func (*TestPredicate) CreatedAtGreaterThan

func (t *TestPredicate) CreatedAtGreaterThan(v time.Time) *client.Where

func (*TestPredicate) CreatedAtLowerEqualThan

func (t *TestPredicate) CreatedAtLowerEqualThan(v time.Time) *client.Where

func (*TestPredicate) CreatedAtLowerThan

func (t *TestPredicate) CreatedAtLowerThan(v time.Time) *client.Where

func (*TestPredicate) GetWhereInfoString

func (t *TestPredicate) GetWhereInfoString() string

func (*TestPredicate) IsCreatedAtEqual

func (t *TestPredicate) IsCreatedAtEqual(v time.Time) *client.Where

func (*TestPredicate) IsCreatedAtIN

func (t *TestPredicate) IsCreatedAtIN(v ...time.Time) *client.Where

func (*TestPredicate) IsCreatedAtNotEqual

func (t *TestPredicate) IsCreatedAtNotEqual(v time.Time) *client.Where

func (*TestPredicate) IsCreatedAtNotIN

func (t *TestPredicate) IsCreatedAtNotIN(v ...time.Time) *client.Where

func (*TestPredicate) IsIDEqual

func (t *TestPredicate) IsIDEqual(v uuid.UUID) *client.Where

func (*TestPredicate) IsIDIN

func (t *TestPredicate) IsIDIN(v ...uuid.UUID) *client.Where

func (*TestPredicate) IsIDNotEqual

func (t *TestPredicate) IsIDNotEqual(v uuid.UUID) *client.Where

func (*TestPredicate) IsIDNotIN

func (t *TestPredicate) IsIDNotIN(v ...uuid.UUID) *client.Where

func (*TestPredicate) IsInfoEqual added in v0.6.0

func (t *TestPredicate) IsInfoEqual(v custom_data_type.Custom) *client.Where

func (*TestPredicate) IsInfoIN added in v0.6.0

func (t *TestPredicate) IsInfoIN(v ...custom_data_type.Custom) *client.Where

func (*TestPredicate) IsInfoNil added in v0.6.0

func (t *TestPredicate) IsInfoNil() *client.Where

func (*TestPredicate) IsInfoNotEqual added in v0.6.0

func (t *TestPredicate) IsInfoNotEqual(v custom_data_type.Custom) *client.Where

func (*TestPredicate) IsInfoNotIN added in v0.6.0

func (t *TestPredicate) IsInfoNotIN(v ...custom_data_type.Custom) *client.Where

func (*TestPredicate) IsInfoNotNil added in v0.6.0

func (t *TestPredicate) IsInfoNotNil() *client.Where

func (*TestPredicate) IsNameEqual

func (t *TestPredicate) IsNameEqual(v string) *client.Where

func (*TestPredicate) IsNameIN

func (t *TestPredicate) IsNameIN(v ...string) *client.Where

func (*TestPredicate) IsNameNotEqual

func (t *TestPredicate) IsNameNotEqual(v string) *client.Where

func (*TestPredicate) IsNameNotIN

func (t *TestPredicate) IsNameNotIN(v ...string) *client.Where

func (*TestPredicate) ORWhere

func (t *TestPredicate) ORWhere(w ...*client.Where)

func (*TestPredicate) Where

func (t *TestPredicate) Where(w ...*client.Where)

type TestResult

type TestResult struct {
	Deneme *DenemeResult
	// contains filtered or unexported fields
}

func (*TestResult) GetDBName

func (t *TestResult) GetDBName() string

func (*TestResult) GetRelations

func (t *TestResult) GetRelations() []client.Result

func (*TestResult) GetSelectedFields

func (t *TestResult) GetSelectedFields() []*client.SelectedField

func (*TestResult) Init

func (t *TestResult) Init()

func (*TestResult) IsExist

func (t *TestResult) IsExist() bool

func (*TestResult) SelectAll

func (t *TestResult) SelectAll()

func (*TestResult) SelectCreatedAt

func (t *TestResult) SelectCreatedAt()

func (*TestResult) SelectID

func (t *TestResult) SelectID()

func (*TestResult) SelectInfo added in v0.6.0

func (t *TestResult) SelectInfo()

func (*TestResult) SelectName

func (t *TestResult) SelectName()

type Transaction

type Transaction struct {
	Logger logger.Logger
	pgx.Tx
}

func (Transaction) GetLogger added in v0.8.0

func (t Transaction) GetLogger() logger.Logger

func (Transaction) SavePoint added in v0.7.0

Jump to

Keyboard shortcuts

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