11 years agodon't accept relationship names as final identifier parts in remap
Matt S Trout [Sun, 24 Nov 2013 03:30:45 +0000]
don't accept relationship names as final identifier parts in remap

11 years agoonly add rels once when seen repeatedly
Matt S Trout [Sun, 24 Nov 2013 02:49:15 +0000]
only add rels once when seen repeatedly

11 years agofirst tests for identifier remapping and a slight refactoring
Matt S Trout [Sun, 24 Nov 2013 01:59:15 +0000]
first tests for identifier remapping and a slight refactoring

11 years agoreorganise dq expr tests slightly
Matt S Trout [Sun, 24 Nov 2013 01:23:27 +0000]
reorganise dq expr tests slightly

11 years agomove join inference cleverness into a role
Matt S Trout [Tue, 19 Nov 2013 05:16:43 +0000]
move join inference cleverness into a role

11 years agoneed to clear converter after setting limit dialect
Matt S Trout [Tue, 19 Nov 2013 05:12:13 +0000]
need to clear converter after setting limit dialect

11 years agofirst (naive) cut at identifier remapping and join injection
Matt S Trout [Sun, 17 Nov 2013 11:03:24 +0000]
first (naive) cut at identifier remapping and join injection

11 years agoswitch to delete+local from clear_* methods
Matt S Trout [Sun, 17 Nov 2013 08:18:06 +0000]
switch to delete+local from clear_* methods

11 years agoSTRAIGHT_JOIN support for MySQL
Matt S Trout [Sun, 17 Nov 2013 05:38:50 +0000]
STRAIGHT_JOIN support for MySQL

11 years agoliterals on the other side of = are acceptable for a fixed condition
Matt S Trout [Sun, 17 Nov 2013 04:09:15 +0000]
literals on the other side of = are acceptable for a fixed condition

11 years agofix foreign key identification in SQLT parser
Matt S Trout [Sun, 17 Nov 2013 03:53:48 +0000]
fix foreign key identification in SQLT parser

11 years agoFix lean startup for Data::Compare -> Data::Dumper::Concise in ResultSet
Matt S Trout [Sun, 17 Nov 2013 03:32:42 +0000]
Fix lean startup for Data::Compare -> Data::Dumper::Concise in ResultSet

11 years agofix unresolvable condition handling
Matt S Trout [Sun, 17 Nov 2013 03:25:57 +0000]
fix unresolvable condition handling

11 years agofix test to use qw as (so far as I can see) originally intended
Matt S Trout [Sun, 17 Nov 2013 03:01:29 +0000]
fix test to use qw as (so far as I can see) originally intended

11 years agofix condition extraction for new_result
Matt S Trout [Sun, 17 Nov 2013 02:53:33 +0000]
fix condition extraction for new_result

11 years agomaintain condition order (left versus right) in _stack_cond
Matt S Trout [Sun, 17 Nov 2013 02:52:39 +0000]
maintain condition order (left versus right) in _stack_cond

11 years ago_resolve_condition for DQ exprs now provides correct value_meta
Matt S Trout [Sun, 17 Nov 2013 01:39:41 +0000]
_resolve_condition for DQ exprs now provides correct value_meta

11 years agofactor out _extract_top_level_conditions and use it to rewrite _stack_cond
Matt S Trout [Sun, 17 Nov 2013 01:38:54 +0000]
factor out _extract_top_level_conditions and use it to rewrite _stack_cond

11 years agolet rowparser introspect DQ join conds
Matt S Trout [Fri, 15 Nov 2013 19:03:50 +0000]
let rowparser introspect DQ join conds

11 years agoDBICTest result class now loading ExprDeclare
Matt S Trout [Fri, 15 Nov 2013 19:03:18 +0000]
DBICTest result class now loading ExprDeclare

11 years agofactor out join cond to hashref code, return unresolvable conditions correctly
Matt S Trout [Fri, 15 Nov 2013 18:23:13 +0000]
factor out join cond to hashref code, return unresolvable conditions correctly

11 years agomake extract_fixed_values work without an alias, make _extract_fixed_condition_column...
Matt S Trout [Fri, 15 Nov 2013 15:33:49 +0000]
make extract_fixed_values work without an alias, make _extract_fixed_condition_columns use it

11 years agomove _extract_fixed dq methods into resultsource to share between rs and row
Matt S Trout [Fri, 15 Nov 2013 14:54:10 +0000]
move _extract_fixed dq methods into resultsource to share between rs and row

11 years agosome support for dq in rs condition merging and populate
Matt S Trout [Fri, 15 Nov 2013 13:14:44 +0000]
some support for dq in rs condition merging and populate

11 years agomove reverse_relationship_info "is join a hashref" check into __strip_relcond
Matt S Trout [Fri, 15 Nov 2013 11:34:10 +0000]
move reverse_relationship_info "is join a hashref" check into __strip_relcond

11 years agosupport expr {} in join cond
Matt S Trout [Fri, 15 Nov 2013 10:07:47 +0000]
support expr {} in join cond

11 years agoallow DQ expr {} blocks as first arg to search
Matt S Trout [Fri, 15 Nov 2013 08:46:39 +0000]
allow DQ expr {} blocks as first arg to search

11 years agoMerge branch 'master' into dq2eb
Peter Rabbitson [Tue, 5 Nov 2013 08:51:56 +0000]
Merge branch 'master' into dq2eb

11 years agoThis is an expensive author-only test, move to xt/
Peter Rabbitson [Tue, 5 Nov 2013 08:26:23 +0000]
This is an expensive author-only test, move to xt/

Also get xt tests first in line (won't matter much with -s)

11 years agoMake sure DBICTest is always loaded first (purely bookkeep)
Peter Rabbitson [Tue, 5 Nov 2013 08:17:52 +0000]
Make sure DBICTest is always loaded first (purely bookkeep)

11 years agoWork around TB1.5 hanging with 5.19 - use unreleased github patch
Peter Rabbitson [Tue, 5 Nov 2013 00:44:23 +0000]
Work around TB1.5 hanging with 5.19 - use unreleased github patch

11 years agoRevert 2c300e45 - new backwards compatible SQLT got released
Peter Rabbitson [Tue, 5 Nov 2013 00:29:05 +0000]
Revert 2c300e45 - new backwards compatible SQLT got released

Work is being done to reintroduce the feature with a softer push:
https://github.com/dbsrgits/sql-translator/pull/26#issuecomment-27644756

11 years agoClarify what happens on distinct + get_column($aggregate_alias)
Peter Rabbitson [Mon, 15 Feb 2010 18:45:05 +0000]
Clarify what happens on distinct + get_column($aggregate_alias)

11 years agoCentralize and sanify generation of synthetic group_by criteria
Peter Rabbitson [Thu, 29 Aug 2013 06:14:05 +0000]
Centralize and sanify generation of synthetic group_by criteria

This should solve multiple deficiencies when a limited prefetch is ordered
by non-local columns (especially pre-multiplied ones). Also intelligently
solves many problems combining distinct with various non-selecting external
order criteria.

Most current behaviors should remain unaffected except for cases of
blatantly incorrect query generation (fingercross)

11 years agofix typo in FATAL ERROR message.
Matt Phillips [Mon, 4 Nov 2013 21:53:47 +0000]
fix typo in FATAL ERROR message.

11 years agoMove database-independent mysql SQLMaker test
Peter Rabbitson [Mon, 4 Nov 2013 09:03:54 +0000]
Move database-independent mysql SQLMaker test

11 years agoset nulls => "none" in order nodes under GenericSubquery
Matt S Trout [Mon, 4 Nov 2013 03:05:42 +0000]
set nulls => "none" in order nodes under GenericSubquery

11 years agofixup INNER use for mysql 3
Matt S Trout [Mon, 4 Nov 2013 00:43:13 +0000]
fixup INNER use for mysql 3

11 years agoidentifier parsing to make mysql subselect wrapping work within literals
Matt S Trout [Sun, 3 Nov 2013 23:34:35 +0000]
identifier parsing to make mysql subselect wrapping work within literals

11 years agoremove dead code from _extract_order_criteria
Matt S Trout [Fri, 1 Nov 2013 15:18:02 +0000]
remove dead code from _extract_order_criteria

11 years ago_extract_order_criteria can now handle ident only or full criteria
Matt S Trout [Fri, 1 Nov 2013 15:16:59 +0000]
_extract_order_criteria can now handle ident only or full criteria

11 years agot/prefetch/o2m_o2m_order_by_with_limit.t: literal identifier now gets quoted
Matt S Trout [Fri, 1 Nov 2013 10:33:00 +0000]
t/prefetch/o2m_o2m_order_by_with_limit.t: literal identifier now gets quoted

11 years agomove select arg handling to _select_to_dq to enable creating $rs->_as_select_dq
Matt S Trout [Fri, 1 Nov 2013 09:37:23 +0000]
move select arg handling to _select_to_dq to enable creating $rs->_as_select_dq

11 years ago_extract_order_criteria should return column names, not full criteria
Matt S Trout [Fri, 1 Nov 2013 02:58:45 +0000]
_extract_order_criteria should return column names, not full criteria

11 years agouse more DQ in DBIHacks to avoid literals everywhere
Matt S Trout [Fri, 1 Nov 2013 01:42:56 +0000]
use more DQ in DBIHacks to avoid literals everywhere

11 years agot/sqlmaker/limit_dialects/generic_subq.t: unselected column given gensym alias
Matt S Trout [Fri, 1 Nov 2013 01:23:17 +0000]
t/sqlmaker/limit_dialects/generic_subq.t: unselected column given gensym alias

11 years agorender order by elements without quoting to get identifier names in _extract_order_cr...
Matt S Trout [Sat, 26 Oct 2013 19:14:09 +0000]
render order by elements without quoting to get identifier names in _extract_order_criteria

11 years agoTHROW AWAY this commit on rebase - dirty bootstrap
Peter Rabbitson [Mon, 14 Oct 2013 10:21:11 +0000]
THROW AWAY this commit on rebase - dirty bootstrap

11 years agoSimplify DBIHacks signatures
Peter Rabbitson [Wed, 30 Oct 2013 15:33:48 +0000]
Simplify DBIHacks signatures

The cross-polination of $attrs and various subparts is becoming a nightmare
to maintain. Straighten up most ::DBIHacks to pass stuff around as a single
$attrs bag (no functional changes, this is a temp-stage cleanup)

The idea is to prepare for an rsattrs object (later on all we will need to
do is replace the hash-grabs with methods, but this requires much more
thought and design, small steps)

Affected signatures in :DBIHacks:
_prune_unused_joins()
_resolve_aliastypes_from_select_args()
_adjust_select_args_for_complex_prefetch()
_extract_fixed_condition_columns()

Not touching to facilitate easier DQ merge (TODO in a sense):
_order_by_is_stable()
_main_source_order_by_portion_is_stable()

11 years agoTemporarily freeze travis SQLT on 0.11016, until the SQLT debacle is resolved
Peter Rabbitson [Thu, 31 Oct 2013 09:55:01 +0000]
Temporarily freeze travis SQLT on 0.11016, until the SQLT debacle is resolved

https://github.com/dbsrgits/sql-translator/pull/26#issuecomment-27472588

11 years agoTest more JSON::Any backends, and reorder the selection in terms of desirability
Peter Rabbitson [Thu, 31 Oct 2013 10:28:49 +0000]
Test more JSON::Any backends, and reorder the selection in terms of desirability

DWIW is the most lax JSON parser and thus is always preferred for CLI work

11 years agoWork around JSON::Any not being future-proof
Peter Rabbitson [Wed, 30 Oct 2013 08:16:39 +0000]
Work around JSON::Any not being future-proof

https://rt.cpan.org/Ticket/Display.html?id=89853
https://github.com/perigrin/json-any/pull/2

11 years agoConsistently use "eq ''" when checking for exception refness
Dagfinn Ilmari Mannsåker [Tue, 29 Oct 2013 17:24:34 +0000]
Consistently use "eq ''" when checking for exception refness

11 years agoExplicitly stringify when checking for existing exception
Dagfinn Ilmari Mannsåker [Tue, 29 Oct 2013 17:00:53 +0000]
Explicitly stringify when checking for existing exception

This fixes errors with exception objects with incomplete
overloading (like Log::Report::Dispatcher::Try).

11 years agoFix a47f273b change to be in line with the Row->Result rename of fb13a49f
Peter Rabbitson [Fri, 25 Oct 2013 05:10:47 +0000]
Fix a47f273b change to be in line with the Row->Result rename of fb13a49f

11 years agofix some pod links
Karen Etheridge [Thu, 24 Oct 2013 21:11:12 +0000]
fix some pod links

11 years agoBetter render of $POSTMORTEM
Peter Rabbitson [Fri, 18 Oct 2013 16:00:31 +0000]
Better render of $POSTMORTEM

11 years agoAdd a MAKEFLAGS parallel execution config on travis
Peter Rabbitson [Fri, 18 Oct 2013 14:47:29 +0000]
Add a MAKEFLAGS parallel execution config on travis

11 years agoGet TAP::Harness to time tests travis-wide
Peter Rabbitson [Fri, 18 Oct 2013 13:15:06 +0000]
Get TAP::Harness to time tests travis-wide

11 years agoRemove anything preinstalled on the travis perls when CLEANTEST is true
Peter Rabbitson [Mon, 14 Oct 2013 12:12:06 +0000]
Remove anything preinstalled on the travis perls when CLEANTEST is true

This will give us yet another test point

11 years agoSmoother concurrent test-flow
Peter Rabbitson [Wed, 16 Oct 2013 03:56:39 +0000]
Smoother concurrent test-flow

The noop trick initializes the STDOUT, so that the TAP::Harness
issued IO::Select->can_read calls (which are blocking wtf wtf wtf)
keep spinning and scheduling jobs

This results in an overall much smoother job-queue drainage, since
the Harness blocks less

(ideally this needs to be addressed in T::H, but a quick patchjob
broke everything so tabling it for now)

11 years agoBuild more recent perls concurrently
Peter Rabbitson [Wed, 16 Oct 2013 04:08:09 +0000]
Build more recent perls concurrently

11 years agoCheck that 64 bit in-SQLite math works regardless of ivsize
Peter Rabbitson [Mon, 14 Oct 2013 07:46:37 +0000]
Check that 64 bit in-SQLite math works regardless of ivsize

Expand on top of 04ab4eb1 and 579d1966, work inspired by charsbar's
https://github.com/charsbar/dbd-sqlite-authortests

Tested by passing the following on an old and recent DBI and a mix of ivsizes

for p in 5.8.1 5.8.2 5.8.3 5.8.5 5.18.0 5.18.1; do
  perlbrew switch $p
  for v in 1.29 1.31 1.33 1.35 1.37 1.39 1.40 ; do
    PERL_CPANM_OPT= cpanm -qn DBD::SQLite@$v && echo -n "$p " && perl -V:ivsize && prove -l t/752sqlite.t || break
  done
done

@mattp- now *that's* attention to detail :)

11 years agoFix exceedingly sloppy SQLite warning workaround from 04ab4eb1
Peter Rabbitson [Sat, 12 Oct 2013 12:40:30 +0000]
Fix exceedingly sloppy SQLite warning workaround from 04ab4eb1

The previous version managed not only to *not* silence any warning but also
break the test checking for lack of said warnings. In addition the silencing
regex was unacceptably broad, possibly missing some important misbinds.

riba pull your shit together man
a.k.a. this is what happens when there are no code reviewers :(((

11 years agoForgotten remnant of 655d80dd (void by f207111d)
Peter Rabbitson [Mon, 14 Oct 2013 06:47:17 +0000]
Forgotten remnant of 655d80dd (void by f207111d)

11 years agoReally work around https://github.com/travis-ci/travis-ci/issues/1477
Peter Rabbitson [Mon, 14 Oct 2013 08:07:28 +0000]
Really work around https://github.com/travis-ci/travis-ci/issues/1477

Just upgrade cpanm by hand with --dev

11 years agoAdd more autogenerated test exceptions, in fact do a carpetbomb
Peter Rabbitson [Mon, 14 Oct 2013 09:13:04 +0000]
Add more autogenerated test exceptions, in fact do a carpetbomb

This is necessary at least for a while until the war on the user passes

11 years agoStreamline postmortem analysis, and fix non-essential-test report being lost
Peter Rabbitson [Mon, 14 Oct 2013 12:09:45 +0000]
Streamline postmortem analysis, and fix non-essential-test report being lost

It got eaten by lack of STDERR output after fixage from a4c52abc, GAH!

11 years agoimprove order by error message
Matt S Trout [Sat, 12 Oct 2013 19:45:55 +0000]
improve order by error message

11 years agoFetchFirst does not inject an order because me.title is unique
Matt S Trout [Sat, 12 Oct 2013 18:54:35 +0000]
FetchFirst does not inject an order because me.title is unique

11 years agot/sqlmaker/limit_dialects/toplimit.t - add missing me.id - fairly sure this was a bug
Matt S Trout [Sat, 12 Oct 2013 16:18:27 +0000]
t/sqlmaker/limit_dialects/toplimit.t - add missing me.id - fairly sure this was a bug

11 years agocomplete murdering emulate_limit
Matt S Trout [Sat, 12 Oct 2013 16:12:28 +0000]
complete murdering emulate_limit

11 years agot/sqlmaker/quotes/quotes_newstyle.t - ORDER BY parsing means we quote, but not misquote
Matt S Trout [Sat, 12 Oct 2013 16:01:39 +0000]
t/sqlmaker/quotes/quotes_newstyle.t - ORDER BY parsing means we quote, but not misquote

11 years agot/sqlmaker/quotes/quotes.t - ORDER BY parsing means we quote, but not misquote
Matt S Trout [Sat, 12 Oct 2013 16:00:52 +0000]
t/sqlmaker/quotes/quotes.t - ORDER BY parsing means we quote, but not misquote

11 years agoclean up OracleJoins
Matt S Trout [Sat, 12 Oct 2013 15:59:18 +0000]
clean up OracleJoins

11 years agooraclejoins fix
Matt S Trout [Sat, 12 Oct 2013 15:19:11 +0000]
oraclejoins fix

11 years agot/sqlmaker/oracle.t - parens and quoting fixes
Matt S Trout [Sat, 12 Oct 2013 15:14:56 +0000]
t/sqlmaker/oracle.t - parens and quoting fixes

11 years agot/sqlmaker/limit_dialects/toplimit.t - ORDER BY title -> me.title
Matt S Trout [Sat, 12 Oct 2013 15:05:00 +0000]
t/sqlmaker/limit_dialects/toplimit.t - ORDER BY title -> me.title

11 years agot/sqlmaker/limit_dialects/rownum.t - ROWNUM -> ROWNUM AS
Matt S Trout [Sat, 12 Oct 2013 15:03:38 +0000]
t/sqlmaker/limit_dialects/rownum.t - ROWNUM -> ROWNUM AS

11 years agot/sqlmaker/limit_dialects/rno.t - ORDER BY on column of "main" table
Matt S Trout [Sat, 12 Oct 2013 14:54:52 +0000]
t/sqlmaker/limit_dialects/rno.t - ORDER BY on column of "main" table

11 years agot/sqlmaker/limit_dialects/fetch_first.t - minor SQL tweaks
Matt S Trout [Sat, 12 Oct 2013 14:39:02 +0000]
t/sqlmaker/limit_dialects/fetch_first.t - minor SQL tweaks

11 years agoAdd a 9m soft / 9.5m hard timeout option to bin/cpan runs
Peter Rabbitson [Fri, 11 Oct 2013 10:12:53 +0000]
Add a 9m soft / 9.5m hard timeout option to bin/cpan runs

This makes sure we do not abort a travis run without meaningful output

11 years agoReenable 5.10 travis smokes
Peter Rabbitson [Fri, 11 Oct 2013 06:52:25 +0000]
Reenable 5.10 travis smokes

https://rt.cpan.org/Ticket/Display.html?id=88903 got solved \o/

11 years agoCorrect attribution of nonessential skipped tests origin
Peter Rabbitson [Thu, 10 Oct 2013 10:10:27 +0000]
Correct attribution of nonessential skipped tests origin

11 years agoMULTICREATE_DEBUG + TRACE_PROFILE=console_monochrome results in >4MB log
Peter Rabbitson [Fri, 11 Oct 2013 07:44:50 +0000]
MULTICREATE_DEBUG + TRACE_PROFILE=console_monochrome results in >4MB log

11 years agoPod/comment fixes
Karen Etheridge [Thu, 10 Oct 2013 19:23:29 +0000]
Pod/comment fixes

11 years agoMake the dbh error handler installer `Perl -d` friendly
Peter Rabbitson [Mon, 29 Jul 2013 01:47:13 +0000]
Make the dbh error handler installer `Perl -d` friendly

GC in perl is a mess sometimes - a literal sub { ... } within a try { ... } goes
wonky, but the equivalent coderef stored in a scalar is fine >.<

11 years agoMove classdata handling to DBICTest::Util::LeakTracer
Peter Rabbitson [Mon, 29 Jul 2013 04:45:50 +0000]
Move classdata handling to DBICTest::Util::LeakTracer

11 years agoSilence nonessential test warning (last outstanding \o/)
Peter Rabbitson [Fri, 11 Oct 2013 11:03:05 +0000]
Silence nonessential test warning (last outstanding \o/)

11 years agocorrectly carry DESC on simple orderings for complex prefetch
Matt S Trout [Wed, 9 Oct 2013 18:36:13 +0000]
correctly carry DESC on simple orderings for complex prefetch

11 years agomake multicolumn IN work for update/delete
Matt S Trout [Wed, 9 Oct 2013 18:13:23 +0000]
make multicolumn IN work for update/delete

11 years agoswitch _adjust_select_args_for_complex_prefetch order by handling to part-DQ
Matt S Trout [Wed, 9 Oct 2013 17:46:13 +0000]
switch _adjust_select_args_for_complex_prefetch order by handling to part-DQ

11 years agoswitch having code in _count_subq_rs to DQ SQLA, update regexp
Matt S Trout [Wed, 9 Oct 2013 15:52:39 +0000]
switch having code in _count_subq_rs to DQ SQLA, update regexp

11 years agomake _resolve_aliastypes_from_select_args handle an undef select
Matt S Trout [Wed, 9 Oct 2013 15:15:59 +0000]
make _resolve_aliastypes_from_select_args handle an undef select

11 years agoclear renderer objects before dicking around with them as well as after
Matt S Trout [Wed, 9 Oct 2013 15:15:44 +0000]
clear renderer objects before dicking around with them as well as after

11 years agoMany improvements of bigint handling across various DBD::SQLite versions
Peter Rabbitson [Tue, 8 Oct 2013 22:51:25 +0000]
Many improvements of bigint handling across various DBD::SQLite versions

This started as a patch by ilmari to bind all integers as SQL_BIGINT
as opposed to SQL_INTEGER. While this change itself worked fine, further
testing revealed we never actually bound 'bigint' column types in the
first place. When this was rectified all hell broke loose.

The current situation per DBD::SQLite version

1.29 ~ 1.33:  everything works fine, for large values DBD::SQLite loses
              precision on perl binaries with ivsize == 4 (just like integer
              math within perl itself)

1.35:         Nothing works *regardless* of ivsize. Binding a >32 bit value
              as either SQL_INTEGER or as SQL_BIGINT is impossible (an
              exception is thrown from within DBD::SQLite). DBIC simply strips
              the bindtype altogether and issues an "UPGRADE!" warning.

1.37 ~ 1.40:  Everything works, except for the annoying fact that DBD::SQLite
              issues a spurious 'datatype mismatch' warning when one tries
              to bind a >32 bit value with ivsize == 4. RT#76395
              Warning is silenced for the time being within the guts of DBIC.

On the SQL_INTEGER => SQL_BIGINT change: according to
http://www.sqlite.org/datatype3.html#storageclasses all numeric types are
dynamically allocated up to 8 bytes per individual value. Thus it should be
safe and non-wasteful to bind everything as SQL_BIGINT and have SQLite deal
with storage/comparisons however it deems correct.

11 years agoAdd explicit notes wrt DBI/DBD::SQLite dep versions
Peter Rabbitson [Tue, 8 Oct 2013 22:47:15 +0000]
Add explicit notes wrt DBI/DBD::SQLite dep versions

11 years agoMake $SIG{__WARN__} overrides more Carp::Always friendly
Peter Rabbitson [Tue, 8 Oct 2013 22:28:46 +0000]
Make $SIG{__WARN__} overrides more Carp::Always friendly

11 years agoWarn about non-integer values for all integer bind types, not just SQL_INTEGER
Dagfinn Ilmari Mannsåker [Tue, 8 Oct 2013 12:02:23 +0000]
Warn about non-integer values for all integer bind types, not just SQL_INTEGER

11 years agoUse explicit variable on loop
Dagfinn Ilmari Mannsåker [Tue, 8 Oct 2013 12:02:23 +0000]
Use explicit variable on loop