Documentation ¶
Overview ¶
Code generated by norm. DO NOT EDIT. Generated on: 2020-12-26 18:50:49.673523925 -0800 PST m=+0.002477716
Index ¶
- func AddUser(db *sql.DB, email string) error
- func CreateUserTable(db *sql.DB) error
- func DeleteAllUsers(db *sql.DB) error
- func FindUserEmail(db *sql.DB, email string) (*string, error)
- func GetUserEmailsNoModel(db *sql.DB) ([]string, error)
- type FindUserOutput
- type GetUserEmailsNoModelResult
- type GetUserListNoModelOutput
- type GetUserListNoModelResult
- type GetUserListWithModelResult
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindUserEmail ¶
Finds user by email.
Types ¶
type FindUserOutput ¶
type GetUserEmailsNoModelResult ¶
type GetUserEmailsNoModelResult struct {
// contains filtered or unexported fields
}
func GetUserEmailsNoModelScan ¶
func GetUserEmailsNoModelScan(db *sql.DB) (*GetUserEmailsNoModelResult, error)
Retrieves all emails from the users table. In this example, there is// only one output field. Therefore an intermediate struct is also not needed,// we just return a slice of the output type (string in this case)
func (GetUserEmailsNoModelResult) Close ¶
func (res GetUserEmailsNoModelResult) Close()
func (GetUserEmailsNoModelResult) Next ¶
func (res GetUserEmailsNoModelResult) Next() bool
func (GetUserEmailsNoModelResult) Scan ¶
func (res GetUserEmailsNoModelResult) Scan(Email *string) error
type GetUserListNoModelOutput ¶
func GetUserListNoModel ¶
func GetUserListNoModel(db *sql.DB) ([]GetUserListNoModelOutput, error)
type GetUserListNoModelResult ¶
type GetUserListNoModelResult struct {
// contains filtered or unexported fields
}
func GetUserListNoModelScan ¶
func GetUserListNoModelScan(db *sql.DB) (*GetUserListNoModelResult, error)
Retrieves all emails from the users table. Since there is no// intermediate model, an output struct is autocreated which will contain only// the fields specified in the output. Please make sure that the field names// are capitalized.
func (GetUserListNoModelResult) Close ¶
func (res GetUserListNoModelResult) Close()
func (GetUserListNoModelResult) Next ¶
func (res GetUserListNoModelResult) Next() bool
type GetUserListWithModelResult ¶
type GetUserListWithModelResult struct {
// contains filtered or unexported fields
}
func GetUserListWithModelScan ¶
func GetUserListWithModelScan(db *sql.DB) (*GetUserListWithModelResult, error)
Retrieves all emails from the users table. In this example, an// intermediate model is used. See `gen.go` for the model definition. This// allows users to specify an arbitrary intermediate struct.
func (GetUserListWithModelResult) Close ¶
func (res GetUserListWithModelResult) Close()
func (GetUserListWithModelResult) Next ¶
func (res GetUserListWithModelResult) Next() bool