Package lemon :: Package db :: Package drivers :: Module mysql :: Class mysqlCursor
[show private | hide private]
[frames | no frames]

Class mysqlCursor

baseCursor --+
             |
            mysqlCursor


Method Summary
  setupFields(self)
This function is overridden in derived classes.
  setupOptions(self)
    Inherited from baseCursor
  __init__(self, cursor, autoExecute, fetchMode, autoConvert, convertMode, colTypesName, types)
  __getattr__(self, name)
Delegate unrecognised methods/attributes to the cursor object.
  addColumnType(self, table, col, c)
Add a column type definition to the ColumnTypes table.
  ALTER(self, table, mode, columnName, dataType)
  alter(self, table, mode, columnName, columnType, autoExecute)
  average(self, field, table, where)
  checkTypes(self, table, cols)
Checks to see if the columns specified by 'cols' are all present in the cache.
  columnExists(self, table, column)
  CREATE(self, table, fields)
  create(self, table, fields, autoExecute)
Fields:...
  createColTypesTable(self)
Create the ColumnTypes table required by the DB layer.
  decodeBinary(self, field)
  decodeChar(self, field)
  decodeDate(self, field)
  decodeDateTime(self, field)
  decodeFloat(self, field)
  decodeInteger(self, field)
  decodeRow(self, types, values)
Called to convert the results of a select or function call to the correct types.
  decodeString(self, field)
  decodeTime(self, field)
  DELETE(self, table, WHERE, autoExecute)
  delete(self, table, where, autoExecute)
  DROP(self, table)
  drop(self, table, autoExecute)
Remove a table from the database.
  encodeBinary(self, field)
  encodeChar(self, field)
  encodeDate(self, field)
  encodeDateTime(self, field)
  encodeFloat(self, field)
  encodeInteger(self, field)
  encodeRow(self, types, values)
Called to encode the data sent as SQL to ensure all strings are handled correctly across each database.
  encodeString(self, field)
  encodeTime(self, field)
  execute(self, sql, values)
  fetchRows(self, fetchMode, types)
Retrieve all the rows from the query in the format of a sequence of results.
  fieldAlias(self, f)
  FUNCTION(self, func, field, table, WHERE)
Warning: Please note..
  function(self, func, field, table, where)
Warning: Please note..
  getColumnNames(self, table)
  getTableData(self, table)
Called to retrieve information on the types of each column for a particular database using the retrieval method set with the autoConvert option.
  getTypes(self, table, fields)
Called to get a list of field types from a table name and a list of field names.
  INSERT(self, table, fields, VALUES, types, autoConvert, autoExecute)
  insert(self, table, fields, values, types, autoConvert, autoExecute)
  max(self, field, table, where)
  mergeTypes(self, table, types)
  min(self, field, table, where)
  removeColumnType(self, table, col)
Remove a column type definition to the ColumnTypes table.
  removeTableTypes(self, table)
Remove all definitions for the table 'table' from the ColumnTypes table.
  SELECT(self, fields, FROM, WHERE, ORDERBY, REST, types, autoConvert, autoExecute, fetchMode)
  select(self, fields, table, where, orderby, rest, types, autoConvert, autoExecute, fetchMode)
fields should be either: 1.
  sum(self, field, table, where)
  tableExists(self, table)
  tables(self, FROM)
  tblalias(self, t)
  UPDATE(self, table, fields, VALUES, WHERE, types, autoConvert, autoExecute)
  update(self, table, fields, values, where, types, autoConvert, autoExecute)

Method Details

setupFields(self)

This function is overridden in derived classes. It is used to specify the column type integers and strings for each field type Lemon allows. You should also set the self.autoConvertOptions list in this function if it needs to be changed.
Overrides:
lemon.db.drivers.base.baseCursor.setupFields (inherited documentation)

Generated by Epydoc 2.0 on Mon Nov 10 15:07:42 2003 http://epydoc.sf.net