DBIx::StORM::RecordSet

StORM StORM Class FilteredRecordSet Inflater LexBindings OrderedRecordSet ParseCV Record RecordArray RecordSet RecordSetWithView SQLDriver SQLDriver:: mysql SQLDriver:: Pg Table TiedCallback TiedColumn TiedRecord TiedTable Index Everything Classes Functions Variables | # DBIx:: StORM:: RecordSet
DBIx::StORM::RecordSet
DBIx::StORM::FilteredRecordSet DBIx::StORM::OrderedRecordSet DBIx::StORM::RecordSetWithView DBIx::StORM::Table
Summary
DBIx:: StORM:: RecordSet |
Variables |
$filter_map (private static) | An array of cached results from parsing perl subroutine references into SQL.
$recommended_columns (private static) | A cache of recommended columns for a given RecordSet.
Functions |
_do_parse (private instance) | Inspect a filter target (may be a string for code reference) and decide how best to handle it.
_parse (private instance) | Actually parse a perl code reference and turn it into a glob of SQL
filter (public instance) | Create a DBIx::StORM::FilteredRecordSet to represent a filtered set of results from the database.
sort (public instance) | Create a DBIx::StORM::OrderedRecordSet to represent the same records as in this object, but sorted into a particular order.
view (instance) | Create a DBIx::StORM::RecordSetWithView to represent a set of results from the database with computed columns
lookup (instance) | Fetch the first row from this RecordSet, and optionally fetch a particular field from it.
_filter_id (private instance) | Fetch a string uniquely identifying this filter
_recommended_columns (private_instance) | Fetch a list of recommended columns for this filter
_recommend_column (private instance) | Recommend a new column for this filter to pre-fetch in future
_table (private instance) | Fetch the table object underlying this RecordSet
_as_array (private instance) | Actually do the query, and return a tied array that can be used to access the DBIx::StORM::Record objects.
array (instance) | Actually do the query, and return an array of DBIx::StORM::Record objects.
_get_sth (private instance) | Execute the query and set up a DBI statement handle
_storm (private instance) | Get the DBIx::StORM object this result set was created using
_as_string |
update |
delete |
_do_binding |
### Variables ### $filter_map (private static) An array of cached results from parsing perl subroutine references into SQL. The first level is a hash reference based on the usage of the subroutine (eg. filter, view, sort) and the next level is based on the stringified value of the code reference. =end NaturalDocs ### $recommended_columns (private static) A cache of recommended columns for a given RecordSet. The first level is a hash reference of filter IDs, and each value is a hash of column names. =end NaturalDocs ### Functions ### _do_parse (private instance) Inspect a filter target (may be a string for code reference) and decide how best to handle it. If it’s a SQL string, it’ll be fine as-is (it’s up to you to make sure it works!) whilst if it’s a perl CV it’ll need parsing into SQL and caching for next time. #### Parameters
Scalar $filter | The code reference or the string to parse
String $mode | The type of parse required for perl (eg. select, view, order)
#### Returns
String | The result of the parse
=end NaturalDocs ### _parse (private instance) Actually parse a perl code reference and turn it into a glob of SQL #### Parameters
CodeRef $filter | The code reference to parse
String $mode | The type of parse required (eg. select, view, order)
#### Returns
String | The result of the parse
=end NaturalDocs ### filter (public instance) Create a DBIx::StORM::FilteredRecordSet to represent a filtered set of results from the database. The filter is usually a perl subroutine reference with the filtering logic in it, but could be a SQL WHERE component where use of perl isn’t appropriate. #### Parameters
CodeRef $filter | The filter code as a code reference or string
#### Returns
Object | An object of type DBIx::StORM::FilteredRecordSet
=end NaturalDocs ### sort (public instance) Create a DBIx::StORM::OrderedRecordSet to represent the same records as in this object, but sorted into a particular order. The filter is usually a perl subroutine reference with the filtering logic in it, but could be a SQL ORDER BY component where use of perl isn’t appropriate. #### Parameters
$filter | The filter code as a code reference or string
#### Returns
Object | An object of type DBIx::StORM::OrderedRecordSet
=end NaturalDocs ### view (instance) Create a DBIx::StORM::RecordSetWithView to represent a set of results from the database with computed columns #### Parameters
%new_views | The view columns as hash with keys as a column name and values a code reference or string
#### Returns An object of type DBIx::StORM::OrderedRecordSet =end NaturalDocs ### lookup (instance) Fetch the first row from this RecordSet, and optionally fetch a particular field from it. #### Parameters
$field | Optionally, the field to return from the first row
#### Returns An object of type DBIx::StORM::Record if no field is supplied or the field is a foreign key, otherwise a simple scalar =end NaturalDocs ### _filter_id (private instance) Fetch a string uniquely identifying this filter #### Parameters None #### Returns
String | The filter ID
=end NaturalDocs ### _recommended_columns (private_instance) Fetch a list of recommended columns for this filter #### Parameters None #### Returns An array reference of strings representing the path of the recommended columns =end NaturalDocs ### _recommend_column (private instance) Recommend a new column for this filter to pre-fetch in future #### Parameters
String $column | The full path of the column to pre-fetch next time
#### Returns Nothing =end NaturalDocs ### _table (private instance) Fetch the table object underlying this RecordSet #### Parameters None #### Returns
Object | An object of type DBIx::StORM::Table
=end NaturalDocs ### _as_array (private instance) Actually do the query, and return a tied array that can be used to access the DBIx::StORM::Record objects. A tied array is used as it means a maximum of two result objects are kept in memory at once, but does mean you can’t randomly access or otherwise tweak the array #### Parameters None #### Returns
ArrayRef | An array reference tied to class DBIx::StORM::RecordArray
=end NaturalDocs ### array (instance) Actually do the query, and return an array of DBIx::StORM::Record objects. Unlike the array dereference, this returns a proper perl array rather than a tied array. This means you can randomly access the results, but it also takes a lot of memory #### Parameters None #### Returns
ArrayRef | An array of DBIx::StORM::Record Objects
=end NaturalDocs ### _get_sth (private instance) Execute the query and set up a DBI statement handle #### Parameters None #### Returns
Object $sth | A DBI statement handle from which query results can be fetched
HashRef $table_mapping | A mapping of column references to result indices
=end NaturalDocs ### _storm (private instance) Get the DBIx::StORM object this result set was created using #### Parameters None #### Returns
Object | A DBIx::StORM object
> =end NaturalDocs ### _as_string
> sub _as_string
> ### update
> sub update
> ### delete
> sub delete
> ### _do_binding
> sub _do_binding

> sub _as_string

> sub update

> sub delete

> sub _do_binding