MCPcopy Create free account
hub / github.com/duckdb/duckdb / PivotEntryCheck

Method PivotEntryCheck

src/parser/transform/statement/transform_pivot_stmt.cpp:54–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void Transformer::PivotEntryCheck(const string &type) {
55 auto &entries = GetPivotEntries();
56 if (!entries.empty()) {
57 throw ParserException(
58 "PIVOT statements with pivot elements extracted from the data cannot be used in %ss.\nIn order to use "
59 "PIVOT in a %s the PIVOT values must be manually specified, e.g.:\nPIVOT ... ON %s IN (val1, val2, ...)",
60 type, type, entries[0]->column->ToString());
61 }
62}
63unique_ptr<SQLStatement> Transformer::GenerateCreateEnumStmt(unique_ptr<CreatePivotEntry> entry) {
64 auto result = make_uniq<CreateStatement>();
65 auto info = make_uniq<CreateTypeInfo>();

Callers

nothing calls this directly

Calls 3

ParserExceptionClass · 0.85
emptyMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected