Documentation
¶
Overview ¶
Copyright (c) 2025 DaggerTech. All rights reserved. Use of this source code is governed by an MIT license that can be found in the LICENSE file. Package utils provides utility functions for converting values to SQL-compatible strings
Copyright (c) 2025 DaggerTech. All rights reserved. Use of this source code is governed by an MIT license that can be found in the LICENSE file. Package utils provides utility functions for working with pointers
Copyright (c) 2025 DaggerTech. All rights reserved. Use of this source code is governed by an MIT license that can be found in the LICENSE file. Package utils provides utility functions for time conversion between SQL and Go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeValue ¶
MakeValue converts a value to a SQL-compatible string representation Supports various types including bool, string, and time.Time Returns the SQL string and a boolean indicating success
@param value The value to convert @return A SQL-compatible string and a boolean indicating success
func Ptr ¶
func Ptr[T any](value T) *T
Ptr returns a pointer to the provided value This is a generic helper function that works with any type
@param value The value to create a pointer to @return A pointer to the provided value
func SQLToTime ¶
SQLToTime converts a SQL time string to a Go time.Time object Supports both " " and "T" as separators between date and time Returns a pointer to time.Time and a boolean indicating success
@param st The SQL time string to convert @return A pointer to the converted time.Time object, and a boolean indicating success
Types ¶
This section is empty.