[anjuta] symbol-db: Partially fixes bgo #615429: Optimize global and local views sql queries
- From: Naba Kumar <naba src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] symbol-db: Partially fixes bgo #615429: Optimize global and local views sql queries
- Date: Thu, 6 May 2010 19:17:04 +0000 (UTC)
commit 29ac0d1298ab86344512e8d4e7e18a2f1411ea8b
Author: Naba Kumar <naba gnome org>
Date: Thu May 6 22:20:11 2010 +0300
symbol-db: Partially fixes bgo #615429: Optimize global and local views sql queries
plugins/symbol-db/symbol-db-model-file.c | 8 ++------
plugins/symbol-db/symbol-db-model-project.c | 8 ++------
2 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/plugins/symbol-db/symbol-db-model-file.c b/plugins/symbol-db/symbol-db-model-file.c
index 20518eb..ac0c95b 100644
--- a/plugins/symbol-db/symbol-db-model-file.c
+++ b/plugins/symbol-db/symbol-db-model-file.c
@@ -32,16 +32,12 @@
sym_access.access_name, \
sym_type.type_type, \
sym_type.type_name, \
- (symbol.kind_id IN \
- ( \
- SELECT sym_kind_id \
- FROM sym_kind \
- WHERE kind_name IN ('class', 'namespace', 'enum', 'struct', 'union') \
- )) AS has_child \
+ sym_kind.is_container \
FROM symbol \
LEFT JOIN file ON symbol.file_defined_id = file.file_id \
LEFT JOIN sym_access ON symbol.access_kind_id = sym_access.access_kind_id \
LEFT JOIN sym_type ON symbol.type_id = sym_type.type_id \
+ LEFT JOIN sym_kind ON symbol.kind_id = sym_kind.sym_kind_id \
WHERE \
( \
file.file_path = ## /* name:'filepath' type:gchararray */ \
diff --git a/plugins/symbol-db/symbol-db-model-project.c b/plugins/symbol-db/symbol-db-model-project.c
index c8305a9..fd4eeca 100644
--- a/plugins/symbol-db/symbol-db-model-project.c
+++ b/plugins/symbol-db/symbol-db-model-project.c
@@ -32,16 +32,12 @@
sym_access.access_name, \
sym_type.type_type, \
sym_type.type_name, \
- (symbol.kind_id IN \
- ( \
- SELECT sym_kind_id \
- FROM sym_kind \
- WHERE kind_name IN ('class', 'namespace', 'enum', 'struct', 'union') \
- )) AS has_child \
+ sym_kind.is_container \
FROM symbol \
LEFT JOIN file ON symbol.file_defined_id = file.file_id \
LEFT JOIN sym_access ON symbol.access_kind_id = sym_access.access_kind_id \
LEFT JOIN sym_type ON symbol.type_id = sym_type.type_id \
+ LEFT JOIN sym_kind ON symbol.kind_id = sym_kind.sym_kind_id \
WHERE \
( \
symbol.scope_id = ## /* name:'parent' type:gint */ \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]