Something went wrong. Try again.
the coolest token pot ever
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142package web
import "database/sql"
func sqlNullInt64(v int64) sql.NullInt64 { return sql.NullInt64{Int64: v, Valid: true} }
func sqlNullInt64Ptr(v *int64) sql.NullInt64 { if v == nil { return sql.NullInt64{} } return sql.NullInt64{Int64: *v, Valid: true}}
func nullStrWeb(s string) sql.NullString { if s == "" { return sql.NullString{} } return sql.NullString{String: s, Valid: true}}
func nullIntWeb(v int64) sql.NullInt64 { if v == 0 { return sql.NullInt64{} } return sql.NullInt64{Int64: v, Valid: true}}
// toInt64 unboxes the interface{} sqlc emits for SUM/COALESCE aggregates.func toInt64(v any) int64 { switch x := v.(type) { case int64: return x case int: return int64(x) case float64: return int64(x) case nil: return 0 } return 0}