MCPcopy Create free account
hub / github.com/araddon/qlbridge / sqlSelectFromWhere

Function sqlSelectFromWhere

rel/sql.go:1896–1909  ·  view source on GitHub ↗
(from string, where *SqlWhere)

Source from the content-addressed store, hash-verified

1894func (m *SqlUpdate) SqlSelect() *SqlSelect { return sqlSelectFromWhere(m.Table, m.Where) }
1895
1896func sqlSelectFromWhere(from string, where *SqlWhere) *SqlSelect {
1897 req := NewSqlSelect()
1898 req.From = []*SqlSource{NewSqlSource(from)}
1899 switch {
1900 case where.Expr != nil:
1901 req.Where = NewSqlWhere(where.Expr)
1902 default:
1903 req.Where = where
1904 }
1905
1906 req.Star = true
1907 req.Columns = starCols
1908 return req
1909}
1910
1911func (m *SqlDelete) Keyword() lex.TokenType { return lex.TokenDelete }
1912func (m *SqlDelete) String() string { return fmt.Sprintf("%s ", m.Keyword()) }

Callers 3

SqlSelectMethod · 0.85
SqlSelectMethod · 0.85
SqlSelectMethod · 0.85

Calls 3

NewSqlSelectFunction · 0.85
NewSqlSourceFunction · 0.85
NewSqlWhereFunction · 0.85

Tested by

no test coverage detected