model

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AggregateResult

type AggregateResult struct {
	Count int `json:"count" db:"count"`
}

type Animal added in v0.3.0

type Animal interface {
	IsAnimal()
	GetID() int
	GetName() string
	GetType() string
}

type AnimalAvg added in v0.3.0

type AnimalAvg struct {
	// Compute the avg for id
	ID float64 `json:"id" db:"id"`
}

avg Aggregate

type AnimalFilterInput added in v0.3.0

type AnimalFilterInput struct {
	ID   *IntComparator    `json:"id,omitempty" db:"id"`
	Name *StringComparator `json:"name,omitempty" db:"name"`
	Type *StringComparator `json:"type,omitempty" db:"type"`
	Cat  *CatFilterInput   `json:"cat,omitempty" db:"cat"`
	Dog  *DogFilterInput   `json:"dog,omitempty" db:"dog"`
	// Logical AND of FilterInput
	And []*AnimalFilterInput `json:"AND,omitempty" db:"and"`
	// Logical OR of FilterInput
	Or []*AnimalFilterInput `json:"OR,omitempty" db:"or"`
	// Logical NOT of FilterInput
	Not *AnimalFilterInput `json:"NOT,omitempty" db:"not"`
}

type AnimalGroupBy added in v0.3.0

type AnimalGroupBy string

Group by Animal

const (
	// Group by id
	AnimalGroupByID AnimalGroupBy = "ID"
	// Group by name
	AnimalGroupByName AnimalGroupBy = "NAME"
	// Group by type
	AnimalGroupByType AnimalGroupBy = "TYPE"
)

func (AnimalGroupBy) IsValid added in v0.3.0

func (e AnimalGroupBy) IsValid() bool

func (AnimalGroupBy) MarshalGQL added in v0.3.0

func (e AnimalGroupBy) MarshalGQL(w io.Writer)

func (AnimalGroupBy) String added in v0.3.0

func (e AnimalGroupBy) String() string

func (*AnimalGroupBy) UnmarshalGQL added in v0.3.0

func (e *AnimalGroupBy) UnmarshalGQL(v interface{}) error

type AnimalMax added in v0.3.0

type AnimalMax struct {
	// Compute the max for id
	ID int `json:"id" db:"id"`
	// Compute the max for name
	Name string `json:"name" db:"name"`
	// Compute the max for type
	Type string `json:"type" db:"type"`
}

max Aggregate

type AnimalMin added in v0.3.0

type AnimalMin struct {
	// Compute the min for id
	ID int `json:"id" db:"id"`
	// Compute the min for name
	Name string `json:"name" db:"name"`
	// Compute the min for type
	Type string `json:"type" db:"type"`
}

min Aggregate

type AnimalOrdering added in v0.3.0

type AnimalOrdering struct {
	// Order Animal by id
	ID *OrderingTypes `json:"id,omitempty" db:"id"`
	// Order Animal by name
	Name *OrderingTypes `json:"name,omitempty" db:"name"`
	// Order Animal by type
	Type *OrderingTypes `json:"type,omitempty" db:"type"`
}

Ordering for Animal

type AnimalSum added in v0.3.0

type AnimalSum struct {
	// Compute the sum for id
	ID float64 `json:"id" db:"id"`
}

sum Aggregate

type AnimalsAggregate added in v0.3.0

type AnimalsAggregate struct {
	// Group
	Group map[string]interface{} `json:"group,omitempty" db:"group"`
	// Count results
	Count int `json:"count" db:"count"`
	// Max Aggregate
	Max *AnimalMax `json:"max" db:"max"`
	// Min Aggregate
	Min *AnimalMin `json:"min" db:"min"`
	// Avg Aggregate
	Avg *AnimalAvg `json:"avg" db:"avg"`
	// Sum Aggregate
	Sum *AnimalSum `json:"sum" db:"sum"`
}

Aggregate Animal

type BooleanComparator

type BooleanComparator struct {
	Eq     *bool `json:"eq,omitempty" db:"eq"`
	Neq    *bool `json:"neq,omitempty" db:"neq"`
	IsNull *bool `json:"isNull,omitempty" db:"is_null"`
}

type BooleanListComparator

type BooleanListComparator struct {
	Eq        []*bool `json:"eq,omitempty" db:"eq"`
	Neq       []*bool `json:"neq,omitempty" db:"neq"`
	Contains  []*bool `json:"contains,omitempty" db:"contains"`
	Contained []*bool `json:"contained,omitempty" db:"contained"`
	Overlap   []*bool `json:"overlap,omitempty" db:"overlap"`
	IsNull    *bool   `json:"isNull,omitempty" db:"is_null"`
}

type Cat added in v0.3.0

type Cat struct {
	ID    int    `json:"id" db:"id"`
	Name  string `json:"name" db:"name"`
	Type  string `json:"type" db:"type"`
	Color string `json:"color" db:"color"`
}

func (Cat) GetID added in v0.3.0

func (this Cat) GetID() int

func (Cat) GetName added in v0.3.0

func (this Cat) GetName() string

func (Cat) GetType added in v0.3.0

func (this Cat) GetType() string

func (Cat) IsAnimal added in v0.3.0

func (Cat) IsAnimal()

type CatFilterInput added in v0.3.0

type CatFilterInput struct {
	ID    *IntComparator    `json:"id,omitempty" db:"id"`
	Name  *StringComparator `json:"name,omitempty" db:"name"`
	Type  *StringComparator `json:"type,omitempty" db:"type"`
	Color *StringComparator `json:"color,omitempty" db:"color"`
	// Logical AND of FilterInput
	And []*CatFilterInput `json:"AND,omitempty" db:"and"`
	// Logical OR of FilterInput
	Or []*CatFilterInput `json:"OR,omitempty" db:"or"`
	// Logical NOT of FilterInput
	Not *CatFilterInput `json:"NOT,omitempty" db:"not"`
}

type CategoriesAggregate

type CategoriesAggregate struct {
	// Group
	Group map[string]interface{} `json:"group,omitempty" db:"group"`
	// Count results
	Count int `json:"count" db:"count"`
	// Max Aggregate
	Max *CategoryMax `json:"max" db:"max"`
	// Min Aggregate
	Min *CategoryMin `json:"min" db:"min"`
	// Avg Aggregate
	Avg *CategoryAvg `json:"avg" db:"avg"`
	// Sum Aggregate
	Sum *CategorySum `json:"sum" db:"sum"`
}

Aggregate Category

type Category

type Category struct {
	ID   int     `json:"id" db:"id"`
	Name *string `json:"name,omitempty" db:"name"`
}

type CategoryAvg added in v0.3.0

type CategoryAvg struct {
	// Compute the avg for id
	ID float64 `json:"id" db:"id"`
}

avg Aggregate

type CategoryFilterInput

type CategoryFilterInput struct {
	ID   *IntComparator    `json:"id,omitempty" db:"id"`
	Name *StringComparator `json:"name,omitempty" db:"name"`
	// Logical AND of FilterInput
	And []*CategoryFilterInput `json:"AND,omitempty" db:"and"`
	// Logical OR of FilterInput
	Or []*CategoryFilterInput `json:"OR,omitempty" db:"or"`
	// Logical NOT of FilterInput
	Not *CategoryFilterInput `json:"NOT,omitempty" db:"not"`
}

type CategoryGroupBy added in v0.3.0

type CategoryGroupBy string

Group by Category

const (
	// Group by id
	CategoryGroupByID CategoryGroupBy = "ID"
	// Group by name
	CategoryGroupByName CategoryGroupBy = "NAME"
)

func (CategoryGroupBy) IsValid added in v0.3.0

func (e CategoryGroupBy) IsValid() bool

func (CategoryGroupBy) MarshalGQL added in v0.3.0

func (e CategoryGroupBy) MarshalGQL(w io.Writer)

func (CategoryGroupBy) String added in v0.3.0

func (e CategoryGroupBy) String() string

func (*CategoryGroupBy) UnmarshalGQL added in v0.3.0

func (e *CategoryGroupBy) UnmarshalGQL(v interface{}) error

type CategoryMax added in v0.3.0

type CategoryMax struct {
	// Compute the max for id
	ID int `json:"id" db:"id"`
	// Compute the max for name
	Name string `json:"name" db:"name"`
}

max Aggregate

type CategoryMin

type CategoryMin struct {
	// Compute the min for id
	ID int `json:"id" db:"id"`
	// Compute the min for name
	Name string `json:"name" db:"name"`
}

min Aggregate

type CategoryOrdering

type CategoryOrdering struct {
	// Order Category by id
	ID *OrderingTypes `json:"id,omitempty" db:"id"`
	// Order Category by name
	Name *OrderingTypes `json:"name,omitempty" db:"name"`
}

Ordering for Category

type CategorySum added in v0.3.0

type CategorySum struct {
	// Compute the sum for id
	ID float64 `json:"id" db:"id"`
}

sum Aggregate

type CreatePostInput

type CreatePostInput struct {
	ID     int     `json:"id" db:"id"`
	Name   *string `json:"name,omitempty" db:"name"`
	UserID *int    `json:"user_id,omitempty" db:"user_id"`
}

AutoGenerated input for Post

type Dog added in v0.3.0

type Dog struct {
	ID    int    `json:"id" db:"id"`
	Name  string `json:"name" db:"name"`
	Type  string `json:"type" db:"type"`
	Breed string `json:"breed" db:"breed"`
}

func (Dog) GetID added in v0.3.0

func (this Dog) GetID() int

func (Dog) GetName added in v0.3.0

func (this Dog) GetName() string

func (Dog) GetType added in v0.3.0

func (this Dog) GetType() string

func (Dog) IsAnimal added in v0.3.0

func (Dog) IsAnimal()

type DogFilterInput added in v0.3.0

type DogFilterInput struct {
	ID    *IntComparator    `json:"id,omitempty" db:"id"`
	Name  *StringComparator `json:"name,omitempty" db:"name"`
	Type  *StringComparator `json:"type,omitempty" db:"type"`
	Breed *StringComparator `json:"breed,omitempty" db:"breed"`
	// Logical AND of FilterInput
	And []*DogFilterInput `json:"AND,omitempty" db:"and"`
	// Logical OR of FilterInput
	Or []*DogFilterInput `json:"OR,omitempty" db:"or"`
	// Logical NOT of FilterInput
	Not *DogFilterInput `json:"NOT,omitempty" db:"not"`
}

type FloatComparator added in v0.3.0

type FloatComparator struct {
	Eq     *float64 `json:"eq,omitempty" db:"eq"`
	Neq    *float64 `json:"neq,omitempty" db:"neq"`
	Gt     *float64 `json:"gt,omitempty" db:"gt"`
	Gte    *float64 `json:"gte,omitempty" db:"gte"`
	Lt     *float64 `json:"lt,omitempty" db:"lt"`
	Lte    *float64 `json:"lte,omitempty" db:"lte"`
	IsNull *bool    `json:"isNull,omitempty" db:"is_null"`
}

type FloatListComparator added in v0.3.0

type FloatListComparator struct {
	Eq        []*float64 `json:"eq,omitempty" db:"eq"`
	Neq       []*float64 `json:"neq,omitempty" db:"neq"`
	Contains  []*float64 `json:"contains,omitempty" db:"contains"`
	Contained []*float64 `json:"contained,omitempty" db:"contained"`
	Overlap   []*float64 `json:"overlap,omitempty" db:"overlap"`
	IsNull    *bool      `json:"isNull,omitempty" db:"is_null"`
}

type IntComparator

type IntComparator struct {
	Eq     *int  `json:"eq,omitempty" db:"eq"`
	Neq    *int  `json:"neq,omitempty" db:"neq"`
	Gt     *int  `json:"gt,omitempty" db:"gt"`
	Gte    *int  `json:"gte,omitempty" db:"gte"`
	Lt     *int  `json:"lt,omitempty" db:"lt"`
	Lte    *int  `json:"lte,omitempty" db:"lte"`
	IsNull *bool `json:"isNull,omitempty" db:"is_null"`
}

type IntListComparator

type IntListComparator struct {
	Eq        []*int `json:"eq,omitempty" db:"eq"`
	Neq       []*int `json:"neq,omitempty" db:"neq"`
	Contains  []*int `json:"contains,omitempty" db:"contains"`
	Contained []*int `json:"contained,omitempty" db:"contained"`
	Overlap   []*int `json:"overlap,omitempty" db:"overlap"`
	IsNull    *bool  `json:"isNull,omitempty" db:"is_null"`
}

type OrderingTypes

type OrderingTypes string
const (
	OrderingTypesAsc           OrderingTypes = "ASC"
	OrderingTypesDesc          OrderingTypes = "DESC"
	OrderingTypesAscNullFirst  OrderingTypes = "ASC_NULL_FIRST"
	OrderingTypesDescNullFirst OrderingTypes = "DESC_NULL_FIRST"
	OrderingTypesAscNullLast   OrderingTypes = "ASC_NULL_LAST"
	OrderingTypesDescNullLast  OrderingTypes = "DESC_NULL_LAST"
)

func (OrderingTypes) IsValid

func (e OrderingTypes) IsValid() bool

func (OrderingTypes) MarshalGQL

func (e OrderingTypes) MarshalGQL(w io.Writer)

func (OrderingTypes) String

func (e OrderingTypes) String() string

func (*OrderingTypes) UnmarshalGQL

func (e *OrderingTypes) UnmarshalGQL(v interface{}) error

type Post

type Post struct {
	ID         int         `json:"id" db:"id"`
	Name       *string     `json:"name,omitempty" db:"name"`
	Categories []*Category `json:"categories,omitempty" db:"categories"`
	UserID     *int        `json:"user_id,omitempty" db:"user_id"`
	User       *User       `json:"user,omitempty" db:"user"`
	// categories Aggregate
	CategoriesAggregate []CategoriesAggregate `json:"_categoriesAggregate" db:"_categories_aggregate"`
	// user Aggregate
	UserAggregate []UsersAggregate `json:"_userAggregate" db:"_user_aggregate"`
}

type PostAvg added in v0.3.0

type PostAvg struct {
	// Compute the avg for id
	ID float64 `json:"id" db:"id"`
	// Compute the avg for user_id
	UserID float64 `json:"user_id" db:"user_id"`
}

avg Aggregate

type PostFilterInput

type PostFilterInput struct {
	ID         *IntComparator       `json:"id,omitempty" db:"id"`
	Name       *StringComparator    `json:"name,omitempty" db:"name"`
	Categories *CategoryFilterInput `json:"categories,omitempty" db:"categories"`
	UserID     *IntComparator       `json:"user_id,omitempty" db:"user_id"`
	User       *UserFilterInput     `json:"user,omitempty" db:"user"`
	// Logical AND of FilterInput
	And []*PostFilterInput `json:"AND,omitempty" db:"and"`
	// Logical OR of FilterInput
	Or []*PostFilterInput `json:"OR,omitempty" db:"or"`
	// Logical NOT of FilterInput
	Not *PostFilterInput `json:"NOT,omitempty" db:"not"`
}

type PostGroupBy added in v0.3.0

type PostGroupBy string

Group by Post

const (
	// Group by id
	PostGroupByID PostGroupBy = "ID"
	// Group by name
	PostGroupByName PostGroupBy = "NAME"
	// Group by user_id
	PostGroupByUserID PostGroupBy = "USER_ID"
)

func (PostGroupBy) IsValid added in v0.3.0

func (e PostGroupBy) IsValid() bool

func (PostGroupBy) MarshalGQL added in v0.3.0

func (e PostGroupBy) MarshalGQL(w io.Writer)

func (PostGroupBy) String added in v0.3.0

func (e PostGroupBy) String() string

func (*PostGroupBy) UnmarshalGQL added in v0.3.0

func (e *PostGroupBy) UnmarshalGQL(v interface{}) error

type PostMax added in v0.3.0

type PostMax struct {
	// Compute the max for id
	ID int `json:"id" db:"id"`
	// Compute the max for name
	Name string `json:"name" db:"name"`
	// Compute the max for user_id
	UserID int `json:"user_id" db:"user_id"`
}

max Aggregate

type PostMin

type PostMin struct {
	// Compute the min for id
	ID int `json:"id" db:"id"`
	// Compute the min for name
	Name string `json:"name" db:"name"`
	// Compute the min for user_id
	UserID int `json:"user_id" db:"user_id"`
}

min Aggregate

type PostOrdering

type PostOrdering struct {
	// Order Post by id
	ID *OrderingTypes `json:"id,omitempty" db:"id"`
	// Order Post by name
	Name *OrderingTypes `json:"name,omitempty" db:"name"`
	// Order Post by user_id
	UserID *OrderingTypes `json:"user_id,omitempty" db:"user_id"`
}

Ordering for Post

type PostSum added in v0.3.0

type PostSum struct {
	// Compute the sum for id
	ID float64 `json:"id" db:"id"`
	// Compute the sum for user_id
	UserID float64 `json:"user_id" db:"user_id"`
}

sum Aggregate

type PostsAggregate

type PostsAggregate struct {
	// Group
	Group map[string]interface{} `json:"group,omitempty" db:"group"`
	// Count results
	Count int `json:"count" db:"count"`
	// Max Aggregate
	Max *PostMax `json:"max" db:"max"`
	// Min Aggregate
	Min *PostMin `json:"min" db:"min"`
	// Avg Aggregate
	Avg *PostAvg `json:"avg" db:"avg"`
	// Sum Aggregate
	Sum *PostSum `json:"sum" db:"sum"`
}

Aggregate Post

type PostsPayload

type PostsPayload struct {
	// rows affection by mutation
	RowsAffected int     `json:"rows_affected" db:"rows_affected"`
	Posts        []*Post `json:"posts,omitempty" db:"posts"`
}

Autogenerated payload object

type RelationType

type RelationType string
const (
	RelationTypeOneToOne   RelationType = "ONE_TO_ONE"
	RelationTypeOneToMany  RelationType = "ONE_TO_MANY"
	RelationTypeManyToMany RelationType = "MANY_TO_MANY"
)

func (RelationType) IsValid

func (e RelationType) IsValid() bool

func (RelationType) MarshalGQL

func (e RelationType) MarshalGQL(w io.Writer)

func (RelationType) String

func (e RelationType) String() string

func (*RelationType) UnmarshalGQL

func (e *RelationType) UnmarshalGQL(v interface{}) error

type StringComparator

type StringComparator struct {
	Eq          *string   `json:"eq,omitempty" db:"eq"`
	Neq         *string   `json:"neq,omitempty" db:"neq"`
	Contains    []*string `json:"contains,omitempty" db:"contains"`
	NotContains []*string `json:"notContains,omitempty" db:"not_contains"`
	Like        *string   `json:"like,omitempty" db:"like"`
	Ilike       *string   `json:"ilike,omitempty" db:"ilike"`
	Suffix      *string   `json:"suffix,omitempty" db:"suffix"`
	Prefix      *string   `json:"prefix,omitempty" db:"prefix"`
	IsNull      *bool     `json:"isNull,omitempty" db:"is_null"`
}

type StringListComparator

type StringListComparator struct {
	Eq          []*string `json:"eq,omitempty" db:"eq"`
	Neq         []*string `json:"neq,omitempty" db:"neq"`
	Contains    []*string `json:"contains,omitempty" db:"contains"`
	ContainedBy []*string `json:"containedBy,omitempty" db:"contained_by"`
	Overlap     []*string `json:"overlap,omitempty" db:"overlap"`
	IsNull      *bool     `json:"isNull,omitempty" db:"is_null"`
}

type UpdatePostInput

type UpdatePostInput struct {
	ID     *int    `json:"id,omitempty" db:"id"`
	Name   *string `json:"name,omitempty" db:"name"`
	UserID *int    `json:"user_id,omitempty" db:"user_id"`
}

AutoGenerated update input for Post

type User

type User struct {
	ID    int     `json:"id" db:"id"`
	Name  string  `json:"name" db:"name"`
	Posts []*Post `json:"posts,omitempty" db:"posts"`
	// posts Aggregate
	PostsAggregate []PostsAggregate `json:"_postsAggregate" db:"_posts_aggregate"`
}

type UserAvg added in v0.3.0

type UserAvg struct {
	// Compute the avg for id
	ID float64 `json:"id" db:"id"`
}

avg Aggregate

type UserFilterInput

type UserFilterInput struct {
	ID    *IntComparator    `json:"id,omitempty" db:"id"`
	Name  *StringComparator `json:"name,omitempty" db:"name"`
	Posts *PostFilterInput  `json:"posts,omitempty" db:"posts"`
	// Logical AND of FilterInput
	And []*UserFilterInput `json:"AND,omitempty" db:"and"`
	// Logical OR of FilterInput
	Or []*UserFilterInput `json:"OR,omitempty" db:"or"`
	// Logical NOT of FilterInput
	Not *UserFilterInput `json:"NOT,omitempty" db:"not"`
}

type UserGroupBy added in v0.3.0

type UserGroupBy string

Group by User

const (
	// Group by id
	UserGroupByID UserGroupBy = "ID"
	// Group by name
	UserGroupByName UserGroupBy = "NAME"
)

func (UserGroupBy) IsValid added in v0.3.0

func (e UserGroupBy) IsValid() bool

func (UserGroupBy) MarshalGQL added in v0.3.0

func (e UserGroupBy) MarshalGQL(w io.Writer)

func (UserGroupBy) String added in v0.3.0

func (e UserGroupBy) String() string

func (*UserGroupBy) UnmarshalGQL added in v0.3.0

func (e *UserGroupBy) UnmarshalGQL(v interface{}) error

type UserMax added in v0.3.0

type UserMax struct {
	// Compute the max for id
	ID int `json:"id" db:"id"`
	// Compute the max for name
	Name string `json:"name" db:"name"`
}

max Aggregate

type UserMin

type UserMin struct {
	// Compute the min for id
	ID int `json:"id" db:"id"`
	// Compute the min for name
	Name string `json:"name" db:"name"`
}

min Aggregate

type UserOrdering

type UserOrdering struct {
	// Order User by id
	ID *OrderingTypes `json:"id,omitempty" db:"id"`
	// Order User by name
	Name *OrderingTypes `json:"name,omitempty" db:"name"`
}

Ordering for User

type UserSum added in v0.3.0

type UserSum struct {
	// Compute the sum for id
	ID float64 `json:"id" db:"id"`
}

sum Aggregate

type UsersAggregate

type UsersAggregate struct {
	// Group
	Group map[string]interface{} `json:"group,omitempty" db:"group"`
	// Count results
	Count int `json:"count" db:"count"`
	// Max Aggregate
	Max *UserMax `json:"max" db:"max"`
	// Min Aggregate
	Min *UserMin `json:"min" db:"min"`
	// Avg Aggregate
	Avg *UserAvg `json:"avg" db:"avg"`
	// Sum Aggregate
	Sum *UserSum `json:"sum" db:"sum"`
}

Aggregate User

Jump to

Keyboard shortcuts

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