Skip to content

docs: standardize table/label naming to LDBC/Neo4j convention and fix Cypher keyword casing#573

Open
longbinlai wants to merge 10 commits into
alibaba:mainfrom
longbinlai:fix/doc-naming-consistency
Open

docs: standardize table/label naming to LDBC/Neo4j convention and fix Cypher keyword casing#573
longbinlai wants to merge 10 commits into
alibaba:mainfrom
longbinlai:fix/doc-naming-consistency

Conversation

@longbinlai

Copy link
Copy Markdown
Collaborator

Summary

Fixes #572

This PR standardizes table/label naming and Cypher keyword casing across all NeuG documentation to eliminate inconsistencies that could confuse users.

Naming Convention (LDBC/Neo4j Style)

Element Convention Examples
Node labels PascalCase Person, Software, Company, User
Relationship labels UPPERCASE_SNAKE KNOWS, CREATED, WORKS_FOR, FRIENDS
Cypher keywords ALL-CAPS MATCH, RETURN, WHERE, ORDER BY, LIMIT
DDL syntax Full keywords CREATE NODE TABLE, CREATE REL TABLE

Changes

Label Naming (Node → PascalCase, Rel → UPPERCASE_SNAKE)

Cypher Manual:

  • match_clause.md, where_clause.md, return_clause.md, order_clause.md, limit_clause.md, with_clause.md, union_clause.md, merge_clause.md, dml_clause.md, index.md
  • personPerson, softwareSoftware
  • knowsKNOWS, createdCREATED
  • Output tables updated (_LABEL, _SRC_LABEL, _DST_LABEL)

Data I/O:

  • import_data.md: Unified all examples to Person/KNOWS/User/FRIENDS/WORKS_FOR
  • export_data.md: personPerson, knowsKNOWS (including JSON output)
  • load_data.md: Updated label references

Other Docs:

  • transaction.md: WorksAtWORKS_AT
  • data_types.md: All label references in tables and examples
  • extensions/load_httpfs.md: Person in COPY TO examples

Python API Reference:

  • database.md, connection.md: CREATE TABLECREATE NODE TABLE/CREATE REL TABLE

Tutorials:

  • benchmark-neug-dual-mode.md: Labels in descriptive text

Cypher Keyword Casing (Title Case → ALL-CAPS)

9 files updated: MatchMATCH, ReturnRETURN, WhereWHERE, Order BYORDER BY, LimitLIMIT, SkipSKIP, WithWITH

Test Updates

  • test_data_io_docs.py: Updated to match new doc examples (Person/KNOWS/Software/CREATED)
  • test_merge.py: followsFOLLOWS

Node.js API Reference

  • connection.md: Fixed DDL syntax references

Not Changed

  • Tutorial files using dataset-specific schemas (LDBC SNB studyAt/workAt, CodeGraph Function/CALLS) — these match their actual datasets
  • CSV filenames (e.g., person.csv, knows.csv) — only Cypher labels changed
  • Property names and variable names — unchanged

…on.md and merge_clause.md

- transaction.md: WorksAt → WORKS_AT
- merge_clause.md: follows → FOLLOWS
Standardize all documentation to use:
- Node labels: PascalCase (Person, Software, Company, User)
- Relationship labels: UPPERCASE_SNAKE (KNOWS, CREATED, WORKS_FOR, FRIENDS)
- Cypher keywords: ALL-CAPS (MATCH, RETURN, WHERE, etc.)
- DDL: CREATE NODE TABLE / CREATE REL TABLE (not CREATE TABLE)

This fixes inconsistencies where different docs mixed lowercase
(person, knows), PascalCase (Person, Company), UPPERCASE (KNOWS,
WORKS_FOR), and even camelCase (WorksAt) labels.

Fixes alibaba#572
…s_api database

- ddl_clause.md: person→Person, knows→KNOWS in all DDL examples
- load_parquet.md: person→Person, knows→KNOWS in COPY TO examples
- nodejs_api/database.md: person→Person, knows→KNOWS, CREATE TABLE→CREATE NODE/REL TABLE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: Inconsistent table/label naming and Cypher keyword casing across documentation

1 participant