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

Function timestampRowValue

backend/plugin/db/spanner/spanner_test.go:89–97  ·  view source on GitHub ↗

Helper function to create expected timestamp RowValue for tests

(rfc3339 string, accuracy int32)

Source from the content-addressed store, hash-verified

87
88// Helper function to create expected timestamp RowValue for tests
89func timestampRowValue(rfc3339 string, accuracy int32) *v1pb.RowValue {
90 t, _ := time.Parse(time.RFC3339Nano, rfc3339)
91 return &v1pb.RowValue{Kind: &v1pb.RowValue_TimestampValue{
92 TimestampValue: &v1pb.RowValue_Timestamp{
93 GoogleTimestamp: timestamppb.New(t),
94 Accuracy: accuracy,
95 },
96 }}
97}
98
99func TestConvertSpannerValue(t *testing.T) {
100 tests := []struct {

Callers 1

TestConvertSpannerValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected