summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Ultramarine/Model/DB.pm68
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Ultramarine/Model/DB.pm6 b/lib/Ultramarine/Model/DB.pm6
index 596da6a..24a6a4a 100644
--- a/lib/Ultramarine/Model/DB.pm6
+++ b/lib/Ultramarine/Model/DB.pm6
@@ -159,14 +159,14 @@ class Ultramarine::Model::DB {
return %song;
}
- method get-song(:$path!) {
+ method get-song(Str() :$path!) {
my $sth = $!dbh.prepare(q:to/END/);
SELECT *
FROM songs
WHERE path=?
END
LEAVE { .finish with $sth }
- $sth.execute($path.Str);
+ $sth.execute($path);
return unpack-row($sth.row(:hash));
}
@@ -185,7 +185,7 @@ class Ultramarine::Model::DB {
}
}
- method is-up-to-date(:$path!,:$mtime!) {
+ method is-up-to-date(Str() :$path!,:$mtime!) {
my $sth = $!dbh.prepare(q:to/END/);
SELECT COUNT(*)
FROM songs
@@ -193,7 +193,7 @@ class Ultramarine::Model::DB {
AND mtime >= $mtime
END
LEAVE { .finish with $sth };
- $sth.execute($path.Str,$mtime);
+ $sth.execute($path,$mtime);
return ($sth.row[0]//0).Bool;
}
}