Welcome Guest, Not a member yet? Register   Sign In
CUBRID Database Support
#11

[eluser]kadishmal[/eluser]
CUBRID Books? No, I haven't heard of any CUBRID books so far. But they have:

- CUBRID Manual http://www.cubrid.org/manual
- CUBRID PHP Manual http://php.net/manual/en/book.cubrid.php
- CUBRID PDO Manual http://php.net/manual/en/ref.pdo-cubrid.php

All that we need.

I looked at the /databases/mysql directory and have estimated the approximate time to completed. I suppose in a week or two we can finish porting. Not many changes are necessary. The ones we definitely need to change/handle are the function which handle:

- database creation
- character set
- serials

1. At this moment, it is not possible to create a database through CUBRID PHP Driver. So, normally, users have to pre-create their database, then run their PHP script to populate the database. I don't think this is a problem, though.

2. There are no character sets in CUBRID. So, we can ignore those functions (or do something else). I will see when I look deeper.

Like I told you before, I will arrive on August 1st. If you manage to port the MySQL driver classes to CUBRID, I will come and check, and perform tests. Otherwise, I will join you and help you finish the porting.

By the way, if you happen to attend CUBRID it! programming contest (http://www.cubrid.org/cubrid_it), soon they are going to launch a new contest which will be related to web applications porting/development or something of this sort. So, we may also apply for the event. I don't know the details, though.

And, my skype is kadishmal. We can also talk there.
#12

[eluser]kadishmal[/eluser]
Hi! I'm back now. Why don't you upload your code to github or other SCV so that we could co-work? I will check your code and will finish it up.
#13

[eluser]nikes[/eluser]
hi kadishmal
#14

[eluser]kadishmal[/eluser]
[quote author="nikes" date="1312384011"]hi kadishmal[/quote]

Hi nikes! What's up?
#15

[eluser]kadishmal[/eluser]
Hi!

I've created the cubrid_*.php CUBRID Driver related classes. Now I need to run CI native unit tests to confirm the DB Driver works as expected. Do you know where can I find these tests?

Any ideas are appreciated.
#16

[eluser]kadishmal[/eluser]
Since CI also supports several relational DBs, I suppose there should be unit tests used for testing all of them.

Where do I find them?
#17

[eluser]kadishmal[/eluser]
Hi,

Here is the complete CUBRID Driver classes for CodeIgniter 2.0.2. The archive contains:

Code:
codeigniter-cubrid-driver.zip\
-database.php
-cubrid\
--cubrid_driver.php
--cubrid_result.php
--cubrid_forge.php
--cubrid_utility.php
--index.html

1. Place the database.php file under the \application\config\ directory and make appropriate adjustments for the DB connection.

2. Place the cubrid\ driver directory under the \system\database\drivers\ directory.

Now it should be ready. Before launching you web app make sure:

- you have started the CUBRID Service (cubrid service start)
- you have started the database(s) you plan to use (cubrid server start db_name).

You are more than welcome to test this CUBRID Driver. If you encounter any issues, please report them here. I will do my best to fix them.
#18

[eluser]kadishmal[/eluser]
Just in case, here is the configurations necessary to establish DB Connection with CUBRID.

Code:
$db['default']['hostname'] = 'localhost';
$db['default']['port'] = '33000';
$db['default']['username'] = 'dba';
$db['default']['password'] = 'ci_pass';
$db['default']['database'] = 'ci_demo';
$db['default']['auto_commit'] = TRUE;
$db['default']['dbdriver'] = 'cubrid';
$db['default']['dbprefix'] = 'tbl_';

1. port parameter represents the port of the CUBRID Broker. By default it is 33000. To check which one is yours, run the following command. This assumes that your CUBRID Service is running.

Code:
% cubrid service status

should output something like:

Code:
@ cubrid master status
++ cubrid master is running.
@ cubrid server status
Server ci_demo (rel 8.4, pid 5042)
@ cubrid broker status
  NAME           PID  PORT  AS  JQ      REQ  TPS  QPS    LONG-T    LONG-Q  ERR-Q
================================================================================
* query_editor  5007 30000   5   0        0    0    0    0/0.0    0/0.0      0
* broker1       5017 33000   5   0       12   10    4    0/0.0    0/0.0      0
@ cubrid manager server status
++ cubrid manager server is running.

As you can see the CUBRID Broker (broker1) is listening to port 33000.

2. Also you can set the auto_commit parameter to FALSE which will allow you to run your Web app in dry mode, i.e. all INSERTs to the DB will not be committed.

If any questions, feel free to ask.
#19

[eluser]kadishmal[/eluser]
First of all, thanks to CI team for having accepted CUBRID Driver for CI. Second, the new CUBRID 8.4.1 database server is available now with over 70% performance improvement. The new release brings lots of new features and improvements to SQL compatibility with MySQL.

I have already ran preliminary tests with CI checked out the latest code from Github and CUBRID 8.4.1. I can say that so far all works as with 8.4.0.

Nevertheless, I plan to update the driver. The new 8.4.1 PHP API has many improvements and support for MySQL's PHP API, as well as persistent connection on API level. Once completed I will send a pull request as before and will update this forum. Anyone willing to help me will always be welcomed!




Theme © iAndrew 2016 - Forum software by © MyBB