Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUserTableSQL ¶
func CreateUserTableSQL() string
CreateUserTableSQL returns the SQL to create the users table
func ExampleQueries ¶ added in v4.1.3
func ExampleQueries()
ExampleQueries demonstrates various query patterns
Types ¶
type User ¶
type User struct { ID int64 `gom:"id,primary_key,auto_increment"` Username string `gom:"username,size:50,not_null,unique"` Email string `gom:"email,size:100,not_null,unique"` Age int `gom:"age"` Active bool `gom:"active,default:true"` Role string `gom:"role,size:20,default:'user'"` CreatedAt time.Time `gom:"created_at,not_null"` UpdatedAt time.Time `gom:"updated_at,not_null"` }
User represents a user in the system
Click to show internal directories.
Click to hide internal directories.