Comments (11)
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.
It has to do with the parameter being passed, in 3.2.1 it must require additional information (breaking change)?
from pdo-via-oci8.
Confirmed, the statement you did w/out parameters works fine in 3.2.1
from pdo-via-oci8.
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.
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.
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.
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.
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.
@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.
from pdo-via-oci8.
Wow! Thank you for that.
from pdo-via-oci8.
Released on v3.2.2, thanks a lot @danielrona and @NBA707 π»
from pdo-via-oci8.
Related Issues (20)
- Calling reset() on an object is deprecated in (Statement.php on line 690) PHP 8.1.4 HOT 3
- PHP 8.1 Support HOT 1
- Call to a member function save() on null HOT 1
- setFetchMode(PDO::FETCH_CLASS, 'Classtype') and fetchAll() returns array<stdClass>
- getAttribute returning empty array instead of null in PHP v8.1.16 HOT 2
- Support Request for SQLT_BOL or OCI_B_BOL in oci_bind_by_name HOT 2
- Table naming case sensitivity issue
- Undefined constant "Yajra\Pdo\Oci8\SQLT_BOL"
- Compound Primary Key HOT 2
- Binding variable with ociType SQLT_NTY gets cleared HOT 3
- oci_connect(): OCI_SUCCESS_WITH_INFO: ORA-28002: the password will expire within 97 days HOT 2
- Use oci_new_connect instead oci_connect HOT 1
- getColumnMeta returns uppercase name even if PDO::CASE_LOWER is set
- PHP8 Compatibility
- Declaration of Yajra\Pdo\Oci8::query($statement, $fetchMode = null, $modeArg = null, $ctorArgs = null) must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs) HOT 7
- always empty collection by binding to statement in php 8 HOT 5
- missing implementation of listTableColumns fail on using laravel-ide-helper HOT 2
- Get the resource of oci8 connection HOT 1
- set oracle connection identifier HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdo-via-oci8.