From bogus@does.not.exist.com Tue Nov 7 19:00:29 2017 From: bogus@does.not.exist.com () Date: Tue, 07 Nov 2017 19:00:29 -0000 Subject: No subject Message-ID: ``` dsn dbi:Oracle:host=xxx;sid=xxx user xxx pass xxx LongReadLen 100000000 LongTrunkOk 1 ``` However, this gave the error: ``` Can't use string ("LongTrunkOk") as a HASH ref while "strict refs" in use at /cath/homes2/ucbcisi/.plenv/versions/5.12.5/lib/perl5/site_perl/5.12.5/DBIx/Class/Storage/DBI.pm line 733. ``` It looks like `DBIC->connect` can accept these options as a hashref, but dbicdump is currently passing them in as a (de-referenced) hash. Applying the change in this PR seemed to make everything work for me. Existing tests all pass. I've added a test to make sure the new config with options parses okay (fails prior to this PR). It currently throws out a warning though (I think because the test database isn't DBD::Oracle). You can view, comment on, or merge this pull request online at: https://github.com/dbsrgits/dbix-class-schema-loader/pull/15 -- Commit Summary -- * Use hashref (not hash) for connection info options -- File Changes -- M script/dbicdump (2) A t/61dbicdump_config_options.t (65) -- Patch Links -- https://github.com/dbsrgits/dbix-class-schema-loader/pull/15.patch https://github.com/dbsrgits/dbix-class-schema-loader/pull/15.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dbsrgits/dbix-class-schema-loader/pull/15 ----==_mimepart_59f7319b66a84_2e413f9439534f281907b4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Trying to specify DBI connection options in dbicdump config.

I may have misunderstood usage, but it looks like connect allows DBI connection options to be given as a hashref, eg

$options = { LongTrunkOk => 1 };
My::Schema->connect($dsn, $user, $pass, $options);

However, I think dbicdump is currently passing them in as a (de-referenced) hash:

     make_schema_at(
         $c->{schema_class},
         $c->{loader_options} || {},
         [ $dsn, $user, $pass, %{$options} ],
     );

This PR changes %{$options} to $options, which allows DBI connection options to be specified in the config as:

<connect_info>
    dsn     dbi:Oracle:host=xxx;sid=xxx
    user    xxx
    pass    xxx
    <options>
        LongReadLen         100000000
        LongTrunkOk         1
    </options>
</connect_info>

Full details appended.


I was having difficulty passing connect options through to dbicdump (via Config::Any), e.g trying to dump the schema from an Oracle database requires the following connection options:

      LongReadLen         100000000
      LongTrunkOk         1

Based on the DBIx::Class::Storage::DBI docs, I thought the best way to do this in dbic.conf was:

<connect_info>
    dsn     dbi:Oracle:host=xxx;sid=xxx
    user    xxx
    pass    xxx
    LongReadLen         100000000
    LongTrunkOk         1
</connect_info>

However this came up with an error that seemed to suggest these options weren't being used.

DBIx::Class::Schema::Loader::DBI::Oracle::_view_definition(): DBI Exception: DBD::Oracle::db selectrow_array failed: ORA-24345: A Truncation or null fetch error occurred (DBD ERROR: ORA-01406 error on field 1 of 1, ora_type 8, LongReadLen too small and/or LongTruncOk not set)

From the code, it looks like dbicdump allows a config key options within connect_info so I tried:

<connect_info>
    dsn     dbi:Oracle:host=xxx;sid=xxx
    user    xxx
    pass    xxx
    <options>
        LongReadLen         100000000
        LongTrunkOk         1
    </options>
</connect_info>

However, this gave the error:

Can't use string ("LongTrunkOk") as a HASH ref while "strict refs" in use at /cath/homes2/ucbcisi/.plenv/versions/5.12.5/lib/perl5/site_perl/5.12.5/DBIx/Class/Storage/DBI.pm line 733.

It looks like DBIC->connect can accept these options as a hashref, but dbicdump is currently passing them in as a (de-referenced) hash. Applying the change in this PR seemed to make everything work for me.

Existing tests all pass. I've added a test to make sure the new config with options parses okay (fails prior to this PR). It currently throws out a warning though (I think because the test database isn't DBD::Oracle).


You can view, comment on, or merge this pull request online at:

  https://github.com/dbsrgits/dbix-class-schema-loader/pull/15

Commit Summary

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

----==_mimepart_59f7319b66a84_2e413f9439534f281907b4-- From notifications at github.com Thu Nov 2 20:33:16 2017 From: notifications at github.com (Matthew Musgrove) Date: Thu, 02 Nov 2017 20:33:16 +0000 (UTC) Subject: [DBIx-Class-Devel] [dbsrgits/dbix-class] RT-112563 Correct documentation for get_column arguments (#117) Message-ID: This addresses https://rt.cpan.org/Ticket/Display.html?id=112563 by changes the arguments for get_columns to '$column'. You can view, comment on, or merge this pull request online at: https://github.com/dbsrgits/dbix-class/pull/117 -- Commit Summary -- * RT-112563 Correct documentation for get_column arguments -- File Changes -- M lib/DBIx/Class/ResultSet.pm (2) -- Patch Links -- https://github.com/dbsrgits/dbix-class/pull/117.patch https://github.com/dbsrgits/dbix-class/pull/117.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dbsrgits/dbix-class/pull/117 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Thu Nov 2 20:58:08 2017 From: notifications at github.com (Matthew Musgrove) Date: Thu, 02 Nov 2017 20:58:08 +0000 (UTC) Subject: [DBIx-Class-Devel] [dbsrgits/dbix-class] RT-119863 Improve error message when the related_resultset is not found. (#118) Message-ID: This addresses https://rt.cpan.org/Ticket/Display.html?id=119863 by changing the error message to include the name of the source resultset. You can view, comment on, or merge this pull request online at: https://github.com/dbsrgits/dbix-class/pull/118 -- Commit Summary -- * RT-119863 Improve error message when the related_resultset is not found. -- File Changes -- M lib/DBIx/Class/Relationship/Base.pm (4) -- Patch Links -- https://github.com/dbsrgits/dbix-class/pull/118.patch https://github.com/dbsrgits/dbix-class/pull/118.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dbsrgits/dbix-class/pull/118 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Thu Nov 2 21:04:54 2017 From: notifications at github.com (Matthew Musgrove) Date: Thu, 02 Nov 2017 21:04:54 +0000 (UTC) Subject: [DBIx-Class-Devel] [dbsrgits/dbix-class] Fix a typo (#109) In-Reply-To: References: Message-ID: mrmuskrat commented on this pull request. This looks good to me. You might want to change the PR to merge into devrel. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dbsrgits/dbix-class/pull/109#pullrequestreview-73939301 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Thu Nov 2 21:06:05 2017 From: notifications at github.com (Matthew Musgrove) Date: Thu, 02 Nov 2017 21:06:05 +0000 (UTC) Subject: [DBIx-Class-Devel] [dbsrgits/dbix-class] Minor SYNOPSIS fix (#104) In-Reply-To: References: Message-ID: mrmuskrat commented on this pull request. This looks good to me. You want to update the PR to merge into the devrel branch though. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dbsrgits/dbix-class/pull/104#pullrequestreview-73939626 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Fri Nov 3 16:35:49 2017 From: notifications at github.com (Matthew Musgrove) Date: Fri, 03 Nov 2017 16:35:49 +0000 (UTC) Subject: [DBIx-Class-Devel] [dbsrgits/dbix-class] RT-123495 Fix failing tests in t/72pg.t (#119) Message-ID: This addresses https://rt.cpan.org/Ticket/Display.html?id=123494 by adding the expected warning in the call to warnings_like on line 512. You can view, comment on, or merge this pull request online at: https://github.com/dbsrgits/dbix-class/pull/119 -- Commit Summary -- * RT-123495 Fix failing tests in t/72pg.t -- File Changes -- M t/72pg.t (2) -- Patch Links -- https://github.com/dbsrgits/dbix-class/pull/119.patch https://github.com/dbsrgits/dbix-class/pull/119.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dbsrgits/dbix-class/pull/119 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Mon Nov 6 22:30:06 2017 From: notifications at github.com (Andrew Ruder) Date: Mon, 06 Nov 2017 22:30:06 +0000 (UTC) Subject: [DBIx-Class-Devel] [dbsrgits/dbix-class] clear inflated in update({column => deflated}) (#120) Message-ID: If you access an inflated column and then change it with update({column => deflated_value}), the cached inflated column isn't cleared out and returns stale values. Added a small test exhibiting the problem with a datetime field. You can view, comment on, or merge this pull request online at: https://github.com/dbsrgits/dbix-class/pull/120 -- Commit Summary -- * clear inflated in update({column => deflated}) -- File Changes -- M AUTHORS (1) M lib/DBIx/Class/Row.pm (1) A t/inflate/datetime.t (94) -- Patch Links -- https://github.com/dbsrgits/dbix-class/pull/120.patch https://github.com/dbsrgits/dbix-class/pull/120.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dbsrgits/dbix-class/pull/120 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Fri Nov 10 19:30:01 2017 From: notifications at github.com (Andrew Ruder) Date: Fri, 10 Nov 2017 19:30:01 +0000 (UTC) Subject: [DBIx-Class-Devel] [dbsrgits/dbix-class] clear inflated in update({column => deflated}) (#120) In-Reply-To: References: Message-ID: Looks like the preferred test structure has changed significantly. I'll have to figure it out. In the meantime I'll submit a pull request for the maintenance branch. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dbsrgits/dbix-class/pull/120#issuecomment-343564633 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Fri Nov 10 19:30:50 2017 From: notifications at github.com (Andrew Ruder) Date: Fri, 10 Nov 2017 19:30:50 +0000 (UTC) Subject: [DBIx-Class-Devel] [dbsrgits/dbix-class] clear inflated in update({column => deflated}) (#121) Message-ID: If you access an inflated column and then change it with update({column => deflated_value}), the cached inflated column isn't cleared out and returns stale values. Added a small test exhibiting the problem with a datetime field. You can view, comment on, or merge this pull request online at: https://github.com/dbsrgits/dbix-class/pull/121 -- Commit Summary -- * clear inflated in update({column => deflated}) -- File Changes -- M AUTHORS (1) M lib/DBIx/Class/Row.pm (1) M t/inflate/datetime.t (50) -- Patch Links -- https://github.com/dbsrgits/dbix-class/pull/121.patch https://github.com/dbsrgits/dbix-class/pull/121.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dbsrgits/dbix-class/pull/121 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Fri Nov 10 19:31:44 2017 From: notifications at github.com (Andrew Ruder) Date: Fri, 10 Nov 2017 19:31:44 +0000 (UTC) Subject: [DBIx-Class-Devel] [dbsrgits/dbix-class] clear inflated in update({column => deflated}) (#121) In-Reply-To: References: Message-ID: This is against the maintenance branch for 0.0828xx. We are seeing quite a few other regressions with master right now, hopefully I can prepare some pull requests for that in the near future. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dbsrgits/dbix-class/pull/121#issuecomment-343565028 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Fri Nov 10 19:32:07 2017 From: notifications at github.com (Andrew Ruder) Date: Fri, 10 Nov 2017 19:32:07 +0000 (UTC) Subject: [DBIx-Class-Devel] [dbsrgits/dbix-class] clear inflated in update({column => deflated}) (#120) In-Reply-To: References: Message-ID: Closed #120. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dbsrgits/dbix-class/pull/120#event-1336669388 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Wed Nov 15 18:54:28 2017 From: notifications at github.com (Vladimir Melnik) Date: Wed, 15 Nov 2017 18:54:28 +0000 (UTC) Subject: [DBIx-Class-Devel] [dbsrgits/dbix-class] Stop trying to get last_insert_id() from all the columns (#122) Message-ID: Hello, When we're trying to create a new row in a table having a complex PK (like `int+datetime+datetime` in my case), we're getting a `Can't get last insert id` exception, as datetime doesn't return anything to a `last_insert_id` call, so `@pri_values != @missing_pri` in such case. So I'd like to propose to filter out the columns that don't have the `is_auto_increment` attribute set. Would you be so kind as to review it? Thanks! You can view, comment on, or merge this pull request online at: https://github.com/dbsrgits/dbix-class/pull/122 -- Commit Summary -- * Stop trying to get last_insert_id() from all the columns -- File Changes -- M lib/DBIx/Class/Storage/DBI.pm (2) -- Patch Links -- https://github.com/dbsrgits/dbix-class/pull/122.patch https://github.com/dbsrgits/dbix-class/pull/122.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/dbsrgits/dbix-class/pull/122 -------------- next part -------------- An HTML attachment was scrubbed... URL: