Giter Site home page Giter Site logo

cooperl22 / laravel-ibmi Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 12.0 67 KB

laravel-ibmi is a simple DB2 & Toolkit for IBMi service provider for Laravel. It provides DB2 Connection by extending the Illuminate Database component of the laravel framework. Plus it also provides Toolkit for IBMi so that you can access IBMi resources with same credentials.

License: Other

PHP 100.00%

laravel-ibmi's People

Contributors

boivinj avatar cooperl22 avatar jonkerw85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

laravel-ibmi's Issues

SQL0104 - Token , was not valid when using Laravel 5.1 ::paginate(xx)

Hello,

I have been using your package on a test project and found a problem when trying to paginate results. The first page returns fine but subsequent pages throw an SQL error during the prepare step.

My controller has:

$data = Model::paginate(15);

The query that is produced is:

select * from (select *, row_number() over (order by field asc) as row_num from table ) as temp_table where row_num between 16 and 30;

The problem is the comma in (select *, row_nu...

I was able to work around the error by changing my controller to have:

$data = Model::select('table.*')->paginate(xx);

This produced
select * from (select table.*, row_number() over (order by field asc) as row_num from table ) as temp_table where row_num between 16 and 30;

and the prepare was successful.

It looks like the Laravel Illuminate Builder is supplying the default of '*" for the columns in a query. Not sure if there is a way this can be overridden in your package.

This is my first github comment so please forgive me if I've violated any etiquette.

Laravel 5

I've noticed there's a branch for 5, is this working? How might I go about installing this in 5?

I'm having to write some integration with our iSeries into Laravel, so if this can work with Laravel 5 this seems like it would be perfect!

Thanks

Edit: Also I realize this was released/updated 8 days ago, and I appreciate the effort going into it! There seems to be few resources for iSeries and PHP integration out there.

Drivers for linux and mac

This is not a code issue, i have googled a lot to find drivers and installation guides but, without success.
I'm asking you where i can find drivers for ibm i (AS400) and how to install them.
Thanks

Trim whitespace

Is there a way to automatically trim the whitespace from data that has been pulled? I checked in the db2 config file under options where PDO::ATTR_CASE => PDO::CASE_LOWER, is held but didn't see any way with these functions or options to accomplish this.

I know you can do mutations/casting in laravel or just use the trim function, but it would be nice to handle this globally when data is returned via the connector. The laravel way would have you define every field unfortunately. Working with an AS400 here.

Error typeUuid does not exist

Hi !

When i try to create the notification table, i have this error

php artisan notifications:table
php artisan migrate

Migrating: 2020_10_02_063013_create_notifications_table

   BadMethodCallException 

  Method Cooperl\Database\DB2\Schema\Grammars\DB2Grammar::typeUuid does not exist.

  at vendor/laravel/framework/src/Illuminate/Support/Traits/Macroable.php:103
     99|      */
    100|     public function __call($method, $parameters)
    101|     {
    102|         if (! static::hasMacro($method)) {
  > 103|             throw new BadMethodCallException(sprintf(
    104|                 'Method %s::%s does not exist.', static::class, $method
    105|             ));
    106|         }
    107| 

      +9 vendor frames 
  10  database/migrations/2020_10_02_063013_create_notifications_table.php:23
      Illuminate\Support\Facades\Facade::__callStatic("create")

      +22 vendor frames 
  33  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

They are a solution ?

I would like to express my gratitude for all your help in this matter

Bad return value with CCSID 1208

Hi,

I try this vendor to retrieve data from my iSeries database. The iSeries QCCSID is 65535.

My CCSID conf for this vendor is : 1208

I have a model named EXB and code are execute on Laravel on Ubuntu 18.04.4 with IBM i Access ODBC Driver.

I have a model name EXB, and when i retrieve data, some value are null while when i test with iSQL i get the correct value and not null.

Example :

{
"data": {
"exb01": "CL00000001",
"exb02": "MME",
"exb03": null, <-- this value is not null with iSQL test

After some searches, i can see that all column values which have an accent return a null value on laravel.

Anybody knows what happens ?

Thanks for your help

Not getting data from IBMi database

Hello,

First off, thank you for developing this. I have a laravel 5.5 application that I am trying to get working with a DB2 database running on a V7R1 IBMi server.

Here is my database config:

'ibmi' => [
'driver' => 'db2_ibmi_odbc',
'driverName' => '{IBM i Access ODBC Driver 64-bit}',
'host' => 'SYSTEM',
'username' => 'USER',
'password' => 'PASSWD',
'database' => 'DATABASE',
'prefix' => '',
'schema' => 'SCHEMA',
'port' => 50000,
'date_format' => 'Y-m-d H:i:s',
// or 'Y-m-d H:i:s.u' / 'Y-m-d-H.i.s.u'...
'odbc_keywords' => [
'SIGNON' => 3,
'SSL' => 0,
'CommitMode' => 2,
'ConnectionType' => 0,
'DefaultLibraries' => '',
'Naming' => 0,
'UNICODESQL' => 0,
'DateFormat' => 5,
'DateSeperator' => 0,
'Decimal' => 0,
'TimeFormat' => 0,
'TimeSeparator' => 0,
'TimestampFormat' => 0,
'ConvertDateTimeToChar' => 0,
'BLOCKFETCH' => 1,'BlockSizeKB' => 32,
'AllowDataCompression' => 1,
'CONCURRENCY' => 0,
'LAZYCLOSE' => 0,
'MaxFieldLength' => 15360,
'PREFETCH' => 0,
'QUERYTIMEOUT' => 1,
'DefaultPkgLibrary' => 'QGPL',
'DefaultPackage' => 'A /DEFAULT(IBM),2,0,1,0',
'ExtendedDynamic' => 0,
'QAQQINILibrary' => '',
'SQDIAGCODE' => '',
'LANGUAGEID' => 'ENU',
'SORTTABLE' => '',
'SortSequence' => 0,
'SORTWEIGHT' => 0,
'AllowUnsupportedChar' => 0,
'CCSID' => 1208,
'GRAPHIC' => 0,
'ForceTranslation' => 0,
'ALLOWPROCCALLS' => 0,
'DB2SQLSTATES' => 0,
'DEBUG' => 0,
'TRUEAUTOCOMMIT' => 0,
'CATALOGOPTIONS' => 3,
'LibraryView' => 0,
'ODBCRemarks' => 0,
'SEARCHPATTERN' => 1,
'TranslationDLL' => '',
'TranslationOption' => 0,
'MAXTRACESIZE' => 0,
'MultipleTraceFiles' => 1,
'TRACE' => 0,
'TRACEFILENAME' => '','ExtendedColInfo' => 0,
],

I can successfully run the migration, and actually insert some data into my database. The problem comes into play when I try to retrieve any data through my application. I was wondering if you've seen this before?

Thanks,

Laravel 8 & PHP 8

Hey there! Thanks for this plugin! It looks exactly like what I need! The problem is I am using Laravel 8 & php 8 ... Is there any chances you can plan an update for this?

Laravel 7.x

Have you had the time look at #7. Please let me know if somethings need to be changed for Laravel 7 compatibility.

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.