Closed mikkoi closed 4 years ago
I'm not particularly keen on the maintenance overhead. Especially since SQL::Abstract::Pg
is technically a Mojolicious spin-off module (and has to follow all the usual rules). But i'll leave this issue open so we can see if others care.
That said, if you're using SQL::Abstract
you're already pulling half of CPAN into your project, so Mojo::Base
should be the least of your worries. 😉
I would like to make a common SQL::Abstract extension module that both Mojo::Pg and Mojo::SQLite (and others) can use, but IIRC neither @kraih nor @shadowcat-mst were very keen on the idea.
That reminds me, SQL::Abstract::Pg
has very Mojo::Pg
specific features, like the -json
operator.
To be honest, i was really hoping to give back features like LIMIT
/OFFSET
support upstream to SQL::Abstract
. Since it works in all major open source databases the same. But there was simply zero interest, and at this point i only really care about Mojo::Pg
.
SQL::Abstract is not so heavy. I created a test case and run scandeps.pl (Module::ScanDeps) on it.
use SQL::Abstract;
my ($stmt, @bind) = SQL::Abstract->new->select('test_table',
[ qw( id ver code ) ], { id => 'ID_1', ver => 3, });
print "Statement:$stmt:\n";
print 'bind:', (join ',', @bind), "\n";
scandeps.pl ./test-sql-abstract.pl
'List::Util' => '1.53',
'MRO::Compat' => '0.13',
'SQL::Abstract' => '1.86',
'Scalar::Util' => '1.53',
'XSLoader' => '0.24',
@mikkoi I have no idea what you're trying to say. But that doesn't even cover the deps listed on CPAN.
I only wanted to demonstrate that the actual SQL::Abstract functionality is not dependent on much besides the core. The list of dependencies listed in CPAN has Moo
but it is only used when pretty printing (SQL::Abstract::Tree).
Closing this issue since the discussion has gotten way off-topic.
I am using
SQL::Abstract::Pg
without Mojolicious directly withDBI
. So the other dependencies seem like extra weight. Would it be possible to separateSQL::Abstract::Pg
into its own distro and remove the need for Mojolicous, specificallyMojo::Base
which is used to loadSQL::Abstract
?