@@ -21,7 +21,6 @@ You might need to use this utility in scenarios such as:
2121 - [ Oracle Specific Functions] ( #oracle-specific-functions )
2222 - [ How to Add New Oracle-Specific Functions] ( #how-to-add-new-oracle-specific-functions )
2323 - [ Example Usage] ( #example-usage-1 )
24- - [ Note] ( #note )
2524
2625## Using the Oracle Utility
2726
@@ -84,7 +83,7 @@ Common values are placed in the `SqlQueryValues` class to avoid repeating the sa
8483
8584- Define a new function in ` utils/oracle/oracle_specific_functions.py ` .
8685- Create your SQL query, ` parameterizing ` as needed.
87- - Call ` OracleDB().execute_query(query, params) ` to run the query .
86+ - Call the relevant methods from the oracle util based on your needs (e.g., ` execute_query ` , stored procedure methods, etc.) .
8887- Return the result as a pandas DataFrame.
8988- Document the function with a clear docstring.
9089
@@ -94,7 +93,11 @@ Common values are placed in the `SqlQueryValues` class to avoid repeating the sa
9493from utils.oracle.oracle import OracleDB
9594
9695def example_query () -> pd.DataFrame:
97-
96+ """
97+ Example function to demonstrate OracleDB usage for querying subject NHS numbers.
98+ Returns:
99+ pd.DataFrame: Query results as a pandas DataFrame.
100+ """
98101 example_df = OracleDB().execute_query(
99102 f """ subject_nhs_number
100103 from ep_subject_episode_t
@@ -103,7 +106,6 @@ def example_query() -> pd.DataFrame:
103106 return example_df
104107```
105108
106- ## Note
107-
108- The Oracle utility and its helper functions are available under utils/oracle/.
109- See the source code for more details.
109+ > ** Note:** <br >
110+ > The Oracle utility and its helper functions are available under utils/oracle/.<br >
111+ > See the source code for more details.
0 commit comments