[libgda] Added doc for GdaData.Record iteration over fields
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Added doc for GdaData.Record iteration over fields
- Date: Tue, 27 Mar 2012 00:01:45 +0000 (UTC)
commit d1c513f9d2b2b6b75324095f466a232b63e32eed
Author: Daniel Espinosa <despinosa src gnome org>
Date: Mon Mar 26 18:00:40 2012 -0600
Added doc for GdaData.Record iteration over fields
doc/mallard/gda-data/Record-Class.page | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/doc/mallard/gda-data/Record-Class.page b/doc/mallard/gda-data/Record-Class.page
index 8ddf59c..2f985e3 100644
--- a/doc/mallard/gda-data/Record-Class.page
+++ b/doc/mallard/gda-data/Record-Class.page
@@ -109,4 +109,18 @@
The above code declares a <code>MyRecord.name</code> property witch uses <code>Record.get_value()</code> and <code>Record.set_field_value()</code> from its base class, to get and set its value.
</p>
</section>
+ <section id="record-fields">
+ <title>Iterating through Fields</title>
+ <p>
+ You can iterate over <code>Record</code>'s fields using Vala <code>foreach</code> statement, by using <code>Record.fields</code> property; it's a <code>Gee.Collection</code> of <code>DbField</code> objects, then you can use:
+ </p>
+ <code mime="text/x-c++src">
+ foreach (DbField f in record.fields) {
+ /* work with DbField object */
+ }
+ </code>
+ <p>
+ The same apply for all keys you set by using <code>Record.keys</code> property.
+ </p>
+ </section>
</page>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]