Public Member Functions

db_query_EditableResultset Class Reference

a resultset created for editing table data. More...

#include <structs.db.query.h>

Inheritance diagram for db_query_EditableResultset:
db_query_Resultset GrtObject

List of all members.

Public Member Functions

grt::StringRef schema () const
 Getter for attribute schema.
virtual void schema (const grt::StringRef &value)
 Setter for attribute schema.
grt::StringRef table () const
 Getter for attribute table.
virtual void table (const grt::StringRef &value)
 Setter for attribute table.
virtual grt::IntegerRef addNewRow ()
 adds a new empty row to the resultset.
virtual grt::IntegerRef applyChanges ()
 generates a SQL script with all pending changes made to the resultset and executes it, once confirmed through a GUI wizard
virtual grt::IntegerRef deleteRow (long column)
 marks a row from the resultset for deletion.
virtual grt::IntegerRef loadFieldValueFromFile (long column, const std::string &file)
 loads the contents of an external file into the current row at the given column index
virtual grt::IntegerRef revertChanges ()
 discards all changes made to the resultset
virtual grt::IntegerRef setFieldNull (long column)
 sets the contents of the current row at the given column index to NULL
virtual grt::IntegerRef setFieldNullByName (const std::string &column)
 sets the contents of the current row at the given column name to NULL
virtual grt::IntegerRef setFloatFieldValue (long column, double value)
 sets the contents of the current row at the given column index
virtual grt::IntegerRef setFloatFieldValueByName (const std::string &column, double value)
 sets the contents of the current row at the given column name
virtual grt::IntegerRef setIntFieldValue (long column, long value)
 sets the contents of the current row at the given integer type column index
virtual grt::IntegerRef setIntFieldValueByName (const std::string &column, long value)
 sets the contents of the current row at the given column name
virtual grt::IntegerRef setStringFieldValue (long column, const std::string &value)
 sets the contents of the current row at the given column index
virtual grt::IntegerRef setStringFieldValueByName (const std::string &column, const std::string &value)
 sets the contents of the current row at the given column name

Detailed Description

a resultset created for editing table data.

Changes made to the resultset are queued to be applied when applyChanges() is called


Member Function Documentation

virtual grt::IntegerRef addNewRow (  )  [virtual]

adds a new empty row to the resultset.

The row contents must be set before applying changes

Returns:
virtual grt::IntegerRef applyChanges (  )  [virtual]

generates a SQL script with all pending changes made to the resultset and executes it, once confirmed through a GUI wizard

Returns:
virtual grt::IntegerRef deleteRow ( long  column  )  [virtual]

marks a row from the resultset for deletion.

The row will only be deleted in the target database when applyChanges() is called

Parameters:
column 
Returns:
virtual grt::IntegerRef loadFieldValueFromFile ( long  column,
const std::string &  file 
) [virtual]

loads the contents of an external file into the current row at the given column index

Parameters:
column 
file 
Returns:
virtual grt::IntegerRef revertChanges (  )  [virtual]

discards all changes made to the resultset

Returns:
virtual void schema ( const grt::StringRef &  value  )  [virtual]

Setter for attribute schema.

schema name of the table

In Python:
obj.schema = value
grt::StringRef schema (  )  const

Getter for attribute schema.

schema name of the table

In Python:
value = obj.schema
virtual grt::IntegerRef setFieldNull ( long  column  )  [virtual]

sets the contents of the current row at the given column index to NULL

Parameters:
column 
Returns:
virtual grt::IntegerRef setFieldNullByName ( const std::string &  column  )  [virtual]

sets the contents of the current row at the given column name to NULL

Parameters:
column 
Returns:
virtual grt::IntegerRef setFloatFieldValue ( long  column,
double  value 
) [virtual]

sets the contents of the current row at the given column index

Parameters:
column 
value 
Returns:
virtual grt::IntegerRef setFloatFieldValueByName ( const std::string &  column,
double  value 
) [virtual]

sets the contents of the current row at the given column name

Parameters:
column 
value 
Returns:
virtual grt::IntegerRef setIntFieldValue ( long  column,
long  value 
) [virtual]

sets the contents of the current row at the given integer type column index

Parameters:
column 
value 
Returns:
virtual grt::IntegerRef setIntFieldValueByName ( const std::string &  column,
long  value 
) [virtual]

sets the contents of the current row at the given column name

Parameters:
column 
value 
Returns:
virtual grt::IntegerRef setStringFieldValue ( long  column,
const std::string &  value 
) [virtual]

sets the contents of the current row at the given column index

Parameters:
column 
value 
Returns:
virtual grt::IntegerRef setStringFieldValueByName ( const std::string &  column,
const std::string &  value 
) [virtual]

sets the contents of the current row at the given column name

Parameters:
column 
value 
Returns:
grt::StringRef table (  )  const

Getter for attribute table.

name of the table being edited

In Python:
value = obj.table
virtual void table ( const grt::StringRef &  value  )  [virtual]

Setter for attribute table.

name of the table being edited

In Python:
obj.table = value