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

Method WriteDialect

rel/filter.go:161–186  ·  view source on GitHub ↗
(w expr.DialectWriter)

Source from the content-addressed store, hash-verified

159}
160
161func (m *FilterSelect) WriteDialect(w expr.DialectWriter) {
162
163 io.WriteString(w, "SELECT ")
164 m.Columns.WriteDialect(w)
165
166 if m.From != "" {
167 io.WriteString(w, " FROM ")
168 w.WriteIdentity(m.From)
169 }
170
171 io.WriteString(w, " FILTER ")
172
173 m.Filter.WriteDialect(w)
174
175 if m.Limit > 0 {
176 io.WriteString(w, fmt.Sprintf(" LIMIT %d", m.Limit))
177 }
178 if len(m.With) > 0 {
179 io.WriteString(w, " WITH ")
180 HelperString(w, m.With)
181 }
182 if m.Alias != "" {
183 io.WriteString(w, " ALIAS ")
184 w.WriteIdentity(m.Alias)
185 }
186}
187
188// String representation of FilterSelect
189func (m *FilterSelect) String() string {

Callers 2

StringMethod · 0.95
FingerPrintIDMethod · 0.95

Calls 3

HelperStringFunction · 0.85
WriteDialectMethod · 0.65
WriteIdentityMethod · 0.65

Tested by

no test coverage detected