Giter Club home page Giter Club logo

Comments (11)

yajra avatar yajra commented on August 21, 2024

Looks fine on my side. Might be on your function?

Route::get('dual', fn() => DB::connection('oracle')->select('select sysdate from dual'));

Output:

[
  {
     sysdate: "2022-05-16 19:27:56"
  }
]

from pdo-via-oci8.

NBA707 avatar NBA707 commented on August 21, 2024

It has to do with the parameter being passed, in 3.2.1 it must require additional information (breaking change)?

from pdo-via-oci8.

NBA707 avatar NBA707 commented on August 21, 2024

Confirmed, the statement you did w/out parameters works fine in 3.2.1

from pdo-via-oci8.

NBA707 avatar NBA707 commented on August 21, 2024

What the procedure does is return the last 10 entries for a table given a user id. Not sure what changed, but per the PHP.NET manual (https://www.php.net/manual/en/function.oci-get-implicit-resultset.php) it looks like it is just returning the fact there are rows to return instead of returning the actual rows themselves like it did in 3.2.0.

from pdo-via-oci8.

yajra avatar yajra commented on August 21, 2024

Sorry can't check further atm, would you please send a PR if you can? The recent changes was mostly php8 chores that fixes the warnings.

Here is the comparison of changes: v3.2.0...v3.2.1

Most changes were added via PR #95, ping @danielrona if you can assists? Thanks!

from pdo-via-oci8.

danielrona avatar danielrona commented on August 21, 2024

I can't reproduce this either, though I can't figure out where there would have been a breaking change as there's not much change apart from typecasting/hinting.

@NBA707 can you run the tests and see if there's any problem popping up if not could you provide a test where the problem occurs?

//EDIT
If you can provide the tables / sample data I can also try to debug this locally.

from pdo-via-oci8.

NBA707 avatar NBA707 commented on August 21, 2024

Create Function and Table.docx

Attached is the create and replace function command, the create table command and insert sample data.

In SQL Developer I do: select LAST_TEN(59496) from dual; or
select LAST_TEN(18357) from dual;
and there is data

In Tinker I do (artisan tinker):

DB::connection('train')->select('select LAST_TEN(18357) from dual')
=> [
{#4175
+"last_ten(18357)": oci8 statement resource #1045,
},
]

DB::connection('train')->select('select LAST_TEN( ? ) from dual',[18357])
=> [
{#4179
+"last_ten(:p0)": oci8 statement resource #1057,
},
]

So the function works, returns up to 10 rows in a cursor, but 3.2.1 just returns the fact there is a cursor but not the data.

In 3.2.0 you get:

DB::connection('train')->select('select LAST_TEN( ? ) from dual',[18357])
=> [
{#4178
+"partid": "316",
+"supid": "18357",
+"pn": "39033153-1",
+"description": "Electrical installation kit",
+"replaces_pn": "Modification Part",
+"approvalbasis": "STC SA09693AC dated November 2, 2007, DWG No: 39000004 Rev: A Date: September 4, 2007, or later FAA approved revision.",
+"models": "Hawker Beechcraft (390)",
},
]

from pdo-via-oci8.

NBA707 avatar NBA707 commented on August 21, 2024

Granted the test data doesn't match the system data, here is what it looks like with 3.2.0 and multiple rows:

DB::connection('train')->select('select LAST_TEN(48055) from dual')
=> [
{#4195
+"partid": "2990",
+"supid": "48055",
+"pn": "170980-01, 170980-02",
+"description": "Double Seat Harness",
+"replaces_pn": "Boeing 170980-01, 170980-02",
+"approvalbasis": "Identicality per 14 CFR Β§ 21.303, Licensing Agreement",
+"models": "Boeing (747-300 Series)",
},
{#4194
+"partid": "1877",
+"supid": "48055",
+"pn": "171919-01, 171919-02, 171919-03, 171919-04, 171919-05, 171919-06, 171919-07, 171919-08, 171919-20, 171919-21, 171919-22, 171919-23, 171919-24, 171919-25",
+"description": "Double Seat Harness Assembly",
+"replaces_pn": "Boeing 171919-01, 171919-02, 171919-03, 171919-04, 171919-05, 171919-06, 171919-07, 171919-08, 171919-20, 171919-21, 171919-22 , 171919-23, 171919-24, 171919-25",
+"approvalbasis": "Identicality per 14 CFR Β§ 21.303, Licensing Agreement",
+"models": "Boeing (767-300)",
},
{#4193
+"partid": "329",
+"supid": "48055",
+"pn": "170777-30",
+"description": "Module, Electrical Jack",
+"replaces_pn": "McDonnell Douglas 170777-30",
+"approvalbasis": "Identicality per 14 CFR Β§ 21.303, Licensing Agreement",
+"models": "McDonnell Douglas (MD-11)",
},
]

from pdo-via-oci8.

danielrona avatar danielrona commented on August 21, 2024

@NBA707 with the sample Data you provided I could replicate the behavior in Toad this shows up as a cursor but @yajra already applied some magic πŸ‘and I fixed the underlying issue.

Apologies for any inconvenience this might have caused you.

image

image

from pdo-via-oci8.

NBA707 avatar NBA707 commented on August 21, 2024

Wow! Thank you for that.

from pdo-via-oci8.

yajra avatar yajra commented on August 21, 2024

Released on v3.2.2, thanks a lot @danielrona and @NBA707 🍻

from pdo-via-oci8.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.