graphqlite 0.4.2__tar.gz → 0.4.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.
Files changed (38) hide show
  1. {graphqlite-0.4.2/src/graphqlite.egg-info → graphqlite-0.4.4}/PKG-INFO +1 -1
  2. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/__init__.py +1 -1
  3. {graphqlite-0.4.2 → graphqlite-0.4.4/src/graphqlite.egg-info}/PKG-INFO +1 -1
  4. {graphqlite-0.4.2 → graphqlite-0.4.4}/tests/test_graph.py +52 -0
  5. {graphqlite-0.4.2 → graphqlite-0.4.4}/FAQ.md +0 -0
  6. {graphqlite-0.4.2 → graphqlite-0.4.4}/README.md +0 -0
  7. {graphqlite-0.4.2 → graphqlite-0.4.4}/pyproject.toml +0 -0
  8. {graphqlite-0.4.2 → graphqlite-0.4.4}/setup.cfg +0 -0
  9. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/_platform.py +0 -0
  10. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/algorithms/__init__.py +0 -0
  11. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/algorithms/_parsing.py +0 -0
  12. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/algorithms/centrality.py +0 -0
  13. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/algorithms/community.py +0 -0
  14. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/algorithms/components.py +0 -0
  15. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/algorithms/export.py +0 -0
  16. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/algorithms/paths.py +0 -0
  17. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/algorithms/similarity.py +0 -0
  18. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/algorithms/traversal.py +0 -0
  19. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/connection.py +0 -0
  20. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/graph/__init__.py +0 -0
  21. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/graph/_base.py +0 -0
  22. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/graph/batch.py +0 -0
  23. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/graph/bulk.py +0 -0
  24. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/graph/edges.py +0 -0
  25. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/graph/nodes.py +0 -0
  26. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/graph/queries.py +0 -0
  27. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/manager.py +0 -0
  28. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite/utils.py +0 -0
  29. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite.egg-info/SOURCES.txt +0 -0
  30. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite.egg-info/dependency_links.txt +0 -0
  31. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite.egg-info/requires.txt +0 -0
  32. {graphqlite-0.4.2 → graphqlite-0.4.4}/src/graphqlite.egg-info/top_level.txt +0 -0
  33. {graphqlite-0.4.2 → graphqlite-0.4.4}/tests/test_connection.py +0 -0
  34. {graphqlite-0.4.2 → graphqlite-0.4.4}/tests/test_manager.py +0 -0
  35. {graphqlite-0.4.2 → graphqlite-0.4.4}/tests/test_new_functions.py +0 -0
  36. {graphqlite-0.4.2 → graphqlite-0.4.4}/uv.lock +0 -0
  37. {graphqlite-0.4.2 → graphqlite-0.4.4}/vendor/sqlite/sqlite3.h +0 -0
  38. {graphqlite-0.4.2 → graphqlite-0.4.4}/vendor/sqlite/sqlite3ext.h +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphqlite
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: SQLite extension for graph queries using Cypher
5
5
  Author: GraphQLite Contributors
6
6
  License: MIT
@@ -8,7 +8,7 @@ from .manager import GraphManager, graphs
8
8
  from .utils import escape_string, sanitize_rel_type, CYPHER_RESERVED
9
9
  from ._platform import get_loadable_path
10
10
 
11
- __version__ = "0.4.2"
11
+ __version__ = "0.4.4"
12
12
  __all__ = [
13
13
  "BulkInsertResult",
14
14
  "Connection", "connect", "wrap", "load", "loadable_path",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphqlite
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: SQLite extension for graph queries using Cypher
5
5
  Author: GraphQLite Contributors
6
6
  License: MIT
@@ -1717,3 +1717,55 @@ def test_unwind_merge_on_create_set(g):
1717
1717
  assert result[0]["n.name"] == "First"
1718
1718
  assert result[1]["n.id"] == "b2"
1719
1719
  assert result[1]["n.name"] == "Second"
1720
+
1721
+
1722
+ # =============================================================================
1723
+ # Spec compliance regression tests (Bugs A-E)
1724
+ # =============================================================================
1725
+
1726
+ def test_count_skips_nulls_from_optional_match(g):
1727
+ """COUNT(r) where r is null from OPTIONAL MATCH should return 0."""
1728
+ g.query("CREATE (a:CntNull {id: 'x'})")
1729
+ g.query("CREATE (p:CntPet {id: 'p'})")
1730
+ g.query("MATCH (a:CntNull), (p:CntPet) CREATE (a)-[:OWNS]->(p)")
1731
+ result = g.query("MATCH (a:CntNull) OPTIONAL MATCH (a)-->(r:Ghost) RETURN a.id AS aid, COUNT(r) AS cnt")
1732
+ assert len(result) == 1
1733
+ assert int(result[0]["cnt"]) == 0
1734
+
1735
+
1736
+ def test_edge_variable_through_with(g):
1737
+ """Relationship variables should pass through WITH for type() and property access."""
1738
+ g.query("CREATE (:EWA {id: 'a'})-[:EREL {weight: 7}]->(:EWB {id: 'b'})")
1739
+ result = g.query("MATCH (a:EWA)-[r:EREL]->(b:EWB) WITH a, b, r RETURN type(r) AS t, r.weight AS w")
1740
+ assert len(result) == 1
1741
+ assert result[0]["t"] == "EREL"
1742
+ assert int(result[0]["w"]) == 7
1743
+
1744
+
1745
+ def test_function_call_in_create_property_map(g):
1746
+ """Functions like toUpper() should be evaluated in CREATE property maps."""
1747
+ g.query("CREATE (n:FnCreate {upper: toUpper('hello'), lower: toLower('WORLD')})")
1748
+ result = g.query("MATCH (n:FnCreate) RETURN n.upper AS u, n.lower AS l")
1749
+ assert len(result) == 1
1750
+ assert result[0]["u"] == "HELLO"
1751
+ assert result[0]["l"] == "world"
1752
+
1753
+
1754
+ def test_call_subquery_exports_inner_return(g):
1755
+ """Variables returned from CALL subquery should be visible in outer scope."""
1756
+ g.query("CREATE (:CallExp {id: 'ce1'})")
1757
+ result = g.query("MATCH (a:CallExp) CALL { WITH a RETURN a.id AS inner_id } RETURN a.id AS outer_id, inner_id")
1758
+ assert len(result) == 1
1759
+ assert result[0]["outer_id"] == "ce1"
1760
+ assert result[0]["inner_id"] == "ce1"
1761
+
1762
+
1763
+ def test_call_subquery_processes_all_inner_match_rows(g):
1764
+ """CALL subquery should iterate all inner MATCH rows, not just the first."""
1765
+ g.query("CREATE (:CallCo {id: 'co'})")
1766
+ g.query("CREATE (:CallDep {id: 'd1'})")
1767
+ g.query("CREATE (:CallDep {id: 'd2'})")
1768
+ g.query("CREATE (:CallDep {id: 'd3'})")
1769
+ g.query("MATCH (c:CallCo) CALL { WITH c MATCH (d:CallDep) MERGE (c)-[:CHAS]->(d) }")
1770
+ result = g.query("MATCH (:CallCo)-[:CHAS]->(d:CallDep) RETURN d.id ORDER BY d.id")
1771
+ assert len(result) == 3
File without changes
File without changes
File without changes
File without changes
File without changes