get_cursor

BaseQueryBuilder.get_cursor(cursor_name=None, cursor_class=None, *args, **kwargs)[source]

Create and return a new database cursor object.

It’s recommended to override this method if you’re inheriting from this class, as this Generic version of get_cursor does not make use of cursor_name nor cursor_class.

Parameters
  • cursor_name (str) – (If DB API supports it) The name for this cursor

  • cursor_class (type) – (If DB API supports it) The cursor class to use

Return GenericCursor cursor

A cursor object which should implement at least the basic Python DB API Cursor functionality as specified in GenericCursor ((PEP 249)