sqlc

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID            int64              `db:"id" json:"id"`
	AccountNumber string             `db:"account_number" json:"account_number"`
	AccountName   string             `db:"account_name" json:"account_name"`
	AccountType   string             `db:"account_type" json:"account_type"`
	Balance       pgtype.Numeric     `db:"balance" json:"balance"`
	Currency      string             `db:"currency" json:"currency"`
	Status        string             `db:"status" json:"status"`
	OwnerID       pgtype.Int8        `db:"owner_id" json:"owner_id"`
	CreatedAt     pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt     pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type CommonReferenceMaster

type CommonReferenceMaster struct {
	ID        int64              `db:"id" json:"id"`
	Entity    string             `db:"entity" json:"entity"`
	EntityKey string             `db:"entity_key" json:"entity_key"`
	CreatedAt pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type Employee

type Employee struct {
	ID         int64              `db:"id" json:"id"`
	FirstName  string             `db:"first_name" json:"first_name"`
	LastName   string             `db:"last_name" json:"last_name"`
	Email      string             `db:"email" json:"email"`
	Phone      pgtype.Text        `db:"phone" json:"phone"`
	HireDate   pgtype.Date        `db:"hire_date" json:"hire_date"`
	Salary     pgtype.Numeric     `db:"salary" json:"salary"`
	Department pgtype.Text        `db:"department" json:"department"`
	Position   pgtype.Text        `db:"position" json:"position"`
	IsActive   pgtype.Bool        `db:"is_active" json:"is_active"`
	Status     pgtype.Text        `db:"status" json:"status"`
	CreatedAt  pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt  pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

func (Employee) TableName

func (e Employee) TableName() string

type EmployeeStat

type EmployeeStat struct {
	Department    pgtype.Text `db:"department" json:"department"`
	EmployeeCount int64       `db:"employee_count" json:"employee_count"`
	AvgSalary     float64     `db:"avg_salary" json:"avg_salary"`
	EarliestHire  interface{} `db:"earliest_hire" json:"earliest_hire"`
}

type EmployeeStatus

type EmployeeStatus string
const (
	EmployeeStatusActive     EmployeeStatus = "active"
	EmployeeStatusOnLeave    EmployeeStatus = "on_leave"
	EmployeeStatusTerminated EmployeeStatus = "terminated"
)

func (*EmployeeStatus) Scan

func (e *EmployeeStatus) Scan(src interface{}) error

type GetEmployeesAdvancedParams

type GetEmployeesAdvancedParams struct {
	Department pgtype.Text    `db:"department" json:"department"`
	MinSalary  pgtype.Numeric `db:"min_salary" json:"min_salary"`
	MaxSalary  pgtype.Numeric `db:"max_salary" json:"max_salary"`
}

func (GetEmployeesAdvancedParams) TableName

func (GetEmployeesAdvancedParams) TableName() string

TableName methods for parameter types

type GetEmployeesAdvancedRow

type GetEmployeesAdvancedRow struct {
	ID         int64          `db:"id" json:"id"`
	FirstName  string         `db:"first_name" json:"first_name"`
	LastName   string         `db:"last_name" json:"last_name"`
	Department pgtype.Text    `db:"department" json:"department"`
	Salary     pgtype.Numeric `db:"salary" json:"salary"`
}

func (GetEmployeesAdvancedRow) TableName

func (GetEmployeesAdvancedRow) TableName() string

TableName methods for result types

type GetEmployeesWithAccountsParams

type GetEmployeesWithAccountsParams struct {
	Department pgtype.Text    `db:"department" json:"department"`
	MinSalary  pgtype.Numeric `db:"min_salary" json:"min_salary"`
	MaxSalary  pgtype.Numeric `db:"max_salary" json:"max_salary"`
}

func (GetEmployeesWithAccountsParams) TableName

type GetEmployeesWithAccountsRow

type GetEmployeesWithAccountsRow struct {
	EmployeeName string         `db:"employee_name" json:"employee_name"`
	Dept         pgtype.Text    `db:"dept" json:"dept"`
	AccountCount int64          `db:"account_count" json:"account_count"`
	TotalBalance pgtype.Numeric `db:"total_balance" json:"total_balance"`
}

func (GetEmployeesWithAccountsRow) TableName

func (GetEmployeesWithAccountsRow) TableName() string

type Holder

type Holder struct {
	ID         int64              `db:"id" json:"id"`
	RefID      int64              `db:"ref_id" json:"ref_id"`
	HolderRank pgtype.Int8        `db:"holder_rank" json:"holder_rank"`
	DeletedAt  pgtype.Timestamptz `db:"deleted_at" json:"deleted_at"`
	DeletedBy  pgtype.Text        `db:"deleted_by" json:"deleted_by"`
	CreatedAt  pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt  pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type NonIndividualDetail

type NonIndividualDetail struct {
	ID         int64              `db:"id" json:"id"`
	RefID      int64              `db:"ref_id" json:"ref_id"`
	EntityType string             `db:"entity_type" json:"entity_type"`
	OrgName    pgtype.Text        `db:"org_name" json:"org_name"`
	CreatedAt  pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt  pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type NullEmployeeStatus

type NullEmployeeStatus struct {
	EmployeeStatus EmployeeStatus `json:"employee_status"`
	Valid          bool           `json:"valid"` // Valid is true if EmployeeStatus is not NULL
}

func (*NullEmployeeStatus) Scan

func (ns *NullEmployeeStatus) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullEmployeeStatus) Value

func (ns NullEmployeeStatus) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type PersonDetail

type PersonDetail struct {
	ID         int64              `db:"id" json:"id"`
	RefID      int64              `db:"ref_id" json:"ref_id"`
	EntityType string             `db:"entity_type" json:"entity_type"`
	FirstName  pgtype.Text        `db:"first_name" json:"first_name"`
	MiddleName pgtype.Text        `db:"middle_name" json:"middle_name"`
	LastName   pgtype.Text        `db:"last_name" json:"last_name"`
	CreatedAt  pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt  pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) GetEmployee

func (q *Queries) GetEmployee(ctx context.Context, id int64) (Employee, error)

func (*Queries) GetEmployeesAdvanced

func (q *Queries) GetEmployeesAdvanced(ctx context.Context, arg GetEmployeesAdvancedParams) ([]GetEmployeesAdvancedRow, error)

func (*Queries) GetEmployeesWithAccounts

func (q *Queries) GetEmployeesWithAccounts(ctx context.Context, arg GetEmployeesWithAccountsParams) ([]GetEmployeesWithAccountsRow, error)

func (*Queries) UCCList

func (q *Queries) UCCList(ctx context.Context, arg UCCListParams) ([]UCCListRow, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type TaxStatusMaster

type TaxStatusMaster struct {
	ID        int64              `db:"id" json:"id"`
	TaxName   string             `db:"tax_name" json:"tax_name"`
	CreatedAt pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type UCCListParams

type UCCListParams struct {
	UccStatus        pgtype.Int8 `db:"ucc_status" json:"ucc_status"`
	TaxStatus        pgtype.Int8 `db:"tax_status" json:"tax_status"`
	HoldingNature    pgtype.Int8 `db:"holding_nature" json:"holding_nature"`
	IsClientPhysical pgtype.Bool `db:"is_client_physical" json:"is_client_physical"`
	IsClientDemat    pgtype.Bool `db:"is_client_demat" json:"is_client_demat"`
	ClientCode       pgtype.Text `db:"client_code" json:"client_code"`
	MemberCode       pgtype.Text `db:"member_code" json:"member_code"`
	ParentClientCode pgtype.Text `db:"parent_client_code" json:"parent_client_code"`
	Search           pgtype.Text `db:"search" json:"search"`
	SortBy           interface{} `db:"sort_by" json:"sort_by"`
	SortOrder        interface{} `db:"sort_order" json:"sort_order"`
	Offset           pgtype.Int4 `db:"offset" json:"offset"`
	Limit            pgtype.Int4 `db:"limit" json:"limit"`
}

func (UCCListParams) TableName

func (UCCListParams) TableName() string

type UCCListRow

type UCCListRow struct {
	UccID             int64       `db:"ucc_id" json:"ucc_id"`
	ClientCode        pgtype.Text `db:"client_code" json:"client_code"`
	MemberCode        pgtype.Text `db:"member_code" json:"member_code"`
	TaxStatus         pgtype.Text `db:"tax_status" json:"tax_status"`
	HoldingNature     pgtype.Text `db:"holding_nature" json:"holding_nature"`
	UccStatus         pgtype.Text `db:"ucc_status" json:"ucc_status"`
	IsClientPhysical  bool        `db:"is_client_physical" json:"is_client_physical"`
	IsClientDemat     bool        `db:"is_client_demat" json:"is_client_demat"`
	ParentClientCode  pgtype.Text `db:"parent_client_code" json:"parent_client_code"`
	PrimaryHolderName interface{} `db:"primary_holder_name" json:"primary_holder_name"`
}

func (UCCListRow) TableName

func (UCCListRow) TableName() string

type Ucc

type Ucc struct {
	UccID            int64              `db:"ucc_id" json:"ucc_id"`
	ClientCode       pgtype.Text        `db:"client_code" json:"client_code"`
	MemberCode       pgtype.Text        `db:"member_code" json:"member_code"`
	TaxStatus        pgtype.Int8        `db:"tax_status" json:"tax_status"`
	HoldingNature    pgtype.Int8        `db:"holding_nature" json:"holding_nature"`
	UccStatus        pgtype.Int8        `db:"ucc_status" json:"ucc_status"`
	IsClientPhysical bool               `db:"is_client_physical" json:"is_client_physical"`
	IsClientDemat    bool               `db:"is_client_demat" json:"is_client_demat"`
	ParentClientCode pgtype.Text        `db:"parent_client_code" json:"parent_client_code"`
	DeletedAt        pgtype.Timestamptz `db:"deleted_at" json:"deleted_at"`
	DeletedBy        pgtype.Text        `db:"deleted_by" json:"deleted_by"`
	CreatedAt        pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt        pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

Jump to

Keyboard shortcuts

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