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

Function getTypeInfo

server/types.go:222–224  ·  view source on GitHub ↗

getTypeInfo extracts type info from a ColumnTyper (e.g. *sql.ColumnType).

(colType ColumnTyper)

Source from the content-addressed store, hash-verified

220
221// getTypeInfo extracts type info from a ColumnTyper (e.g. *sql.ColumnType).
222func getTypeInfo(colType ColumnTyper) TypeInfo {
223 return mapDuckDBType(colType.DatabaseTypeName())
224}
225
226// parseNumericTypmod parses precision and scale from a type name like "DECIMAL(10,2)"
227// and encodes them as a PostgreSQL typmod: ((precision << 16) | scale) + 4.

Callers 12

handleExecuteMethod · 0.85
streamRowsToClientMethod · 0.85
handleCopyOutMethod · 0.85
handleCopyOutBinaryMethod · 0.85
handleCopyInBinaryMethod · 0.85
openCursorMethod · 0.85
executeSelectQueryMethod · 0.85

Calls 2

mapDuckDBTypeFunction · 0.85
DatabaseTypeNameMethod · 0.65

Tested by

no test coverage detected