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

Function parseSQLTimestamp

backend/plugin/db/util/driverutil.go:82–87  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

80}
81
82func parseSQLTimestamp(value string) (time.Time, error) {
83 if strings.Contains(value, ".") {
84 return time.Parse("2006-01-02 15:04:05.999999999", value)
85 }
86 return time.Parse(time.DateTime, value)
87}
88
89func RowsToQueryResult(rows *sql.Rows, valueMaker func(string, *sql.ColumnType) any, rowValueConverter func(string, *sql.ColumnType, any) *v1pb.RowValue, limit int64) (*v1pb.QueryResult, error) {
90 columnNames, err := rows.Columns()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected