MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / getColumnIDs

Function getColumnIDs

src/graph/on_disk_graph.cpp:36–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34namespace graph {
35
36static std::vector<column_id_t> getColumnIDs(const expression_vector& propertyExprs,
37 const TableCatalogEntry& relEntry, const std::vector<column_id_t>& propertyColumnIDs) {
38 auto columnIDs = std::vector{NBR_ID_COLUMN_ID};
39 for (auto columnID : propertyColumnIDs) {
40 columnIDs.push_back(columnID);
41 }
42 for (const auto& expr : propertyExprs) {
43 auto& property = expr->constCast<PropertyExpression>();
44 if (property.hasProperty(relEntry.getTableID())) {
45 columnIDs.push_back(relEntry.getColumnID(property.getPropertyName()));
46 } else {
47 columnIDs.push_back(INVALID_COLUMN_ID);
48 }
49 }
50 return columnIDs;
51}
52
53static expression_vector getProperties(std::shared_ptr<Expression> expr) {
54 if (expr == nullptr) {

Callers 1

Calls 4

hasPropertyMethod · 0.80
push_backMethod · 0.45
getColumnIDMethod · 0.45
getPropertyNameMethod · 0.45

Tested by

no test coverage detected