Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

quote-identifier

  • Loading branch information...
commit 1cb4082d043b7e716defd633a23b97500dd2af38 1 parent 44c09e2
@moritz moritz authored
Showing with 16 additions and 0 deletions.
  1. +12 −0 lib/DBDish.pm6
  2. +4 −0 lib/DBDish/mysql.pm6
View
12 lib/DBDish.pm6
@@ -113,6 +113,18 @@ role DBDish::Connection does DBDish::ErrorHandling {
}
=begin pod
+=head5 quote-identifier
+
+Returns the string parameter as a quoted identifier
+
+=end pod
+
+ method quote-identifier(Str:D $name) {
+ # a first approximation
+ qq["$name"];
+ }
+
+=begin pod
=head5 disconnect
The C<disconnect> method
=end pod
View
4 lib/DBDish/mysql.pm6
@@ -264,6 +264,10 @@ class DBDish::mysql::Connection does DBDish::Connection {
mysql_close($!mysql_client);
True
}
+
+ method quote-identifer(Str:D $name) {
+ qq[`$name`];
+ }
}
class DBDish::mysql:auth<mberends>:ver<0.0.1> {
Please sign in to comment.
Something went wrong with that request. Please try again.