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

Function SQLNodeToDoltTable

core/table_to_dolt.go:26–32  ·  view source on GitHub ↗

SQLNodeToDoltTable takes a sql.Node and returns a *sqle.DoltTable if either the node is a Dolt table, or it is a wrapper or container that holds a Dolt table. Returns nil if a Dolt table could not be found. If the node is not a sql.Table, then this will return nil.

(n sql.Node)

Source from the content-addressed store, hash-verified

24// wrapper or container that holds a Dolt table. Returns nil if a Dolt table could not be found. If the node is not a
25// sql.Table, then this will return nil.
26func SQLNodeToDoltTable(n sql.Node) *sqle.DoltTable {
27 tbl, ok := n.(sql.Table)
28 if !ok {
29 return nil
30 }
31 return SQLTableToDoltTable(tbl)
32}
33
34// SQLTableToDoltTable takes a sql.Table and returns a *sqle.DoltTable if either the table is a Dolt table, or it is a
35// wrapper or container that holds a Dolt table. Returns nil if a Dolt table could not be found.

Callers 6

BeforeTableModifyColumnFunction · 0.92
AfterTableDropColumnFunction · 0.92
BeforeTableDeletionFunction · 0.92
AfterTableRenameColumnFunction · 0.92
BeforeTableAddColumnFunction · 0.92
AfterTableAddColumnFunction · 0.92

Calls 1

SQLTableToDoltTableFunction · 0.85

Tested by

no test coverage detected