Documentation
¶
Overview ¶
Package query provides query building for DML operations. This is a stub for future implementation.
Index ¶
- type Builder
- type DeleteBuilder
- type InsertBuilder
- type SelectBuilder
- func (s *SelectBuilder) From(table string) *SelectBuilder
- func (s *SelectBuilder) Limit(n int) *SelectBuilder
- func (s *SelectBuilder) Offset(n int) *SelectBuilder
- func (s *SelectBuilder) OrderBy(column string) *SelectBuilder
- func (s *SelectBuilder) ToSQL() (string, []any)
- func (s *SelectBuilder) Where(condition string) *SelectBuilder
- type UpdateBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteBuilder ¶
type DeleteBuilder struct {
// contains filtered or unexported fields
}
DeleteBuilder builds DELETE queries.
func (*DeleteBuilder) ToSQL ¶
func (d *DeleteBuilder) ToSQL() (string, []any)
ToSQL generates the DELETE SQL. (stub implementation)
func (*DeleteBuilder) Where ¶
func (d *DeleteBuilder) Where(condition string) *DeleteBuilder
Where adds a WHERE condition.
type InsertBuilder ¶
type InsertBuilder struct {
// contains filtered or unexported fields
}
InsertBuilder builds INSERT queries.
func (*InsertBuilder) Columns ¶
func (i *InsertBuilder) Columns(columns ...string) *InsertBuilder
Columns sets the columns to insert into.
func (*InsertBuilder) ToSQL ¶
func (i *InsertBuilder) ToSQL() (string, []any)
ToSQL generates the INSERT SQL. (stub implementation)
func (*InsertBuilder) Values ¶
func (i *InsertBuilder) Values(values ...any) *InsertBuilder
Values sets the values to insert.
type SelectBuilder ¶
type SelectBuilder struct {
// contains filtered or unexported fields
}
SelectBuilder builds SELECT queries.
func (*SelectBuilder) From ¶
func (s *SelectBuilder) From(table string) *SelectBuilder
From sets the table to select from.
func (*SelectBuilder) Limit ¶
func (s *SelectBuilder) Limit(n int) *SelectBuilder
Limit sets the LIMIT clause.
func (*SelectBuilder) Offset ¶
func (s *SelectBuilder) Offset(n int) *SelectBuilder
Offset sets the OFFSET clause.
func (*SelectBuilder) OrderBy ¶
func (s *SelectBuilder) OrderBy(column string) *SelectBuilder
OrderBy adds an ORDER BY clause.
func (*SelectBuilder) ToSQL ¶
func (s *SelectBuilder) ToSQL() (string, []any)
ToSQL generates the SELECT SQL. (stub implementation)
func (*SelectBuilder) Where ¶
func (s *SelectBuilder) Where(condition string) *SelectBuilder
Where adds a WHERE condition.
type UpdateBuilder ¶
type UpdateBuilder struct {
// contains filtered or unexported fields
}
UpdateBuilder builds UPDATE queries.
func (*UpdateBuilder) Set ¶
func (u *UpdateBuilder) Set(column string, value any) *UpdateBuilder
Set adds a column=value pair to update.
func (*UpdateBuilder) ToSQL ¶
func (u *UpdateBuilder) ToSQL() (string, []any)
ToSQL generates the UPDATE SQL. (stub implementation)
func (*UpdateBuilder) Where ¶
func (u *UpdateBuilder) Where(condition string) *UpdateBuilder
Where adds a WHERE condition.