Cphalcon: MariaDB dynamic columns and Phalcon

Created on 10 Sep 2016  路  6Comments  路  Source: phalcon/cphalcon

Hi there,
i just noticed that there is no obvious way to insert MariaDB dynamic columns with Phalcon.
The ways to do is to execute raw sql query, but i don't wanna take care of bindings and so on.
Obviously this will not work:

$query = 'INSERT INTO SomeModel ( name, subject, message, parameters, created_at, updated_at ) VALUES (:name:, :subject:, :message:, :parameters:, :created_at:, :updated_at: )';
$this->getDI()->get( 'modelsManager' )->executeQuery( $query, [
    'name' => 'Name',
    'subject' => 'Subject',
    'parameters' => 'COLUMN_CREATE(\'key\', \'value\')',
    'message' => 'Just some message',
    'created_at' => '...',
    'updated_at' => '...',
]);

Most helpful comment

Yeah, almost all our projects from 2014 onwards are all based on MariaDB. So it is quite popular.

Native Phalcon support would be much appreciated, and we all should work on it.

All 6 comments

Obviously as mariadb is drop-in replacement for mysql this is why it works out-of-box with phalcon. But OBVIOUSLY any new features which mariadb is adding itself won't work with PHQL because there is no OFFICIAL phalcon support for mariadb.

@Jurigag OBVIOUSLY thanks for response.
Just don' t get whats yelling for, but ok :)

Well i understood your issue as yelling why it's not working. You should just create it as [NFR] with mariadb support, because we can't just add one stuff from it, we need to write whole adapter with support for new things from mariadb, and this is not stuff like can be done in few days.

@Jurigag i understand, sorry it's my bad then, idk for [NFR] requests.
Maybe i will gonna create MariaDB adapter as it is highly deployed nowadays as drop in replacement for mysql (as you said) from various Linux distro's and i simply love those "new features".
I will contact you if i have any further questions regarding developing of this adapter, thanks.

Yeah, almost all our projects from 2014 onwards are all based on MariaDB. So it is quite popular.

Native Phalcon support would be much appreciated, and we all should work on it.

Well this probably could be started as a dialect extension in the Incubator repo/package.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TimurFlush picture TimurFlush  路  3Comments

ruudboon picture ruudboon  路  3Comments

abcpremium picture abcpremium  路  3Comments

kkstun picture kkstun  路  3Comments

EquaI1ty picture EquaI1ty  路  3Comments