{"modulePath":"github.com/objectundefined/cockroach","version":"v0.0.0-20160624191317-5695764788c5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package parser\n\n## Constants\n\n```go\nconst (\n\tDistinct funcType\n\tAll\n)\n```\nFuncExpr.Type\n\n```go\nconst ACTION = 57358\n```\n\n```go\nconst ADD = 57359\n```\n\n```go\nconst ALL = 57360\n```\n\n```go\nconst ALTER = 57361\n```\n\n```go\nconst ANALYSE = 57362\n```\n\n```go\nconst ANALYZE = 57363\n```\n\n```go\nconst AND = 57364\n```\n\n```go\nconst ANY = 57365\n```\n\n```go\nconst ARRAY = 57366\n```\n\n```go\nconst AS = 57367\n```\n\n```go\nconst ASC = 57368\n```\n\n```go\nconst ASYMMETRIC = 57369\n```\n\n```go\nconst AS_LA = 57610\n```\n\n```go\nconst AT = 57370\n```\n\n```go\nconst BCONST = 57348\n```\n\n```go\nconst BEGIN = 57371\n```\n\n```go\nconst BETWEEN = 57372\n```\n\n```go\nconst BIGINT = 57373\n```\n\n```go\nconst BIGSERIAL = 57374\n```\n\n```go\nconst BIT = 57375\n```\n\n```go\nconst BLOB = 57376\n```\n\n```go\nconst BOOL = 57377\n```\n\n```go\nconst BOOLEAN = 57378\n```\n\n```go\nconst BOTH = 57379\n```\n\n```go\nconst BY = 57380\n```\n\n```go\nconst BYTEA = 57381\n```\n\n```go\nconst BYTES = 57382\n```\n\n```go\nconst CASCADE = 57383\n```\n\n```go\nconst CASE = 57384\n```\n\n```go\nconst CAST = 57385\n```\n\n```go\nconst CHAR = 57386\n```\n\n```go\nconst CHARACTER = 57387\n```\n\n```go\nconst CHARACTERISTICS = 57388\n```\n\n```go\nconst CHECK = 57389\n```\n\n```go\nconst COALESCE = 57390\n```\n\n```go\nconst COLLATE = 57391\n```\n\n```go\nconst COLLATION = 57392\n```\n\n```go\nconst COLUMN = 57393\n```\n\n```go\nconst COLUMNS = 57394\n```\n\n```go\nconst COMMIT = 57395\n```\n\n```go\nconst COMMITTED = 57396\n```\n\n```go\nconst CONCAT = 57397\n```\n\n```go\nconst CONFLICT = 57398\n```\n\n```go\nconst CONSTRAINT = 57399\n```\n\n```go\nconst COVERING = 57400\n```\n\n```go\nconst CREATE = 57401\n```\n\n```go\nconst CROSS = 57402\n```\n\n```go\nconst CUBE = 57403\n```\n\n```go\nconst CURRENT = 57404\n```\n\n```go\nconst CURRENT_CATALOG = 57405\n```\n\n```go\nconst CURRENT_DATE = 57406\n```\n\n```go\nconst CURRENT_ROLE = 57407\n```\n\n```go\nconst CURRENT_TIME = 57408\n```\n\n```go\nconst CURRENT_TIMESTAMP = 57409\n```\n\n```go\nconst CURRENT_USER = 57410\n```\n\n```go\nconst CYCLE = 57411\n```\n\n```go\nconst DATA = 57412\n```\n\n```go\nconst DATABASE = 57413\n```\n\n```go\nconst DATABASES = 57414\n```\n\n```go\nconst DATE = 57415\n```\n\n```go\nconst DAY = 57416\n```\n\n```go\nconst DEALLOCATE = 57420\n```\n\n```go\nconst DEC = 57417\n```\n\n```go\nconst DECIMAL = 57418\n```\n\n```go\nconst DEFAULT = 57419\n```\n\n```go\nconst DEFERRABLE = 57421\n```\n\n```go\nconst DELETE = 57422\n```\n\n```go\nconst DESC = 57423\n```\n\n```go\nconst DISTINCT = 57424\n```\n\n```go\nconst DO = 57425\n```\n\n```go\nconst DOT_DOT = 57353\n```\n\n```go\nconst DOUBLE = 57426\n```\n\n```go\nconst DROP = 57427\n```\n\n```go\nconst ELSE = 57428\n```\n\n```go\nconst ENCODING = 57429\n```\n\n```go\nconst END = 57430\n```\n\n```go\nconst ERROR = 57357\n```\n\n```go\nconst ESCAPE = 57431\n```\n\n```go\nconst EXCEPT = 57432\n```\n\n```go\nconst EXECUTE = 57434\n```\n\n```go\nconst EXISTS = 57433\n```\n\n```go\nconst EXPLAIN = 57435\n```\n\n```go\nconst EXTRACT = 57436\n```\n\n```go\nconst FALSE = 57437\n```\n\n```go\nconst FAMILY = 57438\n```\n\n```go\nconst FCONST = 57350\n```\n\n```go\nconst FETCH = 57439\n```\n\n```go\nconst FILTER = 57440\n```\n\n```go\nconst FIRST = 57441\n```\n\n```go\nconst FLOAT = 57442\n```\n\n```go\nconst FLOORDIV = 57443\n```\n\n```go\nconst FOLLOWING = 57444\n```\n\n```go\nconst FOR = 57445\n```\n\n```go\nconst FORCE_INDEX = 57446\n```\n\n```go\nconst FOREIGN = 57447\n```\n\n```go\nconst FROM = 57448\n```\n\n```go\nconst FULL = 57449\n```\n\n```go\nconst GRANT = 57450\n```\n\n```go\nconst GRANTS = 57451\n```\n\n```go\nconst GREATER_EQUALS = 57355\n```\n\n```go\nconst GREATEST = 57452\n```\n\n```go\nconst GROUP = 57453\n```\n\n```go\nconst GROUPING = 57454\n```\n\n```go\nconst HAVING = 57455\n```\n\n```go\nconst HIGH = 57456\n```\n\n```go\nconst HOUR = 57457\n```\n\n```go\nconst ICONST = 57349\n```\n\n```go\nconst IDENT = 57346\n```\n\n```go\nconst IF = 57458\n```\n\n```go\nconst IFNULL = 57459\n```\n\n```go\nconst IN = 57460\n```\n\n```go\nconst INDEX = 57461\n```\n\n```go\nconst INDEXES = 57462\n```\n\n```go\nconst INITIALLY = 57463\n```\n\n```go\nconst INNER = 57464\n```\n\n```go\nconst INSERT = 57465\n```\n\n```go\nconst INT = 57466\n```\n\n```go\nconst INT64 = 57467\n```\n\n```go\nconst INTEGER = 57468\n```\n\n```go\nconst INTERSECT = 57469\n```\n\n```go\nconst INTERVAL = 57470\n```\n\n```go\nconst INTO = 57471\n```\n\n```go\nconst IS = 57472\n```\n\n```go\nconst ISOLATION = 57473\n```\n\n```go\nconst JOIN = 57474\n```\n\n```go\nconst KEY = 57475\n```\n\n```go\nconst KEYS = 57476\n```\n\n```go\nconst LATERAL = 57477\n```\n\n```go\nconst LEADING = 57478\n```\n\n```go\nconst LEAST = 57479\n```\n\n```go\nconst LEFT = 57480\n```\n\n```go\nconst LESS_EQUALS = 57354\n```\n\n```go\nconst LEVEL = 57481\n```\n\n```go\nconst LIKE = 57482\n```\n\n```go\nconst LIMIT = 57483\n```\n\n```go\nconst LOCAL = 57484\n```\n\n```go\nconst LOCALTIME = 57485\n```\n\n```go\nconst LOCALTIMESTAMP = 57486\n```\n\n```go\nconst LOW = 57487\n```\n\n```go\nconst LSHIFT = 57488\n```\n\n```go\nconst MATCH = 57489\n```\n\n```go\nconst MINUTE = 57490\n```\n\n```go\nconst MONTH = 57491\n```\n\n```go\nconst NAME = 57492\n```\n\n```go\nconst NAMES = 57493\n```\n\n```go\nconst NATURAL = 57494\n```\n\n```go\nconst NEXT = 57495\n```\n\n```go\nconst NO = 57496\n```\n\n```go\nconst NORMAL = 57498\n```\n\n```go\nconst NOT = 57499\n```\n\n```go\nconst NOTHING = 57500\n```\n\n```go\nconst NOT_EQUALS = 57356\n```\n\n```go\nconst NOT_LA = 57608\n```\n\n```go\nconst NO_INDEX_JOIN = 57497\n```\n\n```go\nconst NULL = 57501\n```\n\n```go\nconst NULLIF = 57502\n```\n\n```go\nconst NULLS = 57503\n```\n\n```go\nconst NUMERIC = 57504\n```\n\n```go\nconst OF = 57505\n```\n\n```go\nconst OFF = 57506\n```\n\n```go\nconst OFFSET = 57507\n```\n\n```go\nconst ON = 57508\n```\n\n```go\nconst ONLY = 57509\n```\n\n```go\nconst OR = 57510\n```\n\n```go\nconst ORDER = 57511\n```\n\n```go\nconst ORDINALITY = 57512\n```\n\n```go\nconst OUT = 57513\n```\n\n```go\nconst OUTER = 57514\n```\n\n```go\nconst OVER = 57515\n```\n\n```go\nconst OVERLAPS = 57516\n```\n\n```go\nconst OVERLAY = 57517\n```\n\n```go\nconst PARTIAL = 57518\n```\n\n```go\nconst PARTITION = 57519\n```\n\n```go\nconst PLACEHOLDER = 57351\n```\n\n```go\nconst PLACING = 57520\n```\n\n```go\nconst POSITION = 57521\n```\n\n```go\nconst POSTFIXOP = 57611\n```\n\n```go\nconst PRECEDING = 57522\n```\n\n```go\nconst PRECISION = 57523\n```\n\n```go\nconst PREPARE = 57524\n```\n\n```go\nconst PRIMARY = 57525\n```\n\n```go\nconst PRIORITY = 57526\n```\n\n```go\nconst RANGE = 57527\n```\n\n```go\nconst READ = 57528\n```\n\n```go\nconst REAL = 57529\n```\n\n```go\nconst RECURSIVE = 57530\n```\n\n```go\nconst REF = 57531\n```\n\n```go\nconst REFERENCES = 57532\n```\n\n```go\nconst RELEASE = 57535\n```\n\n```go\nconst RENAME = 57533\n```\n\n```go\nconst REPEATABLE = 57534\n```\n\n```go\nconst RESTRICT = 57536\n```\n\n```go\nconst RETURNING = 57537\n```\n\n```go\nconst REVOKE = 57538\n```\n\n```go\nconst RIGHT = 57539\n```\n\n```go\nconst ROLLBACK = 57540\n```\n\n```go\nconst ROLLUP = 57541\n```\n\n```go\nconst ROW = 57542\n```\n\n```go\nconst ROWS = 57543\n```\n\n```go\nconst RSHIFT = 57544\n```\n\n```go\nconst RestartSavepointName string = \"COCKROACH_RESTART\"\n```\nRestartSavepointName is the only savepoint name that we accept, modulo capitalization.\n\n```go\nconst SAVEPOINT = 57545\n```\n\n```go\nconst SCONST = 57347\n```\n\n```go\nconst SEARCH = 57546\n```\n\n```go\nconst SECOND = 57547\n```\n\n```go\nconst SELECT = 57548\n```\n\n```go\nconst SERIAL = 57549\n```\n\n```go\nconst SERIALIZABLE = 57550\n```\n\n```go\nconst SESSION = 57551\n```\n\n```go\nconst SESSION_USER = 57552\n```\n\n```go\nconst SET = 57553\n```\n\n```go\nconst SHOW = 57554\n```\n\n```go\nconst SIMILAR = 57555\n```\n\n```go\nconst SIMPLE = 57556\n```\n\n```go\nconst SMALLINT = 57557\n```\n\n```go\nconst SMALLSERIAL = 57558\n```\n\n```go\nconst SNAPSHOT = 57559\n```\n\n```go\nconst SOME = 57560\n```\n\n```go\nconst SQL = 57561\n```\n\n```go\nconst START = 57562\n```\n\n```go\nconst STORING = 57565\n```\n\n```go\nconst STRICT = 57563\n```\n\n```go\nconst STRING = 57564\n```\n\n```go\nconst SUBSTRING = 57566\n```\n\n```go\nconst SYMMETRIC = 57567\n```\n\n```go\nconst SYSTEM = 57568\n```\n\n```go\nconst TABLE = 57569\n```\n\n```go\nconst TABLES = 57570\n```\n\n```go\nconst TEXT = 57571\n```\n\n```go\nconst THEN = 57572\n```\n\n```go\nconst TIME = 57573\n```\n\n```go\nconst TIMESTAMP = 57574\n```\n\n```go\nconst TIMESTAMPTZ = 57575\n```\n\n```go\nconst TO = 57576\n```\n\n```go\nconst TRAILING = 57577\n```\n\n```go\nconst TRANSACTION = 57578\n```\n\n```go\nconst TREAT = 57579\n```\n\n```go\nconst TRIM = 57580\n```\n\n```go\nconst TRUE = 57581\n```\n\n```go\nconst TRUNCATE = 57582\n```\n\n```go\nconst TYPE = 57583\n```\n\n```go\nconst TYPECAST = 57352\n```\n\n```go\nconst UMINUS = 57612\n```\n\n```go\nconst UNBOUNDED = 57584\n```\n\n```go\nconst UNCOMMITTED = 57585\n```\n\n```go\nconst UNION = 57586\n```\n\n```go\nconst UNIQUE = 57587\n```\n\n```go\nconst UNKNOWN = 57588\n```\n\n```go\nconst UPDATE = 57589\n```\n\n```go\nconst UPSERT = 57590\n```\n\n```go\nconst USER = 57591\n```\n\n```go\nconst USING = 57592\n```\n\n```go\nconst VALID = 57593\n```\n\n```go\nconst VALIDATE = 57594\n```\n\n```go\nconst VALUE = 57595\n```\n\n```go\nconst VALUES = 57596\n```\n\n```go\nconst VARCHAR = 57597\n```\n\n```go\nconst VARIADIC = 57598\n```\n\n```go\nconst VARYING = 57599\n```\n\n```go\nconst WHEN = 57600\n```\n\n```go\nconst WHERE = 57601\n```\n\n```go\nconst WINDOW = 57602\n```\n\n```go\nconst WITH = 57603\n```\n\n```go\nconst WITHIN = 57604\n```\n\n```go\nconst WITHOUT = 57605\n```\n\n```go\nconst WITH_LA = 57609\n```\n\n```go\nconst YEAR = 57606\n```\n\n```go\nconst ZONE = 57607\n```\n\n## Variables\n\n```go\nvar (\n\n\t// DBoolTrue is a pointer to the DBool(true) value and can be used in\n\t// comparisons against Datum types.\n\tDBoolTrue = \u0026constDBoolTrue\n\t// DBoolFalse is a pointer to the DBool(false) value and can be used in\n\t// comparisons against Datum types.\n\tDBoolFalse = \u0026constDBoolFalse\n\n\t// DNull is the NULL Datum.\n\tDNull Datum = dNull{}\n)\n```\n\n```go\nvar Aggregates = map[string][]Builtin{\n\t\"avg\": {\n\t\tmakeAggBuiltin(TypeInt, TypeDecimal, newAvgAggregate),\n\t\tmakeAggBuiltin(TypeFloat, TypeFloat, newAvgAggregate),\n\t\tmakeAggBuiltin(TypeDecimal, TypeDecimal, newAvgAggregate),\n\t},\n\n\t\"bool_and\": {\n\t\tmakeAggBuiltin(TypeBool, TypeBool, newBoolAndAggregate),\n\t},\n\n\t\"bool_or\": {\n\t\tmakeAggBuiltin(TypeBool, TypeBool, newBoolOrAggregate),\n\t},\n\n\t\"count\": countImpls(),\n\n\t\"max\": makeAggBuiltins(newMaxAggregate, TypeBool, TypeInt, TypeFloat, TypeDecimal, TypeString, TypeBytes, TypeDate, TypeTimestamp, TypeInterval),\n\t\"min\": makeAggBuiltins(newMinAggregate, TypeBool, TypeInt, TypeFloat, TypeDecimal, TypeString, TypeBytes, TypeDate, TypeTimestamp, TypeInterval),\n\n\t\"sum\": {\n\t\tmakeAggBuiltin(TypeInt, TypeDecimal, newSumAggregate),\n\t\tmakeAggBuiltin(TypeFloat, TypeFloat, newSumAggregate),\n\t\tmakeAggBuiltin(TypeDecimal, TypeDecimal, newSumAggregate),\n\t},\n\n\t\"variance\": {\n\t\tmakeAggBuiltin(TypeInt, TypeDecimal, newVarianceAggregate),\n\t\tmakeAggBuiltin(TypeDecimal, TypeDecimal, newVarianceAggregate),\n\t\tmakeAggBuiltin(TypeFloat, TypeFloat, newVarianceAggregate),\n\t},\n\n\t\"stddev\": {\n\t\tmakeAggBuiltin(TypeInt, TypeDecimal, newStddevAggregate),\n\t\tmakeAggBuiltin(TypeDecimal, TypeDecimal, newStddevAggregate),\n\t\tmakeAggBuiltin(TypeFloat, TypeFloat, newStddevAggregate),\n\t},\n}\n```\nAggregates are a special class of builtin functions that are wrapped at execution in a bucketing layer to combine (aggregate) the result of the function being run over many rows. See \\`aggregateFuncHolder\\` in the sql In particular they must not be simplified during normalization (and thus must be marked as impure), even when they are given a constant argument (e.g. SUM(1)). This is because aggregate functions must return NULL when they are no rows in the source table, so their evaluation must always be delayed until query execution.\n\n```go\nvar BinOps = map[BinaryOperator]binOpOverload{\n\tBitand: {\n\t\tBinOp{\n\t\t\tLeftType:   TypeInt,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tBitor: {\n\t\tBinOp{\n\t\t\tLeftType:   TypeInt,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tBitxor: {\n\t\tBinOp{\n\t\t\tLeftType:   TypeInt,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tPlus: {\n\t\tBinOp{\n\t\t\tLeftType:   TypeInt,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeFloat,\n\t\t\tRightType:  TypeFloat,\n\t\t\tReturnType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeDecimal,\n\t\t\tRightType:  TypeDecimal,\n\t\t\tReturnType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeDate,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeDate,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeInt,\n\t\t\tRightType:  TypeDate,\n\t\t\tReturnType: TypeDate,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeTimestamp,\n\t\t\tRightType:  TypeInterval,\n\t\t\tReturnType: TypeTimestamp,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeInterval,\n\t\t\tRightType:  TypeTimestamp,\n\t\t\tReturnType: TypeTimestamp,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeTimestampTZ,\n\t\t\tRightType:  TypeInterval,\n\t\t\tReturnType: TypeTimestampTZ,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeInterval,\n\t\t\tRightType:  TypeTimestampTZ,\n\t\t\tReturnType: TypeTimestampTZ,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeInterval,\n\t\t\tRightType:  TypeInterval,\n\t\t\tReturnType: TypeInterval,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tMinus: {\n\t\tBinOp{\n\t\t\tLeftType:   TypeInt,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeFloat,\n\t\t\tRightType:  TypeFloat,\n\t\t\tReturnType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeDecimal,\n\t\t\tRightType:  TypeDecimal,\n\t\t\tReturnType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeDate,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeDate,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeDate,\n\t\t\tRightType:  TypeDate,\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeTimestamp,\n\t\t\tRightType:  TypeTimestamp,\n\t\t\tReturnType: TypeInterval,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeTimestampTZ,\n\t\t\tRightType:  TypeTimestampTZ,\n\t\t\tReturnType: TypeInterval,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeTimestamp,\n\t\t\tRightType:  TypeInterval,\n\t\t\tReturnType: TypeTimestamp,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeTimestampTZ,\n\t\t\tRightType:  TypeInterval,\n\t\t\tReturnType: TypeTimestampTZ,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeInterval,\n\t\t\tRightType:  TypeInterval,\n\t\t\tReturnType: TypeInterval,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tMult: {\n\t\tBinOp{\n\t\t\tLeftType:   TypeInt,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeFloat,\n\t\t\tRightType:  TypeFloat,\n\t\t\tReturnType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\n\t\tBinOp{\n\t\t\tLeftType:   TypeDecimal,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeInt,\n\t\t\tRightType:  TypeDecimal,\n\t\t\tReturnType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeDecimal,\n\t\t\tRightType:  TypeDecimal,\n\t\t\tReturnType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeInt,\n\t\t\tRightType:  TypeInterval,\n\t\t\tReturnType: TypeInterval,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeInterval,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeInterval,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tDiv: {\n\t\tBinOp{\n\t\t\tLeftType:   TypeInt,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeFloat,\n\t\t\tRightType:  TypeFloat,\n\t\t\tReturnType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeDecimal,\n\t\t\tRightType:  TypeDecimal,\n\t\t\tReturnType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeInterval,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeInterval,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tFloorDiv: {\n\t\tBinOp{\n\t\t\tLeftType:   TypeInt,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeFloat,\n\t\t\tRightType:  TypeFloat,\n\t\t\tReturnType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeDecimal,\n\t\t\tRightType:  TypeDecimal,\n\t\t\tReturnType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tMod: {\n\t\tBinOp{\n\t\t\tLeftType:   TypeInt,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeFloat,\n\t\t\tRightType:  TypeFloat,\n\t\t\tReturnType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeDecimal,\n\t\t\tRightType:  TypeDecimal,\n\t\t\tReturnType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tConcat: {\n\t\tBinOp{\n\t\t\tLeftType:   TypeString,\n\t\t\tRightType:  TypeString,\n\t\t\tReturnType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBinOp{\n\t\t\tLeftType:   TypeBytes,\n\t\t\tRightType:  TypeBytes,\n\t\t\tReturnType: TypeBytes,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tLShift: {\n\t\tBinOp{\n\t\t\tLeftType:   TypeInt,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tRShift: {\n\t\tBinOp{\n\t\t\tLeftType:   TypeInt,\n\t\t\tRightType:  TypeInt,\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n}\n```\nBinOps contains the binary operations indexed by operation type.\n\n```go\nvar Builtins = map[string][]Builtin{\n\n\t\"length\": {\n\t\tstringBuiltin1(func(s string) (Datum, error) {\n\t\t\treturn NewDInt(DInt(utf8.RuneCountInString(s))), nil\n\t\t}, TypeInt),\n\t\tbytesBuiltin1(func(s string) (Datum, error) {\n\t\t\treturn NewDInt(DInt(len(s))), nil\n\t\t}, TypeInt),\n\t},\n\n\t\"octet_length\": {\n\t\tstringBuiltin1(func(s string) (Datum, error) {\n\t\t\treturn NewDInt(DInt(len(s))), nil\n\t\t}, TypeInt),\n\t\tbytesBuiltin1(func(s string) (Datum, error) {\n\t\t\treturn NewDInt(DInt(len(s))), nil\n\t\t}, TypeInt),\n\t},\n\n\t\"lower\": {stringBuiltin1(func(s string) (Datum, error) {\n\t\treturn NewDString(strings.ToLower(s)), nil\n\t}, TypeString)},\n\n\t\"upper\": {stringBuiltin1(func(s string) (Datum, error) {\n\t\treturn NewDString(strings.ToUpper(s)), nil\n\t}, TypeString)},\n\n\t\"substr\":    substringImpls,\n\t\"substring\": substringImpls,\n\n\t\"concat\": {\n\t\tBuiltin{\n\t\t\tTypes:      VariadicType{TypeString},\n\t\t\tReturnType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"concat_ws\": {\n\t\tBuiltin{\n\t\t\tTypes:      VariadicType{TypeString},\n\t\t\tReturnType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"split_part\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeString, TypeString, TypeInt},\n\t\t\tReturnType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"repeat\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeString, TypeInt},\n\t\t\tReturnType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"ascii\": {stringBuiltin1(func(s string) (Datum, error) {\n\t\tfor _, ch := range s {\n\t\t\treturn NewDInt(DInt(ch)), nil\n\t\t}\n\t\treturn nil, errEmptyInputString\n\t}, TypeInt)},\n\n\t\"md5\": {stringBuiltin1(func(s string) (Datum, error) {\n\t\treturn NewDString(fmt.Sprintf(\"%x\", md5.Sum([]byte(s)))), nil\n\t}, TypeString)},\n\n\t\"sha1\": {stringBuiltin1(func(s string) (Datum, error) {\n\t\treturn NewDString(fmt.Sprintf(\"%x\", sha1.Sum([]byte(s)))), nil\n\t}, TypeString)},\n\n\t\"sha256\": {stringBuiltin1(func(s string) (Datum, error) {\n\t\treturn NewDString(fmt.Sprintf(\"%x\", sha256.Sum256([]byte(s)))), nil\n\t}, TypeString)},\n\n\t\"to_hex\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeInt},\n\t\t\tReturnType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"strpos\": {stringBuiltin2(func(s, substring string) (Datum, error) {\n\t\tindex := strings.Index(s, substring)\n\t\tif index \u003c 0 {\n\t\t\treturn NewDInt(0), nil\n\t\t}\n\n\t\treturn NewDInt(DInt(utf8.RuneCountInString(s[:index]) + 1)), nil\n\t}, TypeInt)},\n\n\t\"overlay\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeString, TypeString, TypeInt},\n\t\t\tReturnType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeString, TypeString, TypeInt, TypeInt},\n\t\t\tReturnType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"btrim\": {\n\t\tstringBuiltin2(func(s, chars string) (Datum, error) {\n\t\t\treturn NewDString(strings.Trim(s, chars)), nil\n\t\t}, TypeString),\n\t\tstringBuiltin1(func(s string) (Datum, error) {\n\t\t\treturn NewDString(strings.TrimSpace(s)), nil\n\t\t}, TypeString),\n\t},\n\n\t\"ltrim\": {\n\t\tstringBuiltin2(func(s, chars string) (Datum, error) {\n\t\t\treturn NewDString(strings.TrimLeft(s, chars)), nil\n\t\t}, TypeString),\n\t\tstringBuiltin1(func(s string) (Datum, error) {\n\t\t\treturn NewDString(strings.TrimLeftFunc(s, unicode.IsSpace)), nil\n\t\t}, TypeString),\n\t},\n\n\t\"rtrim\": {\n\t\tstringBuiltin2(func(s, chars string) (Datum, error) {\n\t\t\treturn NewDString(strings.TrimRight(s, chars)), nil\n\t\t}, TypeString),\n\t\tstringBuiltin1(func(s string) (Datum, error) {\n\t\t\treturn NewDString(strings.TrimRightFunc(s, unicode.IsSpace)), nil\n\t\t}, TypeString),\n\t},\n\n\t\"reverse\": {stringBuiltin1(func(s string) (Datum, error) {\n\t\trunes := []rune(s)\n\t\tfor i, j := 0, len(runes)-1; i \u003c j; i, j = i+1, j-1 {\n\t\t\trunes[i], runes[j] = runes[j], runes[i]\n\t\t}\n\t\treturn NewDString(string(runes)), nil\n\t}, TypeString)},\n\n\t\"replace\": {stringBuiltin3(func(s, from, to string) (Datum, error) {\n\t\treturn NewDString(strings.Replace(s, from, to, -1)), nil\n\t}, TypeString)},\n\n\t\"translate\": {stringBuiltin3(func(s, from, to string) (Datum, error) {\n\t\tconst deletionRune = utf8.MaxRune + 1\n\t\ttranslation := make(map[rune]rune, len(from))\n\t\tfor _, fromRune := range from {\n\t\t\ttoRune, size := utf8.DecodeRuneInString(to)\n\t\t\tif toRune == utf8.RuneError {\n\t\t\t\ttoRune = deletionRune\n\t\t\t} else {\n\t\t\t\tto = to[size:]\n\t\t\t}\n\t\t\ttranslation[fromRune] = toRune\n\t\t}\n\n\t\trunes := make([]rune, 0, len(s))\n\t\tfor _, c := range s {\n\t\t\tif t, ok := translation[c]; ok {\n\t\t\t\tif t != deletionRune {\n\t\t\t\t\trunes = append(runes, t)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\trunes = append(runes, c)\n\t\t\t}\n\t\t}\n\t\treturn NewDString(string(runes)), nil\n\t}, TypeString)},\n\n\t\"regexp_extract\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeString, TypeString},\n\t\t\tReturnType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"regexp_replace\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeString, TypeString, TypeString},\n\t\t\tReturnType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeString, TypeString, TypeString, TypeString},\n\t\t\tReturnType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"initcap\": {stringBuiltin1(func(s string) (Datum, error) {\n\t\treturn NewDString(strings.Title(strings.ToLower(s))), nil\n\t}, TypeString)},\n\n\t\"left\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeBytes, TypeInt},\n\t\t\tReturnType: TypeBytes,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeString, TypeInt},\n\t\t\tReturnType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"right\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeBytes, TypeInt},\n\t\t\tReturnType: TypeBytes,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeString, TypeInt},\n\t\t\tReturnType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"random\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{},\n\t\t\tReturnType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"experimental_unique_bytes\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{},\n\t\t\tReturnType: TypeBytes,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"unique_rowid\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{},\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"experimental_uuid_v4\": {uuidV4Impl},\n\t\"uuid_v4\":              {uuidV4Impl},\n\n\t\"greatest\": {\n\t\tBuiltin{\n\t\t\tTypes:      AnyType{},\n\t\t\tReturnType: nil,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"least\": {\n\t\tBuiltin{\n\t\t\tTypes:      AnyType{},\n\t\t\tReturnType: nil,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"age\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeTimestamp},\n\t\t\tReturnType: TypeInterval,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeTimestamp, TypeTimestamp},\n\t\t\tReturnType: TypeInterval,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"current_date\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{},\n\t\t\tReturnType: TypeDate,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"now\":                   {txnTSImpl},\n\t\"current_timestamp\":     {txnTSImpl},\n\t\"transaction_timestamp\": {txnTSImpl},\n\n\t\"statement_timestamp\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{},\n\t\t\tReturnType: TypeTimestamp,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"cluster_logical_timestamp\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{},\n\t\t\tReturnType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"clock_timestamp\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{},\n\t\t\tReturnType: TypeTimestamp,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"extract\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeString, TypeTimestamp},\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"parse_timestamp_ns\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeString},\n\t\t\tReturnType: TypeTimestamp,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"format_timestamp_ns\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeTimestamp},\n\t\t\tReturnType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"current_timestamp_ns\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{},\n\t\t\tReturnType: TypeTimestamp,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"abs\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Abs(x))), nil\n\t\t}),\n\t\tdecimalBuiltin1(func(x *inf.Dec) (Datum, error) {\n\t\t\tdd := \u0026DDecimal{}\n\t\t\tdd.Abs(x)\n\t\t\treturn dd, nil\n\t\t}),\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeInt},\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"acos\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Acos(x))), nil\n\t\t}),\n\t},\n\n\t\"asin\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Asin(x))), nil\n\t\t}),\n\t},\n\n\t\"atan\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Atan(x))), nil\n\t\t}),\n\t},\n\n\t\"atan2\": {\n\t\tfloatBuiltin2(func(x, y float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Atan2(x, y))), nil\n\t\t}),\n\t},\n\n\t\"cbrt\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Cbrt(x))), nil\n\t\t}),\n\t\tdecimalBuiltin1(func(x *inf.Dec) (Datum, error) {\n\t\t\tdd := \u0026DDecimal{}\n\t\t\tdecimal.Cbrt(\u0026dd.Dec, x, decimal.Precision)\n\t\t\treturn dd, nil\n\t\t}),\n\t},\n\n\t\"ceil\":    ceilImpl,\n\t\"ceiling\": ceilImpl,\n\n\t\"cos\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Cos(x))), nil\n\t\t}),\n\t},\n\n\t\"cot\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(1 / math.Tan(x))), nil\n\t\t}),\n\t},\n\n\t\"degrees\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(180.0 * x / math.Pi)), nil\n\t\t}),\n\t},\n\n\t\"div\": {\n\t\tfloatBuiltin2(func(x, y float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Trunc(x / y))), nil\n\t\t}),\n\t\tdecimalBuiltin2(func(x, y *inf.Dec) (Datum, error) {\n\t\t\tif y.Sign() == 0 {\n\t\t\t\treturn nil, errDivByZero\n\t\t\t}\n\t\t\tdd := \u0026DDecimal{}\n\t\t\tdd.QuoRound(x, y, 0, inf.RoundDown)\n\t\t\treturn dd, nil\n\t\t}),\n\t},\n\n\t\"exp\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Exp(x))), nil\n\t\t}),\n\t\tdecimalBuiltin1(func(x *inf.Dec) (Datum, error) {\n\t\t\tdd := \u0026DDecimal{}\n\t\t\tdecimal.Exp(\u0026dd.Dec, x, decimal.Precision)\n\t\t\treturn dd, nil\n\t\t}),\n\t},\n\n\t\"floor\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Floor(x))), nil\n\t\t}),\n\t\tdecimalBuiltin1(func(x *inf.Dec) (Datum, error) {\n\t\t\tdd := \u0026DDecimal{}\n\t\t\tdd.Round(x, 0, inf.RoundFloor)\n\t\t\treturn dd, nil\n\t\t}),\n\t},\n\n\t\"ln\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Log(x))), nil\n\t\t}),\n\t\tdecimalLogFn(decimal.Log),\n\t},\n\n\t\"log\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Log10(x))), nil\n\t\t}),\n\t\tdecimalLogFn(decimal.Log10),\n\t},\n\n\t\"mod\": {\n\t\tfloatBuiltin2(func(x, y float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Mod(x, y))), nil\n\t\t}),\n\t\tdecimalBuiltin2(func(x, y *inf.Dec) (Datum, error) {\n\t\t\tif y.Sign() == 0 {\n\t\t\t\treturn nil, errZeroModulus\n\t\t\t}\n\t\t\tdd := \u0026DDecimal{}\n\t\t\tdecimal.Mod(\u0026dd.Dec, x, y)\n\t\t\treturn dd, nil\n\t\t}),\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeInt, TypeInt},\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"pi\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{},\n\t\t\tReturnType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"pow\":   powImpls,\n\t\"power\": powImpls,\n\n\t\"radians\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(x * math.Pi / 180.0)), nil\n\t\t}),\n\t},\n\n\t\"round\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn round(x, 0)\n\t\t}),\n\t\tdecimalBuiltin1(func(x *inf.Dec) (Datum, error) {\n\t\t\tdd := \u0026DDecimal{}\n\t\t\tdd.Round(x, 0, inf.RoundHalfUp)\n\t\t\treturn dd, nil\n\t\t}),\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeFloat, TypeInt},\n\t\t\tReturnType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeDecimal, TypeInt},\n\t\t\tReturnType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"sin\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Sin(x))), nil\n\t\t}),\n\t},\n\n\t\"sign\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\tswitch {\n\t\t\tcase x \u003c 0:\n\t\t\t\treturn NewDFloat(-1), nil\n\t\t\tcase x == 0:\n\t\t\t\treturn NewDFloat(0), nil\n\t\t\t}\n\t\t\treturn NewDFloat(1), nil\n\t\t}),\n\t\tdecimalBuiltin1(func(x *inf.Dec) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(x.Sign())), nil\n\t\t}),\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{TypeInt},\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\t\"sqrt\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\tif x \u003c 0 {\n\t\t\t\treturn nil, errSqrtOfNegNumber\n\t\t\t}\n\t\t\treturn NewDFloat(DFloat(math.Sqrt(x))), nil\n\t\t}),\n\t\tdecimalBuiltin1(func(x *inf.Dec) (Datum, error) {\n\t\t\tif x.Sign() \u003c 0 {\n\t\t\t\treturn nil, errSqrtOfNegNumber\n\t\t\t}\n\t\t\tdd := \u0026DDecimal{}\n\t\t\tdecimal.Sqrt(\u0026dd.Dec, x, decimal.Precision)\n\t\t\treturn dd, nil\n\t\t}),\n\t},\n\n\t\"tan\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Tan(x))), nil\n\t\t}),\n\t},\n\n\t\"trunc\": {\n\t\tfloatBuiltin1(func(x float64) (Datum, error) {\n\t\t\treturn NewDFloat(DFloat(math.Trunc(x))), nil\n\t\t}),\n\t\tdecimalBuiltin1(func(x *inf.Dec) (Datum, error) {\n\t\t\tdd := \u0026DDecimal{}\n\t\t\tdd.Round(x, 0, inf.RoundDown)\n\t\t\treturn dd, nil\n\t\t}),\n\t},\n\t\"version\": {\n\t\tBuiltin{\n\t\t\tTypes:      ArgTypes{},\n\t\t\tReturnType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n}\n```\nBuiltins contains the built-in functions indexed by name.\n\n```go\nvar CmpOps = map[ComparisonOperator]cmpOpOverload{\n\tEQ: {\n\t\tCmpOp{\n\t\t\tLeftType:  TypeString,\n\t\t\tRightType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeBytes,\n\t\t\tRightType: TypeBytes,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeBool,\n\t\t\tRightType: TypeBool,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeInt,\n\t\t\tRightType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeFloat,\n\t\t\tRightType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeDecimal,\n\t\t\tRightType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeFloat,\n\t\t\tRightType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeInt,\n\t\t\tRightType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeDecimal,\n\t\t\tRightType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeInt,\n\t\t\tRightType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeDecimal,\n\t\t\tRightType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeFloat,\n\t\t\tRightType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeDate,\n\t\t\tRightType: TypeDate,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeTimestamp,\n\t\t\tRightType: TypeTimestamp,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeTimestampTZ,\n\t\t\tRightType: TypeTimestampTZ,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeInterval,\n\t\t\tRightType: TypeInterval,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeTuple,\n\t\t\tRightType: TypeTuple,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tLT: {\n\t\tCmpOp{\n\t\t\tLeftType:  TypeString,\n\t\t\tRightType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeBytes,\n\t\t\tRightType: TypeBytes,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeBool,\n\t\t\tRightType: TypeBool,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeInt,\n\t\t\tRightType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeFloat,\n\t\t\tRightType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeDecimal,\n\t\t\tRightType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeFloat,\n\t\t\tRightType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeInt,\n\t\t\tRightType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeDecimal,\n\t\t\tRightType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeInt,\n\t\t\tRightType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeDecimal,\n\t\t\tRightType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeFloat,\n\t\t\tRightType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeDate,\n\t\t\tRightType: TypeDate,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeTimestamp,\n\t\t\tRightType: TypeTimestamp,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeTimestampTZ,\n\t\t\tRightType: TypeTimestampTZ,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeInterval,\n\t\t\tRightType: TypeInterval,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeTuple,\n\t\t\tRightType: TypeTuple,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tLE: {\n\t\tCmpOp{\n\t\t\tLeftType:  TypeString,\n\t\t\tRightType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeBytes,\n\t\t\tRightType: TypeBytes,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeBool,\n\t\t\tRightType: TypeBool,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeInt,\n\t\t\tRightType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeFloat,\n\t\t\tRightType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeDecimal,\n\t\t\tRightType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeFloat,\n\t\t\tRightType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeInt,\n\t\t\tRightType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeDecimal,\n\t\t\tRightType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeInt,\n\t\t\tRightType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeDecimal,\n\t\t\tRightType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeFloat,\n\t\t\tRightType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeDate,\n\t\t\tRightType: TypeDate,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeTimestamp,\n\t\t\tRightType: TypeTimestamp,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeTimestampTZ,\n\t\t\tRightType: TypeTimestampTZ,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeInterval,\n\t\t\tRightType: TypeInterval,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tCmpOp{\n\t\t\tLeftType:  TypeTuple,\n\t\t\tRightType: TypeTuple,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tIn: {\n\t\tmakeEvalTupleIn(TypeBool),\n\t\tmakeEvalTupleIn(TypeInt),\n\t\tmakeEvalTupleIn(TypeFloat),\n\t\tmakeEvalTupleIn(TypeString),\n\t\tmakeEvalTupleIn(TypeBytes),\n\t\tmakeEvalTupleIn(TypeDate),\n\t\tmakeEvalTupleIn(TypeTimestamp),\n\t\tmakeEvalTupleIn(TypeTimestampTZ),\n\t\tmakeEvalTupleIn(TypeInterval),\n\t\tmakeEvalTupleIn(TypeTuple),\n\t},\n\n\tLike: {\n\t\tCmpOp{\n\t\t\tLeftType:  TypeString,\n\t\t\tRightType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tSimilarTo: {\n\t\tCmpOp{\n\t\t\tLeftType:  TypeString,\n\t\t\tRightType: TypeString,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n}\n```\nCmpOps contains the comparison operations indexed by operation type.\n\n```go\nvar NoTypePreference = Datum(nil)\n```\nNoTypePreference can be provided to TypeCheck's desired type parameter to indicate that the caller of the function has no preference on the type of the resulting TypedExpr.\n\n```go\nvar UnaryOps = map[UnaryOperator]unaryOpOverload{\n\tUnaryPlus: {\n\t\tUnaryOp{\n\t\t\tTyp:        TypeInt,\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tUnaryOp{\n\t\t\tTyp:        TypeFloat,\n\t\t\tReturnType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tUnaryOp{\n\t\t\tTyp:        TypeDecimal,\n\t\t\tReturnType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tUnaryMinus: {\n\t\tUnaryOp{\n\t\t\tTyp:        TypeInt,\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tUnaryOp{\n\t\t\tTyp:        TypeFloat,\n\t\t\tReturnType: TypeFloat,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t\tUnaryOp{\n\t\t\tTyp:        TypeDecimal,\n\t\t\tReturnType: TypeDecimal,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n\n\tUnaryComplement: {\n\t\tUnaryOp{\n\t\t\tTyp:        TypeInt,\n\t\t\tReturnType: TypeInt,\n\t\t\t// contains filtered or unexported fields\n\t\t},\n\t},\n}\n```\nUnaryOps contains the unary operations indexed by operation type.\n\n## Functions\n\n```go\nfunc AsString(n NodeFormatter) string\n```\nAsString pretty prints a node to a string.\n\n```go\nfunc AsStringWithFlags(n NodeFormatter, f FmtFlags) string\n```\nAsStringWithFlags pretty prints a node to a string given specific flags.\n\n```go\nfunc ContainsVars(expr Expr) bool\n```\nContainsVars returns true if the expression contains any variables.\n\n```go\nfunc FindEqualComparisonFunction(leftType, rightType Datum) (func(*EvalContext, Datum, Datum) (DBool, error), bool)\n```\nFindEqualComparisonFunction looks up an overload of the \"=\" operator for a given pair of input operand types.\n\n```go\nfunc FormatNode(buf *bytes.Buffer, f FmtFlags, n NodeFormatter)\n```\nFormatNode recurses into a node for pretty-printing. Flag-driven special cases can hook into this.\n\n```go\nfunc SimilarEscape(pattern string) string\n```\nSimilarEscape converts a SQL:2008 regexp pattern to POSIX style, so it can be used by our regexp engine.\n\n```go\nfunc ValidateRestartCheckpoint(savepoint string) error\n```\nValidateRestartCheckpoint checks that a checkpoint name is our magic restart value. We accept everything with the desired prefix because at least the C++ libpqxx appends sequence numbers to the savepoint name specified by the user.\n\n```go\nfunc WalkExprConst(v Visitor, expr Expr)\n```\nWalkExprConst is a variant of WalkExpr for visitors that do not modify the expression.\n\n## Types\n\n```go\ntype AggregateFunc interface {\n\tAdd(Datum) error\n\tResult() (Datum, error)\n}\n```\nAggregateFunc accumulates the result of a some function of a Datum.\n\n```go\nfunc NewIdentAggregate() AggregateFunc\n```\nNewIdentAggregate returns an identAggregate (see comment on struct).\n\n```go\ntype AliasClause struct {\n\tAlias Name\n\tCols  NameList\n}\n```\nAliasClause represents an alias, optionally with a column list: \"AS name\" or \"AS name(col1, col2)\".\n\n```go\nfunc (a AliasClause) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype AliasedTableExpr struct {\n\tExpr  TableExpr\n\tHints *IndexHints\n\tAs    AliasClause\n\tAsOf  AsOfClause\n}\n```\nAliasedTableExpr represents a table expression coupled with an optional alias.\n\n```go\nfunc (node *AliasedTableExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *AliasedTableExpr) String() string\n```\n\n```go\ntype AlterTable struct {\n\tIfExists bool\n\tTable    *QualifiedName\n\tCmds     AlterTableCmds\n}\n```\nAlterTable represents an ALTER TABLE statement.\n\n```go\nfunc (node *AlterTable) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*AlterTable) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*AlterTable) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *AlterTable) String() string\n```\n\n```go\ntype AlterTableAddColumn struct {\n\tIfNotExists bool\n\tColumnDef   *ColumnTableDef\n\t// contains filtered or unexported fields\n}\n```\nAlterTableAddColumn represents an ADD COLUMN command.\n\n```go\nfunc (node *AlterTableAddColumn) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (n *AlterTableAddColumn) String() string\n```\n\n```go\ntype AlterTableAddConstraint struct {\n\tConstraintDef ConstraintTableDef\n}\n```\nAlterTableAddConstraint represents an ADD CONSTRAINT command.\n\n```go\nfunc (node *AlterTableAddConstraint) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (n *AlterTableAddConstraint) String() string\n```\n\n```go\ntype AlterTableCmd interface {\n\tNodeFormatter\n\t// contains filtered or unexported methods\n}\n```\nAlterTableCmd represents a table modification operation.\n\n```go\ntype AlterTableCmds []AlterTableCmd\n```\nAlterTableCmds represents a list of table alterations.\n\n```go\nfunc (node AlterTableCmds) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (n AlterTableCmds) String() string\n```\n\n```go\ntype AlterTableDropColumn struct {\n\tIfExists     bool\n\tColumn       string\n\tDropBehavior DropBehavior\n\t// contains filtered or unexported fields\n}\n```\nAlterTableDropColumn represents a DROP COLUMN command.\n\n```go\nfunc (node *AlterTableDropColumn) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (n *AlterTableDropColumn) String() string\n```\n\n```go\ntype AlterTableDropConstraint struct {\n\tIfExists     bool\n\tConstraint   string\n\tDropBehavior DropBehavior\n}\n```\nAlterTableDropConstraint represents a DROP CONSTRAINT command.\n\n```go\nfunc (node *AlterTableDropConstraint) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (n *AlterTableDropConstraint) String() string\n```\n\n```go\ntype AlterTableDropNotNull struct {\n\tColumn string\n\t// contains filtered or unexported fields\n}\n```\nAlterTableDropNotNull represents an ALTER COLUMN DROP NOT NULL command.\n\n```go\nfunc (node *AlterTableDropNotNull) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *AlterTableDropNotNull) GetColumn() string\n```\nGetColumn implements the ColumnMutationCmd interface.\n\n```go\nfunc (n *AlterTableDropNotNull) String() string\n```\n\n```go\ntype AlterTableSetDefault struct {\n\tColumn  string\n\tDefault Expr\n\t// contains filtered or unexported fields\n}\n```\nAlterTableSetDefault represents an ALTER COLUMN SET DEFAULT or DROP DEFAULT command.\n\n```go\nfunc (node *AlterTableSetDefault) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *AlterTableSetDefault) GetColumn() string\n```\nGetColumn implements the ColumnMutationCmd interface.\n\n```go\nfunc (n *AlterTableSetDefault) String() string\n```\n\n```go\ntype AndExpr struct {\n\tLeft, Right Expr\n\t// contains filtered or unexported fields\n}\n```\nAndExpr represents an AND expression.\n\n```go\nfunc NewTypedAndExpr(left, right TypedExpr) *AndExpr\n```\nNewTypedAndExpr returns a new AndExpr that is verified to be well-typed.\n\n```go\nfunc (expr *AndExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *AndExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta AndExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *AndExpr) String() string\n```\n\n```go\nfunc (expr *AndExpr) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (node *AndExpr) TypedLeft() TypedExpr\n```\nTypedLeft returns the AndExpr's left expression as a TypedExpr.\n\n```go\nfunc (node *AndExpr) TypedRight() TypedExpr\n```\nTypedRight returns the AndExpr's right expression as a TypedExpr.\n\n```go\nfunc (expr *AndExpr) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype AnyType struct{}\n```\nAnyType is a typeList implementation that accepts any arguments.\n\n```go\ntype ArgTypes []Datum\n```\nArgTypes is a typeList implementation that accepts a specific number of argument types.\n\n```go\ntype Array struct {\n\tExprs Exprs\n}\n```\nArray represents an array constructor.\n\n```go\nfunc (node *Array) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *Array) String() string\n```\n\n```go\nfunc (expr *Array) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (expr *Array) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype ArrayIndirection struct {\n\tBegin Expr\n\tEnd   Expr\n}\n```\nArrayIndirection represents \"\\[\\\u003cbegin\u003e:\\\u003cend\u003e]\" in an indirection expression.\n\n```go\nfunc (a *ArrayIndirection) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype AsOfClause struct {\n\tExpr Expr\n}\n```\nAsOfClause represents an as of time.\n\n```go\nfunc (a AsOfClause) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype BeginTransaction struct {\n\tIsolation    IsolationLevel\n\tUserPriority UserPriority\n}\n```\nBeginTransaction represents a BEGIN statement\n\n```go\nfunc (node *BeginTransaction) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*BeginTransaction) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*BeginTransaction) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *BeginTransaction) String() string\n```\n\n```go\ntype BinOp struct {\n\tLeftType   Datum\n\tRightType  Datum\n\tReturnType Datum\n\t// contains filtered or unexported fields\n}\n```\nBinOp is a binary operator.\n\n```go\ntype BinaryExpr struct {\n\tOperator    BinaryOperator\n\tLeft, Right Expr\n\t// contains filtered or unexported fields\n}\n```\nBinaryExpr represents a binary value expression.\n\n```go\nfunc (expr *BinaryExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *BinaryExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta BinaryExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *BinaryExpr) String() string\n```\n\n```go\nfunc (expr *BinaryExpr) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (node *BinaryExpr) TypedLeft() TypedExpr\n```\nTypedLeft returns the BinaryExpr's left expression as a TypedExpr.\n\n```go\nfunc (node *BinaryExpr) TypedRight() TypedExpr\n```\nTypedRight returns the BinaryExpr's right expression as a TypedExpr.\n\n```go\nfunc (expr *BinaryExpr) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype BinaryOperator int\n```\nBinaryOperator represents a binary operator.\n\n```go\nconst (\n\tBitand BinaryOperator = iota\n\tBitor\n\tBitxor\n\tPlus\n\tMinus\n\tMult\n\tDiv\n\tFloorDiv\n\tMod\n\tConcat\n\tLShift\n\tRShift\n)\n```\nBinaryExpr.Operator\n\n```go\nfunc (i BinaryOperator) String() string\n```\n\n```go\ntype BoolColType struct {\n\tName string\n}\n```\nBoolColType represents a BOOLEAN type.\n\n```go\nfunc (node *BoolColType) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *BoolColType) String() string\n```\n\n```go\ntype Builtin struct {\n\tTypes      typeList\n\tReturnType Datum\n\n\tAggregateFunc func() AggregateFunc\n\t// contains filtered or unexported fields\n}\n```\nBuiltin is a built-in function.\n\n```go\nfunc (b Builtin) Category() string\n```\nCategory is used to categorize a function (for documentation purposes).\n\n```go\ntype BytesColType struct {\n\tName string\n}\n```\nBytesColType represents a BYTES or BLOB type.\n\n```go\nfunc (node *BytesColType) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *BytesColType) String() string\n```\n\n```go\ntype CaseExpr struct {\n\tExpr  Expr\n\tWhens []*When\n\tElse  Expr\n\t// contains filtered or unexported fields\n}\n```\nCaseExpr represents a CASE expression.\n\n```go\nfunc (expr *CaseExpr) CopyNode() *CaseExpr\n```\nCopyNode makes a copy of this Expr without recursing in any child Exprs.\n\n```go\nfunc (expr *CaseExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *CaseExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta CaseExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *CaseExpr) String() string\n```\n\n```go\nfunc (expr *CaseExpr) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (expr *CaseExpr) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype CastExpr struct {\n\tExpr Expr\n\tType ColumnType\n\t// contains filtered or unexported fields\n}\n```\nCastExpr represents a CAST(expr AS type) expression.\n\n```go\nfunc (expr *CastExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *CastExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta CastExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *CastExpr) String() string\n```\n\n```go\nfunc (expr *CastExpr) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (expr *CastExpr) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype CheckConstraintTableDef struct {\n\tName Name\n\tExpr Expr\n}\n```\nCheckConstraintTableDef represents a check constraint within a CREATE TABLE statement.\n\n```go\nfunc (node *CheckConstraintTableDef) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype CmpOp struct {\n\tLeftType  Datum\n\tRightType Datum\n\t// contains filtered or unexported fields\n}\n```\nCmpOp is a comparison operator.\n\n```go\ntype CoalesceExpr struct {\n\tName  string\n\tExprs Exprs\n\t// contains filtered or unexported fields\n}\n```\nCoalesceExpr represents a COALESCE or IFNULL expression.\n\n```go\nfunc (expr *CoalesceExpr) CopyNode() *CoalesceExpr\n```\nCopyNode makes a copy of this Expr without recursing in any child Exprs.\n\n```go\nfunc (expr *CoalesceExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *CoalesceExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta CoalesceExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *CoalesceExpr) String() string\n```\n\n```go\nfunc (expr *CoalesceExpr) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (expr *CoalesceExpr) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype ColumnCheckConstraint struct {\n\tExpr Expr\n}\n```\nColumnCheckConstraint represents either a check on a column.\n\n```go\ntype ColumnDefault struct {\n\tExpr Expr\n}\n```\nColumnDefault represents a DEFAULT clause for a column.\n\n```go\ntype ColumnFKConstraint struct {\n\tTable *QualifiedName\n\tCol   Name // empty-string means use PK\n}\n```\nColumnFKConstraint represents a FK-constaint on a column.\n\n```go\ntype ColumnMutationCmd interface {\n\tAlterTableCmd\n\tGetColumn() string\n}\n```\nColumnMutationCmd is the subset of AlterTableCmds that modify an existing column.\n\n```go\ntype ColumnQualification interface {\n\t// contains filtered or unexported methods\n}\n```\nColumnQualification represents a constraint on a column.\n\n```go\ntype ColumnTableDef struct {\n\tName     Name\n\tType     ColumnType\n\tNullable struct {\n\t\tNullability    Nullability\n\t\tConstraintName Name\n\t}\n\tPrimaryKey           bool\n\tUnique               bool\n\tUniqueConstraintName Name\n\tDefaultExpr          struct {\n\t\tExpr           Expr\n\t\tConstraintName Name\n\t}\n\tCheckExpr struct {\n\t\tExpr           Expr\n\t\tConstraintName Name\n\t}\n\tReferences struct {\n\t\tTable          *QualifiedName\n\t\tCol            Name\n\t\tConstraintName Name\n\t}\n}\n```\nColumnTableDef represents a column definition within a CREATE TABLE statement.\n\n```go\nfunc (node *ColumnTableDef) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype ColumnType interface {\n\tfmt.Stringer\n\tNodeFormatter\n\t// contains filtered or unexported methods\n}\n```\nColumnType represents a type in a column definition.\n\n```go\ntype CommitTransaction struct{}\n```\nCommitTransaction represents a COMMIT statement.\n\n```go\nfunc (node *CommitTransaction) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*CommitTransaction) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*CommitTransaction) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *CommitTransaction) String() string\n```\n\n```go\ntype ComparisonExpr struct {\n\tOperator    ComparisonOperator\n\tLeft, Right Expr\n\t// contains filtered or unexported fields\n}\n```\nComparisonExpr represents a two-value comparison expression.\n\n```go\nfunc NewTypedComparisonExpr(op ComparisonOperator, left, right TypedExpr) *ComparisonExpr\n```\nNewTypedComparisonExpr returns a new ComparisonExpr that is verified to be well-typed.\n\n```go\nfunc (expr *ComparisonExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *ComparisonExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *ComparisonExpr) IsMixedTypeComparison() bool\n```\nIsMixedTypeComparison returns true when the two sides of a comparison operator have different types.\n\n```go\nfunc (ta ComparisonExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *ComparisonExpr) String() string\n```\n\n```go\nfunc (expr *ComparisonExpr) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (node *ComparisonExpr) TypedLeft() TypedExpr\n```\nTypedLeft returns the ComparisonExpr's left expression as a TypedExpr.\n\n```go\nfunc (node *ComparisonExpr) TypedRight() TypedExpr\n```\nTypedRight returns the ComparisonExpr's right expression as a TypedExpr.\n\n```go\nfunc (expr *ComparisonExpr) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype ComparisonOperator int\n```\nComparisonOperator represents a binary operator.\n\n```go\nconst (\n\tEQ ComparisonOperator = iota\n\tLT\n\tGT\n\tLE\n\tGE\n\tNE\n\tIn\n\tNotIn\n\tLike\n\tNotLike\n\tSimilarTo\n\tNotSimilarTo\n\tIsDistinctFrom\n\tIsNotDistinctFrom\n\tIs\n\tIsNot\n)\n```\nComparisonExpr.Operator\n\n```go\nfunc (i ComparisonOperator) String() string\n```\n\n```go\ntype Constant interface {\n\tExpr\n\t// AvailableTypes returns the ordered set of types that the Constant is able to\n\t// be resolved into. The order of the type slice provides a notion of precedence,\n\t// with the first element in the ordering being the Constant's \"natural type\".\n\tAvailableTypes() []Datum\n\t// ResolveAsType resolves the Constant as the Datum type specified, or returns an\n\t// error if the Constant could not be resolved as that type. The method should only\n\t// be passed a type returned from AvailableTypes and should never be called more than\n\t// once for a given Constant.\n\tResolveAsType(*SemaContext, Datum) (Datum, error)\n}\n```\nConstant is an constant literal expression which may be resolved to more than one type.\n\n```go\ntype ConstraintTableDef interface {\n\tTableDef\n\t// contains filtered or unexported methods\n}\n```\nConstraintTableDef represents a constraint definition within a CREATE TABLE statement.\n\n```go\ntype CreateDatabase struct {\n\tIfNotExists bool\n\tName        Name\n\tEncoding    *StrVal\n}\n```\nCreateDatabase represents a CREATE DATABASE statement.\n\n```go\nfunc (node *CreateDatabase) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*CreateDatabase) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*CreateDatabase) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *CreateDatabase) String() string\n```\n\n```go\ntype CreateIndex struct {\n\tName        Name\n\tTable       *QualifiedName\n\tUnique      bool\n\tIfNotExists bool\n\tColumns     IndexElemList\n\t// Extra columns to be stored together with the indexed ones as an optimization\n\t// for improved reading performance.\n\tStoring NameList\n}\n```\nCreateIndex represents a CREATE INDEX statement.\n\n```go\nfunc (node *CreateIndex) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*CreateIndex) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*CreateIndex) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *CreateIndex) String() string\n```\n\n```go\ntype CreateTable struct {\n\tIfNotExists bool\n\tTable       *QualifiedName\n\tDefs        TableDefs\n}\n```\nCreateTable represents a CREATE TABLE statement.\n\n```go\nfunc (node *CreateTable) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*CreateTable) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*CreateTable) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *CreateTable) String() string\n```\n\n```go\ntype DBool bool\n```\nDBool is the boolean Datum.\n\n```go\nfunc GetBool(d Datum) (DBool, error)\n```\nGetBool gets DBool or an error (also treats NULL as false, not an error).\n\n```go\nfunc MakeDBool(d DBool) *DBool\n```\nMakeDBool converts its argument to a \\*DBool, returning either DBoolTrue or DBoolFalse.\n\n```go\nfunc ParseDBool(s string) (*DBool, error)\n```\nParseDBool parses and returns the \\*DBool Datum value represented by the provided string, or an error if parsing is unsuccessful.\n\n```go\nfunc (d *DBool) Compare(other Datum) int\n```\nCompare implements the Datum interface.\n\n```go\nfunc (t *DBool) Eval(_ *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (d *DBool) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*DBool) HasNext() bool\n```\nHasNext implements the Datum interface.\n\n```go\nfunc (*DBool) HasPrev() bool\n```\nHasPrev implements the Datum interface.\n\n```go\nfunc (d *DBool) IsMax() bool\n```\nIsMax implements the Datum interface.\n\n```go\nfunc (d *DBool) IsMin() bool\n```\nIsMin implements the Datum interface.\n\n```go\nfunc (*DBool) Next() Datum\n```\nNext implements the Datum interface.\n\n```go\nfunc (*DBool) Prev() Datum\n```\nPrev implements the Datum interface.\n\n```go\nfunc (*DBool) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (node *DBool) String() string\n```\n\n```go\nfunc (*DBool) Type() string\n```\nType implements the Datum interface.\n\n```go\nfunc (d *DBool) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface. It is implemented as an idempotent identity function for Datum.\n\n```go\nfunc (d *DBool) TypeEqual(other Datum) bool\n```\nTypeEqual implements the Datum interface.\n\n```go\nfunc (expr *DBool) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype DBytes string\n```\nDBytes is the bytes Datum. The underlying type is a string because we want the immutability, but this may contain arbitrary bytes.\n\n```go\nfunc NewDBytes(d DBytes) *DBytes\n```\nNewDBytes is a helper routine to create a \\*DBytes initialized from its argument.\n\n```go\nfunc (d *DBytes) Compare(other Datum) int\n```\nCompare implements the Datum interface.\n\n```go\nfunc (t *DBytes) Eval(_ *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (d *DBytes) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*DBytes) HasNext() bool\n```\nHasNext implements the Datum interface.\n\n```go\nfunc (*DBytes) HasPrev() bool\n```\nHasPrev implements the Datum interface.\n\n```go\nfunc (*DBytes) IsMax() bool\n```\nIsMax implements the Datum interface.\n\n```go\nfunc (d *DBytes) IsMin() bool\n```\nIsMin implements the Datum interface.\n\n```go\nfunc (d *DBytes) Next() Datum\n```\nNext implements the Datum interface.\n\n```go\nfunc (d *DBytes) Prev() Datum\n```\nPrev implements the Datum interface.\n\n```go\nfunc (d *DBytes) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (node *DBytes) String() string\n```\n\n```go\nfunc (*DBytes) Type() string\n```\nType implements the Datum interface.\n\n```go\nfunc (d *DBytes) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface. It is implemented as an idempotent identity function for Datum.\n\n```go\nfunc (d *DBytes) TypeEqual(other Datum) bool\n```\nTypeEqual implements the Datum interface.\n\n```go\nfunc (expr *DBytes) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype DDate int64\n```\nDDate is the date Datum represented as the number of days after the Unix epoch.\n\n```go\nfunc NewDDate(d DDate) *DDate\n```\nNewDDate is a helper routine to create a \\*DDate initialized from its argument.\n\n```go\nfunc NewDDateFromTime(t time.Time, loc *time.Location) *DDate\n```\nNewDDateFromTime constructs a \\*DDate from a time.Time in the provided time zone.\n\n```go\nfunc ParseDDate(s string, loc *time.Location) (*DDate, error)\n```\nParseDDate parses and returns the \\*DDate Datum value represented by the provided string in the provided location, or an error if parsing is unsuccessful.\n\n```go\nfunc (d *DDate) Compare(other Datum) int\n```\nCompare implements the Datum interface.\n\n```go\nfunc (t *DDate) Eval(_ *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (d *DDate) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*DDate) HasNext() bool\n```\nHasNext implements the Datum interface.\n\n```go\nfunc (*DDate) HasPrev() bool\n```\nHasPrev implements the Datum interface.\n\n```go\nfunc (d *DDate) IsMax() bool\n```\nIsMax implements the Datum interface.\n\n```go\nfunc (d *DDate) IsMin() bool\n```\nIsMin implements the Datum interface.\n\n```go\nfunc (d *DDate) Next() Datum\n```\nNext implements the Datum interface.\n\n```go\nfunc (d *DDate) Prev() Datum\n```\nPrev implements the Datum interface.\n\n```go\nfunc (*DDate) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (node *DDate) String() string\n```\n\n```go\nfunc (*DDate) Type() string\n```\nType implements the Datum interface.\n\n```go\nfunc (d *DDate) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface. It is implemented as an idempotent identity function for Datum.\n\n```go\nfunc (d *DDate) TypeEqual(other Datum) bool\n```\nTypeEqual implements the Datum interface.\n\n```go\nfunc (expr *DDate) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype DDecimal struct {\n\tinf.Dec\n}\n```\nDDecimal is the decimal Datum.\n\n```go\nfunc ParseDDecimal(s string) (*DDecimal, error)\n```\nParseDDecimal parses and returns the \\*DDecimal Datum value represented by the provided string, or an error if parsing is unsuccessful.\n\n```go\nfunc (d *DDecimal) Compare(other Datum) int\n```\nCompare implements the Datum interface.\n\n```go\nfunc (t *DDecimal) Eval(_ *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (d *DDecimal) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*DDecimal) HasNext() bool\n```\nHasNext implements the Datum interface.\n\n```go\nfunc (*DDecimal) HasPrev() bool\n```\nHasPrev implements the Datum interface.\n\n```go\nfunc (*DDecimal) IsMax() bool\n```\nIsMax implements the Datum interface.\n\n```go\nfunc (*DDecimal) IsMin() bool\n```\nIsMin implements the Datum interface.\n\n```go\nfunc (d *DDecimal) Next() Datum\n```\nNext implements the Datum interface.\n\n```go\nfunc (d *DDecimal) Prev() Datum\n```\nPrev implements the Datum interface.\n\n```go\nfunc (d *DDecimal) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (node *DDecimal) String() string\n```\n\n```go\nfunc (*DDecimal) Type() string\n```\nType implements the Datum interface.\n\n```go\nfunc (d *DDecimal) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface. It is implemented as an idempotent identity function for Datum.\n\n```go\nfunc (d *DDecimal) TypeEqual(other Datum) bool\n```\nTypeEqual implements the Datum interface.\n\n```go\nfunc (expr *DDecimal) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype DFloat float64\n```\nDFloat is the float Datum.\n\n```go\nfunc NewDFloat(d DFloat) *DFloat\n```\nNewDFloat is a helper routine to create a \\*DFloat initialized from its argument.\n\n```go\nfunc ParseDFloat(s string) (*DFloat, error)\n```\nParseDFloat parses and returns the \\*DFloat Datum value represented by the provided string, or an error if parsing is unsuccessful.\n\n```go\nfunc (d *DFloat) Compare(other Datum) int\n```\nCompare implements the Datum interface.\n\n```go\nfunc (t *DFloat) Eval(_ *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (d *DFloat) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*DFloat) HasNext() bool\n```\nHasNext implements the Datum interface.\n\n```go\nfunc (*DFloat) HasPrev() bool\n```\nHasPrev implements the Datum interface.\n\n```go\nfunc (d *DFloat) IsMax() bool\n```\nIsMax implements the Datum interface.\n\n```go\nfunc (d *DFloat) IsMin() bool\n```\nIsMin implements the Datum interface.\n\n```go\nfunc (d *DFloat) Next() Datum\n```\nNext implements the Datum interface.\n\n```go\nfunc (d *DFloat) Prev() Datum\n```\nPrev implements the Datum interface.\n\n```go\nfunc (*DFloat) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (node *DFloat) String() string\n```\n\n```go\nfunc (*DFloat) Type() string\n```\nType implements the Datum interface.\n\n```go\nfunc (d *DFloat) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface. It is implemented as an idempotent identity function for Datum.\n\n```go\nfunc (d *DFloat) TypeEqual(other Datum) bool\n```\nTypeEqual implements the Datum interface.\n\n```go\nfunc (expr *DFloat) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype DInt int64\n```\nDInt is the int Datum.\n\n```go\nfunc NewDInt(d DInt) *DInt\n```\nNewDInt is a helper routine to create a \\*DInt initialized from its argument.\n\n```go\nfunc ParseDInt(s string) (*DInt, error)\n```\nParseDInt parses and returns the \\*DInt Datum value represented by the provided string, or an error if parsing is unsuccessful.\n\n```go\nfunc (d *DInt) Compare(other Datum) int\n```\nCompare implements the Datum interface.\n\n```go\nfunc (t *DInt) Eval(_ *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (d *DInt) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*DInt) HasNext() bool\n```\nHasNext implements the Datum interface.\n\n```go\nfunc (*DInt) HasPrev() bool\n```\nHasPrev implements the Datum interface.\n\n```go\nfunc (d *DInt) IsMax() bool\n```\nIsMax implements the Datum interface.\n\n```go\nfunc (d *DInt) IsMin() bool\n```\nIsMin implements the Datum interface.\n\n```go\nfunc (d *DInt) Next() Datum\n```\nNext implements the Datum interface.\n\n```go\nfunc (d *DInt) Prev() Datum\n```\nPrev implements the Datum interface.\n\n```go\nfunc (*DInt) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (node *DInt) String() string\n```\n\n```go\nfunc (*DInt) Type() string\n```\nType implements the Datum interface.\n\n```go\nfunc (d *DInt) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface. It is implemented as an idempotent identity function for Datum.\n\n```go\nfunc (d *DInt) TypeEqual(other Datum) bool\n```\nTypeEqual implements the Datum interface.\n\n```go\nfunc (expr *DInt) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype DInterval struct {\n\tduration.Duration\n}\n```\nDInterval is the interval Datum.\n\n```go\nfunc ParseDInterval(s string) (*DInterval, error)\n```\nParseDInterval parses and returns the \\*DInterval Datum value represented by the provided string, or an error if parsing is unsuccessful.\n\n```go\nfunc (d *DInterval) Compare(other Datum) int\n```\nCompare implements the Datum interface.\n\n```go\nfunc (t *DInterval) Eval(_ *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (d *DInterval) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*DInterval) HasNext() bool\n```\nHasNext implements the Datum interface.\n\n```go\nfunc (*DInterval) HasPrev() bool\n```\nHasPrev implements the Datum interface.\n\n```go\nfunc (d *DInterval) IsMax() bool\n```\nIsMax implements the Datum interface.\n\n```go\nfunc (d *DInterval) IsMin() bool\n```\nIsMin implements the Datum interface.\n\n```go\nfunc (d *DInterval) Next() Datum\n```\nNext implements the Datum interface.\n\n```go\nfunc (d *DInterval) Prev() Datum\n```\nPrev implements the Datum interface.\n\n```go\nfunc (d *DInterval) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (node *DInterval) String() string\n```\n\n```go\nfunc (*DInterval) Type() string\n```\nType implements the Datum interface.\n\n```go\nfunc (d *DInterval) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface. It is implemented as an idempotent identity function for Datum.\n\n```go\nfunc (d *DInterval) TypeEqual(other Datum) bool\n```\nTypeEqual implements the Datum interface.\n\n```go\nfunc (expr *DInterval) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype DPlaceholder struct {\n\t// contains filtered or unexported fields\n}\n```\nDPlaceholder is the named placeholder Datum.\n\n```go\nfunc (d *DPlaceholder) Compare(other Datum) int\n```\nCompare implements the Datum interface.\n\n```go\nfunc (t *DPlaceholder) Eval(_ *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (d *DPlaceholder) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*DPlaceholder) HasNext() bool\n```\nHasNext implements the Datum interface.\n\n```go\nfunc (*DPlaceholder) HasPrev() bool\n```\nHasPrev implements the Datum interface.\n\n```go\nfunc (*DPlaceholder) IsMax() bool\n```\nIsMax implements the Datum interface.\n\n```go\nfunc (*DPlaceholder) IsMin() bool\n```\nIsMin implements the Datum interface.\n\n```go\nfunc (d *DPlaceholder) Name() string\n```\nName gives access to the placeholder's name to other packages.\n\n```go\nfunc (d *DPlaceholder) Next() Datum\n```\nNext implements the Datum interface.\n\n```go\nfunc (d *DPlaceholder) Prev() Datum\n```\nPrev implements the Datum interface.\n\n```go\nfunc (d *DPlaceholder) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (node *DPlaceholder) String() string\n```\n\n```go\nfunc (*DPlaceholder) Type() string\n```\nType implements the Datum interface.\n\n```go\nfunc (d *DPlaceholder) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface. It is implemented as an idempotent identity function for Datum.\n\n```go\nfunc (d *DPlaceholder) TypeEqual(other Datum) bool\n```\nTypeEqual implements the Datum interface.\n\n```go\nfunc (*DPlaceholder) Variable()\n```\nVariable implements the VariableExpr interface.\n\n```go\nfunc (expr *DPlaceholder) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype DString string\n```\nDString is the string Datum.\n\n```go\nfunc NewDString(d string) *DString\n```\nNewDString is a helper routine to create a \\*DString initialized from its argument.\n\n```go\nfunc (d *DString) Compare(other Datum) int\n```\nCompare implements the Datum interface.\n\n```go\nfunc (t *DString) Eval(_ *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (d *DString) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*DString) HasNext() bool\n```\nHasNext implements the Datum interface.\n\n```go\nfunc (*DString) HasPrev() bool\n```\nHasPrev implements the Datum interface.\n\n```go\nfunc (*DString) IsMax() bool\n```\nIsMax implements the Datum interface.\n\n```go\nfunc (d *DString) IsMin() bool\n```\nIsMin implements the Datum interface.\n\n```go\nfunc (d *DString) Next() Datum\n```\nNext implements the Datum interface.\n\n```go\nfunc (d *DString) Prev() Datum\n```\nPrev implements the Datum interface.\n\n```go\nfunc (*DString) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (node *DString) String() string\n```\n\n```go\nfunc (*DString) Type() string\n```\nType implements the Datum interface.\n\n```go\nfunc (d *DString) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface. It is implemented as an idempotent identity function for Datum.\n\n```go\nfunc (d *DString) TypeEqual(other Datum) bool\n```\nTypeEqual implements the Datum interface.\n\n```go\nfunc (expr *DString) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype DTimestamp struct {\n\ttime.Time\n}\n```\nDTimestamp is the timestamp Datum.\n\n```go\nfunc MakeDTimestamp(t time.Time, precision time.Duration) *DTimestamp\n```\nMakeDTimestamp creates a DTimestamp with specified precision.\n\n```go\nfunc ParseDTimestamp(s string, loc *time.Location, precision time.Duration) (*DTimestamp, error)\n```\nParseDTimestamp parses and returns the \\*DTimestamp Datum value represented by the provided string in the provided location, or an error if parsing is unsuccessful.\n\n```go\nfunc (d *DTimestamp) Compare(other Datum) int\n```\nCompare implements the Datum interface.\n\n```go\nfunc (t *DTimestamp) Eval(_ *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (d *DTimestamp) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*DTimestamp) HasNext() bool\n```\nHasNext implements the Datum interface.\n\n```go\nfunc (*DTimestamp) HasPrev() bool\n```\nHasPrev implements the Datum interface.\n\n```go\nfunc (d *DTimestamp) IsMax() bool\n```\nIsMax implements the Datum interface.\n\n```go\nfunc (d *DTimestamp) IsMin() bool\n```\nIsMin implements the Datum interface.\n\n```go\nfunc (d *DTimestamp) Next() Datum\n```\nNext implements the Datum interface.\n\n```go\nfunc (d *DTimestamp) Prev() Datum\n```\nPrev implements the Datum interface.\n\n```go\nfunc (*DTimestamp) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (node *DTimestamp) String() string\n```\n\n```go\nfunc (*DTimestamp) Type() string\n```\nType implements the Datum interface.\n\n```go\nfunc (d *DTimestamp) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface. It is implemented as an idempotent identity function for Datum.\n\n```go\nfunc (d *DTimestamp) TypeEqual(other Datum) bool\n```\nTypeEqual implements the Datum interface.\n\n```go\nfunc (expr *DTimestamp) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype DTimestampTZ struct {\n\ttime.Time\n}\n```\nDTimestampTZ is the timestamp Datum that is rendered with session offset.\n\n```go\nfunc MakeDTimestampTZ(t time.Time, precision time.Duration) *DTimestampTZ\n```\nMakeDTimestampTZ creates a DTimestampTZ with specified precision.\n\n```go\nfunc ParseDTimestampTZ(\n\ts string, loc *time.Location, precision time.Duration,\n) (*DTimestampTZ, error)\n```\nParseDTimestampTZ parses and returns the \\*DTimestampTZ Datum value represented by the provided string in the provided location, or an error if parsing is unsuccessful.\n\n```go\nfunc (d *DTimestampTZ) Compare(other Datum) int\n```\nCompare implements the Datum interface.\n\n```go\nfunc (t *DTimestampTZ) Eval(_ *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (d *DTimestampTZ) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (d *DTimestampTZ) HasNext() bool\n```\nHasNext implements the Datum interface.\n\n```go\nfunc (d *DTimestampTZ) HasPrev() bool\n```\nHasPrev implements the Datum interface.\n\n```go\nfunc (d *DTimestampTZ) IsMax() bool\n```\nIsMax implements the Datum interface.\n\n```go\nfunc (d *DTimestampTZ) IsMin() bool\n```\nIsMin implements the Datum interface.\n\n```go\nfunc (d *DTimestampTZ) Next() Datum\n```\nNext implements the Datum interface.\n\n```go\nfunc (d *DTimestampTZ) Prev() Datum\n```\nPrev implements the Datum interface.\n\n```go\nfunc (*DTimestampTZ) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (node *DTimestampTZ) String() string\n```\n\n```go\nfunc (d *DTimestampTZ) Type() string\n```\nType implements the Datum interface.\n\n```go\nfunc (d *DTimestampTZ) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface. It is implemented as an idempotent identity function for Datum.\n\n```go\nfunc (d *DTimestampTZ) TypeEqual(other Datum) bool\n```\nTypeEqual implements the Datum interface.\n\n```go\nfunc (expr *DTimestampTZ) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype DTuple []Datum\n```\nDTuple is the tuple Datum.\n\n```go\nfunc (d *DTuple) Compare(other Datum) int\n```\nCompare implements the Datum interface.\n\n```go\nfunc (t *DTuple) Eval(_ *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (d *DTuple) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (d *DTuple) HasNext() bool\n```\nHasNext implements the Datum interface.\n\n```go\nfunc (d *DTuple) HasPrev() bool\n```\nHasPrev implements the Datum interface.\n\n```go\nfunc (*DTuple) IsMax() bool\n```\nIsMax implements the Datum interface.\n\n```go\nfunc (*DTuple) IsMin() bool\n```\nIsMin implements the Datum interface.\n\n```go\nfunc (d *DTuple) Len() int\n```\n\n```go\nfunc (d *DTuple) Less(i, j int) bool\n```\n\n```go\nfunc (d *DTuple) Next() Datum\n```\nNext implements the Datum interface.\n\n```go\nfunc (d *DTuple) Normalize()\n```\nNormalize sorts and uniques the datum tuple.\n\n```go\nfunc (d *DTuple) Prev() Datum\n```\nPrev implements the Datum interface.\n\n```go\nfunc (d *DTuple) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (d *DTuple) SortedDifference(other *DTuple) *DTuple\n```\nSortedDifference finds the elements of d which are not in other, assuming that d and other are already sorted.\n\n```go\nfunc (node *DTuple) String() string\n```\n\n```go\nfunc (d *DTuple) Swap(i, j int)\n```\n\n```go\nfunc (*DTuple) Type() string\n```\nType implements the Datum interface.\n\n```go\nfunc (d *DTuple) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface. It is implemented as an idempotent identity function for Datum.\n\n```go\nfunc (d *DTuple) TypeEqual(other Datum) bool\n```\nTypeEqual implements the Datum interface.\n\n```go\nfunc (expr *DTuple) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype DateColType struct {\n}\n```\nDateColType represents a DATE type.\n\n```go\nfunc (node *DateColType) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *DateColType) String() string\n```\n\n```go\ntype Datum interface {\n\tTypedExpr\n\t// Type returns the (user-friendly) name of the type.\n\tType() string\n\t// TypeEqual determines if the receiver and the other Datum have the same\n\t// type or not. This method should be used for asserting the type of all\n\t// Datum, with the exception of DNull, where it is safe/encouraged to perform\n\t// a direct equivalence check.\n\tTypeEqual(other Datum) bool\n\t// Compare returns -1 if the receiver is less than other, 0 if receiver is\n\t// equal to other and +1 if receiver is greater than other.\n\t// TODO(nvanbenschoten) Should we look into merging this with cmpOps?\n\tCompare(other Datum) int\n\t// HasPrev specifies if Prev() can be used to compute a previous value for\n\t// a datum. For example, DBytes doesn't support it (the previous for BB is BAZZZ..).\n\tHasPrev() bool\n\t// Prev returns the previous datum. If the receiver is \"b\" and the returned datum\n\t// is \"a\", then \"a \u003c b\" and no other datum will compare such that \"a \u003c c \u003c\n\t// b\".\n\t// The return value is undefined if `IsMin()`.\n\tPrev() Datum\n\t// HasNext specifies if Next() can be used to compute a next value for a\n\t// datum. For example, DDecimal doesn't support it (the next for 1.0 is 1.00..1).\n\tHasNext() bool\n\t// Next returns the next datum. If the receiver is \"a\" and the returned datum\n\t// is \"b\", then \"a \u003c b\" and no other datum will compare such that \"a \u003c c \u003c\n\t// b\".\n\t// The return value is undefined if `IsMax()`.\n\tNext() Datum\n\t// IsMax returns true if the datum is equal to the maximum value the datum\n\t// type can hold.\n\tIsMax() bool\n\t// IsMin returns true if the datum is equal to the minimum value the datum\n\t// type can hold.\n\tIsMin() bool\n}\n```\nA Datum holds either a bool, int64, float64, string or \\[]Datum.\n\n```go\nvar (\n\t// TypeBool is the type of a DBool.\n\tTypeBool Datum = DBoolFalse\n\t// TypeInt is the type of a DInt.\n\tTypeInt Datum = NewDInt(0)\n\t// TypeFloat is the type of a DFloat.\n\tTypeFloat Datum = NewDFloat(0)\n\t// TypeDecimal is the type of a DDecimal.\n\tTypeDecimal Datum = \u0026DDecimal{}\n\t// TypeString is the type of a DString.\n\tTypeString Datum = NewDString(\"\")\n\t// TypeBytes is the type of a DBytes.\n\tTypeBytes Datum = NewDBytes(\"\")\n\t// TypeDate is the type of a DDate.\n\tTypeDate Datum = NewDDate(0)\n\t// TypeTimestamp is the type of a DTimestamp.\n\tTypeTimestamp Datum = \u0026DTimestamp{}\n\t// TypeTimestampTZ is the type of a DTimestamp.\n\tTypeTimestampTZ Datum = \u0026DTimestampTZ{}\n\t// TypeInterval is the type of a DInterval.\n\tTypeInterval Datum = \u0026DInterval{}\n\t// TypeTuple is the type of a DTuple.\n\tTypeTuple Datum = \u0026DTuple{}\n)\n```\n\n```go\ntype Deallocate struct {\n\tName Name // empty for ALL\n}\n```\nDeallocate represents a DEALLOCATE statement.\n\n```go\nfunc (node *Deallocate) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (n *Deallocate) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*Deallocate) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *Deallocate) String() string\n```\n\n```go\ntype DecimalColType struct {\n\tName  string\n\tPrec  int\n\tScale int\n}\n```\nDecimalColType represents a DECIMAL or NUMERIC type.\n\n```go\nfunc (node *DecimalColType) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *DecimalColType) String() string\n```\n\n```go\ntype DefaultVal struct{}\n```\nDefaultVal represents the DEFAULT expression.\n\n```go\nfunc (expr DefaultVal) Eval(_ *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node DefaultVal) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (DefaultVal) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (node DefaultVal) String() string\n```\n\n```go\nfunc (expr DefaultVal) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (expr DefaultVal) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype Delete struct {\n\tTable     TableExpr\n\tWhere     *Where\n\tReturning ReturningExprs\n}\n```\nDelete represents a DELETE statement.\n\n```go\nfunc (stmt *Delete) CopyNode() *Delete\n```\nCopyNode makes a copy of this Expr without recursing in any child Exprs.\n\n```go\nfunc (node *Delete) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*Delete) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (n *Delete) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *Delete) String() string\n```\n\n```go\nfunc (stmt *Delete) WalkStmt(v Visitor) Statement\n```\nWalkStmt is part of the WalkableStmt interface.\n\n```go\ntype Direction int\n```\nDirection for ordering results.\n\n```go\nconst (\n\tDefaultDirection Direction = iota\n\tAscending\n\tDescending\n)\n```\nDirection values.\n\n```go\nfunc (d Direction) String() string\n```\n\n```go\ntype DropBehavior int\n```\nDropBehavior represents options for dropping schema elements.\n\n```go\nconst (\n\tDropDefault DropBehavior = iota\n\tDropRestrict\n\tDropCascade\n)\n```\nDropBehavior values.\n\n```go\nfunc (d DropBehavior) String() string\n```\n\n```go\ntype DropDatabase struct {\n\tName     Name\n\tIfExists bool\n}\n```\nDropDatabase represents a DROP DATABASE statement.\n\n```go\nfunc (node *DropDatabase) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*DropDatabase) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*DropDatabase) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *DropDatabase) String() string\n```\n\n```go\ntype DropIndex struct {\n\tIndexList    TableNameWithIndexList\n\tIfExists     bool\n\tDropBehavior DropBehavior\n}\n```\nDropIndex represents a DROP INDEX statement.\n\n```go\nfunc (node *DropIndex) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*DropIndex) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*DropIndex) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *DropIndex) String() string\n```\n\n```go\ntype DropTable struct {\n\tNames        QualifiedNames\n\tIfExists     bool\n\tDropBehavior DropBehavior\n}\n```\nDropTable represents a DROP TABLE statement.\n\n```go\nfunc (node *DropTable) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*DropTable) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*DropTable) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *DropTable) String() string\n```\n\n```go\ntype EvalContext struct {\n\tNodeID roachpb.NodeID\n\n\t// Location references the *Location on the current Session.\n\tLocation **time.Location\n\n\tReCache *RegexpCache\n\n\t// TODO(mjibson): remove prepareOnly in favor of a 2-step prepare-exec solution\n\t// that is also able to save the plan to skip work during the exec step.\n\tPrepareOnly bool\n\n\t// SkipNormalize indicates whether expressions should be normalized\n\t// (false) or not (true).  It is set to true conditionally by\n\t// EXPLAIN(TYPES[, NORMALIZE]).\n\tSkipNormalize bool\n\t// contains filtered or unexported fields\n}\n```\nEvalContext defines the context in which to evaluate an expression, allowing the retrieval of state such as the node ID or statement start time.\n\n```go\nfunc (ctx *EvalContext) GetClusterTimestamp() *DDecimal\n```\nGetClusterTimestamp retrieves the current cluster timestamp as per the evaluation context. The timestamp is guaranteed to be nonzero.\n\n```go\nfunc (ctx *EvalContext) GetLocation() *time.Location\n```\nGetLocation returns the session timezone.\n\n```go\nfunc (ctx *EvalContext) GetStmtTimestamp() *DTimestamp\n```\nGetStmtTimestamp retrieves the current statement timestamp as per the evaluation context. The timestamp is guaranteed to be nonzero.\n\n```go\nfunc (ctx *EvalContext) GetTxnTimestamp(precision time.Duration) *DTimestamp\n```\nGetTxnTimestamp retrieves the current transaction timestamp as per the evaluation context. The timestamp is guaranteed to be nonzero.\n\n```go\nfunc (ctx *EvalContext) NormalizeExpr(typedExpr TypedExpr) (TypedExpr, error)\n```\nNormalizeExpr normalizes a typed expression, simplifying where possible, but guaranteeing that the result of evaluating the expression is unchanged and that resulting expression tree is still well-typed. Example normalizations:\n\n\t(a)                   -\u003e a\n\ta = 1 + 1             -\u003e a = 2\n\ta + 1 = 2             -\u003e a = 1\n\ta BETWEEN b AND c     -\u003e (a \u003e= b) AND (a \u003c= c)\n\ta NOT BETWEEN b AND c -\u003e (a \u003c b) OR (a \u003e c)\n\n```go\nfunc (ctx *EvalContext) SetClusterTimestamp(ts hlc.Timestamp)\n```\nSetClusterTimestamp sets the corresponding timestamp in the EvalContext.\n\n```go\nfunc (ctx *EvalContext) SetStmtTimestamp(ts time.Time)\n```\nSetStmtTimestamp sets the corresponding timestamp in the EvalContext.\n\n```go\nfunc (ctx *EvalContext) SetTxnTimestamp(ts time.Time)\n```\nSetTxnTimestamp sets the corresponding timestamp in the EvalContext.\n\n```go\ntype Execute struct {\n\tName   Name\n\tParams Exprs\n}\n```\nExecute represents an EXECUTE statement.\n\n```go\nfunc (node *Execute) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*Execute) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*Execute) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *Execute) String() string\n```\n\n```go\ntype ExistsExpr struct {\n\tSubquery Expr\n\t// contains filtered or unexported fields\n}\n```\nExistsExpr represents an EXISTS expression.\n\n```go\nfunc (t *ExistsExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *ExistsExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta ExistsExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *ExistsExpr) String() string\n```\n\n```go\nfunc (expr *ExistsExpr) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (expr *ExistsExpr) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype Explain struct {\n\tOptions   []string\n\tStatement Statement\n}\n```\nExplain represents an EXPLAIN statement.\n\n```go\nfunc (stmt *Explain) CopyNode() *Explain\n```\nCopyNode makes a copy of this Expr without recursing in any child Exprs.\n\n```go\nfunc (node *Explain) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*Explain) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*Explain) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *Explain) String() string\n```\n\n```go\nfunc (stmt *Explain) WalkStmt(v Visitor) Statement\n```\nWalkStmt is part of the WalkableStmt interface.\n\n```go\ntype Expr interface {\n\tfmt.Stringer\n\tNodeFormatter\n\t// Walk recursively walks all children using WalkExpr. If any children are changed, it returns a\n\t// copy of this node updated to point to the new children. Otherwise the receiver is returned.\n\t// For childless (leaf) Exprs, its implementation is empty.\n\tWalk(Visitor) Expr\n\t// TypeCheck transforms the Expr into a well-typed TypedExpr, which further permits\n\t// evaluation and type introspection, or an error if the expression cannot be well-typed.\n\t// When type checking is complete, if no error was reported, the expression and all\n\t// sub-expressions will be guaranteed to be well-typed, meaning that the method effectively\n\t// maps the Expr tree into a TypedExpr tree.\n\t//\n\t// The ctx parameter defines the context in which to perform type checking.\n\t// The desired parameter hints the desired type that the method's caller wants from\n\t// the resulting TypedExpr.\n\tTypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n}\n```\nExpr represents an expression.\n\n```go\nfunc ParseExprTraditional(sql string) (Expr, error)\n```\nParseExprTraditional is a short-hand for parseExprs(Traditional, \\[]string{sql})\n\n```go\nfunc SimpleVisit(expr Expr, preFn SimpleVisitFn) (Expr, error)\n```\nSimpleVisit is a convenience wrapper for visitors that only have VisitPre code and don't return any results except an error. The given function is called in VisitPre for every node. The visitor stops as soon as an error is returned.\n\n```go\nfunc WalkExpr(v Visitor, expr Expr) (newExpr Expr, changed bool)\n```\nWalkExpr traverses the nodes in an expression.\n\n```go\ntype Exprs []Expr\n```\nExprs represents a list of value expressions. It's not a valid expression because it's not parenthesized.\n\n```go\nfunc ParseExprsTraditional(sql []string) (Exprs, error)\n```\nParseExprsTraditional is a short-hand for parseExprs(Traditional, sql)\n\n```go\nfunc (node Exprs) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node Exprs) String() string\n```\n\n```go\ntype FamilyElem struct {\n\tColumn Name\n}\n```\nFamilyElem represents a column in a FAMILY constraint.\n\n```go\nfunc (node FamilyElem) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype FamilyElemList []FamilyElem\n```\nFamilyElemList is list of FamilyElem.\n\n```go\nfunc (l FamilyElemList) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat pretty-prints the contained names separated by commas. Format implements the NodeFormatter interface.\n\n```go\ntype FamilyTableDef struct {\n\tName    Name\n\tColumns FamilyElemList\n}\n```\nFamilyTableDef represents a family definition within a CREATE TABLE statement.\n\n```go\nfunc (node *FamilyTableDef) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype FloatColType struct {\n\tName string\n\tPrec int\n}\n```\nFloatColType represents a REAL, DOUBLE or FLOAT type.\n\n```go\nfunc (node *FloatColType) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *FloatColType) String() string\n```\n\n```go\ntype FmtFlags *fmtFlags\n```\nFmtFlags enables conditional formatting in the pretty-printer.\n\n```go\nvar FmtQualify FmtFlags = \u0026fmtFlags{showTableAliases: true}\n```\nFmtQualify instructs the pretty-printer to qualify qnames with the table name.\n\n```go\nvar FmtShowTypes FmtFlags = \u0026fmtFlags{showTypes: true}\n```\nFmtShowTypes instructs the pretty-printer to annotate expressions with their resolved types.\n\n```go\nvar FmtSimple FmtFlags = \u0026fmtFlags{showTypes: false}\n```\nFmtSimple instructs the pretty-printer to produce a straightforward representation, ideally using SQL syntax that makes prettyprint+parse idempotent.\n\n```go\ntype FuncExpr struct {\n\tName  *QualifiedName\n\tType  funcType\n\tExprs Exprs\n\t// contains filtered or unexported fields\n}\n```\nFuncExpr represents a function call.\n\n```go\nfunc (expr *FuncExpr) CopyNode() *FuncExpr\n```\nCopyNode makes a copy of this Expr without recursing in any child Exprs.\n\n```go\nfunc (expr *FuncExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *FuncExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta FuncExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *FuncExpr) String() string\n```\n\n```go\nfunc (expr *FuncExpr) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (expr *FuncExpr) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype Grant struct {\n\tPrivileges privilege.List\n\tTargets    TargetList\n\tGrantees   NameList\n}\n```\nGrant represents a GRANT statement.\n\n```go\nfunc (node *Grant) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*Grant) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*Grant) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *Grant) String() string\n```\n\n```go\ntype GroupBy []Expr\n```\nGroupBy represents a GROUP BY clause.\n\n```go\nfunc (node GroupBy) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype IfExpr struct {\n\tCond Expr\n\tTrue Expr\n\tElse Expr\n\t// contains filtered or unexported fields\n}\n```\nIfExpr represents an IF expression.\n\n```go\nfunc (expr *IfExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *IfExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta IfExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *IfExpr) String() string\n```\n\n```go\nfunc (expr *IfExpr) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (expr *IfExpr) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype IndexElem struct {\n\tColumn    Name\n\tDirection Direction\n}\n```\nIndexElem represents a column with a direction in a CREATE INDEX statement.\n\n```go\nfunc (node IndexElem) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype IndexElemList []IndexElem\n```\nIndexElemList is list of IndexElem.\n\n```go\nfunc NameListToIndexElems(lst NameList) IndexElemList\n```\nNameListToIndexElems converts a NameList to an IndexElemList with all members using the \\`DefaultDirection\\`.\n\n```go\nfunc (l IndexElemList) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat pretty-prints the contained names separated by commas. Format implements the NodeFormatter interface.\n\n```go\ntype IndexHints struct {\n\tIndex       Name\n\tNoIndexJoin bool\n}\n```\nIndexHints represents \"@\\\u003cindex\\_name\u003e\" or \"@{param\\[,param]}\" where param is one of:\n\n  - FORCE\\_INDEX=\\\u003cindex\\_name\u003e\n  - NO\\_INDEX\\_JOIN\n\nIt is used optionally after a table name in SELECT statements.\n\n```go\nfunc (n *IndexHints) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype IndexTableDef struct {\n\tName    Name\n\tColumns IndexElemList\n\tStoring NameList\n}\n```\nIndexTableDef represents an index definition within a CREATE TABLE statement.\n\n```go\nfunc (node *IndexTableDef) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype IndexedVar struct {\n\tIdx int\n\t// contains filtered or unexported fields\n}\n```\nIndexedVar is a VariableExpr that can be used as a leaf in expressions; it represents a dynamic value. It defers calls to TypeCheck, Eval, String to an IndexedVarContainer.\n\n```go\nfunc (v *IndexedVar) Eval(ctx *EvalContext) (Datum, error)\n```\nEval is part of the TypedExpr interface.\n\n```go\nfunc (v *IndexedVar) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (v *IndexedVar) ReturnType() Datum\n```\nReturnType is part of the TypedExpr interface.\n\n```go\nfunc (node *IndexedVar) String() string\n```\n\n```go\nfunc (v *IndexedVar) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck is part of the Expr interface.\n\n```go\nfunc (*IndexedVar) Variable()\n```\nVariable is a dummy function part of the VariableExpr interface.\n\n```go\nfunc (v *IndexedVar) Walk(_ Visitor) Expr\n```\nWalk is part of the Expr interface.\n\n```go\ntype IndexedVarContainer interface {\n\tIndexedVarEval(idx int, ctx *EvalContext) (Datum, error)\n\tIndexedVarReturnType(idx int) Datum\n\tIndexedVarString(idx int) string\n}\n```\nIndexedVarContainer provides the implementation of TypeCheck, Eval, and String for IndexedVars.\n\n```go\ntype IndexedVarHelper struct {\n\t// contains filtered or unexported fields\n}\n```\nIndexedVarHelper is a structure that helps with initialization of IndexVars.\n\n```go\nfunc MakeIndexedVarHelper(container IndexedVarContainer, numVars int) IndexedVarHelper\n```\nMakeIndexedVarHelper initializes an IndexedVarHelper structure.\n\n```go\nfunc (h *IndexedVarHelper) IndexedVar(idx int) *IndexedVar\n```\nIndexedVar returns an IndexedVar for the given index. The index must be valid.\n\n```go\nfunc (h *IndexedVarHelper) IndexedVarUsed(idx int) bool\n```\nIndexedVarUsed returns true if IndexedVar() was called for the given index. The index must be valid.\n\n```go\nfunc (h *IndexedVarHelper) NumVars() int\n```\nNumVars returns the number of variables the IndexedVarHelper was initialized for.\n\n```go\ntype Indirection []IndirectionElem\n```\nIndirection represents an indirection expression composed of a series of indirection elements.\n\n```go\nfunc (i Indirection) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype IndirectionElem interface {\n\tNodeFormatter\n\t// contains filtered or unexported methods\n}\n```\nIndirectionElem is a single element in an indirection expression.\n\n```go\ntype Insert struct {\n\tTable      TableExpr\n\tColumns    QualifiedNames\n\tRows       *Select\n\tOnConflict *OnConflict\n\tReturning  ReturningExprs\n}\n```\nInsert represents an INSERT statement.\n\n```go\nfunc (stmt *Insert) CopyNode() *Insert\n```\nCopyNode makes a copy of this Expr without recursing in any child Exprs.\n\n```go\nfunc (node *Insert) DefaultValues() bool\n```\nDefaultValues returns true iff only default values are being inserted.\n\n```go\nfunc (node *Insert) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*Insert) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (n *Insert) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *Insert) String() string\n```\n\n```go\nfunc (stmt *Insert) WalkStmt(v Visitor) Statement\n```\nWalkStmt is part of the WalkableStmt interface.\n\n```go\ntype IntColType struct {\n\tName string\n\tN    int\n}\n```\nIntColType represents an INT, INTEGER, SMALLINT or BIGINT type.\n\n```go\nfunc (node *IntColType) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *IntColType) IsSerial() bool\n```\nIsSerial returns true when this column should be given a DEFAULT of a unique, incrementing function.\n\n```go\nfunc (node *IntColType) String() string\n```\n\n```go\ntype IntervalColType struct {\n}\n```\nIntervalColType represents an INTERVAL type\n\n```go\nfunc (node *IntervalColType) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *IntervalColType) String() string\n```\n\n```go\ntype IsAggregateVisitor struct {\n\tAggregated bool\n}\n```\nIsAggregateVisitor checks if walked expressions contain aggregate functions.\n\n```go\nfunc (v *IsAggregateVisitor) Reset()\n```\nReset clear the IsAggregateVisitor's internal state.\n\n```go\nfunc (*IsAggregateVisitor) VisitPost(expr Expr) Expr\n```\nVisitPost satisfies the Visitor interface.\n\n```go\nfunc (v *IsAggregateVisitor) VisitPre(expr Expr) (recurse bool, newExpr Expr)\n```\nVisitPre satisfies the Visitor interface.\n\n```go\ntype IsOfTypeExpr struct {\n\tNot   bool\n\tExpr  Expr\n\tTypes []ColumnType\n\t// contains filtered or unexported fields\n}\n```\nIsOfTypeExpr represents an IS {,NOT} OF (type\\_list) expression.\n\n```go\nfunc (expr *IsOfTypeExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *IsOfTypeExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta IsOfTypeExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *IsOfTypeExpr) String() string\n```\n\n```go\nfunc (expr *IsOfTypeExpr) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (expr *IsOfTypeExpr) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype IsolationLevel int\n```\nIsolationLevel holds the isolation level for a transaction.\n\n```go\nconst (\n\tUnspecifiedIsolation IsolationLevel = iota\n\tSnapshotIsolation\n\tSerializableIsolation\n)\n```\nIsolationLevel values\n\n```go\nfunc (i IsolationLevel) String() string\n```\n\n```go\ntype JoinCond interface {\n\tNodeFormatter\n\t// contains filtered or unexported methods\n}\n```\nJoinCond represents a join condition.\n\n```go\ntype JoinTableExpr struct {\n\tJoin  string\n\tLeft  TableExpr\n\tRight TableExpr\n\tCond  JoinCond\n}\n```\nJoinTableExpr represents a TableExpr that's a JOIN operation.\n\n```go\nfunc (node *JoinTableExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *JoinTableExpr) String() string\n```\n\n```go\ntype Limit struct {\n\tOffset, Count Expr\n}\n```\nLimit represents a LIMIT clause.\n\n```go\nfunc (node *Limit) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype MaxAggregate struct {\n\t// contains filtered or unexported fields\n}\n```\nMaxAggregate keeps track of the largest value passed to Add.\n\n```go\nfunc (a *MaxAggregate) Add(datum Datum) error\n```\nAdd sets the max to the larger of the current max or the passed datum.\n\n```go\nfunc (a *MaxAggregate) Result() (Datum, error)\n```\nResult returns the largest value passed to Add.\n\n```go\ntype MinAggregate struct {\n\t// contains filtered or unexported fields\n}\n```\nMinAggregate keeps track of the smallest value passed to Add.\n\n```go\nfunc (a *MinAggregate) Add(datum Datum) error\n```\nAdd sets the min to the smaller of the current min or the passed datum.\n\n```go\nfunc (a *MinAggregate) Result() (Datum, error)\n```\nResult returns the smallest value passed to Add.\n\n```go\ntype Name string\n```\nA Name is an SQL identifier.\n\n```go\nfunc (n Name) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node Name) String() string\n```\n\n```go\ntype NameIndirection Name\n```\nNameIndirection represents \".\\\u003cname\u003e\" in an indirection expression.\n\n```go\nfunc (n NameIndirection) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype NameList []string\n```\nA NameList is a list of identifier. TODO(tschottdorf): would be nicer to have \\[]Name here but unless we want to introduce new types to the grammar, NameList(\\[]string{...}) needs to work.\n\n```go\nfunc (l NameList) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (list NameList) String() string\n```\n\n```go\ntype NamedColumnQualification struct {\n\tName          Name\n\tQualification ColumnQualification\n}\n```\nNamedColumnQualification wraps a NamedColumnQualification with a name.\n\n```go\ntype NaturalJoinCond struct{}\n```\nNaturalJoinCond represents a NATURAL join condition\n\n```go\nfunc (NaturalJoinCond) Format(buf *bytes.Buffer, _ FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype NodeFormatter interface {\n\t// Format performs pretty-printing towards a bytes buffer. The\n\t// flags argument influences the results.\n\tFormat(buf *bytes.Buffer, flags FmtFlags)\n}\n```\nNodeFormatter is implemented by nodes that can be pretty-printed.\n\n```go\ntype NotExpr struct {\n\tExpr Expr\n\t// contains filtered or unexported fields\n}\n```\nNotExpr represents a NOT expression.\n\n```go\nfunc NewTypedNotExpr(expr TypedExpr) *NotExpr\n```\nNewTypedNotExpr returns a new NotExpr that is verified to be well-typed.\n\n```go\nfunc (expr *NotExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *NotExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta NotExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *NotExpr) String() string\n```\n\n```go\nfunc (expr *NotExpr) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (node *NotExpr) TypedInnerExpr() TypedExpr\n```\nTypedInnerExpr returns the NotExpr's inner expression as a TypedExpr.\n\n```go\nfunc (expr *NotExpr) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype NotNullConstraint struct{}\n```\nNotNullConstraint represents NOT NULL on a column.\n\n```go\ntype NullConstraint struct{}\n```\nNullConstraint represents NULL on a column.\n\n```go\ntype NullIfExpr struct {\n\tExpr1 Expr\n\tExpr2 Expr\n\t// contains filtered or unexported fields\n}\n```\nNullIfExpr represents a NULLIF expression.\n\n```go\nfunc (expr *NullIfExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *NullIfExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta NullIfExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *NullIfExpr) String() string\n```\n\n```go\nfunc (expr *NullIfExpr) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (expr *NullIfExpr) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype Nullability int\n```\nNullability represents either NULL, NOT NULL or an unspecified value (silent NULL).\n\n```go\nconst (\n\tNotNull Nullability = iota\n\tNull\n\tSilentNull\n)\n```\nThe values for NullType.\n\n```go\ntype NumVal struct {\n\tconstant.Value\n\n\t// We preserve the \"original\" string representation (before folding).\n\tOrigString string\n\t// contains filtered or unexported fields\n}\n```\nNumVal represents a constant numeric value.\n\n```go\nfunc (expr *NumVal) AvailableTypes() []Datum\n```\nAvailableTypes implements the Constant interface.\n\n```go\nfunc (expr *NumVal) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (expr *NumVal) ResolveAsType(ctx *SemaContext, typ Datum) (Datum, error)\n```\nResolveAsType implements the Constant interface.\n\n```go\nfunc (node *NumVal) String() string\n```\n\n```go\nfunc (expr *NumVal) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (expr *NumVal) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype OnConflict struct {\n\tColumns   NameList\n\tExprs     UpdateExprs\n\tWhere     *Where\n\tDoNothing bool\n}\n```\nOnConflict represents an \\`ON CONFLICT (columns) DO UPDATE SET exprs WHERE where\\` clause.\n\nThe zero value for OnConflict is used to signal the UPSERT short form, which uses the primary key for as the conflict index and the values being inserted for Exprs.\n\n```go\nfunc (oc *OnConflict) IsUpsertAlias() bool\n```\nIsUpsertAlias returns true if the UPSERT syntactic sugar was used.\n\n```go\ntype OnJoinCond struct {\n\tExpr Expr\n}\n```\nOnJoinCond represents an ON join condition.\n\n```go\nfunc (node *OnJoinCond) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype OrExpr struct {\n\tLeft, Right Expr\n\t// contains filtered or unexported fields\n}\n```\nOrExpr represents an OR expression.\n\n```go\nfunc NewTypedOrExpr(left, right TypedExpr) *OrExpr\n```\nNewTypedOrExpr returns a new OrExpr that is verified to be well-typed.\n\n```go\nfunc (expr *OrExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *OrExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta OrExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *OrExpr) String() string\n```\n\n```go\nfunc (expr *OrExpr) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (node *OrExpr) TypedLeft() TypedExpr\n```\nTypedLeft returns the OrExpr's left expression as a TypedExpr.\n\n```go\nfunc (node *OrExpr) TypedRight() TypedExpr\n```\nTypedRight returns the OrExpr's right expression as a TypedExpr.\n\n```go\nfunc (expr *OrExpr) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype Order struct {\n\tExpr      Expr\n\tDirection Direction\n}\n```\nOrder represents an ordering expression.\n\n```go\nfunc (node *Order) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype OrderBy []*Order\n```\nOrderBy represents an ORDER By clause.\n\n```go\nfunc (node OrderBy) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype OverlayExpr struct {\n\tFuncExpr\n}\n```\nOverlayExpr represents an overlay function call.\n\n```go\nfunc (expr *OverlayExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *OverlayExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta OverlayExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *OverlayExpr) String() string\n```\n\n```go\ntype ParenExpr struct {\n\tExpr Expr\n\t// contains filtered or unexported fields\n}\n```\nParenExpr represents a parenthesized expression.\n\n```go\nfunc (expr *ParenExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *ParenExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta ParenExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *ParenExpr) String() string\n```\n\n```go\nfunc (expr *ParenExpr) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (node *ParenExpr) TypedInnerExpr() TypedExpr\n```\nTypedInnerExpr returns the ParenExpr's inner expression as a TypedExpr.\n\n```go\nfunc (expr *ParenExpr) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype ParenSelect struct {\n\tSelect *Select\n}\n```\nParenSelect represents a parenthesized SELECT/UNION/VALUES statement.\n\n```go\nfunc (node *ParenSelect) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*ParenSelect) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*ParenSelect) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *ParenSelect) String() string\n```\n\n```go\nfunc (stmt *ParenSelect) WalkStmt(v Visitor) Statement\n```\nWalkStmt is part of the WalkableStmt interface.\n\n```go\ntype ParenTableExpr struct {\n\tExpr TableExpr\n}\n```\nParenTableExpr represents a parenthesized TableExpr.\n\n```go\nfunc (node *ParenTableExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *ParenTableExpr) String() string\n```\n\n```go\ntype Parser struct {\n\t// contains filtered or unexported fields\n}\n```\nParser wraps a scanner, parser and other utilities present in the parser package.\n\n```go\nfunc (p *Parser) AggregateInExpr(expr Expr) bool\n```\nAggregateInExpr determines if an Expr contains an aggregate function.\n\n```go\nfunc (p *Parser) IsAggregate(n *SelectClause) bool\n```\nIsAggregate determines if SelectClause contains an aggregate function.\n\n```go\nfunc (p *Parser) NormalizeExpr(ctx *EvalContext, typedExpr TypedExpr) (TypedExpr, error)\n```\nNormalizeExpr is wrapper around ctx.NormalizeExpr which avoids allocation of a normalizeVisitor.\n\n```go\nfunc (p *Parser) Parse(sql string, syntax Syntax) (stmts StatementList, err error)\n```\nParse parses the sql and returns a list of statements.\n\n```go\ntype Placeholder struct {\n\tName string\n}\n```\nPlaceholder represents a named placeholder.\n\n```go\nfunc (node Placeholder) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node Placeholder) String() string\n```\n\n```go\nfunc (expr Placeholder) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (Placeholder) Variable()\n```\nVariable implements the VariableExpr interface.\n\n```go\nfunc (expr Placeholder) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype PlaceholderInfo struct {\n\tValues QueryArguments\n\tTypes  PlaceholderTypes\n}\n```\nPlaceholderInfo defines the interface to SQL placeholders.\n\n```go\nfunc NewPlaceholderInfo() *PlaceholderInfo\n```\nNewPlaceholderInfo constructs an empty PlaceholderInfo.\n\n```go\nfunc (p *PlaceholderInfo) Assign(src *PlaceholderInfo)\n```\nAssign resets the PlaceholderInfo to the contents of src. If src is nil, the map is cleared.\n\n```go\nfunc (p *PlaceholderInfo) Clear()\n```\nClear resets the placeholder info map.\n\n```go\nfunc (p *PlaceholderInfo) IsUnresolvedPlaceholder(expr Expr) bool\n```\nIsUnresolvedPlaceholder returns whether expr is an unresolved placeholder. In other words, it returns whether the provided expression is a placeholder, and if so, whether the placeholder's type remains unset or not.\n\n```go\nfunc (p *PlaceholderInfo) SetType(name string, typ Datum) error\n```\nSetType assignes a known type to a placeholder. Reports an error if another type was previously assigned.\n\n```go\nfunc (p *PlaceholderInfo) SetTypes(src PlaceholderTypes)\n```\nSetTypes resets the type and values in the map and replaces the types map by an alias to src. If src is nil, the map is cleared. The types map is aliased because the invoking code from pgwire/v3.go for sql.Prepare needs to receive the updated type assignments after Prepare completes.\n\n```go\nfunc (p *PlaceholderInfo) SetValue(name string, val Datum)\n```\nSetValue assigns a known value to a placeholder. If no type is known yet, it is inferred from the assigned value.\n\n```go\nfunc (p *PlaceholderInfo) Type(name string) (Datum, bool)\n```\nType returns the known type of a placeholder. Returns false in the 2nd value if the placeholder is not typed.\n\n```go\nfunc (p *PlaceholderInfo) Value(name string) (Datum, bool)\n```\nValue returns the known value of a placeholder.  Returns false in the 2nd value if the placeholder does not have a value.\n\n```go\ntype PlaceholderTypes map[string]Datum\n```\nPlaceholderTypes relates placeholder names to their resolved type.\n\n```go\nfunc (p PlaceholderTypes) ProcessPlaceholderAnnotations(stmt Statement) error\n```\nProcessPlaceholderAnnotations performs an order-independent global traversal of the provided Statement, annotating all placeholders with a type in either of the following situations.\n\n  - the placeholder is the subject of an explicit type annotation in at least one of its occurrences. If it is subject to multiple explicit type annotations where the types are not all in agreement, or if the placeholder already has an inferred type in the provided args map which conflicts with the explicit type annotation type, an error will be thrown.\n  - the placeholder is the subject to an implicit type annotation, meaning that it is not subject to an explicit type annotation, and that in all occurrences of the placeholder, it is subject to a cast to the same type. If it is subject to casts of multiple types, no error will be thrown, but the placeholder type will not be inferred. If a type has already been assigned for the placeholder in the provided args map, no error will be thrown, and the placeholder will keep it's previously inferred type.\n\nTODO(nvanbenschoten) Add support for explicit placeholder annotations. TODO(nvanbenschoten) Can this visitor and map be preallocated (like normalizeVisitor)?\n\n```go\ntype Prepare struct {\n\tName      Name\n\tTypes     []ColumnType\n\tStatement Statement\n}\n```\nPrepare represents a PREPARE statement.\n\n```go\nfunc (node *Prepare) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*Prepare) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*Prepare) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *Prepare) String() string\n```\n\n```go\ntype PrimaryKeyConstraint struct{}\n```\nPrimaryKeyConstraint represents NULL on a column.\n\n```go\ntype QualifiedName struct {\n\tBase     Name\n\tIndirect Indirection\n\t// contains filtered or unexported fields\n}\n```\nQualifiedName is a base name and an optional indirection expression.\n\n```go\nfunc StarExpr() *QualifiedName\n```\nStarExpr is a convenience function that represents an unqualified \"\\*\".\n\n```go\nfunc (node *QualifiedName) ClearString()\n```\nClearString causes String to return the current (possibly normalized) name instead of the original name (used for testing).\n\n```go\nfunc (node *QualifiedName) Column() string\n```\nColumn returns the column portion of the name. Note that the returned string is not quoted even if the name is a keyword.\n\n```go\nfunc (node *QualifiedName) Database() string\n```\nDatabase returns the database portion of the name. Note that the returned string is not quoted even if the name is a keyword.\n\n```go\nfunc (expr *QualifiedName) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *QualifiedName) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *QualifiedName) IsStar() bool\n```\nIsStar returns true iff the qualified name contains matches \"\".\\* or table.\\*.\n\n```go\nfunc (node *QualifiedName) NormalizeColumnName() error\n```\nNormalizeColumnName normalizes the qualified name to contain a table name as prefix, returning an error if unable to do so or if the name is not a valid column name (e.g. it contains too many indirections). If normalization occurred, the modified qualified name will have n.Base == \"\" to indicate no explicit table was specified. The incoming qualified name should have one of the following forms:\n\n\t*\n\ttable.*\n\tcolumn\n\tcolumn[array-indirection]\n\ttable.column\n\ttable.column[array-indirection]\n\nNote that \"table\" may be the empty string. On successful normalization the qualified name will have one of the forms:\n\n\ttable.*\n\ttable.column\n\ttable.column[array-indirection]\n\n```go\nfunc (node *QualifiedName) NormalizeTableName(database string) error\n```\nNormalizeTableName normalizes the qualified name to contain a database name as prefix, returning an error if unable to do so or if the name is not a valid table name (e.g. it contains an array indirection). The incoming qualified name should have one of the following forms:\n\n\ttable\n\tdatabase.table\n\ttable@index\n\tdatabase.table@index\n\nOn successful normalization, the qualified name will have the form:\n\n\tdatabase.table@index\n\n```go\nfunc (node *QualifiedName) QualifyWithDatabase(database string) error\n```\nQualifyWithDatabase adds an indirection for the database, if it's missing. It transforms: table       -\u003e database.table table@index -\u003e database.table@index \\*           -\u003e database.\\*\n\n```go\nfunc (node *QualifiedName) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (node *QualifiedName) String() string\n```\n\n```go\nfunc (node *QualifiedName) Table() string\n```\nTable returns the table portion of the name. Note that the returned string is not quoted even if the name is a keyword.\n\n```go\nfunc (expr *QualifiedName) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (*QualifiedName) Variable()\n```\nVariable implements the VariableExpr interface.\n\n```go\nfunc (expr *QualifiedName) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype QualifiedNames []*QualifiedName\n```\nQualifiedNames represents a command separated list (see the String method) of qualified names.\n\n```go\nfunc (n QualifiedNames) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype QueryArguments map[string]Datum\n```\nQueryArguments relates placeholder names to their provided query argument.\n\n```go\ntype RangeCond struct {\n\tNot      bool\n\tLeft     Expr\n\tFrom, To Expr\n\t// contains filtered or unexported fields\n}\n```\nRangeCond represents a BETWEEN or a NOT BETWEEN expression.\n\n```go\nfunc (expr *RangeCond) Eval(_ *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *RangeCond) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta RangeCond) ReturnType() Datum\n```\n\n```go\nfunc (node *RangeCond) String() string\n```\n\n```go\nfunc (expr *RangeCond) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (node *RangeCond) TypedFrom() TypedExpr\n```\nTypedFrom returns the RangeCond's from expression as a TypedExpr.\n\n```go\nfunc (node *RangeCond) TypedLeft() TypedExpr\n```\nTypedLeft returns the RangeCond's left expression as a TypedExpr.\n\n```go\nfunc (node *RangeCond) TypedTo() TypedExpr\n```\nTypedTo returns the RangeCond's to expression as a TypedExpr.\n\n```go\nfunc (expr *RangeCond) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype RegexpCache struct {\n\t// contains filtered or unexported fields\n}\n```\nA RegexpCache is a cache used to store compiled regular expressions. The cache is safe for concurrent use by multiple goroutines. It is also safe to use the cache through a nil reference, where it will act like a valid cache with no capacity.\n\n```go\nfunc NewRegexpCache(size int) *RegexpCache\n```\nNewRegexpCache creates a new RegexpCache of the given size. The underlying cache internally uses a hash map, so lookups are cheap.\n\n```go\nfunc (rc *RegexpCache) GetRegexp(key regexpCacheKey) (*regexp.Regexp, error)\n```\nGetRegexp consults the cache for the regular expressions stored for the given key, compiling the key's pattern if it is not already in the cache.\n\n```go\nfunc (rc *RegexpCache) Len() int\n```\nLen returns the number of compiled regular expressions in the cache.\n\n```go\ntype ReleaseSavepoint struct {\n\tSavepoint string\n}\n```\nReleaseSavepoint represents a RELEASE SAVEPOINT \\\u003cname\u003e statement.\n\n```go\nfunc (node *ReleaseSavepoint) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*ReleaseSavepoint) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*ReleaseSavepoint) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *ReleaseSavepoint) String() string\n```\n\n```go\ntype RenameColumn struct {\n\tTable   *QualifiedName\n\tName    Name\n\tNewName Name\n\t// IfExists refers to the table, not the column.\n\tIfExists bool\n}\n```\nRenameColumn represents a RENAME COLUMN statement.\n\n```go\nfunc (node *RenameColumn) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*RenameColumn) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*RenameColumn) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *RenameColumn) String() string\n```\n\n```go\ntype RenameDatabase struct {\n\tName    Name\n\tNewName Name\n}\n```\nRenameDatabase represents a RENAME DATABASE statement.\n\n```go\nfunc (node *RenameDatabase) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*RenameDatabase) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*RenameDatabase) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *RenameDatabase) String() string\n```\n\n```go\ntype RenameIndex struct {\n\tIndex    *TableNameWithIndex\n\tNewName  Name\n\tIfExists bool\n}\n```\nRenameIndex represents a RENAME INDEX statement.\n\n```go\nfunc (node *RenameIndex) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*RenameIndex) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*RenameIndex) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *RenameIndex) String() string\n```\n\n```go\ntype RenameTable struct {\n\tName     *QualifiedName\n\tNewName  *QualifiedName\n\tIfExists bool\n}\n```\nRenameTable represents a RENAME TABLE statement.\n\n```go\nfunc (node *RenameTable) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*RenameTable) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*RenameTable) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *RenameTable) String() string\n```\n\n```go\ntype ReturningExprs SelectExprs\n```\nReturningExprs represents RETURNING expressions.\n\n```go\nfunc (r ReturningExprs) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (r ReturningExprs) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\ntype Revoke struct {\n\tPrivileges privilege.List\n\tTargets    TargetList\n\tGrantees   NameList\n}\n```\nRevoke represents a REVOKE statements. PrivilegeList and TargetList are defined in grant.go\n\n```go\nfunc (node *Revoke) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*Revoke) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*Revoke) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *Revoke) String() string\n```\n\n```go\ntype RollbackToSavepoint struct {\n\tSavepoint string\n}\n```\nRollbackToSavepoint represents a ROLLBACK TO SAVEPOINT \\\u003cname\u003e statement.\n\n```go\nfunc (node *RollbackToSavepoint) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*RollbackToSavepoint) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*RollbackToSavepoint) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *RollbackToSavepoint) String() string\n```\n\n```go\ntype RollbackTransaction struct{}\n```\nRollbackTransaction represents a ROLLBACK statement.\n\n```go\nfunc (node *RollbackTransaction) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*RollbackTransaction) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*RollbackTransaction) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *RollbackTransaction) String() string\n```\n\n```go\ntype Savepoint struct {\n\tName string\n}\n```\nSavepoint represents a SAVEPOINT \\\u003cname\u003e statement.\n\n```go\nfunc (node *Savepoint) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*Savepoint) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*Savepoint) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *Savepoint) String() string\n```\n\n```go\ntype Select struct {\n\tSelect  SelectStatement\n\tOrderBy OrderBy\n\tLimit   *Limit\n}\n```\nSelect represents a SelectStatement with an ORDER and/or LIMIT.\n\n```go\nfunc (stmt *Select) CopyNode() *Select\n```\nCopyNode makes a copy of this Expr without recursing in any child Exprs.\n\n```go\nfunc (node *Select) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*Select) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*Select) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *Select) String() string\n```\n\n```go\nfunc (stmt *Select) WalkStmt(v Visitor) Statement\n```\nWalkStmt is part of the WalkableStmt interface.\n\n```go\ntype SelectClause struct {\n\tDistinct bool\n\tExprs    SelectExprs\n\tFrom     TableExprs\n\tWhere    *Where\n\tGroupBy  GroupBy\n\tHaving   *Where\n\tLock     string\n\t// contains filtered or unexported fields\n}\n```\nSelectClause represents a SELECT statement.\n\n```go\nfunc (stmt *SelectClause) CopyNode() *SelectClause\n```\nCopyNode makes a copy of this Expr without recursing in any child Exprs.\n\n```go\nfunc (node *SelectClause) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*SelectClause) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*SelectClause) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *SelectClause) String() string\n```\n\n```go\nfunc (stmt *SelectClause) WalkStmt(v Visitor) Statement\n```\nWalkStmt is part of the WalkableStmt interface.\n\n```go\ntype SelectExpr struct {\n\tExpr Expr\n\tAs   Name\n}\n```\nSelectExpr represents a SELECT expression.\n\n```go\nfunc (node SelectExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype SelectExprs []SelectExpr\n```\nSelectExprs represents SELECT expressions.\n\n```go\nfunc (node SelectExprs) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype SelectStatement interface {\n\tStatement\n\t// contains filtered or unexported methods\n}\n```\nSelectStatement any SELECT statement.\n\n```go\ntype SemaContext struct {\n\t// Placeholders relates placeholder names to their type and, later, value.\n\tPlaceholders *PlaceholderInfo\n\n\t// Location references the *Location on the current Session.\n\tLocation **time.Location\n}\n```\nSemaContext defines the context in which to perform semantic analysis on an expression syntax tree.\n\n```go\nfunc MakeSemaContext() SemaContext\n```\nMakeSemaContext initializes a simple SemaContext suitable for \"lightweight\" type checking such as the one performed for default expressions.\n\n```go\ntype Set struct {\n\tName   *QualifiedName\n\tValues Exprs\n}\n```\nSet represents a SET statement.\n\n```go\nfunc (stmt *Set) CopyNode() *Set\n```\nCopyNode makes a copy of this Expr without recursing in any child Exprs.\n\n```go\nfunc (node *Set) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*Set) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*Set) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *Set) String() string\n```\n\n```go\nfunc (stmt *Set) WalkStmt(v Visitor) Statement\n```\nWalkStmt is part of the WalkableStmt interface.\n\n```go\ntype SetDefaultIsolation struct {\n\tIsolation IsolationLevel\n}\n```\nSetDefaultIsolation represents a SET SESSION CHARACTERISTICS AS TRANSACTION statement.\n\n```go\nfunc (node *SetDefaultIsolation) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*SetDefaultIsolation) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*SetDefaultIsolation) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *SetDefaultIsolation) String() string\n```\n\n```go\ntype SetTimeZone struct {\n\tValue Expr\n}\n```\nSetTimeZone represents a SET TIME ZONE statement.\n\n```go\nfunc (node *SetTimeZone) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*SetTimeZone) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*SetTimeZone) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *SetTimeZone) String() string\n```\n\n```go\ntype SetTransaction struct {\n\tIsolation    IsolationLevel\n\tUserPriority UserPriority\n}\n```\nSetTransaction represents a SET TRANSACTION statement.\n\n```go\nfunc (node *SetTransaction) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*SetTransaction) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*SetTransaction) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *SetTransaction) String() string\n```\n\n```go\ntype Show struct {\n\tName string\n}\n```\nShow represents a SHOW statement.\n\n```go\nfunc (node *Show) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*Show) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*Show) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *Show) String() string\n```\n\n```go\ntype ShowColumns struct {\n\tTable *QualifiedName\n}\n```\nShowColumns represents a SHOW COLUMNS statement.\n\n```go\nfunc (node *ShowColumns) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*ShowColumns) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*ShowColumns) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *ShowColumns) String() string\n```\n\n```go\ntype ShowCreateTable struct {\n\tTable *QualifiedName\n}\n```\nShowCreateTable represents a SHOW CREATE TABLE statement.\n\n```go\nfunc (node *ShowCreateTable) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*ShowCreateTable) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*ShowCreateTable) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *ShowCreateTable) String() string\n```\n\n```go\ntype ShowDatabases struct {\n}\n```\nShowDatabases represents a SHOW DATABASES statement.\n\n```go\nfunc (node *ShowDatabases) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*ShowDatabases) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*ShowDatabases) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *ShowDatabases) String() string\n```\n\n```go\ntype ShowGrants struct {\n\tTargets  *TargetList\n\tGrantees NameList\n}\n```\nShowGrants represents a SHOW GRANTS statement. TargetList is defined in grant.go.\n\n```go\nfunc (node *ShowGrants) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*ShowGrants) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*ShowGrants) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *ShowGrants) String() string\n```\n\n```go\ntype ShowIndex struct {\n\tTable *QualifiedName\n}\n```\nShowIndex represents a SHOW INDEX statement.\n\n```go\nfunc (node *ShowIndex) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*ShowIndex) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*ShowIndex) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *ShowIndex) String() string\n```\n\n```go\ntype ShowTables struct {\n\tName *QualifiedName\n}\n```\nShowTables represents a SHOW TABLES statement.\n\n```go\nfunc (node *ShowTables) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*ShowTables) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*ShowTables) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *ShowTables) String() string\n```\n\n```go\ntype SimpleVisitFn func(expr Expr) (err error, recurse bool, newExpr Expr)\n```\nSimpleVisitFn is a function that is run for every node in the VisitPre stage; see SimpleVisit.\n\n```go\ntype SingleType struct {\n\tTyp Datum\n}\n```\nSingleType is a typeList implementation which accepts a single argument of type typ. It is logically identical to an ArgTypes implementation with length 1, but avoids the slice allocation.\n\n```go\ntype StarIndirection string\n```\nStarIndirection represents \".\\*\" in an indirection expression.\n\n```go\nfunc (s StarIndirection) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype Statement interface {\n\tfmt.Stringer\n\tNodeFormatter\n\tStatementType() StatementType\n\t// StatementTag is a short string identifying the type of statement\n\t// (usually a single verb). This is different than the Stringer output,\n\t// which is the actual statement (including args).\n\t// TODO(dt): Currently tags are always pg-compatible in the future it\n\t// might make sense to pass a tag format specifier.\n\tStatementTag() string\n}\n```\nStatement represents a statement.\n\n```go\nfunc ParseOne(sql string, syntax Syntax) (Statement, error)\n```\nParseOne parses a sql statement.\n\n```go\nfunc ParseOneTraditional(sql string) (Statement, error)\n```\nParseOneTraditional is short-hand for ParseOne(sql, Traditional)\n\n```go\nfunc WalkStmt(v Visitor, stmt Statement) (newStmt Statement, changed bool)\n```\nWalkStmt walks the entire parsed stmt calling WalkExpr on each expression, and replacing each expression with the one returned by WalkExpr.\n\n```go\ntype StatementList []Statement\n```\nStatementList is a list of statements.\n\n```go\nfunc (l StatementList) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (l StatementList) String() string\n```\n\n```go\ntype StatementType int\n```\nStatementType is the enumerated type for Statement return styles on the wire.\n\n```go\nconst (\n\t// Ack indicates that the statement does not have a meaningful\n\t// return. Examples include SET, BEGIN, COMMIT.\n\tAck StatementType = iota\n\t// DDL indicates that the statement mutates the database schema.\n\tDDL\n\t// RowsAffected indicates that the statement returns the count of\n\t// affected rows.\n\tRowsAffected\n\t// Rows indicates that the statement returns the affected rows after\n\t// the statement was applied.\n\tRows\n\t// Unknown indicates that the statement does not have a known\n\t// return style at the time of parsing. This is not first in the\n\t// enumeration because it is more convenient to have Ack as a zero\n\t// value, and because the use of Unknown should be an explicit choice.\n\t// The primary example of this statement type is EXECUTE, where the\n\t// statement type depends on the statement type of the prepared statement\n\t// being executed.\n\tUnknown\n)\n```\n\n```go\ntype StrVal struct {\n\t// contains filtered or unexported fields\n}\n```\nStrVal represents a constant string value.\n\n```go\nfunc (expr *StrVal) AvailableTypes() []Datum\n```\nAvailableTypes implements the Constant interface.\n\n```go\nfunc (expr *StrVal) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (expr *StrVal) ResolveAsType(ctx *SemaContext, typ Datum) (Datum, error)\n```\nResolveAsType implements the Constant interface.\n\n```go\nfunc (node *StrVal) String() string\n```\n\n```go\nfunc (expr *StrVal) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (expr *StrVal) Walk(_ Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype StringColType struct {\n\tName string\n\tN    int\n}\n```\nStringColType represents a STRING, CHAR or VARCHAR type.\n\n```go\nfunc (node *StringColType) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *StringColType) String() string\n```\n\n```go\ntype Subquery struct {\n\tSelect SelectStatement\n}\n```\nSubquery represents a subquery.\n\n```go\nfunc (expr *Subquery) Eval(_ *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *Subquery) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *Subquery) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (node *Subquery) String() string\n```\n\n```go\nfunc (expr *Subquery) TypeCheck(_ *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (*Subquery) Variable()\n```\nVariable implements the VariableExpr interface.\n\n```go\nfunc (expr *Subquery) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype Syntax int\n```\nSyntax is an enum of the various syntax types.\n\n```go\nconst (\n\t// Implicit default, must stay in the zero-value position.\n\tTraditional Syntax = iota\n\tModern\n)\n```\n\n```go\nfunc (i Syntax) String() string\n```\n\n```go\ntype TableDef interface {\n\tNodeFormatter\n\t// contains filtered or unexported methods\n}\n```\nTableDef represents a column, index or constraint definition within a CREATE TABLE statement.\n\n```go\ntype TableDefs []TableDef\n```\nTableDefs represents a list of table definitions.\n\n```go\nfunc (node TableDefs) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype TableExpr interface {\n\tNodeFormatter\n\t// contains filtered or unexported methods\n}\n```\nTableExpr represents a table expression.\n\n```go\ntype TableExprs []TableExpr\n```\nTableExprs represents a list of table expressions.\n\n```go\nfunc (node TableExprs) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype TableNameWithIndex struct {\n\tTable *QualifiedName\n\tIndex Name\n}\n```\nTableNameWithIndex represents a \"table@index\", used in statements that specifically refer to an index.\n\n```go\nfunc (n *TableNameWithIndex) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype TableNameWithIndexList []*TableNameWithIndex\n```\nTableNameWithIndexList is a list of indexes.\n\n```go\nfunc (n TableNameWithIndexList) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype TargetList struct {\n\tDatabases NameList\n\tTables    QualifiedNames\n}\n```\nTargetList represents a list of targets. Only one field may be non-nil.\n\n```go\nfunc (tl TargetList) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype TargetType int\n```\nTargetType represents the type of target.\n\n```go\nconst (\n\tTargetDatabase TargetType = iota\n)\n```\nEnums for target and privilege types.\n\n```go\nfunc (tt TargetType) String() string\n```\n\n```go\ntype TimestampColType struct {\n}\n```\nTimestampColType represents a TIMESTAMP type.\n\n```go\nfunc (node *TimestampColType) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *TimestampColType) String() string\n```\n\n```go\ntype TimestampTZColType struct {\n}\n```\nTimestampTZColType represents a TIMESTAMP type.\n\n```go\nfunc (node *TimestampTZColType) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *TimestampTZColType) String() string\n```\n\n```go\ntype Truncate struct {\n\tTables       QualifiedNames\n\tDropBehavior DropBehavior\n}\n```\nTruncate represents a TRUNCATE statement.\n\n```go\nfunc (node *Truncate) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*Truncate) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*Truncate) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *Truncate) String() string\n```\n\n```go\ntype Tuple struct {\n\tExprs Exprs\n\t// contains filtered or unexported fields\n}\n```\nTuple represents a parenthesized list of expressions.\n\n```go\nfunc (t *Tuple) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *Tuple) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (node *Tuple) ReturnType() Datum\n```\nReturnType implements the TypedExpr interface.\n\n```go\nfunc (node *Tuple) String() string\n```\n\n```go\nfunc (expr *Tuple) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (expr *Tuple) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype TypedExpr interface {\n\tExpr\n\t// Eval evaluates an SQL expression. Expression evaluation is a mostly\n\t// straightforward walk over the parse tree. The only significant complexity is\n\t// the handling of types and implicit conversions. See binOps and cmpOps for\n\t// more details. Note that expression evaluation returns an error if certain\n\t// node types are encountered: Placeholder, QualifiedName or Subquery. These nodes\n\t// should be replaced prior to expression evaluation by an appropriate\n\t// WalkExpr. For example, Placeholder should be replace by the argument passed from\n\t// the client.\n\tEval(*EvalContext) (Datum, error)\n\t// ReturnType provides the type of the TypedExpr, which is the type of Datum that\n\t// the TypedExpr will return when evaluated.\n\tReturnType() Datum\n}\n```\nTypedExpr represents a well-typed expression.\n\n```go\nfunc TypeCheck(expr Expr, ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck performs type checking on the provided expression tree, returning the new typed expression tree, which additionally permits evaluation and type introspection globally and on each sub-tree.\n\nWhile doing so, it will fold numeric constants and bind placeholder names to their inferred types in the provided context. The optional desired parameter can be used to hint the desired type for the root of the resulting typed expression tree.\n\n```go\nfunc TypeCheckAndRequire(expr Expr, ctx *SemaContext, required Datum, op string) (TypedExpr, error)\n```\nTypeCheckAndRequire performs type checking on the provided expression tree in an identical manner to TypeCheck. It then asserts that the resulting TypedExpr has the provided return type, returning both the typed expression and an error if it does not.\n\n```go\nfunc TypeConstants(expr Expr) (TypedExpr, error)\n```\nTypeConstants type checks all Constant literal expressions, resolving them as the Datum representations of their values. Before doing so, it first folds all numeric constants.\n\nThis means that Constants will become TypedExprs so that they can be used in contexts which expect a TypedExpr tree (such as Normalization). As such, the function is primarily intended for use while testing expressions where full type checking is not desired.\n\nTODO(nvanbenschoten) Can this visitor be preallocated (like normalizeVisitor)?\n\n```go\ntype TypedExprs []TypedExpr\n```\nTypedExprs represents a list of well-typed value expressions. It's not a valid expression because it's not parenthesized.\n\n```go\nfunc (node TypedExprs) String() string\n```\n\n```go\ntype UnaryExpr struct {\n\tOperator UnaryOperator\n\tExpr     Expr\n\t// contains filtered or unexported fields\n}\n```\nUnaryExpr represents a unary value expression.\n\n```go\nfunc (expr *UnaryExpr) Eval(ctx *EvalContext) (Datum, error)\n```\nEval implements the TypedExpr interface.\n\n```go\nfunc (node *UnaryExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ta UnaryExpr) ReturnType() Datum\n```\n\n```go\nfunc (node *UnaryExpr) String() string\n```\n\n```go\nfunc (expr *UnaryExpr) TypeCheck(ctx *SemaContext, desired Datum) (TypedExpr, error)\n```\nTypeCheck implements the Expr interface.\n\n```go\nfunc (expr *UnaryExpr) Walk(v Visitor) Expr\n```\nWalk implements the Expr interface.\n\n```go\ntype UnaryOp struct {\n\tTyp        Datum\n\tReturnType Datum\n\t// contains filtered or unexported fields\n}\n```\nUnaryOp is a unary operator.\n\n```go\ntype UnaryOperator int\n```\nUnaryOperator represents a unary operator.\n\n```go\nconst (\n\tUnaryPlus UnaryOperator = iota\n\tUnaryMinus\n\tUnaryComplement\n)\n```\nUnaryExpr.Operator\n\n```go\nfunc (i UnaryOperator) String() string\n```\n\n```go\ntype UnionClause struct {\n\tType        UnionType\n\tLeft, Right *Select\n\tAll         bool\n}\n```\nUnionClause represents a UNION statement.\n\n```go\nfunc (node *UnionClause) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*UnionClause) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (*UnionClause) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *UnionClause) String() string\n```\n\n```go\ntype UnionType int\n```\nUnionType represents one of the three set operations in sql.\n\n```go\nconst (\n\tUnionOp UnionType = iota\n\tIntersectOp\n\tExceptOp\n)\n```\nUnion.Type\n\n```go\nfunc (i UnionType) String() string\n```\n\n```go\ntype UniqueConstraint struct{}\n```\nUniqueConstraint represents UNIQUE on a column.\n\n```go\ntype UniqueConstraintTableDef struct {\n\tIndexTableDef\n\tPrimaryKey bool\n}\n```\nUniqueConstraintTableDef represents a unique constraint within a CREATE TABLE statement.\n\n```go\nfunc (node *UniqueConstraintTableDef) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype Update struct {\n\tTable     TableExpr\n\tExprs     UpdateExprs\n\tWhere     *Where\n\tReturning ReturningExprs\n}\n```\nUpdate represents an UPDATE statement.\n\n```go\nfunc (stmt *Update) CopyNode() *Update\n```\nCopyNode makes a copy of this Expr without recursing in any child Exprs.\n\n```go\nfunc (node *Update) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (*Update) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (n *Update) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *Update) String() string\n```\n\n```go\nfunc (stmt *Update) WalkStmt(v Visitor) Statement\n```\nWalkStmt is part of the WalkableStmt interface.\n\n```go\ntype UpdateExpr struct {\n\tTuple bool\n\tNames QualifiedNames\n\tExpr  Expr\n}\n```\nUpdateExpr represents an update expression.\n\n```go\nfunc (node *UpdateExpr) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype UpdateExprs []*UpdateExpr\n```\nUpdateExprs represents a list of update expressions.\n\n```go\nfunc (node UpdateExprs) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype UserPriority int\n```\nUserPriority holds the user priority for a transaction.\n\n```go\nconst (\n\tUnspecifiedUserPriority UserPriority = iota\n\tLow\n\tNormal\n\tHigh\n)\n```\nUserPriority values\n\n```go\nfunc (up UserPriority) String() string\n```\n\n```go\ntype UsingJoinCond struct {\n\tCols NameList\n}\n```\nUsingJoinCond represents a USING join condition.\n\n```go\nfunc (node *UsingJoinCond) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype ValuesClause struct {\n\tTuples []*Tuple\n}\n```\nValuesClause represents a VALUES clause.\n\n```go\nfunc (node *ValuesClause) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\nfunc (ValuesClause) StatementTag() string\n```\nStatementTag returns a short string identifying the type of statement.\n\n```go\nfunc (ValuesClause) StatementType() StatementType\n```\nStatementType implements the Statement interface.\n\n```go\nfunc (n *ValuesClause) String() string\n```\n\n```go\nfunc (stmt *ValuesClause) WalkStmt(v Visitor) Statement\n```\nWalkStmt is part of the WalkableStmt interface.\n\n```go\ntype VariableExpr interface {\n\tExpr\n\tVariable()\n}\n```\nVariableExpr is an Expr that may change per row. It is used to signal the evaluation/simplification machinery that the underlying Expr is not constant.\n\n```go\ntype VariadicType struct {\n\tTyp Datum\n}\n```\nVariadicType is a typeList implementation which accepts any number of arguments and matches when each argument is either NULL or of the type typ.\n\n```go\ntype Visitor interface {\n\t// VisitPre is called for each node before recursing into that subtree. Upon return, if recurse\n\t// is false, the visit will not recurse into the subtree (and VisitPost will not be called for\n\t// this node).\n\t//\n\t// The returned Expr replaces the visited expression and can be used for rewriting expressions.\n\t// The function should NOT modify nodes in-place; it should make copies of nodes. The Walk\n\t// infrastructure will automatically make copies of parents as needed.\n\tVisitPre(expr Expr) (recurse bool, newExpr Expr)\n\n\t// VisitPost is called for each node after recursing into the subtree. The returned Expr\n\t// replaces the visited expression and can be used for rewriting expressions.\n\t//\n\t// The returned Expr replaces the visited expression and can be used for rewriting expressions.\n\t// The function should NOT modify nodes in-place; it should make and return copies of nodes. The\n\t// Walk infrastructure will automatically make copies of parents as needed.\n\tVisitPost(expr Expr) (newNode Expr)\n}\n```\nVisitor defines methods that are called for nodes during an expression or statement walk.\n\n```go\ntype WalkableStmt interface {\n\tStatement\n\tWalkStmt(Visitor) Statement\n}\n```\nWalkableStmt is implemented by statements that can appear inside an expression (selects) or we want to start a walk from (using WalkStmt).\n\n```go\ntype When struct {\n\tCond Expr\n\tVal  Expr\n}\n```\nWhen represents a WHEN sub-expression.\n\n```go\nfunc (node *When) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n```go\ntype Where struct {\n\tType string\n\tExpr Expr\n}\n```\nWhere represents a WHERE or HAVING clause.\n\n```go\nfunc (node *Where) Format(buf *bytes.Buffer, f FmtFlags)\n```\nFormat implements the NodeFormatter interface.\n\n","path":"github.com/objectundefined/cockroach/sql/parser","name":"parser","synopsis":"","isRedistributable":true}
