SQLite does not have grant tables and so any part of the schema with grant syntax causes CreateTables() to die

~/hacks/DBIx-Recordset-0.24 $ diff -u Compat.pm~ Compat.pm
--- Compat.pm~ 2003-10-12 18:40:18.687500000 -0700
+++ Compat.pm 2003-10-13 06:11:26.453125000 -0700
@@ -230,7 +230,8 @@
(
'*' =>
{
- 'Placeholders' => 10, # Default: Placeholder are supported
+ 'HasGrant' => 1, # Default: database has GRANT
+ 'Placeholders' => 10, # Default: Placeholder are supported
'ListFields' => \&SelectFields, # Default: Use Select to get field names
'ListTables' => \&ListTables, # Default: Use DBI $dbh -> tables
# QuoteTypes isn't used anymore !!
@@ -263,6 +264,11 @@
'HaveTypes' => 0 # Driver does not support $sth -> {TYPE}
},


+ 'SQLite' =>
+ {
+ HasGrant => 0
+ }, +
'CSV' =>
{
'Placeholders' => 2, # Placeholders supported, but the perl
~/hacks/DBIx-Recordset-0.24 $
~/hacks/DBIx-Recordset-0.24 $ diff -u Database.pm~ Database.pm
--- Database.pm~ 2001-07-09 12:59:48.000000000 -0700
+++ Database.pm 2003-10-13 06:12:32.968750000 -0700
@@ -1003,7 +1003,8 @@
my %tabdef = (%DBDefault, %$tab, %{$tab -> {'!For'} -> {$drv} || {}}) ;
$tabname = "$tabprefix$tabdef{'!Table'}" ;
my $init = $tabdef{'!Init'} ;
- my $grant = (defined ($user) && $db -> {'*Username'} ne $user)?$tabdef{'!Grant'}:undef ;
+ my $grant = (DBIx::Compat::GetItem ($drv, 'HasGrant') and
+defined ($user) and $db -> {'*Username'} ne $user)?$tabdef{'!Grant'}:undef ;
my $constraint ;
my $constraints = $tabdef{'!Constraints'} ;
my $default = $tabdef{'!Default'} ;
~/hacks/DBIx-Recordset-0.24 $




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to