Documentation ¶
Index ¶
Constants ¶
View Source
const ( UsersColRecordID = "record_id" UsersColName = "name" UsersColLastname = "lastname" UsersColGender = "gender" UsersTableName = "users" )
Costanti relative alla tabella users
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { RecordID int64 `json:"id" db:"record_id"` Name *string `json:"name" db:"name"` Lastname *string `json:"lastname" db:"lastname"` Gender *string `json:"gender" db:"gender"` // contains filtered or unexported fields }
User - Define the users table Implements TableRecordInterface
func LoadAllUsers ¶
func LoadAllUsers(db db.SQLConnector) ([]*User, error)
LoadAllUsers - Returns all users
func NewUser ¶
func NewUser(db db.SQLConnector) *User
NewUser - Returns new instance of the struct with the init of TableRecord and set the flag "isNew" It's suggest to use always this to get new instance of the struct
func (User) GetPrimaryKeyName ¶
GetPrimaryKeyName - Returns primary key name
func (User) GetPrimaryKeyValue ¶
GetPrimaryKeyValue - Returns the value of the primary key
func (User) GetTableRecord ¶
func (u User) GetTableRecord() *record.TableRecord
GetTableRecord - Returns TableRecord instance of the User struct
Click to show internal directories.
Click to hide internal directories.