cypher-graphdb 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cypher_graphdb-0.2.3/src/cypher_graphdb.egg-info → cypher_graphdb-0.2.4}/PKG-INFO +1 -1
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/age/agebulkwriter.py +77 -8
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/age/ageserializer.py +20 -12
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/age/agesqlbuilder.py +37 -3
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4/src/cypher_graphdb.egg-info}/PKG-INFO +1 -1
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/.env.age.example +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/.env.example +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/.env.memgraph.example +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/.github/workflows/ci.yml +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/.github/workflows/publish.yml +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/.github/workflows/release.yml +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/.gitignore +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/.pre-commit-config.yaml +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/AGENTS.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/CHANGELOG.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/CONTRIBUTING.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/LICENSE.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/README.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/Taskfile.yml +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/cli +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/TODO.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/changelog.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/css/material.css +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/css/mkdocstrings.css +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/css/style.css +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/design/duckdb-migration.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/design/falkordb-integration.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/design/hierarchical-export-format.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/design/multiple-statement-execution.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/design/parameterized-queries-for-typed-models.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/design/query-result-immutable-design.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/design/read-only-mode.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/design/stateless-multi-graph-support.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/documentation-guide.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/examples/docstring_examples.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/index.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/reference/cypher_graphdb/backends/age/index.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/reference/cypher_graphdb/backends/index.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/reference/cypher_graphdb/cli/index.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/reference/cypher_graphdb/cypher/index.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/reference/cypher_graphdb/index.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/reference/cypher_graphdb/tools/index.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/usage/index.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/mkdocs.yml +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/pyproject.toml +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/scripts/gen_ref_nav.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/setup.cfg +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/__init__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/__main__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/args.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backend.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backendprovider.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/__init__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/age/__init__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/age/agegraphdb.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/age/agerowfactories.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/age/agesearch.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/age/agtype.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/age/agtype_parser.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/memgraph/__init__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/memgraph/memgraphdb.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/memgraph/memgraphrowfactories.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cardinality.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/__init__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/app.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/banner.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/command_manager.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/command_map.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/command_registry.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/__init__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/add_graph_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/apply_config_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/base_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/clear_graph_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/commit_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/connect_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/create_edge_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/create_graph_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/create_linked_node_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/create_node_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/delete_graphobj_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/disconnect_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/drop_graph_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/dump_backends_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/dump_graphs_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/dump_indexes_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/dump_labels_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/dump_models_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/dump_parsed_query_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/dump_schema_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/dump_statistics_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/execute_cypher_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/execute_file_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/exit_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/export_graph_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/fetch_all_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/fetch_edges_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/fetch_nodes_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/format_output_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/get_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/gid_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/graph_exists_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/graph_op_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/graph_to_tree_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/help_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/import_graph_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/last_result_op_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/load_models_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/resolve_edges_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/rollback_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/search_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/set_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/sql_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/update_graphobj_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/use_graph_command.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/completer.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/config.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/exporter.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/file_executor.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/graphdata.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/graphdb.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/help/_overview.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/help/_template.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/help/add_graph.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/help/exit.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/help/export_graph.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/help/import_graph.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/help/last_result.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/help.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/importer.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/prompt.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/promptparser.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/provider.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/renderer.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/runtime.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/schema_cmd.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/settings.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/command_reader.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/config.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/.antlr/Cypher.interp +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/.antlr/Cypher.tokens +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/.antlr/CypherBaseListener.java +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/.antlr/CypherLexer.interp +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/.antlr/CypherLexer.java +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/.antlr/CypherLexer.tokens +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/.antlr/CypherListener.java +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/.antlr/CypherParser.java +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/Cypher.g4 +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/Cypher.interp +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/Cypher.tokens +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/CypherLexer.interp +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/CypherLexer.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/CypherLexer.tokens +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/CypherListener.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/CypherParser.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/__init__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypherbuilder.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cyphergraphdb/__init__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cyphergraphdb/batch.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cyphergraphdb/bulk_normalize.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cyphergraphdb/connection.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cyphergraphdb/criteria.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cyphergraphdb/cyphergraphdb.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cyphergraphdb/indexing.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cyphergraphdb/result.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cyphergraphdb/schema.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cyphergraphdb/search.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cyphergraphdb/sql.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cyphergraphdb/stream_mixin.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypherjson.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypherparser.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/dbpool.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/decorators.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/display.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/exceptions.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/graphops.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/main.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/modelinfo.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/modelprovider.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/models.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/options.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/schema/__init__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/schema/converter.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/schema/core.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/schema/generator.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/settings.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/statistics.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/__init__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/base_exporter.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/base_importer.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/csv_exporter.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/csv_importer.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/csv_source.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/data_flattener.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/excel_exporter.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/excel_importer.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/excel_row_source.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/file_exporter.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/file_importer.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/hierarchical_exporter.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/hierarchical_importer.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/hierarchical_row_source.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/json_importer.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/json_yaml_data_source.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/row_collector.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/row_set.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/row_source.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/tabular_importer.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/tools/yaml_importer.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/utils/__init__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/utils/collection_utils.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/utils/column_utils.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/utils/connection_utils.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/utils/conversion_utils.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/utils/core_utils.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/utils/schema_merge.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/utils/schema_to_llm.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/utils/schema_utils.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/utils/settings_repr.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/utils/string_utils.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb.egg-info/SOURCES.txt +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb.egg-info/dependency_links.txt +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb.egg-info/entry_points.txt +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb.egg-info/requires.txt +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb.egg-info/top_level.txt +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/README.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/conftest.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/integration/__init__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/integration/conftest.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/integration/test_basic_operations.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/integration/test_create_or_merge.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/integration/test_example.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/integration/test_indexes_and_bulk.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/integration/test_parameters.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/integration/test_read_only_mode.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/integration/test_streaming.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/test_json_schema_loading.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/test_json_schema_vs_decorators.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/README.md +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/__init__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/cli/__init__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/cli/test_cmd_map.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/cli/test_command_registry.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/mock_backend.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_age_serializer.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_age_sqlbuilder.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_agtype_parser.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_backend_capabilities.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_bulk_normalize.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_column_utils.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_command_reader.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_cypherbuilder.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_cypherparser.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_dbpool.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_dict_access_mixin.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_extend_relation_decorator.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_extend_relations.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_graph_id_zero.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_graphops.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_indexing.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_model_inheritance.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_modelinfo.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_modelprovider_loading.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_modelprovider_schemas.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_models.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/test_schema_converter.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/tools/__init__.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/tools/test_data_flattener.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/tools/test_exporters.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/tools/test_hierarchical_importer.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/tools/test_json_yaml_data_source.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/tools/test_resource_management.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/tools/test_tabular_import.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/utils/test_collection_utils.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/utils/test_connection_utils.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/utils/test_conversion_utils.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/utils/test_core_utils.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/utils/test_schema_merge.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/utils/test_schema_utils.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/utils/test_settings_repr.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/tests/unit/utils/test_string_utils.py +0 -0
- {cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cypher_graphdb
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: ORM like library and CLI for cypher query language supporting graph databases.
|
|
5
5
|
Author-email: Wolfgang Miller <wolfgang.miller@petrarca-labs.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/age/agebulkwriter.py
RENAMED
|
@@ -37,6 +37,13 @@ class AGEBulkWriter:
|
|
|
37
37
|
def __init__(self, connection: psycopg.Connection, graph_name: str) -> None:
|
|
38
38
|
self._conn = connection
|
|
39
39
|
self._graph_name = graph_name
|
|
40
|
+
# Cache for {(label, ref_prop): {ref_value: graphid}} maps.
|
|
41
|
+
# Avoids repeated full-table scans when bulk_insert_edges is called
|
|
42
|
+
# many times with the same src/dst labels (e.g. 400+ batches of CALLS
|
|
43
|
+
# edges all resolving against Method.qualified_name).
|
|
44
|
+
# Invalidated by invalidate_graphid_cache() after node inserts that
|
|
45
|
+
# change the graphid mapping.
|
|
46
|
+
self._graphid_cache: dict[tuple[str, str], dict[str, int]] = {}
|
|
40
47
|
|
|
41
48
|
# -- Public API -----------------------------------------------------------
|
|
42
49
|
|
|
@@ -83,6 +90,9 @@ class AGEBulkWriter:
|
|
|
83
90
|
total += len(batch)
|
|
84
91
|
|
|
85
92
|
logger.debug("Direct SQL: {} {} nodes inserted", total, label)
|
|
93
|
+
# Invalidate cached graphid maps for this label so subsequent edge
|
|
94
|
+
# inserts see the newly created nodes.
|
|
95
|
+
self.invalidate_graphid_cache(label)
|
|
86
96
|
return total
|
|
87
97
|
|
|
88
98
|
def bulk_insert_edges(
|
|
@@ -122,12 +132,17 @@ class AGEBulkWriter:
|
|
|
122
132
|
|
|
123
133
|
label_id = self._ensure_label(label, kind="e")
|
|
124
134
|
|
|
125
|
-
#
|
|
126
|
-
|
|
135
|
+
# Collect the unique ref values we actually need -- avoids loading
|
|
136
|
+
# the entire label table (which can be 200K+ rows in a shared graph).
|
|
137
|
+
src_refs = {e["src"] for e in edges}
|
|
138
|
+
dst_refs = {e["dst"] for e in edges}
|
|
139
|
+
|
|
140
|
+
# Build {ref_value: graphid} maps for only the referenced nodes
|
|
141
|
+
src_map = self._build_graphid_index(src_label, src_ref_prop, ref_values=src_refs)
|
|
127
142
|
if src_label == dst_label and src_ref_prop == dst_ref_prop:
|
|
128
|
-
dst_map =
|
|
143
|
+
dst_map = self._build_graphid_index(dst_label, dst_ref_prop, ref_values=src_refs | dst_refs)
|
|
129
144
|
else:
|
|
130
|
-
dst_map = self._build_graphid_index(dst_label, dst_ref_prop)
|
|
145
|
+
dst_map = self._build_graphid_index(dst_label, dst_ref_prop, ref_values=dst_refs)
|
|
131
146
|
|
|
132
147
|
total = 0
|
|
133
148
|
skipped = 0
|
|
@@ -240,14 +255,68 @@ class AGEBulkWriter:
|
|
|
240
255
|
inner = inner.replace("'", "''")
|
|
241
256
|
return "'" + inner + "'"
|
|
242
257
|
|
|
243
|
-
def
|
|
244
|
-
"""
|
|
258
|
+
def invalidate_graphid_cache(self, label: str | None = None) -> None:
|
|
259
|
+
"""Drop cached graphid maps so the next lookup re-reads from the database.
|
|
260
|
+
|
|
261
|
+
Call after inserting nodes into a label that is later used as an edge
|
|
262
|
+
endpoint, so the graphid map includes the newly inserted nodes.
|
|
263
|
+
|
|
264
|
+
Args:
|
|
265
|
+
label: If given, only invalidate caches for this label.
|
|
266
|
+
If None, clear the entire cache.
|
|
267
|
+
"""
|
|
268
|
+
if label is None:
|
|
269
|
+
self._graphid_cache.clear()
|
|
270
|
+
else:
|
|
271
|
+
keys_to_drop = [k for k in self._graphid_cache if k[0] == label]
|
|
272
|
+
for k in keys_to_drop:
|
|
273
|
+
del self._graphid_cache[k]
|
|
274
|
+
|
|
275
|
+
def _build_graphid_index(self, label: str, ref_prop: str, ref_values: set[str] | None = None) -> dict[str, int]:
|
|
276
|
+
"""Load a {ref_prop_value: graphid} mapping for nodes of a label.
|
|
277
|
+
|
|
278
|
+
When ``ref_values`` is provided, only loads graphids for those specific
|
|
279
|
+
property values (using a WHERE IN clause). This is critical for shared
|
|
280
|
+
graphs where a label table may contain hundreds of thousands of rows
|
|
281
|
+
across all sources, but only a small subset is needed for the current
|
|
282
|
+
edge batch.
|
|
283
|
+
|
|
284
|
+
When ``ref_values`` is None, loads the entire table (used for small
|
|
285
|
+
labels like structural edges).
|
|
286
|
+
|
|
287
|
+
Results are cached per (label, ref_prop) and incrementally extended
|
|
288
|
+
when new ref_values are requested.
|
|
245
289
|
|
|
246
290
|
Values returned by agtype_access_operator are agtype-quoted strings
|
|
247
291
|
(e.g. '"mth:foo.bar"'), so we strip the surrounding quotes.
|
|
248
292
|
"""
|
|
249
|
-
|
|
293
|
+
cache_key = (label, ref_prop)
|
|
294
|
+
cached = self._graphid_cache.get(cache_key)
|
|
295
|
+
|
|
296
|
+
if ref_values is not None and cached is not None:
|
|
297
|
+
# Check if all requested values are already in the cache
|
|
298
|
+
missing = ref_values - cached.keys()
|
|
299
|
+
if not missing:
|
|
300
|
+
return cached
|
|
301
|
+
# Only query the missing values
|
|
302
|
+
ref_values = missing
|
|
303
|
+
|
|
304
|
+
if ref_values is not None and ref_values:
|
|
305
|
+
sql_stmt = SQLBuilder.lookup_node_graphids_filtered_sql(self._graph_name, label, ref_prop, ref_values)
|
|
306
|
+
else:
|
|
307
|
+
sql_stmt = SQLBuilder.lookup_node_graphids_sql(self._graph_name, label, ref_prop)
|
|
308
|
+
|
|
250
309
|
with self._conn.cursor() as cursor:
|
|
251
310
|
cursor.execute(sql_stmt)
|
|
252
311
|
rows = cursor.fetchall()
|
|
253
|
-
|
|
312
|
+
result = {str(r[0]).strip('"'): r[1] for r in rows}
|
|
313
|
+
|
|
314
|
+
# Merge into cache
|
|
315
|
+
if cached is not None:
|
|
316
|
+
cached.update(result)
|
|
317
|
+
logger.debug("Graphid index extended for {}.{}: +{} entries (total {})", label, ref_prop, len(result), len(cached))
|
|
318
|
+
return cached
|
|
319
|
+
|
|
320
|
+
self._graphid_cache[cache_key] = result
|
|
321
|
+
logger.debug("Graphid index built for {}.{}: {} entries", label, ref_prop, len(result))
|
|
322
|
+
return result
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/age/ageserializer.py
RENAMED
|
@@ -16,12 +16,30 @@ Example output:
|
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
18
|
|
|
19
|
+
def escape_string_inner(v: str) -> str:
|
|
20
|
+
"""Escape a string for use inside a double-quoted agtype/Cypher literal.
|
|
21
|
+
|
|
22
|
+
Returns the escaped content without the surrounding double quotes.
|
|
23
|
+
Null bytes are stripped (agtype does not support them).
|
|
24
|
+
|
|
25
|
+
Order matters: backslashes must be escaped before other characters.
|
|
26
|
+
"""
|
|
27
|
+
return (
|
|
28
|
+
v.replace("\\", "\\\\")
|
|
29
|
+
.replace('"', '\\"')
|
|
30
|
+
.replace("\n", "\\n")
|
|
31
|
+
.replace("\r", "\\r")
|
|
32
|
+
.replace("\t", "\\t")
|
|
33
|
+
.replace("\0", "")
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
|
|
19
37
|
def escape_value(v: object) -> str:
|
|
20
38
|
"""Escape a Python value for inline AGE Cypher literals.
|
|
21
39
|
|
|
22
40
|
Handles None, bool, int, float, and str-coercible values. Strings are
|
|
23
41
|
escaped for double-quoted Cypher literals: backslashes, double quotes,
|
|
24
|
-
newlines, carriage returns, and
|
|
42
|
+
newlines, carriage returns, tabs, and null bytes are all handled.
|
|
25
43
|
|
|
26
44
|
Args:
|
|
27
45
|
v: Python value (None, bool, int, float, or str-coercible).
|
|
@@ -35,17 +53,7 @@ def escape_value(v: object) -> str:
|
|
|
35
53
|
return "true" if v else "false"
|
|
36
54
|
if isinstance(v, int | float):
|
|
37
55
|
return str(v)
|
|
38
|
-
|
|
39
|
-
escaped = (
|
|
40
|
-
str(v)
|
|
41
|
-
.replace("\\", "\\\\")
|
|
42
|
-
.replace('"', '\\"')
|
|
43
|
-
.replace("\n", "\\n")
|
|
44
|
-
.replace("\r", "\\r")
|
|
45
|
-
.replace("\t", "\\t")
|
|
46
|
-
.replace("\0", "")
|
|
47
|
-
)
|
|
48
|
-
return f'"{escaped}"'
|
|
56
|
+
return f'"{escape_string_inner(str(v))}"'
|
|
49
57
|
|
|
50
58
|
|
|
51
59
|
def to_cypher_list(rows: list[dict]) -> str:
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/age/agesqlbuilder.py
RENAMED
|
@@ -9,6 +9,8 @@ from psycopg import sql
|
|
|
9
9
|
|
|
10
10
|
from cypher_graphdb.cypherparser import ParsedCypherQuery
|
|
11
11
|
|
|
12
|
+
from .ageserializer import escape_string_inner
|
|
13
|
+
|
|
12
14
|
|
|
13
15
|
class SQLBuilder:
|
|
14
16
|
"""SQL query builder for Apache AGE graph operations.
|
|
@@ -219,10 +221,11 @@ class SQLBuilder:
|
|
|
219
221
|
|
|
220
222
|
@classmethod
|
|
221
223
|
def lookup_node_graphids_sql(cls, graph_name: str, label: str, ref_prop: str) -> sql.SQL:
|
|
222
|
-
"""SQL to look up graphids of nodes by a property value.
|
|
224
|
+
"""SQL to look up graphids of all nodes of a label by a property value.
|
|
223
225
|
|
|
224
|
-
Returns
|
|
225
|
-
|
|
226
|
+
Returns (ref_value, graphid) pairs for every row in the label table.
|
|
227
|
+
Use ``lookup_node_graphids_filtered_sql`` when only a subset of values
|
|
228
|
+
is needed (avoids scanning hundreds of thousands of rows).
|
|
226
229
|
"""
|
|
227
230
|
return sql.SQL(
|
|
228
231
|
"SELECT ag_catalog.agtype_access_operator(VARIADIC ARRAY[properties, {prop}::ag_catalog.agtype])::text, id "
|
|
@@ -233,6 +236,37 @@ class SQLBuilder:
|
|
|
233
236
|
prop=sql.Literal(f'"{ref_prop}"'),
|
|
234
237
|
)
|
|
235
238
|
|
|
239
|
+
@classmethod
|
|
240
|
+
def lookup_node_graphids_filtered_sql(cls, graph_name: str, label: str, ref_prop: str, ref_values: set[str]) -> sql.SQL:
|
|
241
|
+
"""SQL to look up graphids for a specific set of property values.
|
|
242
|
+
|
|
243
|
+
Uses a WHERE ... IN (...) clause with the same agtype_access_operator
|
|
244
|
+
expression as the expression index, so the btree index is used for
|
|
245
|
+
the filter. For 500 ref values against a 200K+ row table this turns
|
|
246
|
+
a sequential scan into 500 index lookups.
|
|
247
|
+
|
|
248
|
+
The ref values are cast to ``::ag_catalog.agtype`` to match the
|
|
249
|
+
expression index type exactly. Values containing double quotes or
|
|
250
|
+
backslashes are escaped for the agtype JSON string format before
|
|
251
|
+
being wrapped in the PostgreSQL string literal via sql.Literal.
|
|
252
|
+
"""
|
|
253
|
+
# Build the IN list: each value is a double-quoted agtype string literal.
|
|
254
|
+
# escape_string_inner handles backslashes, double quotes, control chars,
|
|
255
|
+
# and null bytes -- identical escaping to the Cypher UNWIND path.
|
|
256
|
+
in_values = ", ".join(
|
|
257
|
+
sql.Literal('"' + escape_string_inner(v) + '"').as_string(None) + "::ag_catalog.agtype" for v in ref_values
|
|
258
|
+
)
|
|
259
|
+
return sql.SQL(
|
|
260
|
+
"SELECT ag_catalog.agtype_access_operator(VARIADIC ARRAY[properties, {prop}::ag_catalog.agtype])::text, id "
|
|
261
|
+
"FROM {schema}.{table} "
|
|
262
|
+
"WHERE ag_catalog.agtype_access_operator(VARIADIC ARRAY[properties, {prop}::ag_catalog.agtype]) IN ({in_vals})"
|
|
263
|
+
).format(
|
|
264
|
+
schema=sql.Identifier(graph_name),
|
|
265
|
+
table=sql.Identifier(label),
|
|
266
|
+
prop=sql.Literal(f'"{ref_prop}"'),
|
|
267
|
+
in_vals=sql.SQL(in_values),
|
|
268
|
+
)
|
|
269
|
+
|
|
236
270
|
@classmethod
|
|
237
271
|
def list_indexes(cls, graph_name: str) -> sql.SQL:
|
|
238
272
|
"""List all user-created indexes in the graph schema via pg_indexes."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cypher_graphdb
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: ORM like library and CLI for cypher query language supporting graph databases.
|
|
5
5
|
Author-email: Wolfgang Miller <wolfgang.miller@petrarca-labs.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/design/parameterized-queries-for-typed-models.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/reference/cypher_graphdb/backends/age/index.md
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/docs/reference/cypher_graphdb/backends/index.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/age/agerowfactories.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/age/agtype_parser.py
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/memgraph/__init__.py
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/backends/memgraph/memgraphdb.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/add_graph_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/base_command.py
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/clear_graph_command.py
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/commit_command.py
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/connect_command.py
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/create_edge_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/create_node_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/disconnect_command.py
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/drop_graph_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/dump_graphs_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/dump_labels_command.py
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/dump_models_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/dump_schema_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/exit_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/fetch_all_command.py
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/fetch_edges_command.py
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/fetch_nodes_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/get_command.py
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/gid_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/graph_op_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/help_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/load_models_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/rollback_command.py
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/search_command.py
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/set_command.py
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/sql_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cli/commands/use_graph_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/.antlr/Cypher.interp
RENAMED
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/.antlr/Cypher.tokens
RENAMED
|
File without changes
|
|
File without changes
|
{cypher_graphdb-0.2.3 → cypher_graphdb-0.2.4}/src/cypher_graphdb/cypher/.antlr/CypherLexer.interp
RENAMED
|
File without changes
|