Announcement

Collapse
No announcement yet.

Expand allowed functions in the functionList

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Expand allowed functions in the functionList

    1. Add RAND.

    To add possibility select random data (like this: select * from table order by RAND() limit 10)

    2. Maybe add something like SQL: for universal access to SQL functions

  • #2
    The ability to write SQL will never be added due to security concerns.

    Please provide more details in future requests. It's not clear what do you mean at all.

    The ability to add custom ORM functions is available since the latest release.

    Comment


    • #3
      I want use this construction

      PHP Code:
       $bots $em->getRepository('Bot')
      ->
      select(['id','name'])
      ->
      order('RAND:')
      ->
      limit(0,1500)
      ->
      find(); 
      for select 1500 random bots. Now I can't do it without modifying (v.6) application/Espo/ORM/QueryComposer/Functions.php, because 'RAND' function doesn't exist in the $functionList

      Adding RAND to the $functionList solving this problem

      Comment

      Working...
      X