aboutsummaryrefslogtreecommitdiffstats
path: root/lib/LXRng/Index/DBI.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/LXRng/Index/DBI.pm')
-rw-r--r--lib/LXRng/Index/DBI.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/LXRng/Index/DBI.pm b/lib/LXRng/Index/DBI.pm
index 763f534..55e215d 100644
--- a/lib/LXRng/Index/DBI.pm
+++ b/lib/LXRng/Index/DBI.pm
@@ -520,6 +520,22 @@ sub get_identifier_info {
\%reflines);
}
+sub set_rfile_charset {
+ my ($self, $rfile_id, $charset) = @_;
+
+ my $dbh = $self->dbh;
+ my $pre = $self->prefix;
+ my $sth = $$self{'sth'}{'set_rfile_charset'} ||=
+ $dbh->prepare(qq{
+ update ${pre}revisions
+ set body_charset = (select id from ${pre}charsets
+ where name = ?)
+ where id = ?});
+
+ return $sth->execute($charset, $rfile_id);
+}
+
+
sub get_rfile_timestamp {
my ($self, $rfile_id) = @_;