Open
Bug 557929
Opened 15 years ago
Updated 11 years ago
[MS-SQL][Oracle] Bugzilla::DB::StatementModifier
Categories
(Bugzilla :: Database, enhancement)
Bugzilla
Database
Tracking
()
ASSIGNED
People
(Reporter: mockodin, Assigned: mockodin)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Both Oracle and Mssql use some very specific workaround for implement compatibility. These should me moved in to a new Bugzilla::DB::StatementModifier module and allow for db specific overrides similar to the existing DB module system.
Assignee | ||
Comment 1•15 years ago
|
||
See bug 487437#c14 for background
Assignee | ||
Comment 2•15 years ago
|
||
This will implement or override of the following:
package Bugzilla::DB::StatementModifier;
sub do {
sub selectrow_array {
sub selectrow_arrayref {
sub selectrow_hashref {
sub selectall_arrayref {
sub selectall_hashref {
sub selectcol_arrayref {
sub prepare {
sub prepare_cached {
sub _fix_arrayref {
sub _fix_hashref {
#This one is a little trickier, I'm thinking this can be done with a standard main function with calls to override functions for db specific items.
sub adjust_sql { #main function where we break er.. fix things
# overrideable by db specific packages.
sub _adjust_sql_begin { # first then after getting parameters
# true false to terminate the function and just
# return the raw sql
sub _adjust_sql_pre_loop { # process @parts array before the main loop
sub _adjust_sql_in_loop { # process each $nonstring one by one
# I don't think we need a post_loop to process @parts again, maybe we do?
sub _adjust_sql_end { # process the recombined $sql
# this is where we fix limit or replace complex
# strings of sql where it couldn't within @parts
package Bugzilla::DB::StatementModifier::st;
sub fetchrow_arrayref {
sub fetchrow_array {
sub fetchrow_hashref {
sub fetchall_arrayref {
sub fetchall_hashref {
sub fetch {
Assignee | ||
Updated•15 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•15 years ago
|
||
re comment 0
<2 cups of coffee and three packets of oat meal later>
Wow my normal brain to text glitching was working over time there..
Comment 0 should read more like:
Both Oracle and Mssql use some very specific workarounds for implementing
compatibility. Since both modules share a lot of code, that code, should be moved in to a new Bugzilla::DB::StatementModifier module and allow for db specific tweaks
eg LIMIT is not supported by Oracle or MSSQL so custom sql contortions are required.
Assignee | ||
Updated•15 years ago
|
Comment 4•13 years ago
|
||
I think this is more of a nicety. Mockodin had this code integrated directly in the Bugzilla::DB::Mssql package as a POC so right now I think the blocking of bug 487437 can be removed from this as it doesn't stop MS-SQL support from functioning at all.
Suggest to mkanat to remove the blocking of 487437 as Bugzilla::DB::StatementModifier can come at a later time.
You need to log in
before you can comment on or make changes to this bug.
Description
•