writers

package
v0.0.0-...-7328aa0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutomapSqlalchemyModel

func AutomapSqlalchemyModel(db *gorm.DB, tableNames []string, schema string) map[string]TableInfo

GetTableInfo retrieves table information from the MySQL database

func DBEncodeHex

func DBEncodeHex(data interface{}, dbDialect string) interface{}

DBEncodeHex encodes data to a hex string or bytes depending on the database dialect

func ModelToDict

func ModelToDict(model interface{}) map[string]interface{}

func StringToTraceAddress

func StringToTraceAddress(traceAddressString string) []int

StringToTraceAddress converts a trace address string to a slice of integers

func StructToMap

func StructToMap(obj interface{}) map[string]interface{}

StructToMap converts a struct to a map[string]interface{} using reflection

func TraceAddressToString

func TraceAddressToString(traceAddress []int) string

TraceAddressToString converts a trace address to a string representation

Types

type ColumnInfo

type ColumnInfo struct {
	Name         string
	Type         string
	DefaultValue string
}

ColumnInfo represents information about a database column

type Config

type Config struct {
	AppName string
}

type TableInfo

type TableInfo struct {
	Name    string
	Columns []ColumnInfo
}

TableInfo represents information about a database table

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL