@@ -40,21 +40,21 @@ AsyncConnection Methods
4040 The exit point for the asynchronous connection as a context manager. This
4141 will close the connection and roll back any uncommitted transaction.
4242
43- .. method :: AsyncConnection.callfunc(name, return_type, parameters=[] , \
44- keyword_parameters={} )
43+ .. method :: AsyncConnection.callfunc(name, return_type, parameters=None , \
44+ keyword_parameters=None )
4545
4646 Calls a PL/SQL function with the given name.
4747
48- This is a shortcut for creating a cursor, calling the stored function with
49- the cursor , and then closing the cursor .
48+ This is a shortcut for calling :meth: ` AsyncConnection. cursor() `,
49+ :meth: ` AsyncCursor.callfunc() ` , and then :meth: ` AsyncCursor.close() ` .
5050
51- .. method :: AsyncConnection.callproc(name, parameters=[] , \
52- keyword_parameters={} )
51+ .. method :: AsyncConnection.callproc(name, parameters=None , \
52+ keyword_parameters=None )
5353
5454 Calls a PL/SQL procedure with the given name.
5555
56- This is a shortcut for creating a cursor, calling the stored procedure
57- with the cursor , and then closing the cursor .
56+ This is a shortcut for calling :meth: ` AsyncConnection. cursor() `,
57+ :meth: ` AsyncCursor.callproc() ` , and then :meth: ` AsyncCursor.close() ` .
5858
5959.. method :: AsyncConnection.cancel()
6060
@@ -78,59 +78,94 @@ AsyncConnection Methods
7878
7979.. method :: AsyncConnection.cursor(scrollable=False)
8080
81- A synchronous method that returns a cursor associated with the connection.
81+ A synchronous method that returns an :ref: `AsyncCursor object
82+ <asynccursorobj>` associated with the connection.
8283
8384.. method :: AsyncConnection.decode_oson(data)
8485
85- A synchronous method that decodes OSON-encoded bytes and returns the object
86- encoded in those bytes. This is useful for fetching columns which have the
87- check constraint ``IS JSON FORMAT OSON `` enabled.
86+ A synchronous method that decodes `OSON-encoded
87+ <https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-911D302C-CFAF-406B-B6A5-4E99DD38ABAD> `__
88+ bytes and returns the object encoded in those bytes. This is useful for
89+ fetching columns which have the check constraint ``IS JSON FORMAT OSON ``
90+ enabled.
8891
8992 .. versionadded :: 2.1.0
9093
9194.. method :: AsyncConnection.encode_oson(value)
9295
93- A synchronous method that encodes a Python value into OSON-encoded bytes
94- and returns them. This is useful for inserting into columns which have the
95- check constraint ``IS JSON FORMAT OSON `` enabled.
96+ A synchronous method that encodes a Python value into `OSON-encoded
97+ <https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-911D302C-CFAF-406B-B6A5-4E99DD38ABAD> `__
98+ bytes and returns them. This is useful for inserting into columns which
99+ have the check constraint ``IS JSON FORMAT OSON `` enabled.
96100
97101 .. versionadded :: 2.1.0
98102
99- .. method :: AsyncConnection.execute(statement, parameters=[] )
103+ .. method :: AsyncConnection.execute(statement, parameters=None )
100104
101105 Executes a statement against the database.
102106
103- This is a shortcut for creating a cursor, executing a statement with the
104- cursor , and then closing the cursor.
107+ This is a shortcut for calling :meth: ` AsyncConnection. cursor() `,
108+ :meth: ` AsyncCursor.execute() ` , and then :meth: ` AsyncCursor.close() `
105109
106- .. method :: AsyncConnection.executemany(statement, parameters=[] )
110+ .. method :: AsyncConnection.executemany(statement, parameters)
107111
108- Prepares a statement for execution against a database and then executes it
109- against all parameter mappings or sequences found in the sequence
110- parameters.
112+ Executes a statement against all parameter mappings or sequences found in
113+ the sequence parameters.
111114
112- This is a shortcut for creating a cursor, calling
113- :meth: `AsyncCursor.executemany() ` on the cursor, and then closing the
114- cursor.
115+ If there are no parameters, the number of iterations can be specified as an
116+ integer instead of needing to provide a list of empty mappings or
117+ sequences.
118+
119+ This is a shortcut for calling :meth: `AsyncConnection.cursor() `,
120+ :meth: `AsyncCursor.executemany() `, and then :meth: `AsyncCursor.close() `.
115121
116122.. method :: AsyncConnection.fetchall(statement, parameters=None, \
117123 arraysize=None, rowfactory=None)
118124
119- Executes a query and returns all of the rows. After the rows are
120- fetched, the cursor is closed.
125+ Executes a query and returns all of the rows.
126+
127+ The default value for ``arraysize `` is :attr: `defaults.arraysize `.
128+
129+ Internally, this method's :attr: `Cursor.prefetchrows ` size is set to the
130+ value of the explicit or default ``arraysize `` parameter value.
131+
132+ This is a shortcut for calling :meth: `AsyncConnection.cursor() `,
133+ :meth: `AsyncCursor.fetchall() `, and then :meth: `AsyncCursor.close() `.
121134
122135.. method :: AsyncConnection.fetchmany(statement, parameters=None, \
123136 num_rows=None, rowfactory=None)
124137
125- Executes a query and returns up to the specified number of rows. After the
126- rows are fetched, the cursor is closed.
138+ Executes a query and returns up to the specified number of rows.
139+
140+ The default value for ``num_rows `` is the value of
141+ :attr: `defaults.arraysize `.
142+
143+ Internally, this method's :attr: `Cursor.prefetchrows ` size is set to the
144+ value of the explicit or default ``num_rows `` parameter, allowing all rows
145+ to be fetched in one :ref: `round-trip <roundtrips >`
146+
147+ Since only one fetch is performed for a query, consider adding a ``FETCH
148+ NEXT `` clause to the statement to prevent the database processing rows that
149+ will never be fetched, see :ref: `rowlimit `.
150+
151+ This a shortcut for calling :meth: `AsyncConnection.cursor() `,
152+ :meth: `AsyncCursor.fetchmany() `, and then :meth: `AsyncCursor.close() `.
127153
128154.. method :: AsyncConnection.fetchone(statement, parameters=None, \
129155 rowfactory=None)
130156
131157 Executes a query and returns the first row of the result set if one exists
132- (or None if no rows exist). After the row is fetched, the cursor is
133- closed.
158+ (or None if no rows exist).
159+
160+ Internally, this method's :attr: `Cursor.prefetchrows ` and
161+ :attr: `Cursor.arraysize ` sizes will be set to 1.
162+
163+ Since only one fetch is performed for a query, consider adding a ``WHERE ``
164+ condition or using a ``FETCH NEXT `` clause in the statement to prevent the
165+ database processing rows that will never be fetched, see :ref: `rowlimit `.
166+
167+ This a shortcut for calling :meth: `AsyncConnection.cursor() `,
168+ :meth: `AsyncCursor.fetchone() `, and then :meth: `AsyncCursor.close() `.
134169
135170.. method :: AsyncConnection.gettype(name)
136171
@@ -145,7 +180,7 @@ AsyncConnection Methods
145180
146181 Connections may become unusable in several cases, such as, if the network
147182 socket is broken, if an Oracle error indicates the connection is unusable,
148- or, after receiving a planned down notification from the database.
183+ or after receiving a planned down notification from the database.
149184
150185 This function is best used before starting a new database request on an
151186 existing standalone connection. Pooled connections internally perform this
@@ -155,8 +190,8 @@ AsyncConnection Methods
155190 application and a new connection should be established instead.
156191
157192 This function performs a local check. To fully check a connection's health,
158- use :meth: `AsyncConnection.ping() ` which performs a round-trip to the
159- database.
193+ use :meth: `AsyncConnection.ping() ` which performs a :ref: ` round-trip
194+ <roundtrips>` to the database.
160195
161196.. method :: AsyncConnection.ping()
162197
0 commit comments