diff --git a/README.rst b/README.rst index 18bf297cb7..41b024443a 100644 --- a/README.rst +++ b/README.rst @@ -74,10 +74,8 @@ Format }, } -Example -~~~~~~~ - -For example: +Database configurations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code:: python @@ -90,6 +88,25 @@ For example: } } +Execute a query +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code:: python + + from google.cloud.spanner_dbapi import connect + + connection = connect("instance-id", "database-id") + cursor = connection.cursor() + + cursor.execute( + "SELECT *" + "FROM Singers" + "WHERE SingerId = 15" + ) + + results = cur.fetchall() + + Limitations -----------