MCPcopy
hub / github.com/Masterminds/squirrel / From

Method From

update.go:247–249  ·  view source on GitHub ↗

From adds FROM clause to the query FROM is valid construct in postgresql only.

(from string)

Source from the content-addressed store, hash-verified

245// From adds FROM clause to the query
246// FROM is valid construct in postgresql only.
247func (b UpdateBuilder) From(from string) UpdateBuilder {
248 return builder.Set(b, "From", newPart(from)).(UpdateBuilder)
249}
250
251// FromSelect sets a subquery into the FROM clause of the query.
252func (b UpdateBuilder) FromSelect(from SelectBuilder, alias string) UpdateBuilder {

Callers 15

DeleteMethod · 0.45
TestInsertBuilderSelectFunction · 0.45
squirrel_test.goFile · 0.45
TestDeleteBuilderToSqlFunction · 0.45
TestUpdateBuilderToSqlFunction · 0.45
TestUpdateBuilderFromFunction · 0.45
ExampleEqFunction · 0.45
TestSelectBuilderToSqlFunction · 0.45

Calls 2

newPartFunction · 0.85
SetMethod · 0.80

Tested by 15

TestInsertBuilderSelectFunction · 0.36
TestDeleteBuilderToSqlFunction · 0.36
TestUpdateBuilderToSqlFunction · 0.36
TestUpdateBuilderFromFunction · 0.36
ExampleEqFunction · 0.36
TestSelectBuilderToSqlFunction · 0.36