Skip to content
Snippets Groups Projects
Commit 5c027254 authored by Zeva Burklow's avatar Zeva Burklow
Browse files

[docs] Add oracle.factories documentation

parent 47cc024d
No related branches found
Tags v0.1.2
No related merge requests found
Pipeline #1077 passed
......@@ -17,3 +17,15 @@ Hash
.. automodule:: beartools.fileio.hash
.. autofunction:: hash_file
Oracle
******
.. automodule:: beartools.oracle
Factories
~~~~~~~~~
.. automodule:: beartools.oracle.factories
.. autofunction:: dict_factory
......@@ -22,3 +22,16 @@ Hashing Files
print(hash_file("path/to/file"))
This will output the sha3_512 hash of the specified file. For more info, see the :ref:`API Reference`.
Oracle Factories
~~~~~~~~~~~~~~~~
.. code-block:: python
from beartools.oracle.factories import dict_factory
# Assuming you already have an oracledb or cx_Oracle cursor
cursor.execute(query)
cursor.rowfactory = dict_factory(cursor)
results = cursor.fetchall()
# Results will be a list of dictionaries
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment