MCPcopy Create free account
hub / github.com/bytebase/bytebase / omniDMLTableReference

Function omniDMLTableReference

backend/plugin/parser/plsql/backup.go:256–276  ·  view source on GitHub ↗
(databaseName string, name *oracleast.ObjectName, alias *oracleast.Alias, statementType StatementType)

Source from the content-addressed store, hash-verified

254}
255
256func omniDMLTableReference(databaseName string, name *oracleast.ObjectName, alias *oracleast.Alias, statementType StatementType) *TableReference {
257 if name == nil || name.Name == "" {
258 return nil
259 }
260 schema := name.Schema
261 hasSchema := schema != ""
262 if schema == "" {
263 schema = databaseName
264 }
265 table := &TableReference{
266 Database: schema,
267 HasSchema: hasSchema,
268 Schema: schema,
269 Table: name.Name,
270 StatementType: statementType,
271 }
272 if alias != nil {
273 table.Alias = alias.Name
274 }
275 return table
276}
277
278func writeSuffixSelectClause(buf *strings.Builder, node oracleast.StmtNode, fullSQL string) error {
279 suffix := ""

Callers 1

extractOmniDMLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected