MCPcopy Create free account
hub / github.com/dolthub/doltgresql / ParseOne

Function ParseOne

postgres/parser/parser/parse.go:266–269  ·  view source on GitHub ↗

ParseOne parses a sql statement string, ensuring that it contains only a single statement, and returns that Statement. ParseOne will always interpret the INT and SERIAL types as 64-bit types, since this is used in various internal-execution paths where we might receive bits of SQL from other nodes.

(sql string)

Source from the content-addressed store, hash-verified

264// bits of SQL from other nodes. In general,earwe expect that all
265// user-generated SQL has been run through the ParseWithInt() function.
266func ParseOne(sql string) (Statement, error) {
267 var p Parser
268 return p.parseOneWithDepth(1, sql)
269}
270
271// HasMultipleStatements returns true if the sql string contains more than one
272// statements.

Callers 5

ParseOneWithOptionsMethod · 0.92
ParseTableNameFunction · 0.85
parseExprsFunction · 0.85

Calls 1

parseOneWithDepthMethod · 0.95

Tested by

no test coverage detected