IDatabaseTableRows

class IDatabaseTableRows

Bases: ImpactCOMWrapperBase, Iterable

Description:

A collection containing objects representing each table row in the table object.

Remarks:

Operations on table rows are not immediately committed to the database. You can perform multiple operations including add, changing and deleting rows and then commit them all in a single operation. Introduced in Impact 11.0.0.27.

Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance

property count

Gets Count.

Description:

Returns the number of table rows. Includes any uncommitted deleted rows.

Returns:

The value of Count.

Return type:

count (int)

property deleted_count

Gets deleted_count.

Description:

Returns the number of table rows that are marked as deleted.

Returns:

The value of deleted_count.

Return type:

deleted_count (int)

property needs_updating_count

Gets needs_updating_count.

Description:

Returns the number of IDatabaseTableRows objects that need updating or deleting.

Returns:

The value of needs_updating_count.

Return type:

needs_updating_count (int)

property sort_columns

Gets sort_columns.

Description:

Name of column(s) used for sorting.

Remarks:

One or more cloumn names, comma-separated. For example “T_DATE desc, T_TIME desc”.

Returns:

The value of sort_columns.

Return type:

sort_columns (str)

property table

Gets Table.

Description:

Returns the table name.

Returns:

The value of Table.

Return type:

table (IDatabaseTable)

property table_relationship

Gets table_relationship.

Description:

Returns the associated ITableRelationship if the IDatabaseTableRows was retrieved from an IDatabaseTableValues collection.

Returns:

The value of table_relationship.

Return type:

table_relationship (IDatabaseTableRelationship)

add()
Description:

Adds a new empty table row.

copy(row)
Description:

Creates a new table row by copying values from an existing table row.

Parameters:

row (IDatabaseTableRow) – The row to be copied

delete(row)
Description:

Deletes a table row.

Parameters:

row (IDatabaseTableRow) – The row to be deleted

do_update()
Description:

Performs a database commit of the add/change/delete operations that have been performed on the data rows.

Remarks:

This method is not applicable for internal objects such as IDrawing or ILayer.

find(column, value, settings)
Description:

Finds the first IDatabaseTableRow object in the collection based on a specific column and value.

Parameters:
  • column (str) – Column name

  • value (any) – Value to be found

  • settings (IUnitSettings) – Unit settings to be used

item(index)
Description:

Use an integer index to retrieve each IDatabaseTableRows object in the collection. This includes uncommitted deleted rows.

Parameters:

index (any) – Specifies the index of the row to retrieve.

refresh()
Description:

Reload all table rows for the parent object.

Remarks:

WARNING: Any added/modified/deleted table rows that have not be committed to the database will be thrown away.This method is not applicable for internal objects such as IDrawing or ILayer.