Skip to content

bug: Bad formatting for time.Time named arg #206

Closed

Description

@candiduslynx

When trying to pass an sql.NamedArg{Name: "syncTime", Value: msg.SyncTime} to ExecContext I got

[INVALID_PARAMETER_MARKER_VALUE.INVALID_VALUE_FOR_DATA_TYPE] An invalid parameter mapping was provided: the value '2024-04-10 11:44:13.011238 +0000 UTC' for parameter 'syncTime' cannot be cast to TIMESTAMP because it is malformed.

I can bypass it by using dbsql.Parameter{Name: "syncTime", Type: dbsql.SqlTimestamp, Value: msg.SyncTime.Format(time.RFC3339Nano)}, however, IMO this should be done by the SDK in here:

param.Value = value.String()

via

param.Value = value.Format(time.RFC3339Nano)

Activity

  1. added a commit that references this issue on Apr 10, 2024
    7ac797b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions