[libgda/libgda-vala] GdaData.Object added sql() and record property
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda/libgda-vala] GdaData.Object added sql() and record property
- Date: Wed, 14 Dec 2011 18:58:03 +0000 (UTC)
commit 6f8de436df4c852a839982d141ec2a20fd37fc3e
Author: Daniel Espinosa <despinosa src gnome org>
Date: Wed Dec 14 12:55:38 2011 -0600
GdaData.Object added sql() and record property
* sql() returns a SqlBuilder object
* record property returns a GdaData.DataModelIterable and is used internally
libgda/data/DataObject.vala | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/libgda/data/DataObject.vala b/libgda/data/DataObject.vala
index c0a3159..b3b23bd 100644
--- a/libgda/data/DataObject.vala
+++ b/libgda/data/DataObject.vala
@@ -26,13 +26,13 @@ namespace GdaData {
private string? _field_id;
private Value? _id_value;
- private DataModel? _model;
+ private DataModelIterable _model;
public abstract string table { get; }
public DataModelIterable record {
- owned get {
- return new DataModelIterable (this._model);
+ get {
+ return this._model;
}
}
@@ -57,11 +57,11 @@ namespace GdaData {
{
this._field_id = field;
this._id_value = v;
- var q = this.build ();
+ var q = this.sql ();
var s = q.get_statement ();
var m = this.connection.statement_execute_select (s, null);
((DataSelect) m).compute_modification_statements ();
- this._model= (DataProxy) DataProxy.new (m);
+ this._model= new DataModelIterable ((DataProxy) DataProxy.new (m));
}
public unowned Value? get_value (string field)
@@ -89,7 +89,7 @@ namespace GdaData {
set_id (this._field_id, this._id_value);
}
- private SqlBuilder build ()
+ public SqlBuilder sql ()
requires (this.table != null || this.table != "")
requires (this._field_id != null || this._field_id != "")
requires (this._id_value != null)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]