testgen

package
v1.8.19 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Comment_TableName     = "Comment"
	Comment_Columns       = []string{"CommentID", "DateCreated", "IsDeleted", "Content", "ObjectType", "ObjectID"}
	Comment_Column_Types  = map[string]string{"CommentID": "%d", "DateCreated": "%d", "IsDeleted": "%d", "Content": "%s", "ObjectType": "%d", "ObjectID": "%d"}
	Comment_UpdateColumns = []string{"Content", "ObjectType", "ObjectID"}
	Comment_InsertColumns = []string{"DateCreated", "Content", "ObjectType", "ObjectID"}
	Comment_PrimaryKey    = "CommentID"
)

Functions

This section is empty.

Types

type Comment

type Comment struct {
	CommentID   int64       `db:"CommentID" json:"CommentID"`
	DateCreated int64       `db:"DateCreated" json:"DateCreated"`
	IsDeleted   int         `db:"IsDeleted" json:"IsDeleted"`
	Content     null.String `db:"Content" json:"Content"`
	ObjectType  int64       `db:"ObjectType" json:"ObjectType"`
	ObjectID    int64       `db:"ObjectID" json:"ObjectID"`
}

Comment is a `Comment` data model

func (*Comment) Create added in v1.8.7

func (c *Comment) Create() string

func (*Comment) Destroy

func (c *Comment) Destroy() string

func (*Comment) FromID added in v1.8.9

func (c *Comment) FromID(id int64) string

func (*Comment) Select

func (c *Comment) Select() *query.Q

func (*Comment) String

func (c *Comment) String() string

func (*Comment) Table_Column_Types

func (c *Comment) Table_Column_Types() map[string]string

func (*Comment) Table_Columns

func (c *Comment) Table_Columns() []string

func (*Comment) Table_InsertColumns

func (c *Comment) Table_InsertColumns() []string

Comment_InsertColumns is a list of all insert columns for this model

func (*Comment) Table_Name

func (c *Comment) Table_Name() string

Comment_TableName is the name of the table

func (*Comment) Table_PrimaryKey

func (c *Comment) Table_PrimaryKey() string

func (*Comment) Table_PrimaryKey_Value

func (c *Comment) Table_PrimaryKey_Value() int64

Comment_PrimaryKey is the name of the table's primary key

func (*Comment) Table_UpdateColumns

func (c *Comment) Table_UpdateColumns() []string

Comment_UpdateColumns is a list of all update columns for this model

func (*Comment) Update added in v1.8.7

func (c *Comment) Update() string

type NullString

type NullString struct {
	sql.NullString
}

func NewNullString

func NewNullString(str string) NullString

func (*NullString) MarshalJSON

func (n *NullString) MarshalJSON() ([]byte, error)

func (*NullString) String

func (n *NullString) String() string

func (*NullString) UnMarshalJSON

func (n *NullString) UnMarshalJSON(data []byte) error

type Time

type Time struct {
	time.Time
}

func NewTime

func NewTime(t time.Time) Time

func (*Time) MarshalJSON

func (t *Time) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface

func (*Time) String

func (t *Time) String() string

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface

Jump to

Keyboard shortcuts

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