You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor Python tests to use unified property access method
- Updated all test files to replace `get_property` method calls with the new `get` method for consistency and improved readability.
- Adjusted comments to reflect the use of Python API instead of Java API where applicable.
- Ensured that all assertions in tests are aligned with the new method signatures.
Copy file name to clipboardExpand all lines: bindings/python/docs/api/batch.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,7 +197,8 @@ with db.batch_context() as batch:
197
197
```
198
198
199
199
!!! note "Edge Creation is Synchronous"
200
-
Unlike vertex/document creation, edge creation with `newEdge()` is synchronous and immediately persists the edge. The callback is called immediately after creation.
200
+
Unlike vertex/document creation, edge creation with `new_edge()` is synchronous and
201
+
immediately persists the edge. The callback is called immediately after creation.
201
202
202
203
---
203
204
@@ -225,8 +226,8 @@ to_delete = list(db.query("sql", "SELECT FROM User WHERE inactive = true"))
Copy file name to clipboardExpand all lines: bindings/python/docs/api/database.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,7 +151,7 @@ Execute a query and return results. Queries are read-only and don't require a tr
151
151
# Simple query
152
152
result = db.query("sql", "SELECT FROM Person WHERE age > 25")
153
153
for record in result:
154
-
print(record.get_property('name'))
154
+
print(record.get('name'))
155
155
156
156
# Parameterized query
157
157
result = db.query("sql", "SELECT FROM Person WHERE age > ?", 25)
@@ -337,13 +337,13 @@ with db.transaction():
337
337
vertex.set("age", 30)
338
338
vertex.save()
339
339
340
-
print(f"Created: {vertex.getIdentity()}")
340
+
print(f"Created: {vertex.get_rid()}")
341
341
```
342
342
343
343
!!! info "Creating Edges"
344
344
There is no `db.new_edge()` method. Edges are created **from vertices**:
345
345
```python
346
-
edge = vertex1.newEdge("Knows", vertex2)
346
+
edge = vertex1.new_edge("Knows", vertex2)
347
347
edge.save()
348
348
```
349
349
See [Graph Operations](../guide/graphs.md) for details.
@@ -413,8 +413,7 @@ db.create_vector_index(
413
413
dimensions: int,
414
414
distance_function: str="cosine",
415
415
max_connections: int=32,
416
-
beam_width: int=256,
417
-
quantization: str=None
416
+
beam_width: int=256
418
417
) -> VectorIndex
419
418
```
420
419
@@ -430,7 +429,6 @@ Create a vector index for similarity search (default JVector implementation).
430
429
-`distance_function` (str): `"cosine"`, `"euclidean"`, or `"inner_product"`
431
430
-`max_connections` (int): Max connections per node (default: 32). Maps to `maxConnections` in JVector.
432
431
-`beam_width` (int): Beam width for search/construction (default: 256). Maps to `beamWidth` in JVector.
433
-
-`quantization` (str): Vector quantization type (default: None). Options: `"INT8"`, `"BINARY"`. Reduces memory usage and speeds up search at the cost of some precision.
0 commit comments