# select[1]/fulltext(normalized, sectionized)
Begin;
BeginTimeSpan;
Initialize;
EndTimeSpan;
# テスト用のDBを作る
InitializeSession "";
Command "create database TESTDB";
TerminateSession;

InitializeSession "TESTDB";
Command  "create table T1(C1 ntext array [no limit])";
Command  "create fulltext index I1_1 on T1(C1) hint 'sectionized, inverted=(nolocation=true, notf=true, normalized=true)'";
Command  "create table T2(C1 ntext array [no limit])";
Command  "create fulltext index I2_1 on T2(C1) hint 'sectionized, inverted=(nolocation=true, notf=true, normalized=true)'";
# selectの対象となるタプルをinsertする
Command  "insert into T1 (C1) values (?)" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"]];
Command  "insert into T1 (C1) values (?)" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"]];
Command  "insert into T1 (C1) values (?)" [[textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\hello.txt"]];
# 2つ目のtableにもinsertする
Command  "insert into T2 (C1) values (?)" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\Teihon.txt"]];
# 全体が取れるかどうか、何通りかの方法で試す
Command  "select C1 from T1";
Command  "select * from T1";
Command  "select count(*) from T1";
# 複数tableのjoinをselectする
Command  "select * from T1, T2 where T1.C1=? and T2.C1=?" [[textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\ricoh.txt"], [textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\Teihon.txt"]];
#Command  "drop table T1";
#Command  "drop table T2";

Command  "select * from T1";
Command  "select * from T2";

TerminateSession;
# DBの後始末
#InitializeSession "";
#Command "drop database TESTDB";
#TerminateSession;
# (障害回復を試すためTerminateしない)
End;

