Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

23 rader
820 B

  1. Database API Functions
  2. ----------------------
  3. Common Database functions. These are a part of the :mod:`db` Module and reproduced here because these are
  4. global and used in API
  5. .. function:: sql(query, values=(), as_dict = 0, as_list = 0, allow_testing = 1)
  6. * Execute a `query`, with given `values`
  7. * returns as a dictionary if as_dict = 1
  8. * returns as a list of lists (with cleaned up dates and decimals) if as_list = 1
  9. .. function:: convert_to_lists(res)
  10. Convert the given result set to a list of lists (with cleaned up dates and decimals)
  11. .. function:: get_value(dt, dn, fieldname)
  12. Return the value of the given field in the given record. For Single Type, set dn = None
  13. .. function:: set(doc, field, val)
  14. Set a field value in the :class:`doc.Document` and upate it in the Database.