MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / ParseOne

Function ParseOne

pkg/sql/parser/parse.go:236–239  ·  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

234// bits of SQL from other nodes. In general, we expect that all
235// user-generated SQL has been run through the ParseWithInt() function.
236func ParseOne(sql string) (Statement, error) {
237 var p Parser
238 return p.parseOneWithDepth(1, sql)
239}
240
241// ParseQualifiedTableName parses a SQL string of the form
242// `[ database_name . ] [ schema_name . ] table_name`.

Callers 4

TestParseOneFunction · 0.92
ParseTableNameFunction · 0.85
parseExprsFunction · 0.85

Calls 1

parseOneWithDepthMethod · 0.95

Tested by 1

TestParseOneFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…