Usage

DoordaHost

cursor.execute("SELECT * FROM table_name")# Returns generator of results# Does not put result into memory. Iterates through rows in a streaming fashion.forrowincursor.iter_result():# Do something with row# Fetch all resultsrows=cursor.fetchall()# Fetch one resultsrows=cursor.fetchone()# Fetch multiple resultsrows=cursor.fetchmany(size=10)# Get list of column namescursor.col_names# Get column names mapped to data typescursor.col_types

Simplified Functions

# Check database connectionresults=cursor.is_connected()# List all catalogsrows=cursor.show_catalogs()# List all tablesrows=cursor.show_tables("catalog_name","schema_name")# Get number of rowsrows=cursor.table_stats(catalog="catalog_name",schema="schema_name",table="table_name")