[bug] auto-where by RefreshRecord (v8.0.0)

[bug] auto-where by RefreshRecord (v8.0.0)

auto-where by refreshrecord works incorrectly with:

  1. cross join
  1. SELECT
  2.   bdea.dbrid
  3.   ba_op
  4. FROM
  5.   bdea
  6.   CROSS JOIN ab2
  7. WHERE
  8.   ba_ix = :ab_ix
  9. :ab_ix(WideString[3])='100'

  1. WHERE
  2. (
  3.   ba_ix = :ab_ix) AND 
  4.   cross.dbrid = :ba_op 

  5. :ab_ix(WideString[3])='100' 
  6. :ba_op(WideString[3])='136'
  7. --------------------------------------------------
  8. [PgSQLMonitor.OnSQL]: tfError
  9. Error: syntax error at or near "."

  1. window-function
  1. SELECT
  2.   bdea.dbrid,
  3.   ba_op
  4. FROM
  5.   bdea
  6.   LEFT JOIN ab2 ON a2_ab_ix = ba_ix AND a2_n = ba_op
  7. WHERE
  8.   ba_ix = :ab_ix
  9. WINDOW rech AS (PARTITION BY a2_n, ba_ix)
  10. :ab_ix(WideString[3])='100'

  1. WHERE
  2. (
  3.   ba_ix = :ab_ix
  4. WINDOW rech AS (PARTITION BY a2_n, ba_ix)) AND 
  5.   bdea.dbrid = :dbrid AND bdea.ba_op = :ba_op 

  6. :ab_ix(WideString[3])='100' 
  7. :dbrid(WideString[3])='136' 
  8. :ba_op(Integer)=10
  9. --------------------------------------------------
  10. [PgSQLMonitor.OnSQL]: tfError
  11. Error: syntax error at or near "WINDOW"

  1. and function calls are incorrectly recognized as columns
  1. SELECT
  2.   bdea.dbrid,
  3.   get_name(ba_op)
  4. FROM
  5.   bdea
  6.   LEFT JOIN ab2 ON a2_ab_ix = ba_ix AND a2_n = ba_op
  7. WHERE
  8.   ba_ix = :ab_ix
  9. :ab_ix(WideString[3])='100'

  1. WHERE
  2. (
  3.   ba_ix = :ab_ix) AND 
  4.   bdea.dbrid = :dbrid AND get_name = :get_name 

  5. :ab_ix(WideString[3])='100' 
  6. :dbrid(WideString[3])='136' 
  7. :get_name(WideString[7])='name_10'
  8. --------------------------------------------------
  9. [PgSQLMonitor.OnSQL]: tfError
  10. Error: column "get_name" does not exist

in the attach you will find a small demo application with creation script