Package s3 :: Module s3query :: Class S3ResourceField
[frames] | no frames]

Class S3ResourceField

source code

object --+
         |
        S3ResourceField

Helper class to resolve a field selector against a resource

Instance Methods
 
__init__(self, resource, selector, label=None)
Constructor
source code
 
__repr__(self)
String representation of this instance
source code
 
join(self)
Implicit join (Query) for this field, for backwards-compatibility
source code
 
left(self)
The left joins for this field, for backwards-compability
source code
 
extract(self, row, represent=False, lazy=False)
Extract the value for this field from a row
source code
 
is_lookup(self)
Check whether the field type is a fixed set lookup (IS_IN_SET)
source code
 
is_numeric(self)
Check whether the field type is numeric (lazy property)
source code
 
is_string(self)
Check whether the field type is a string type (lazy property)
source code
 
is_datetime(self)
Check whether the field type is date/time (lazy property)
source code
 
is_reference(self)
Check whether the field type is a reference (lazy property)
source code
 
is_list(self)
Check whether the field type is a list (lazy property)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, resource, selector, label=None)
(Constructor)

source code 

Constructor

Parameters:
  • resource - the resource
  • selector - the field selector (string)
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

String representation of this instance

Overrides: object.__repr__

join(self)

source code 

Implicit join (Query) for this field, for backwards-compatibility

Decorators:
  • @property

left(self)

source code 

The left joins for this field, for backwards-compability

Decorators:
  • @property

extract(self, row, represent=False, lazy=False)

source code 

Extract the value for this field from a row

Parameters:
  • row - the Row
  • represent - render a text representation for the value
  • lazy - return a lazy representation handle if available

is_lookup(self)

source code 

Check whether the field type is a fixed set lookup (IS_IN_SET)

Returns:
True if field type is a fixed set lookup, else False
Decorators:
  • @property

is_numeric(self)

source code 

Check whether the field type is numeric (lazy property)

Returns:
True if field type is integer or double, else False
Decorators:
  • @property

is_string(self)

source code 

Check whether the field type is a string type (lazy property)

Returns:
True if field type is string or text, else False
Decorators:
  • @property

is_datetime(self)

source code 

Check whether the field type is date/time (lazy property)

Returns:
True if field type is datetime, date or time, else False
Decorators:
  • @property

is_reference(self)

source code 

Check whether the field type is a reference (lazy property)

Returns:
True if field type is a reference, else False
Decorators:
  • @property

is_list(self)

source code 

Check whether the field type is a list (lazy property)

Returns:
True if field type is a list, else False
Decorators:
  • @property