Yii Framework Forum: CUBRID support for Yii - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

CUBRID support for Yii Rate Topic: -----

#21 User is offline   kadishmal 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 44
  • Joined: 09-February 11
  • Location:South Korea

Posted 15 February 2011 - 11:07 PM

View Postthorny-road, on 15 February 2011 - 08:16 PM, said:

The 8.3.1 CUBRID PDO driver can't get the foreign keys of some table, and this issue has been fixed in 8.3.2 version.

I suppose you meant issue in CUBRID PDO 3.0 has been fixed in CUBRID PDO 3.1. Please clarify.

View Postthorny-road, on 15 February 2011 - 08:16 PM, said:

And I believe that CUBRID should support named placeholders.

I also think so. What I think is that it is possible to implement the named placeholders support without the native support in CUBRID engine (until the engine developers implement it). One way is to match the placeholders in the CUBRID DB layer for Yii. The second is in the CUBRID PDO Driver. This way Yii users will not notice any difference. The DB layer or the PDO driver will do that job.

If you have any roadmap for developing the CUBRID DB layer, please share with me. I will join and help you.
0

#22 User is offline   thorny-road 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 25-October 10

Posted 16 February 2011 - 12:02 AM

View Postkadishmal, on 15 February 2011 - 11:07 PM, said:

I suppose you meant issue in CUBRID PDO 3.0 has been fixed in CUBRID PDO 3.1. Please clarify.


I also think so. What I think is that it is possible to implement the named placeholders support without the native support in CUBRID engine (until the engine developers implement it). One way is to match the placeholders in the CUBRID DB layer for Yii. The second is in the CUBRID PDO Driver. This way Yii users will not notice any difference. The DB layer or the PDO driver will do that job.

If you have any roadmap for developing the CUBRID DB layer, please share with me. I will join and help you.


Yes, the fk issue has been fixed in CUBRID PDO 3.1. About the solution for named placeholders, I will think it over.
0

#23 User is offline   thorny-road 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 25-October 10

Posted 17 February 2011 - 10:32 PM

View Postkadishmal, on 15 February 2011 - 11:07 PM, said:

I also think so. What I think is that it is possible to implement the named placeholders support without the native support in CUBRID engine (until the engine developers implement it). One way is to match the placeholders in the CUBRID DB layer for Yii. The second is in the CUBRID PDO Driver. This way Yii users will not notice any difference. The DB layer or the PDO driver will do that job.

If you have any roadmap for developing the CUBRID DB layer, please share with me. I will join and help you.


Hi kadishmal,

The named parameter issue has been solved. I find out that PDO has given its own solution for named parameter, but I didn't know that until I run test cases in PDO :P

In 62 test cases, 2 of them are failed:

pdo_022.phpt: This test case tests the method getColumnMeta. The comment in this test says, "meta information is a nightmare to handle portably. it's not really PDOs job." So CUBRID doesn't implement this method, but give a method cubrid_schema which can be used to get schema info.

bug_43130.phpt: This test case tests that Bound parameters cannot have - in their name. The CUBRID output don't match the desired output. But if the named parameters don't have -, then all will be OK.
0

#24 User is offline   thorny-road 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 25-October 10

  Posted 08 March 2011 - 03:35 AM

Hi kadishmal,

I have developed the cubrid schema adapter for Yii 1.1.6, and tested it using yii blog demo. It seems it works correctly.

Just decompress it and put the directory cubrid in framework/db/schema, then add the following line in the $_coreClasses in framework/YiiBase.php:

Quote

'CCubridColumnSchema' => '/db/schema/cubrid/CCubridColumnSchema.php',
'CCubridSchema' => '/db/schema/cubrid/CCubridSchema.php',
'CCubridTableSchema' => '/db/schema/cubrid/CCubridTableSchema.php',

Attached File(s)


0

#25 User is offline   kadishmal 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 44
  • Joined: 09-February 11
  • Location:South Korea

Posted 08 March 2011 - 05:16 AM

Thanks thorny-road! This is really awesome! I will check it soon. What do you think if we call all CUBRID Community members who use Yii to test it out? Do you think it is stable enough to publicly try?
0

#26 User is offline   thorny-road 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 25-October 10

Posted 08 March 2011 - 07:13 PM

View Postkadishmal, on 08 March 2011 - 05:16 AM, said:

Thanks thorny-road! This is really awesome! I will check it soon. What do you think if we call all CUBRID Community members who use Yii to test it out? Do you think it is stable enough to publicly try?


It is not a stable version, but may be a alpha or beta version. :) It needs carefully testing. And I believe the final solution for Yii CUBRID support is that we can contact Yii developer, suggest adding CUBRID support into Yii.
0

#27 User is offline   kadishmal 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 44
  • Joined: 09-February 11
  • Location:South Korea

Posted 11 March 2011 - 01:44 AM

I will test this weekend and let you know the results.
0

#28 User is offline   thorny-road 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 25-October 10

Posted 11 March 2011 - 03:17 AM

OK. Thanks :)

There are two methods in parent class CDbSchema which I haven't implemented, because I don't know how to implement them correctly now:

1: public function checkIntegrity($check=true,$schema='')

This method is used to check referential integrity.

2: public function resetSequence($table,$value=null)

This method is used to resets the sequence value of a table's primary key.
0

#29 User is offline   kadishmal 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 44
  • Joined: 09-February 11
  • Location:South Korea

Posted 16 August 2011 - 04:49 AM

I have completed CUBRID Driver development based on your code. Since CUBRID 8.4.0 there are many new SQL syntaxes compatible with MySQL, so I changed old code with the new more compact ones.

I've already started testing. Everything works perfectly but one issue I have explained in this post. In short, at this moment Yii does not escape column names which Yii generates for WHERE condition based on some $criteria. This raises reserved words conflict in CUBRID which in response generates an SQL Syntax Error message. What can we do to handle this?
0

#30 User is offline   robregonm 

  • Expert Yii Developer
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 594
  • Joined: 30-July 09
  • Location:Colombia

Posted 10 April 2012 - 10:59 AM

It would be great to have Cubrid drivers in the Yii-core :)
Ricardo Obregón

YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/ - https://1server.co/
PHP 5.5+, nginx 1.7, MySQL(MariaDB & PerconaDB), PostgreSQL 9, Yii 2, CanJS
Follow me: @robregonm & @obregonco & @1ServerCo.
0

#31 User is offline   fsb 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 120
  • Joined: 09-January 11

Posted 10 April 2012 - 11:35 AM

View Postrobregonm, on 10 April 2012 - 10:59 AM, said:

It would be great to have Cubrid drivers in the Yii-core :)

+1
Join the happiest place on Freenode: #yii
We've got a MrFisk the bot, hilarious banter and all kinds of other groovy stuff going on.
Comparison of Internet Relay Chat clients
Web IRC client
0

#32 User is offline   kadishmal 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 44
  • Joined: 09-February 11
  • Location:South Korea

Posted 19 December 2012 - 09:55 AM

Sorry guys for disappearing for quite a while from this thread and not keeping you updated regarding the work I've done to add CUBRID database support to Yii.

Here is the status: last time I managed to make everything work except for one bug (bug for Yii, but it's just a feature in CUBRID). That time I'd reported this issue to CUBRID developers and they'd promised to fix it in the new CUBRID 9.0 release, which they did for what I'm very thankful.

So, right now there is nothing that stops me to release the code. That time I'd worked on Yii 1.1.8. Since then 1.1.12 has been released. So I've just forked it at kadishmal/yii. This week I will apply my last patch, will run tests and if everything goes well, I will push to Gihub. Later we'll see what we can do to have it applied to the upstream.
0

#33 User is offline   kadishmal 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 44
  • Joined: 09-February 11
  • Location:South Korea

Posted 26 December 2012 - 07:52 AM

I've created an issue at Yii Github. Refer to it for more information about the working code.
0

#34 User is offline   robregonm 

  • Expert Yii Developer
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 594
  • Joined: 30-July 09
  • Location:Colombia

Posted 27 December 2012 - 10:15 AM

Great, thanks for your support... hopefully Yii core team will accept the pull request.
Ricardo Obregón

YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/ - https://1server.co/
PHP 5.5+, nginx 1.7, MySQL(MariaDB & PerconaDB), PostgreSQL 9, Yii 2, CanJS
Follow me: @robregonm & @obregonco & @1ServerCo.
0

#35 User is offline   fsb 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 120
  • Joined: 09-January 11

Posted 04 January 2013 - 07:36 PM

the PR works just fine for me.

the changes in 9.0.0 combined with this addition to yii are super important. thanks so much.

anyone worried about the future of mysql under oracle has surely been looking at alternatives. CUBRID is more than an alternative. it's an exceptionally well designed RDBMS that has a great deal to offer.
Join the happiest place on Freenode: #yii
We've got a MrFisk the bot, hilarious banter and all kinds of other groovy stuff going on.
Comparison of Internet Relay Chat clients
Web IRC client
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users