{"modulePath":"github.com/matrixorigin/matrixone","version":"v1.2.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package util\n\n## Variables\n\n```go\nvar CompactPrimaryCol = compactPrimaryCol\n```\n\n```go\nvar CompactSingleIndexCol = compactSingleIndexCol\n```\n\n```go\nvar SerialWithCompacted = serialWithCompacted\n```\n\n```go\nvar SerialWithoutCompacted = serialWithoutCompacted\n```\n\n## Functions\n\n```go\nfunc AppendAnyToStringVector(proc *process.Process, val any, vec *vector.Vector) error\n```\n\n```go\nfunc BinaryToInt(b string) (uint64, error)\n```\n\n```go\nfunc BuildCompositeClusterByColumnName(s []string) string\n```\n\n```go\nfunc BuildIndexTableName(ctx context.Context, unique bool) (string, error)\n```\n\n```go\nfunc BuildMoColumnsFilter(curAccountId uint64) tree.Expr\n```\nBuild the filter condition AST expression for mo\\_columns, as follows: account\\_id = current\\_id or (account\\_id = 0 and attr\\_databse in mo\\_catalog and att\\_relname not in other tables)\n\n```go\nfunc BuildMoDataBaseFilter(curAccountId uint64) tree.Expr\n```\nBuild the filter condition AST expression for mo\\_database, as follows: account\\_id = cur\\_accountId or (account\\_id = 0 and datname in ('mo\\_catalog'))\n\n```go\nfunc BuildMoTablesFilter(curAccountId uint64) tree.Expr\n```\nBuild the filter condition AST expression for mo\\_tables, as follows: account\\_id = cur\\_account\\_id or (account\\_id = 0 and (relname in ('mo\\_tables','mo\\_database','mo\\_columns') or relkind = 'cluster'))\n\n```go\nfunc BuildSysMetricFilter(acctName string) tree.Expr\n```\n\n```go\nfunc BuildSysStatementInfoFilter(acctName string) tree.Expr\n```\n\n```go\nfunc BuildUniqueKeyBatch(vecs []*vector.Vector, attrs []string, parts []string, originTablePrimaryKey string, proc *process.Process, packers *PackerList) (*batch.Batch, int, error)\n```\nBuildUniqueKeyBatch used in test to validate serialWithCompacted(), compactSingleIndexCol() and compactPrimaryCol()\n\n```go\nfunc CopyBatch(bat *batch.Batch, proc *process.Process) (*batch.Batch, error)\n```\n\n```go\nfunc DbIsSystemDb(dbName string) bool\n```\n\n```go\nfunc DecodeBinaryString(s string) ([]byte, error)\n```\n\n```go\nfunc FillCompositeClusterByBatch(bat *batch.Batch, cbName string, proc *process.Process) error\n```\nbuild the clusterBy key's vector of the cluster table according to the composite column name, and append the result vector to batch cbName: column name of composite column\n\n```go\nfunc FillCompositeKeyBatch(bat *batch.Batch, ckeyName string, keyParts []string, proc *process.Process) error\n```\nbuild the vector of the composite key, and append the result vector to batch ckeyName: column name of composite column keyParts: parts of the composite column\n\n```go\nfunc GenVectorByVarValue(proc *process.Process, typ types.Type, val any) (*vector.Vector, error)\n```\n\n```go\nfunc GetClusterByColumnOrder(cbName, colName string) int\n```\n\n```go\nfunc GetClusterByFirstColumn(cbName string) string\n```\n\n```go\nfunc GetClusterTableAttributeName() string\n```\n\n```go\nfunc GetClusterTableAttributeType() *tree.T\n```\n\n```go\nfunc HexToInt(hex string) (uint64, error)\n```\n\n```go\nfunc InitPredefinedTables(tables []string)\n```\n\n```go\nfunc IsClusterTableAttribute(name string) bool\n```\n\n```go\nfunc IsValidNameForPartitionTable(name string) bool\n```\nIsValidNameForPartitionTable the name forms the partition table does not have the partitionDelimiter\n\n```go\nfunc JudgeIsCompositeClusterByColumn(s string) bool\n```\n\n```go\nfunc MakeNameOfPartitionTable(partitionName, tableName string) (bool, string)\n```\nMakeNameOfPartitionTable !!!NOTE!!! With assumption: the partition name and the table name does not have partitionDelimiter. partition table name format : %!%partition\\_name%!%table\\_name\n\n```go\nfunc ScoreBinaryToInt(s string) (uint64, error)\n```\n\n```go\nfunc SetAnyToStringVector(proc *process.Process, val any, vec *vector.Vector, idx int) error\n```\n\n```go\nfunc SetBytesToAnyVector(ctx context.Context, val string, row int,\n\tisNull bool, vec *vector.Vector, proc *process.Process) error\n```\n\n```go\nfunc SetInsertValue(proc *process.Process, numVal *tree.NumVal, vec *vector.Vector) (bool, error)\n```\n\n```go\nfunc SplitCompositeClusterByColumnName(s string) []string\n```\n\n```go\nfunc SplitNameOfPartitionTable(name string) (bool, string, string)\n```\nSplitNameOfPartitionTable splits the partition table name into partition name and origin table name\n\n```go\nfunc SplitTableAndColumn(name string) (string, string)\n```\n\n```go\nfunc TableIsClusterTable(tableType string) bool\n```\nTableIsClusterTable check the table type is cluster table\n\n```go\nfunc TableIsLoggingTable(dbName string, tableName string) bool\n```\n\n## Types\n\n```go\ntype PackerList struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (list *PackerList) Free()\n```\n\n","path":"github.com/matrixorigin/matrixone/pkg/sql/util","name":"util","synopsis":"","isRedistributable":true}
