swat.cas.table.CASTable.__getattr__

CASTable.__getattr__(self, name)

Get named parameter, CAS action, or table column

When attributes are accessed on a CASTable object, they lookup goes through several levels. First, if the attribute is a real Python attribute on the CASTable object, that value will get returned.

Second, if the requested attribute is the name of a CAS table parameter and the parameter has been set, the value of that parameter will be returned.

Third, if the CASTable object has a connection registered with it and the requested attribute name matches the name of a CAS action or CAS action set, that object will be returned.

Finally, if the attribute value matches the name of a CAS table column, a CASColumn is returned.

Parameters
namestring

Name of the attribute to locate.

Returns
any

Examples

>>> conn = swat.CAS()
>>> tbl = CASTable('my-table')
>>> tbl.where = 'a > 2'
>>> tbl.noattr = True
>>> print(tbl.params)
{'name': 'my-table', 'where': 'a > 2'}
>>> print(tbl.noattr)
True
>>> print(tbl.datacol)
CASColumn('my-table', vars=['datacol'])
>>> print(tbl.summary)
?.simple.Summary()