Skip to content

Instantly share code, notes, and snippets.

@joshsh
Created June 17, 2024 21:22
Show Gist options
  • Save joshsh/b2349cfb0b910e2874a99315319882fd to your computer and use it in GitHub Desktop.
Save joshsh/b2349cfb0b910e2874a99315319882fd to your computer and use it in GitHub Desktop.
// A model for characterizing OpenCypher implementations in terms of supported features.
//
// Note: this is an automatically generated file. Do not edit.
syntax = "proto3";
package hydra.langs.cypher;
option java_multiple_files = true;
option java_package = "hydra.langs.cypher";
// A feature set indicating that a Cypher implementation supports aggregates, along with specifically supported aggregation features.
message AggregateSupport {
// Supports the AVG aggregate function.
bool supports_average = 1;
// Supports the COUNT aggregate function.
bool supports_count = 2;
// Supports the MAX aggregate function.
bool supports_max = 3;
// Supports the MIN aggregate function.
bool supports_min = 4;
// Supports the SUM aggregate function.
bool supports_sum = 5;
}
// A feature set indicating that a Cypher implementation supports arithmetic operations, along with specifically supported arithmetic operators.
message ArithmeticSupport {
// Supports the + operator.
bool supports_plus = 1;
// Supports the - operator.
bool supports_minus = 2;
// Supports the * operator.
bool supports_multiply = 3;
// Supports the / operator.
bool supports_divide = 4;
// Supports the % operator.
bool supports_modulus = 5;
// Supports the ^ operator.
bool supports_power_of = 6;
}
// A feature set indicating that a Cypher implementation supports comparison operations, along with specifically supported comparison operators.
message ComparisonSupport {
// Supports the = comparison operator.
bool supports_equal = 1;
// Supports the > comparison operator.
bool supports_greater_than = 2;
// Supports the >= comparison operator.
bool supports_greater_than_or_equal = 3;
// Supports the < comparison operator.
bool supports_less_than = 4;
// Supports the <= comparison operator.
bool supports_less_than_or_equal = 5;
// Supports the <> comparison operator.
bool supports_not_equal = 6;
}
// A feature set indicating that a Cypher implementation supports various kinds of atomic expressions.
message AtomSupport {
// Supports CASE expressions.
bool supports_case_expression = 1;
// Supports the COUNT (*) expression.
bool supports_count = 2;
// Supports existential subqueries.
bool supports_existential_subquery = 3;
// Supports function invocation.
bool supports_function_invocation = 4;
ListComprehensionSupport list_comprehension = 5;
LiteralSupport literal = 6;
// Supports parameter expressions.
bool supports_parameter = 7;
// Supports pattern comprehensions.
bool supports_pattern_comprehension = 8;
// Supports relationship patterns as subexpressions.
bool supports_pattern_predicate = 9;
QuantifierSupport quantifier = 10;
// Supports variable expressions (note: should be true in most if not all implementations).
bool supports_variable = 11;
}
// A feature set indicating that a Cypher implementation supports specific features. Any features which are omitted from the set are assumed to be unsupported.
message CypherSupport {
AggregateSupport aggregate = 1;
ArithmeticSupport arithmetic = 2;
AtomSupport atom = 3;
ComparisonSupport comparison = 4;
DeleteSupport delete = 5;
LogicalSupport logical = 6;
MatchSupport match = 7;
MergeSupport merge = 8;
NodePatternSupport node_pattern = 9;
NullSupport null = 10;
ProcedureCallSupport procedure_call = 11;
ProjectionSupport projection = 12;
RangeLiteralSupport range_literal = 13;
ReadingSupport reading = 14;
RelationshipDirectionSupport relationship_direction = 15;
RelationshipPatternSupport relationship_pattern = 16;
RemoveSupport remove = 17;
SetSupport set = 18;
StringSupport string = 19;
UpdatingSupport updating = 20;
}
// A feature set indicating that a Cypher implementation supports delete operations, along with specifically supported delete features.
message DeleteSupport {
// Supports the basic DELETE clause.
bool supports_delete = 1;
// Supports the DETACH DELETE clause.
bool supports_detach_delete = 2;
}
// A feature set indicating that a Cypher implementation supports list comprehensions, along with specifically supported list comprehension syntax.
message ListComprehensionSupport {
// Supports basic list comprehensions.
bool supports_list_comprehension = 1;
// Supports list range comprehensions (e.g. [1..10]).
bool supports_list_range = 2;
}
// A feature set indicating that a Cypher implementation supports various types of literal values.
message LiteralSupport {
// Supports boolean literals (note: should be true in most if not all implementations).
bool supports_boolean_literal = 1;
// Supports double-precision floating-point literals.
bool supports_double_literal = 2;
// Supports integer literals.
bool supports_integer_literal = 3;
// Supports list literals.
bool supports_list_literal = 4;
// Supports map literals.
bool supports_map_literal = 5;
// Supports the NULL literal.
bool supports_null_literal = 6;
// Supports string literals (note: should be true in most if not all implementations).
bool supports_string_literal = 7;
}
// A feature set indicating that a Cypher implementation supports logical operations, along with specifically supported logical operators.
message LogicalSupport {
// Supports the AND operator.
bool supports_and = 1;
// Supports the NOT operator.
bool supports_not = 2;
// Supports the OR operator.
bool supports_or = 3;
// Supports the XOR operator.
bool supports_xor = 4;
}
// Indicates that a Cypher implementation supports match queries (as most do), along with specifically supported match features.
message MatchSupport {
// Supports OPTIONAL MATCH.
bool supports_optional_match = 1;
}
// A feature set indicating that a Cypher implementation supports merge operations, along with specifically supported merge syntax.
message MergeSupport {
// Supports MERGE with the ON CREATE action.
bool supports_merge_on_create = 1;
// Supports MERGE with the ON MATCH action.
bool supports_merge_on_match = 2;
}
// A feature set indicating that a Cypher implementation supports node patterns, along with specifically supported node pattern features.
message NodePatternSupport {
// Supports specifying multiple labels in a node pattern.
bool supports_multiple_labels_in_node_pattern = 1;
// Supports specifying a parameter as part of a node pattern.
bool supports_node_pattern_parameter = 2;
// Supports specifying a key/value map of properties in a node pattern.
bool supports_node_pattern_property_map = 3;
// Supports binding a variable to a node in a node pattern (note: should be true in most if not all implementations).
bool supports_variable_node = 4;
// Supports omitting labels from a node pattern.
bool supports_wildcard_label_node_pattern = 5;
}
// A feature set indicating whether a Cypher implementation supports IS NULL / IS NOT NULL checks.
message NullSupport {
// Supports the IS NULL operator.
bool supports_is_null = 1;
// Supports the IS NOT NULL operator.
bool supports_is_not_null = 2;
}
// Indicates that a Cypher implementation supports procedure calls, along with specifically supported procedure call features.
message ProcedureCallSupport {
// Supports CALL within a query.
bool supports_in_query_call = 1;
// Supports standalone / top-level CALL.
bool supports_standalone_call = 2;
// Supports the YIELD clause in CALL.
bool supports_yield = 3;
}
// A feature set indicating that a Cypher implementation supports projections, along with specifically supported projection features.
message ProjectionSupport {
// Supports the LIMIT clause.
bool supports_limit = 1;
// Supports the ORDER BY clause.
bool supports_order_by = 2;
// Supports the DISTINCT keyword.
bool supports_project_distinct = 3;
// Supports the * projection.
bool supports_project_all = 4;
// Supports the AS keyword.
bool supports_project_as = 5;
// Supports the SKIP clause.
bool supports_skip = 6;
// Supports the ASC/ASCENDING and DESC/DESCENDING keywords.
bool supports_sort_order = 7;
}
// A feature set indicating that a Cypher implementation supports quantifier expressions, along with specifically supported quantifiers.
message QuantifierSupport {
// Supports the ALL quantifier.
bool supports_all = 1;
// Supports the ANY quantifier.
bool supports_any = 2;
// Supports the NONE quantifier.
bool supports_none = 3;
// Supports the SINGLE quantifier.
bool supports_single = 4;
}
// A feature set indicating that a Cypher implementation supports range literals within relationship patterns, along with specifically supported range syntax.
message RangeLiteralSupport {
// Supports the * range literal.
bool supports_star_range_literal = 1;
// Supports range literals providing an exact number of repetitions.
bool supports_exact_range_literal = 2;
// Supports range literals with a lower bound (only).
bool supports_range_literal_with_lower_bound = 3;
// Supports range literals with an upper bound (only).
bool supports_range_literal_with_upper_bound = 4;
// Supports range literals with both lower and upper bounds.
bool supports_range_literal_with_bounds = 5;
}
// A feature set capturing specific features related to reading data from the graph.
message ReadingSupport {
// Supports the UNION operator.
bool supports_union = 1;
// Supports the UNION ALL operator.
bool supports_union_all = 2;
// Supports the UNWIND clause.
bool supports_unwind = 3;
}
// A feature set indicating supported relationship directions / arrow patterns.
message RelationshipDirectionSupport {
// Supports the two-headed arrow (<-[]->) relationship direction.
bool supports_both_arrow = 1;
// Supports the left arrow (<-[]-) relationship direction.
bool supports_left_arrow = 2;
// Supports the headless arrow (-[]-) relationship direction.
bool supports_neither_arrow = 3;
// Supports the right arrow (-[]->) relationship direction.
bool supports_right_arrow = 4;
}
// A feature set indicating that a Cypher implementation supports relationship patterns, along with specifically supported relationship pattern features.
message RelationshipPatternSupport {
// Supports specifying a disjunction of multiple types in a relationship pattern.
bool supports_multiple_types_in_relationship_pattern = 1;
// Supports binding a variable to a relationship in a relationship pattern (note: should be true in most if not all implementations).
bool supports_variable_relationship = 2;
// Supports omitting types from a relationship pattern.
bool supports_wildcard_type_in_relationship_pattern = 3;
}
// Indicates that a Cypher implementation supports REMOVE operations, along with specifically supported REMOVE features.
message RemoveSupport {
// Supports REMOVE Variable:NodeLabels.
bool supports_remove_by_label = 1;
// Supports REMOVE PropertyExpression.
bool supports_romeve_by_property = 2;
}
// A feature set indicating that a Cypher implementation supports set definitions, along with specifically supported set features.
message SetSupport {
// Supports defining a set using PropertyExpression = Expression.
bool supports_set_property_equals = 1;
// Supports defining a set using Variable = Expression.
bool supports_set_variable_equals = 2;
// Supports defining a set using Variable += Expression.
bool supports_set_variable_plus_equals = 3;
// Supports defining a set using Variable:NodeLabels.
bool supports_set_variable_with_node_labels = 4;
}
// A feature set indicating that a Cypher implementation supports string functions, along with specifically supported string functions.
message StringSupport {
// Supports the CONTAINS function.
bool supports_contains = 1;
// Supports the ENDS WITH function.
bool supports_ends_with = 2;
// Supports the IN function.
bool supports_in = 3;
// Supports the STARTS WITH function.
bool supports_starts_with = 4;
}
// A feature set capturing specific features related to updating data in the graph.
message UpdatingSupport {
// Supports the CREATE clause.
bool supports_create = 1;
// Supports the SET clause.
bool supports_set = 2;
// Supports multi-part queries using WITH.
bool supports_with = 3;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment