[libgda/libgda-vala] Format corrections to Schema
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda/libgda-vala] Format corrections to Schema
- Date: Tue, 14 May 2013 18:14:01 +0000 (UTC)
commit 38d7f04b0089612703fa7530cb2cda9a17adaee7
Author: Daniel Espinosa <esodan gmail com>
Date: Mon May 13 18:48:46 2013 -0500
Format corrections to Schema
libgda/data/Schema.vala | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
---
diff --git a/libgda/data/Schema.vala b/libgda/data/Schema.vala
index f6cda70..73ee85a 100644
--- a/libgda/data/Schema.vala
+++ b/libgda/data/Schema.vala
@@ -2,17 +2,17 @@
/*
* libgdadata
* Copyright (C) Daniel Espinosa Ortiz 2011 <esodan gmail com>
- *
+ *
* libgda is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* libgda is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -25,12 +25,17 @@ namespace GdaData
public class Schema : Object, DbObject, DbNamedObject, DbSchema
{
private bool _update_meta = false;
-
+
public HashMap<string,DbTable> _tables = new HashMap<string,DbTable> ();
// DbObject Interface
public Connection connection { get; set; }
- public bool update_meta { get { return _update_meta; } set { _update_meta = value; } }
- public void update () throws Error
+
+ public bool update_meta {
+ get { return _update_meta; }
+ set { _update_meta = value; }
+ }
+
+ public void update () throws Error
{
connection.update_meta_store (null); // FIXME: just update schemas
var store = connection.get_meta_store ();
@@ -38,17 +43,21 @@ namespace GdaData
var vals = new HashTable<string,Value?> (str_hash,str_equal);
Value v = name;
vals.set ("name", v);
- var mt = store.extract ("SELECT * FROM _tables WHERE schema_name = ##name::string",
vals);
+ var mt =
+ store.extract ("SELECT * FROM _tables WHERE schema_name = ##name::string",
+ vals);
for (int r = 0; r < mt.get_n_rows (); r++) {
var t = new Table ();
t.connection = connection;
t.name = (string) mt.get_value_at (mt.get_column_index ("table_name"), r);
- t.table_type =
- DbTable.TableType.from_string((string) mt.get_value_at
(mt.get_column_index ("table_type"), r));
+ t.table_type =
+ DbTable.TableType.from_string(
+ (string) mt.get_value_at (mt.get_column_index
("table_type"), r));
t.schema = this;
tables.set (t.name, t);
}
}
+
public void save () throws Error {}
public void append () throws Error {}
public void drop (bool cascade) throws Error {}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]