.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DBIx::Class::SQLMaker 3pm" .TH DBIx::Class::SQLMaker 3pm "2022-05-21" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" DBIx::Class::SQLMaker \- An SQL::Abstract::Classic\-like SQL maker class .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module serves as a mere \*(L"nexus class\*(R" providing SQL::Abstract::Classic\-like functionality to DBIx::Class itself, and to a number of database-engine-specific subclasses. This indirection is explicitly maintained in order to allow swapping out the core of \s-1SQL\s0 generation within \s-1DBIC\s0 on per\-\f(CW$schema\fR basis without major architectural changes. It is guaranteed by design and tests that this fast-switching will continue being maintained indefinitely. .SS "Implementation switching" .IX Subsection "Implementation switching" See \*(L"connect_call_rebase_sqlmaker\*(R" in DBIx::Class::Storage::DBI .SH "ROADMAP" .IX Header "ROADMAP" Some maintainer musings on the current state of \s-1SQL\s0 generation within \s-1DBIC\s0 as of October 2019 .SS "Folding of most (or all) of SQL::Abstract::Classic (\s-1SQLAC\s0) into \s-1DBIC.\s0" .IX Subsection "Folding of most (or all) of SQL::Abstract::Classic (SQLAC) into DBIC." The rise of complex prefetch use, and the general streamlining of result parsing within \s-1DBIC\s0 ended up pushing the actual \s-1SQL\s0 generation to the forefront of many casual performance profiles. While the idea behind the SQLAC-like \s-1API\s0 is sound, the actual implementation is terribly inefficient (once again bumping into the ridiculously high overhead of perl function calls). .PP Given that \s-1SQLAC\s0 has a \fBvery\fR distinct life on its own, and will hopefully continue to be used within an order of magnitude more projects compared to \&\s-1DBIC,\s0 it is prudent to \fBnot\fR disturb the current call chains within \s-1SQLAC\s0 itself. Instead in the future an effort will be undertaken to seek a more thorough decoupling of \s-1DBIC SQL\s0 generation from reliance on \s-1SQLAC,\s0 possibly to a point where \fBin the future \s-1DBIC\s0 may no longer depend on SQL::Abstract::Classic\fR at all. .PP \&\fBThe SQL::Abstract::Classic library itself will continue being maintained\fR although it is not likely to gain many extra features, notably it will \fB\s-1NOT\s0\fR add further dialect support, at least not within the preexisting \&\f(CW\*(C`SQL::Abstract::Classic\*(C'\fR namespace. .PP Such streamlining work (if undertaken) will take into consideration the following constraints: .IP "Main \s-1API\s0 compatibility" 4 .IX Item "Main API compatibility" The object returned by \f(CW\*(C`$schema\->storage\->sqlmaker\*(C'\fR needs to be able to satisfy most of the basic tests found in the current-at-the-time \s-1SQLAC\s0 dist. While things like case or logic or even worse convert will definitely remain unsupported, the rest of the tests should pass (within reason). .IP "Ability to replace SQL::Abstract::Classic with a derivative module" 4 .IX Item "Ability to replace SQL::Abstract::Classic with a derivative module" During the initial work on Data::Query, which later was slated to occupy the preexisting namespace of SQL::Abstract, the test suite of \s-1DBIC\s0 turned out to be an invaluable asset to iron out hard-to-reason-about corner cases. In addition the test suite is much more vast and intricate than the tests of \&\s-1SQLAC\s0 itself. This state of affairs is way too valuable to sacrifice in order to gain faster \s-1SQL\s0 generation. Thus the SQLMaker rebase functionality introduced in \s-1DBIC\s0 v0.082850 along with extra \s-1CI\s0 configurations will continue to ensure that \s-1DBIC\s0 can be used with an off-the-CPAN \s-1SQLAC\s0 and derivatives, and that it continues to flawlessly run its entire test suite. While this will undoubtedly complicate the future implementation of a better performing \s-1SQL\s0 generator, it will preserve both the usability of the test suite for external projects and will keep SQL::Abstract::Classic from regressions in the future. .PP Aside from these constraints it is becoming more and more practical to simply stop using \s-1SQLAC\s0 in day-to-day production deployments of \s-1DBIC.\s0 The flexibility of the internals is simply not worth the performance cost. .SS "Relationship to SQL::Abstract and what formerly was known as Data::Query (\s-1DQ\s0)" .IX Subsection "Relationship to SQL::Abstract and what formerly was known as Data::Query (DQ)" When initial work on \s-1DQ\s0 was taking place, the tools in ::Storage::DBIHacks were only beginning to take shape, and it wasn't clear how important they will become further down the road. In fact the \fIregexing all over the place\fR was considered an ugly stop-gap, and even a couple of highly entertaining talks were given to that effect. As the use-cases of \s-1DBIC\s0 were progressing, and evidence for the importance of supporting arbitrary \s-1SQL\s0 was mounting, it became clearer that \s-1DBIC\s0 itself would not really benefit in any significant way from tigher integration with \s-1DQ,\s0 but on the contrary is likely to lose crucial functionality while the corners of the brand new \s-1DQ/SQLA\s0 codebase are sanded off. .PP The current stance on \s-1DBIC/SQLA\s0 integration is that it would mainly benefit \&\s-1SQLA\s0 by having access to the very extensive \*(L"early adopter\*(R" test suite, in the same manner as early \s-1DBIC\s0 benefitted tremendously from usurping the Class::DBI test suite. As far as the \s-1DBIC\s0 user-base \- there are no immediate large-scale upsides to deep \s-1SQLA\s0 integration, neither in terms of \s-1API\s0 nor in performance. As such it is unlikely that \s-1DBIC\s0 will switch back to using SQL::Abstract in its core any time soon, if ever. .PP Accordingly the \s-1DBIC\s0 development effort will in the foreseable future ignore the existence of the new-guts \s-1SQLA,\s0 and will continue optimizing the preexisting SQLAC-based solution, potentially \*(L"organically growing\*(R" its own compatible implementation. Also, as described higher up, the ability to plug a separate SQLAC-compatible class providing the necessary surface \s-1API\s0 will remain possible, and will be protected at all costs in order to continue providing \&\s-1SQLA\s0 and friends access to the test cases of \s-1DBIC.\s0 .SH "FURTHER QUESTIONS?" .IX Header "FURTHER QUESTIONS?" Check the list of additional \s-1DBIC\s0 resources. .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This module is free software copyright by the DBIx::Class (\s-1DBIC\s0) authors. You can redistribute it and/or modify it under the same terms as the DBIx::Class library.