Package ais :: Module sqlhelp :: Class insert
[hide private]
[frames] | no frames]

Class insert

source code

Help create an SQL insert statement for injecting data into a database. Wee!


To Do:

Instance Methods [hide private]
  __init__(self, table)
Create an insert with no values
  dump(self)
Print out a safer dump to std out rather than str for debugging
  __str__(self)
Return the SQL string for the insert
  add(self, field, value)
Add a field value pair to the insert

Method Details [hide private]

__init__(self, table)
(Constructor)

source code 
Create an insert with no values
Parameters:
  • table - which table are we going to insert into

dump(self)

source code 
Print out a safer dump to std out rather than str for debugging

__str__(self)
(Informal representation operator)

source code 
Return the SQL string for the insert

add(self, field, value)

source code 
Add a field value pair to the insert
Parameters:
  • field - name of the field
  • value - value to be assigned to that field.

Note: Integers and floats should NOT be converted to strings.