Remove automatic generated property columns
The columns could only be text, since a typed column makes Cypher writes fail on values of another type. Leave typed columns and views to the database administrator instead, and document how to set them up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fd0dda6470
commit
9a25aa11c9
7 files changed
+21
-216
No files matched your search
@@ -4,13 +4,9 @@
|
||||
|
||||
Usage: python tests/smoke_test.py [bolt-uri] [user] [password]
|
||||
Requires: pip install neo4j
|
||||
Set PEO_SMOKE_PG_DSN (e.g. "host=localhost dbname=postgres") to also check the
|
||||
generated property columns over SQL; that needs psycopg.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
import neo4j
|
||||
from neo4j.graph import Node, Path, Relationship
|
||||
@@ -121,22 +117,6 @@ MATCH ()-[]->() RETURN { name:'relationships', data: count(*)} AS result
|
||||
|
||||
check("managed write transaction", s.execute_write(work) == 1)
|
||||
|
||||
dsn = os.environ.get("PEO_SMOKE_PG_DSN")
|
||||
if dsn:
|
||||
import psycopg
|
||||
|
||||
with psycopg.connect(dsn, user=user, password=password, autocommit=True) as pg:
|
||||
query = f'SELECT name, age FROM "{GRAPH}"."Person" ORDER BY name'
|
||||
for _ in range(30):
|
||||
try:
|
||||
rows = pg.execute(query).fetchall()
|
||||
break
|
||||
except psycopg.errors.UndefinedColumn:
|
||||
time.sleep(0.5)
|
||||
else:
|
||||
rows = None
|
||||
check("generated property columns", rows == [("Ann", "30"), ("Bob's", None)])
|
||||
|
||||
with driver.session(database="system") as s:
|
||||
s.run(f"DROP DATABASE {GRAPH}").consume()
|
||||
|
||||
|
||||
Reference in new issue
Block a user