Laravel 5 Writing Custom Database Driver - database

I'm working on project and need to implement custom database driver, but can't find any guidelines which interfaces i should to implement.
Is there any resourses available that could help writing custom driver rather thank just diving in code and trying to figure out how current drivers are implemented?
EDIT
By saying "driver" i mean support for example NoSQL dabase using standart Laravel's methods ( Eloquent model and Query builder ), for example:
User::take(10)->get();

For Mysql Laravel uses eloquent
laravel - eloquent
For NoSql like MongoDB, you can use laravel-mongodb
jenssegers - laravel-mongodb
It's even support Hybrid relations between MySql and MongoDB

I have worked on MongoDB (a NoSQL database) in one of my project, where I have to use a jenssengers package https://github.com/jenssegers/laravel-mongodb to use the functionalities. I was not able to use Eloquent in that.

Laravel - eloquent/ jenssegers - Laravel-MongoDB can manage hybrid relations as well.

Related

SQLite3 in Symfony3 without doctrine

Is there a specific way to use sqlite3 in symfony without using doctrine?
I just want to do basic operations. And tried including the classes in the directory structure but it is not able to find SQLite3 class.
Any suggestions? I am very tight on time constraint.
Doctrine allow to use sqlite if you define path in doctrine dbal in config.
How to use sqlite database on symfony2 project?
but Doctrine is not integral part of Symfony, so you can drop Doctrine from your project and use sqlite like in pure Php.
You can use exaples form docs:
http://php.net/manual/en/book.sqlite3.php
proposed by Jason Roman in comment. It is simple, but I suggest to create your own service for operation on sqlite or simply use PDO.
http://php.net/manual/en/ref.pdo-sqlite.php

Migrating Stored Procedures to CakePHP 3.0

What is the best practice for migrating a CakePHP 2 project that uses Views in MySQL to a CakePHP 3 projects that uses migrations. As I understand it, there is no support for Stored Procedures/Views in the Phinx library but I would like to continue accessing the View as if it were a table e.g appending conditions.
If there is no best practice then please outline the options that I would have available to me.

CakePHP 3 - Where is custom datasource?

I have a large number of CakePHP 2 web applications, many of them use remote data over the custom DataSource. I'm reading the documentation of CakePHP 3, but I can not find instructions for creating custom datesource.
My next project also requires a custom DataSource (ArangoDB), so I planned to build it with the new version of CakePHP.
Please do specify where and how to build a DataSource in CakePHP 3.
Thank You.
Just look at the code of any existing database driver and see how it is built? There is nothing in the book yet about how to create your own datasource.
ArangoDB seems to be yet another NoSQL DB, so take a look at how this Elastic Search datasource is done. By a quick look I think you can use it as a base for your implemention, they seem to be similar.
I was facing the same problem so I decided to write my own models in CakePHP 3.x. If you want you can use it from here. hope you like it.

Creating JPA from database

I know this is a duplicate question.
But even i couldn't find any tool to create JPA entity file from database source.
I used eclipse to do this. I only got DTO kind of classes with getters & setters.
Can anyone suggest some tools that create DAO files too.
TIA
You can use Telosys Tools,
an Eclipse plugin working from an existing database with customizable Velocity templates
See: https://sites.google.com/site/telosystools/
Eclipse Marketplace : http://marketplace.eclipse.org/content/telosys-tools
For JPA generation, use the JPA set of templates available on GitHub : https://github.com/telosys-tools
you can use netbeans instead of eclipse. After you create own project, you can select "JPA controller classes from entity classes" in netbeans menu. For example http://ensode.net/roller/dheffelfinger/entry/automated_dao_generation_from_jpa
Minuteproject is a generator tool and can generate JPA2 artifacts from Database.
You can instruct the generator to apply convention for your java code that do not follow your DB convention, but the mapping will be correct. (Example strip DB name prefix; table starting with ADMIN_ such as ADMIN_ENVIRONMENT are Environment (w/out Admin) as java class) For the moment there 20+ conventions that help you reshape your model to be less DB look-and-feel by more Java-OO-friendly.
If you want DAO minuteproject has a track BSLA that generate spring-integrated DAO

integrating Cakephp with Informix database

I have an application and I want to use a table of Informix in my cakephp application. Is it possible?
I just want the users table of informix, the others tables i'll use mysql. Is it possible?
Thanks.
It can be done but it needs information about how you can access the data. Is it standardised like REST/SOAP or something? Or do you need hard database access?
In general in CakePHP you build a custom datasource for it: http://book.cakephp.org/2.0/en/models/datasources.html or you can work with behaviours which you attach to models.
There are some examples of this approach like this for REST:
http://www.neilcrookes.com/2010/06/01/rest-datasource-plugin-for-cakephp/

Resources