@@ -270,8 +270,8 @@ For example:
270270 raise gaierror(" Unexpected socket address %r " % socket_address)
271271
272272 driver = GraphDatabase.driver(" neo4j://example.com:9999" ,
273- auth = (" neo4j" , " password" ),
274- resolver = custom_resolver)
273+ auth = (" neo4j" , " password" ),
274+ resolver = custom_resolver)
275275
276276
277277:Default: ``None ``
@@ -484,9 +484,9 @@ Name of the database to query.
484484
485485
486486.. py :attribute :: neo4j.DEFAULT_DATABASE
487- :noindex:
487+ :noindex:
488488
489- This will use the default database on the Neo4j instance.
489+ This will use the default database on the Neo4j instance.
490490
491491
492492.. Note ::
@@ -501,9 +501,10 @@ Name of the database to query.
501501
502502.. code-block :: python
503503
504- from neo4j import GraphDatabase
505- driver = GraphDatabase.driver(uri, auth = (user, password))
506- session = driver.session(database = " system" )
504+ from neo4j import GraphDatabase
505+
506+ driver = GraphDatabase.driver(uri, auth = (user, password))
507+ session = driver.session(database = " system" )
507508
508509
509510:Default: ``neo4j.DEFAULT_DATABASE ``
@@ -536,9 +537,10 @@ context of the impersonated user. For this, the user for which the
536537
537538.. code-block :: python
538539
539- from neo4j import GraphDatabase
540- driver = GraphDatabase.driver(uri, auth = (user, password))
541- session = driver.session(impersonated_user = " alice" )
540+ from neo4j import GraphDatabase
541+
542+ driver = GraphDatabase.driver(uri, auth = (user, password))
543+ session = driver.session(impersonated_user = " alice" )
542544
543545
544546:Default: ``None ``
@@ -676,9 +678,10 @@ Example:
676678 return record[" node_id" ]
677679
678680 def set_person_name (tx , node_id , name ):
679- result = tx.run(" MATCH (a:Person) WHERE id(a) = $id SET a.name = $name" , id = node_id, name = name)
680- info = result.consume()
681- # use the info for logging etc.
681+ query = " MATCH (a:Person) WHERE id(a) = $id SET a.name = $name"
682+ result = tx.run(query, id = node_id, name = name)
683+ summary = result.consume()
684+ # use the summary for logging etc.
682685
683686 .. _managed-transactions-ref :
684687
@@ -1091,9 +1094,9 @@ Point (WGS-84) :class:`neo4j.spatial.WGS84Point`
10911094Point
10921095=====
10931096
1094-
10951097.. autoclass :: neo4j.spatial.Point
1096- :members:
1098+ :show-inheritance:
1099+ :members:
10971100
10981101
10991102CartesianPoint
@@ -1102,31 +1105,43 @@ CartesianPoint
11021105.. autoclass :: neo4j.spatial.CartesianPoint
11031106 :show-inheritance:
11041107
1105- .. autoproperty :: srid
1108+ .. property :: x
1109+ :type: float
1110+
1111+ Same value as ``point[0] ``.
1112+
1113+ .. property :: y
1114+ :type: float
11061115
1107- .. autoproperty :: x
1116+ Same value as `` point[1] ``.
11081117
1109- .. autoproperty :: y
1118+ .. property :: z
1119+ :type: float
11101120
1111- .. autoproperty :: z
1121+ Same value as `` point[2] ``.
11121122
1113- .. automethod :: count
1123+ Only available if the point is in 3D space.
11141124
1115- .. automethod :: index
11161125
1126+ Examples
1127+ --------
11171128
11181129.. code-block :: python
11191130
1120- point = CartesianPoint(( 1.23 , 4.56 )
1131+ from neo4j.spatial import CartesianPoint
11211132
1122- print (point.x, point.y)
1133+ point = CartesianPoint((1.23 , 4.56 )
1134+ print (point.x, point.y, point.srid)
1135+ # 1.23 4.56 7203
11231136
11241137
11251138.. code- block:: python
11261139
1127- point = CartesianPoint(( 1.23 , 4.56 , 7.89 )
1140+ from neo4j.spatial import CartesianPoint
11281141
1129- print (point.x, point.y, point.z)
1142+ point = CartesianPoint((1.23 , 4.56 , 7.89 )
1143+ print (point.x, point.y, point.z, point.srid)
1144+ # 1.23 4.56 7.8 9157
11301145
11311146
11321147WGS84Point
@@ -1135,37 +1150,61 @@ WGS84Point
11351150.. autoclass:: neo4j.spatial.WGS84Point
11361151 :show- inheritance:
11371152
1138- .. autoproperty:: srid
1153+ .. property:: x
1154+ :type : float
1155+
1156+ Same value as `` point[0 ]`` .
1157+
1158+ .. property:: y
1159+ :type : float
11391160
1140- .. autoproperty:: x
1161+ Same value as `` point[ 1 ] `` .
11411162
1142- .. autoproperty:: y
1163+ .. property:: z
1164+ :type : float
11431165
1144- .. autoproperty:: z
1166+ Same value as `` point[ 2 ] `` .
11451167
1146- .. autoproperty:: longitude
1168+ Only available if the point is in 3D space.
11471169
1148- .. autoproperty:: latitude
1170+ .. property:: longitude
1171+ :type : float
11491172
1150- .. autoproperty:: height
1173+ Alias for :attr: `.x` .
11511174
1152- .. automethod:: count
1175+ .. property:: latitude
1176+ :type : float
11531177
1154- .. automethod:: index
1178+ Alias for :attr: `.y` .
11551179
1180+ .. property:: height
1181+ :type : float
11561182
1183+ Alias for :attr:`.z` .
11571184
1185+ Only available if the point is in 3D space.
1186+
1187+
1188+ Examples
1189+ --------
11581190
11591191.. code- block:: python
11601192
1161- point = WGS84Point((1.23 , 4.56 ))
1162- print (point.longitude, point.latitude)
1193+ from neo4j.spatial import WGS84Point
1194+
1195+ point = WGS84Point((1.23 , 4.56 ))
1196+ print (point.longitude, point.latitude, point.srid)
1197+ # 1.23 4.56 4326
11631198
11641199
11651200.. code- block:: python
11661201
1167- point = WGS84Point((1.23 , 4.56 , 7.89 ))
1168- print (point.longitude, point.latitude, point.height)
1202+ from neo4j.spatial import WGS84Point
1203+
1204+ point = WGS84Point((1.23 , 4.56 , 7.89 ))
1205+ print (point.longitude, point.latitude, point.height, point.srid)
1206+ # 1.23 4.56 7.89 4979
1207+
11691208
11701209
11711210** *****************
0 commit comments