set

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(sw io.StringWriter, changes []Change) error

Set writes a SQL string to the given string writer.

Example:

Mysql:
	SET field1 = ?, field2 = ?, field3 = ?
Postgres:
	SET field1 = $1, field2 = $2, field3 = $3

Types

type Change

type Change struct {
	// Col is the column name.
	Col  string
	Expr expressions.Expression
}

Change represents a change to a column.

func (*Change) WriteTo

func (c *Change) WriteTo(sw io.StringWriter) error

Write writes a SQL string to the given string writer.

type Clause

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

Clause writes a SQL string to the given string writer.

func New

func New(changes []Change) *Clause

func (*Clause) Type

func (s *Clause) Type() clauses.ClauseType

func (*Clause) WriteTo

func (s *Clause) WriteTo(sw io.StringWriter) error

Jump to

Keyboard shortcuts

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