Documentation ¶
Index ¶
- Constants
- func FormatData(columnTypes map[string]ColumnDescription, key string, value any) (string, any, error)
- func GetColumnTypes(ctx context.Context, repo *repository.Oracle, tableName string) (map[string]ColumnDescription, error)
- func TransformRow(row map[string]any, columnTypes map[string]ColumnDescription) (map[string]any, error)
- type ColumnDescription
Constants ¶
View Source
const (
// QueryPlaceholder is a temporary placeholder to replace with the Oracle's placeholders.
QueryPlaceholder = ":{placeholder}"
)
Variables ¶
This section is empty.
Functions ¶
func FormatData ¶
func FormatData( columnTypes map[string]ColumnDescription, key string, value any, ) (string, any, error)
FormatData formats the data into Oracle types and wraps the placeholder in a special function, if necessary.
func GetColumnTypes ¶
func GetColumnTypes( ctx context.Context, repo *repository.Oracle, tableName string, ) (map[string]ColumnDescription, error)
GetColumnTypes returns a map containing all table's columns and their database data.
func TransformRow ¶
func TransformRow(row map[string]any, columnTypes map[string]ColumnDescription) (map[string]any, error)
TransformRow converts row map values to appropriate Go types, based on the columnTypes.
Types ¶
type ColumnDescription ¶
ColumnDescription describes columns.
Click to show internal directories.
Click to hide internal directories.