[moriarty] r249 committed - Edited wiki page through web user interface.

4 views
Skip to first unread message

mori...@googlecode.com

unread,
Jan 13, 2010, 7:21:01 PM1/13/10
to moriar...@googlegroups.com
Revision: 249
Author: innovateer
Date: Wed Jan 13 16:16:49 2010
Log: Edited wiki page through web user interface.
http://code.google.com/p/moriarty/source/detail?r=249

Modified:
/wiki/DataTables.wiki

=======================================
--- /wiki/DataTables.wiki Tue Jan 12 03:29:21 2010
+++ /wiki/DataTables.wiki Wed Jan 13 16:16:49 2010
@@ -6,89 +6,3 @@
* DataTable
* DataTableResult
* DataTableExamples
-
-
-
-= !DataTableResult Methods =
-
-== num_rows() ==
-Returns the number of rows in the result set
-
-== num_fields() ==
-Returns the number of fields in the result set
-
-== result() ==
-Returns the query result as an array of objects, or an empty array on any
failure. Each field in the original query is mapped to an object variable.
-
-For example:
-{{{
-$dt = new DataTable('http://api.talis.com/stores/mystore');
-$dt->map('http://xmlns.com/foaf/0.1/name', 'name');
-$dt->map('http://xmlns.com/foaf/0.1/nick', 'nick');
-
-$dt->select('name,nick')->limit(10);
-$res = $dt->get();
-
-foreach ($res->result() as $row) {
- echo $row->name;
- echo $row->nick;
-}
-}}}
-
-== result_array() ==
-Returns the query result as an array of associative arrays, or an empty
array on any failure. The keys and values of the associative array
correspond with the fields and values in the results.
-
-For example:
-{{{
-$dt->select('name,nick')->limit(10);
-$res = $dt->get();
-
-foreach ($res->result_array() as $row) {
- echo $row['name'];
- echo $row['nick'];
-}
-}}}
-
-== row($index) ==
-Returns an object containing a single result row. The $index parameter is
optional and defaults to zero.
-
-{{{
-$dt = new DataTable('http://api.talis.com/stores/mystore');
-$dt->map('http://xmlns.com/foaf/0.1/name', 'name');
-$dt->map('http://xmlns.com/foaf/0.1/nick', 'nick');
-
-$dt->select('name,nick')->limit(10);
-$res = $dt->get();
-
-$row = $res->row(1);
-echo $row->name;
-echo $row->nick;
-}}}
-
-
-== row_array($index) ==
-Returns an associative array containing a single result row. The $index
parameter is optional and defaults to zero.
-
-== rowdata($index) ==
-Returns an associative array containing metadata about the values in the
specified row. The array keys correspond to field names and the values to
another associative array containing the metadata for that field's value.
The $index parameter is optional and defaults to zero.
-
-The following metadata keys are available:
-
- * type - the type of the field's value, one of "uri", "bnode"
or "literal"
- * datatype - the datatype of a literal value, or none if no datatype was
detected
- * lang - the language code of a literal value, or none if no language
was detected
-
-For example:
-{{{
-$dt->select('name,nick')->limit(10);
-$res = $dt->get();
-
-$rowdata = $res->rowdata(5);
-echo $rowdata['name']['type'];
-echo $rowdata['name']['lang'];
-echo $rowdata['name']['datatype'];
-}}}
-
-
-== to_string() ==
-Returns a tabular string representation of the results.

Reply all
Reply to author
Forward
0 new messages