Documentation
¶
Overview ¶
Package types contains all types definition for gqlgin/gorm
Index ¶
- Constants
- Variables
- func FloatToString(id Float) string
- func Format(time time.Time) string
- func ParseTimeInLocation(timeStr string) (time.Time, error)
- func String(id ID) string
- type ColumnName
- func (c ColumnName) Append(argv ...string) ColumnName
- func (c ColumnName) Dup() *string
- func (c ColumnName) Equal(other *ColumnName) bool
- func (c ColumnName) Group(argv ...string) string
- func (c ColumnName) MarshalGQL(w io.Writer)
- func (c *ColumnName) Scan(value interface{}) error
- func (c ColumnName) String() string
- func (c *ColumnName) UnmarshalGQL(v interface{}) error
- func (c ColumnName) Value() (driver.Value, error)
- type DatabaseType
- func (c DatabaseType) Equal(other *DatabaseType) bool
- func (c DatabaseType) MarshalGQL(w io.Writer)
- func (c DatabaseType) Quote(i string) (o string)
- func (c *DatabaseType) Scan(value interface{}) error
- func (c DatabaseType) String() string
- func (c *DatabaseType) UnmarshalGQL(v interface{}) error
- func (c DatabaseType) Value() (driver.Value, error)
- type EndpointSourceType
- func (c EndpointSourceType) Equal(other *EndpointSourceType) bool
- func (y EndpointSourceType) MarshalGQL(w io.Writer)
- func (y *EndpointSourceType) Scan(value interface{}) error
- func (y EndpointSourceType) String() string
- func (y *EndpointSourceType) UnmarshalGQL(v interface{}) error
- func (y EndpointSourceType) Value() (driver.Value, error)
- type Float
- type ID
- type Id
- type IntCount
- type MatchType
- type ParameterType
- func (c ParameterType) Equal(other *ParameterType) bool
- func (y ParameterType) MarshalGQL(w io.Writer)
- func (y *ParameterType) Scan(value interface{}) error
- func (y ParameterType) String() string
- func (y ParameterType) To(val interface{}) (v string, err error)
- func (y *ParameterType) UnmarshalGQL(v interface{}) error
- func (y ParameterType) Value() (driver.Value, error)
- type Timestamp
Constants ¶
View Source
const ColumnSeparator = "_"
View Source
const GroupSeparator = "/"
Variables ¶
View Source
var DatabaseEscapeCharacters = map[DatabaseType]struct{ Left, Right string }{ MySQL: {"`", "`"}, Postgres: {"\"", "\""}, Oracle: {"\"", "\""}, SQLite: {"\"", "\""}, DB2: {"\"", "\""}, SQLServer: {"[", "]"}, }
Functions ¶
func FloatToString ¶
Types ¶
type ColumnName ¶
type ColumnName string
const ( ColumnApproveReason ColumnName = "approve_reason" ColumnBpmNo ColumnName = "bpm_no" ColumnBpmStatus ColumnName = "bpm_status" ColumnCreatorId ColumnName = "creator_id" ColumnCreatorDisplayName ColumnName = "creator_display_name" ColumnCreateTime ColumnName = "create_time" ColumnDeleteTime ColumnName = "delete_time" ColumnDeleteFlag ColumnName = "delete_flag" ColumnIdentifier ColumnName = "id" ColumnMatchTypes ColumnName = "match_types" ColumnModifierId ColumnName = "modifier_id" ColumnModifierDisplayName ColumnName = "modifier_display_name" ColumnModifiedBy ColumnName = "modified_by" ColumnModify ColumnName = "modify" ColumnModifyTime ColumnName = "modify_time" ColumnPublishedFlag ColumnName = "published_flag" ColumnStatus ColumnName = "status" ColumnUpdateTime ColumnName = "update_time" ColumnValidFlag ColumnName = "valid_flag" ColumnVersion ColumnName = "version" ColumnWeight ColumnName = "weight" ColumnLastReleasedTime ColumnName = "latest_released_time" )
func GroupToColumnName ¶
func GroupToColumnName(group string) ColumnName
func (ColumnName) Append ¶
func (c ColumnName) Append(argv ...string) ColumnName
func (ColumnName) Dup ¶
func (c ColumnName) Dup() *string
func (ColumnName) Equal ¶
func (c ColumnName) Equal(other *ColumnName) bool
func (ColumnName) Group ¶
func (c ColumnName) Group(argv ...string) string
func (ColumnName) MarshalGQL ¶
func (c ColumnName) MarshalGQL(w io.Writer)
MarshalGQL implements the graphql.Marshaler interface
func (*ColumnName) Scan ¶
func (c *ColumnName) Scan(value interface{}) error
Scan 实现了 sql.Scanner 接口
func (ColumnName) String ¶
func (c ColumnName) String() string
func (*ColumnName) UnmarshalGQL ¶
func (c *ColumnName) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements the graphql.Unmarshaler interface
type DatabaseType ¶
type DatabaseType string
const ( MySQL DatabaseType = "mysql" // gorm:gorm@tcp(127.0.0.1:3306)/gorm?charset=utf8&parseTime=True&loc=Local Postgres DatabaseType = "postgres" // host=localhost user=gorm password=gorm dbname=gorm port=9920 sslmode=disable TimeZone=Asia/Shanghai Oracle DatabaseType = "oracle" // oracle://user:password@127.0.0.1:1521/service SQLite DatabaseType = "sqlite" // test.db SQLServer DatabaseType = "sqlserver" // sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm DB2 DatabaseType = "db2" )
func (DatabaseType) Equal ¶
func (c DatabaseType) Equal(other *DatabaseType) bool
func (DatabaseType) MarshalGQL ¶
func (c DatabaseType) MarshalGQL(w io.Writer)
MarshalGQL implements the graphql.Marshaler interface
func (DatabaseType) Quote ¶
func (c DatabaseType) Quote(i string) (o string)
func (*DatabaseType) Scan ¶
func (c *DatabaseType) Scan(value interface{}) error
Scan 实现了 sql.Scanner 接口
func (DatabaseType) String ¶
func (c DatabaseType) String() string
func (*DatabaseType) UnmarshalGQL ¶
func (c *DatabaseType) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements the graphql.Unmarshaler interface
type EndpointSourceType ¶
type EndpointSourceType string
const ( ServiceEndpoint EndpointSourceType = "Service" InternalEndpoint EndpointSourceType = "Internal" )
func (EndpointSourceType) Equal ¶
func (c EndpointSourceType) Equal(other *EndpointSourceType) bool
func (EndpointSourceType) MarshalGQL ¶
func (y EndpointSourceType) MarshalGQL(w io.Writer)
func (*EndpointSourceType) Scan ¶
func (y *EndpointSourceType) Scan(value interface{}) error
Scan 实现了 sql.Scanner 接口
func (EndpointSourceType) String ¶
func (y EndpointSourceType) String() string
func (*EndpointSourceType) UnmarshalGQL ¶
func (y *EndpointSourceType) UnmarshalGQL(v interface{}) error
type Float ¶
type Float float64
func (Float) MarshalGQL ¶
MarshalGQL implements the graphql.Marshaler interface
func (*Float) UnmarshalGQL ¶
UnmarshalGQL implements the graphql.Unmarshaler interface
type ID ¶
type ID int64
ID type alias
func (ID) MarshalGQL ¶
MarshalGQL implements the graphql.Marshaler interface
func (*ID) UnmarshalGQL ¶
UnmarshalGQL implements the graphql.Unmarshaler interface
type MatchType ¶
type MatchType string
func (MatchType) MarshalGQL ¶
func (*MatchType) UnmarshalGQL ¶
type ParameterType ¶
type ParameterType string
const ( TypeBool ParameterType = "bool" TypeDouble ParameterType = "double" TypeIdentity ParameterType = "id" TypeInt ParameterType = "int" TypeGroup ParameterType = "group" TypeJson ParameterType = "json" TypeState ParameterType = "state" TypeString ParameterType = "string" TypeText ParameterType = "text" TypeTimestamp ParameterType = "timestamp" TypeArray ParameterType = "array" )
func (ParameterType) Equal ¶
func (c ParameterType) Equal(other *ParameterType) bool
func (ParameterType) MarshalGQL ¶
func (y ParameterType) MarshalGQL(w io.Writer)
func (*ParameterType) Scan ¶
func (y *ParameterType) Scan(value interface{}) error
Scan 实现了 sql.Scanner 接口
func (ParameterType) String ¶
func (y ParameterType) String() string
func (ParameterType) To ¶
func (y ParameterType) To(val interface{}) (v string, err error)
func (*ParameterType) UnmarshalGQL ¶
func (y *ParameterType) UnmarshalGQL(v interface{}) error
Click to show internal directories.
Click to hide internal directories.