php - how to use bindFunc method in redbeanphp? -


i working on project need work spatial object in mysql , choose redbeanphp orm system in project. found redbeanphp terrific , awesome. search in google , found this link bindfunc method can me in working spatial object cannot find example using method.

how method work , how can use method?

according database part of website linked:

as of redbeanphp 4.1 can bind sql function column. useful wrapping values when reading / writing database. instance, use mysql spatial data types need prepare columns this:

r::bindfunc( 'read', 'location.point', 'astext' ); r::bindfunc( 'write', 'location.point', 'geomfromtext' );  $location = r::dispense( 'location' ); $location->point = 'point(14 6)';  //inserts using geomfromtext() function r::store( $location );  //to unbind function, pass null: r::bindfunc( 'read', 'location.point', null ); 

this function added support spatial datatypes in mysql shown above. documentation isn't amazing, recommend looking @ the source code on github if want dig in deeper.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -