Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Side by Side Diff: third_party/sqlite/src/interior.pl

Issue 9144001: The complete work-in-progress SQLite recover virtual table. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sigh, forgot to specify baseline. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/src/create_tables ('k') | third_party/sqlite/src/main.mk » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/perl -w
2
3 use strict;
4 use Getopt::Long;
5
6 my $table = "interior";
7 GetOptions("table=s" => \$table);
8
9 print "-- Create a tree with interior nodes.\n";
10 print "CREATE TABLE $table (\n";
11 print " file TEXT,\n";
12 print " lineno INT,\n";
13 print " line TEXT\n";
14 print ");\n";
15
16 foreach my $file (@ARGV) {
17 print "SELECT 'Loading from $file';\n";
18 print "BEGIN;\n";
19 open(F, $file) || die("Open $file: $!");
20 while (<F>) {
21 chomp;
22 s/'/''/g;
23 print "INSERT INTO $table VALUES ('$file', $., '$_');\n";
24 }
25 close(F) || die("Close $file: $!");
26 print "COMMIT;\n";
27 }
OLDNEW
« no previous file with comments | « third_party/sqlite/src/create_tables ('k') | third_party/sqlite/src/main.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698