Changeset 241 for oup/current/Helper
- Timestamp:
- Jul 18, 2007, 12:27:16 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Helper/LevelDB.pas
r173 r241 594 594 Query.ExecSQL; 595 595 Query.SQL.Text := 596 'CREATE TABLE rawmap ( id AUTOINC PRIMARY KEY, src_id INTEGER, ' +597 'src_link_offset INTEGER, sep BOOLEAN, size INTEGER, ' +596 'CREATE TABLE rawmap ( id AUTOINC PRIMARY KEY, name STRING(32), src_id INTEGER, ' + 597 'src_link_offset INTEGER, sep BOOLEAN, type STRING(8), size INTEGER, ' + 598 598 'data BLOB BlobCompressionMode 9 BlobBlockSize 1024 BlobCompressionAlgorithm ZLib);'; 599 599 // Query.SQL.Text:='CREATE TABLE rawmap ( id AUTOINC PRIMARY KEY, src_id INTEGER, src_link_offset INTEGER, size INTEGER, data BLOB BlobCompressionAlgorithm None );'; 600 600 Query.ExecSQL; 601 601 Query.SQL.Text := 'CREATE INDEX idsrcid ON rawmap (src_id);'; 602 Query.ExecSQL; 603 Query.SQL.Text := 'CREATE INDEX idtype ON rawmap (type);'; 602 604 Query.ExecSQL; 603 605 Query.SQL.Text := … … 667 669 mimecoder := TStringFormat_MIME64.Create; 668 670 Query.SQL.Text := 669 'INSERT INTO rawmap (src_id,src_link_offset,sep,size,data) VALUES (' + 671 'INSERT INTO rawmap (name,src_id,src_link_offset,sep,type,size,data) VALUES (' + 672 '"' + RawLinks[i].Name + '", ' + 670 673 IntToStr(FileID) + ', ' + IntToStr(RawLinks[i].SrcOffset) + ',' + 671 674 BoolToStr(RawLinks[i].LocSep) + ', ' + 675 '"' + RawLinks[i].RawType + '", ' + 672 676 IntToStr(RawLinks[i].RawSize) + ', ' + 673 677 'MimeToBin("' + MimeCoder.StrTo(@tempdata[0], RawLinks[i].RawSize) + '") );'; … … 678 682 begin 679 683 Query.SQL.Text := 680 'INSERT INTO rawmap (src_id,src_link_offset,sep,size) VALUES (' + 684 'INSERT INTO rawmap (name,src_id,src_link_offset,sep,type,size) VALUES (' + 685 '"' + RawLinks[i].Name + '", ' + 681 686 IntToStr(FileID) + ', ' + IntToStr(RawLinks[i].SrcOffset) + ', ' + 682 BoolToStr(RawLinks[i].LocSep) + ', 0);'; 687 BoolToStr(RawLinks[i].LocSep) + ', ' + 688 '"' + RawLinks[i].RawType + '", ' + 689 '0);'; 683 690 Query.ExecSQL; 684 691 end;
Note:
See TracChangeset
for help on using the changeset viewer.