danielmewes / php-rql

A PHP client driver for the RethinkDB query language (ReQL).
http://php-rql.dnsalias.net/
339 stars 60 forks source link

Please support binary #159

Open lavvy opened 6 years ago

lavvy commented 6 years ago

In frontend apps like Php , we deal with images and graverters so much. Please could you add an inserting and retrieving of a binary data like image or graverter .

Geekimo commented 6 years ago

What is a graveters ? Perhaps you should use base64 to encode images before inserting them into database.

lavvy commented 6 years ago

Oh wow am sorry I mean to say avatar. What am trying to achieve with Php is how it is achieved here on a png file on filesystem. https://www.rethinkdb.com/api/python/binary/

Meanwhile thanks for the prompt response cos I was scared if people are deserting rethinkdb (which I think, it's a thinking that came before it's time) On Jan 30, 2018 11:55 AM, "ABRAHAM Morgan" notifications@github.com wrote:

What is a graveters ? Perhaps you should use base64 to encode images before inserting them into database.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/danielmewes/php-rql/issues/159#issuecomment-361659266, or mute the thread https://github.com/notifications/unsubscribe-auth/AGsC4-g6qpmeoxy8ZOG-Bv1fPrbUHbj3ks5tP0mYgaJpZM4RyoZK .

Geekimo commented 6 years ago

I'm still using it. Rdb is not dead. I pusheds a few PRs and I'm waiting them to be pushed to master.

According to http://danielmewes.dnsalias.net/~daniel/php-rql-api/, you have the r\binary method that looks the same as what you have in the python API.

lavvy commented 6 years ago

Don't know if I am the only one not seeing binary in that long list of apis . The closest insert I saw was this Example: Insert a document into the table posts.

r\table("posts")->insert(array( 'id' => 1, 'title' => "Lorem ipsum", 'content' => "Dolor sit amet" ))->run($conn)

And I am trying to figure out how to put a binary data in that query On Jan 30, 2018 1:54 PM, "ABRAHAM Morgan" notifications@github.com wrote:

I'm still using it. Rdb is not dead. I pusheds a few PRs and I'm waiting them to be pushed to master.

According to http://danielmewes.dnsalias.net/~daniel/php-rql-api/, you have the r\binary method that looks the same as what you have in the python API.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/danielmewes/php-rql/issues/159#issuecomment-361696509, or mute the thread https://github.com/notifications/unsubscribe-auth/AGsC473QsOpdawZXx-jVtEBo79p-RICSks5tP2V3gaJpZM4RyoZK .

Geekimo commented 6 years ago

Replace your value with r\binary(file_get_contents('./myfile')) and that's it.