erland;611745 Wrote: > So far, the only real argument for MySQL I've seen is that it makes it > easier to develop plugins and look inside the database (since there are > better tools for MySQL). Some people says that MySQL performs better in > larger libraries, but as far as I know no one has done a real > comparison to prove that this is the case. As long as 7.6 with SQLite > is faster than 7.5 with MySQL I don't see a problem regarding the > performance.Obviously, compared to your work, I've only lightly dabbled in db > / plugin interactions. But from my very limited experience, to me it seems like SQLite does provide at least one major feature for the SBS plugin developer missing from MySQL, namely, the DBD::SQLite::sqlite_create_function() function. To me, this opens up a whole raft of possibilities that one just can't accomplish via DBD::MySQL.
E.G.: using regular expressions to change data in UPDATE queries: Code: -------------------- # SQLite's REGEXP function only works with SELECT. # Impliment a REGEXP-like function that uses regular expressions to modify data.. #$g{log}->is_debug && $g{log}->debug("Creating SQLite query helper function: PSREPLACE() \n"); $dbh->sqlite_create_function( 'PSREPLACE', 2, sub { my ($szStr, $szExp) = @_; my $szNewStr = $szStr; my $szDebug; my @exp = split( /\//, $szExp); # TODO: add support for s///i ??? This is already supported via s/(?i)pattern/replace/ if ( (scalar(@exp) < 3) || ($exp[0] ne 's') ) { $g{log}->error("PSREPLACE bad pattern: $szExp !!\n"); } else { if (scalar(@exp) >= 4 && $exp[3] eq 'g') { #This seems like a kludge...what's really going on here?? if ($exp[2] =~ m/\$\d/) { if ($g{log}->is_debug) { $szDebug = "s\/$exp[1]\/$exp[2]\/gee"; } $szNewStr =~ s/$exp[1]/$exp[2]/gee; } else { if ($g{log}->is_debug) { $szDebug = "s\/$exp[1]\/$exp[2]\/ge"; } $szNewStr =~ s/$exp[1]/$exp[2]/ge; } } else { if ($exp[2] =~ m/\$\d/) { if ($g{log}->is_debug) { $szDebug = "s\/$exp[1]\/$exp[2]\/ee"; } $szNewStr =~ s/$exp[1]/$exp[2]/ee; }else { if ($g{log}->is_debug) { $szDebug = "s\/$exp[1]\/$exp[2]\/e"; } $szNewStr =~ s/$exp[1]/$exp[2]/e; } } $g{log}->is_debug && $g{log}->debug("PSREPLACE $szStr \=\~ $szDebug == $szNewStr"); } return $szNewStr; } ); -------------------- -- gharris999 ------------------------------------------------------------------------ gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115 View this thread: http://forums.slimdevices.com/showthread.php?t=85714 _______________________________________________ beta mailing list beta@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/beta