fix: handle encoded POC set values
测试构建 / 代码检查 (push) Canceled after 0s
测试构建 / 单元测试和构建 (push) Canceled after 0s
测试构建 / 构建验证 (push) Canceled after 0s

This commit is contained in:
ZacharyZcR
2026-09-01 15:09:00 +08:00
parent 75f4265098
commit b73c707a3b
5 changed files with 110 additions and 15 deletions
+10
View File
@@ -21,6 +21,10 @@ func registerMiscDeclarations() []*exprpb.Decl {
decls.NewOverload("tongda_date",
[]*exprpb.Type{},
decls.String)),
decls.NewFunction("timestamp_second",
decls.NewOverload("timestamp_second_zero",
[]*exprpb.Type{},
decls.Int)),
}
}
@@ -47,5 +51,11 @@ func registerMiscImplementations() []*functions.Overload {
return types.String(time.Now().Format("0601"))
},
},
{
Operator: "timestamp_second_zero",
Function: func(value ...ref.Val) ref.Val {
return types.Int(time.Now().Unix())
},
},
}
}