From 5a3f84bf10b9cd11c918c72d26df3f439678ce3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Sun, 27 Mar 2011 20:34:21 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20d'un=20bug=20:=20ne=20pas=20avoir?= =?UTF-8?q?=20les=20noeuds=20qui=20commencent=20avec=20'::'=20comme=20mot?= =?UTF-8?q?=20central.=20(non=20test=C3=A9).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/serveur/dump2sqlite.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/code/serveur/dump2sqlite.sh b/code/serveur/dump2sqlite.sh index 8bed674..cf4c72d 100755 --- a/code/serveur/dump2sqlite.sh +++ b/code/serveur/dump2sqlite.sh @@ -31,6 +31,7 @@ create table game(gid integer primary key autoincrement, eid_central_word, relat create table game_cloud(gid, num, difficulty, eid_word, totalWeight, probaR1, probaR2, probaR0, probaTrash); create table played_game(pgid integer primary key autoincrement, gid, login, timestamp); create table played_game_cloud(pgid, gid, type, num, relation, weight, score); +create table colon_nodes(eid); create table random_cloud_node(eid,nbneighbors); create table random_center_node(eid); @@ -61,15 +62,21 @@ create index i_relation_type on relation(type); create index i_relation_start_type on relation(start,type); create index i_relation_end_type on relation(end,type); create index i_played_game_all on played_game(pgid, gid, login, timestamp); +create index i_colon_nodes_eid on colon_nodes(eid); + +insert into colon_nodes(eid) select eid from node where name glob '::*'; + insert into random_cloud_node(eid,nbneighbors) select eid,sum(nb) from ( select (select type from node where node.eid = relation.start) as type, start as eid, - count(start) as nb from relation where type not in (4, 12, 36, 18, 29, 45, 46, 47, 48, 1000, 1001) + count(start) as nb from relation + where type not in (4, 12, 36, 18, 29, 45, 46, 47, 48, 1000, 1001) and start not in colon_nodes group by start union select (select type from node where node.eid = relation.start) as type, end as eid, - count(end) as nb from relation where type not in (4, 12, 36, 18, 29, 45, 46, 47, 48, 1000, 1001) + count(end) as nb from relation + where type not in (4, 12, 36, 18, 29, 45, 46, 47, 48, 1000, 1001) and start not in colon_nodes group by end ) where type = 1 group by eid; create index i_random_cloud_node_nbneighbors on random_cloud_node(nbneighbors);