MCPcopy Create free account
hub / github.com/PostHog/duckgres / transformInsertStmt

Method transformInsertStmt

transpiler/transform/operators.go:240–260  ·  view source on GitHub ↗
(stmt *pg_query.InsertStmt)

Source from the content-addressed store, hash-verified

238}
239
240func (t *OperatorTransform) transformInsertStmt(stmt *pg_query.InsertStmt) bool {
241 if stmt == nil {
242 return false
243 }
244
245 changed := false
246
247 if stmt.SelectStmt != nil {
248 if selectStmt := stmt.SelectStmt.GetSelectStmt(); selectStmt != nil {
249 if t.transformSelectStmt(selectStmt) {
250 changed = true
251 }
252 }
253 }
254
255 if t.transformReturningList(stmt.ReturningList) {
256 changed = true
257 }
258
259 return changed
260}
261
262func (t *OperatorTransform) transformUpdateStmt(stmt *pg_query.UpdateStmt) bool {
263 if stmt == nil {

Callers 1

TransformMethod · 0.95

Calls 2

transformSelectStmtMethod · 0.95

Tested by

no test coverage detected