Project

General

Profile

Feature #4023

prepared statements - FE action: salveId, sqlInsert, sqlUpdate, sqlDelete, sqlBefore, sqlAfter

Added by Carsten Rose over 2 years ago. Updated 6 days ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Start date:
02.07.2017
Due date:
% Done:

0%

Estimated time:
Discuss:

Description

For every sql query, add a new element 'Arg'. Eg.:

slaveId = {{SELECT id FROM Person WHERE id=?}}
slaveIdArg = {{id}}

sqlInsert = {{INSERT INTO Person (name, firstName) VALUES (?,?)}}
sqlInsertArg = {{name:F:allbut}}, {{firstName:F:allbut}}
* The ...Arg definition should not be fired directly. Instead search for all (non wrapped) ',' , split, replace every by it's onw, build array with the values, fire the prepared statement.

History

#1 Updated by Carsten Rose about 2 years ago

  • Target version set to next4

#2 Updated by Carsten Rose about 2 years ago

  • Target version changed from next4 to 0.21

#3 Updated by Carsten Rose about 2 years ago

  • Tracker changed from Support to Feature

#4 Updated by Carsten Rose about 2 years ago

  • Priority changed from Urgent to Normal

#5 Updated by Carsten Rose about 2 years ago

  • Target version changed from 0.21 to 0.22

#6 Updated by Carsten Rose about 2 years ago

  • Target version changed from 0.22 to 0.23

#7 Updated by Carsten Rose almost 2 years ago

  • Target version changed from 0.23 to next2

#8 Updated by Carsten Rose 6 days ago

  • Description updated (diff)

#9 Updated by Carsten Rose 6 days ago

  • Description updated (diff)

#10 Updated by Carsten Rose 6 days ago

  • Description updated (diff)

Die oben genannten Notation hat den Nachteil das fuer alle Query Anweisungen neue Schluesselwoerter (mit 'arg' am Ende) eingefuehrt und geparst werden muessen.

Vorschlag neue Definition (passt vermutlich auch fuer Report Notation):

sqlAfter = {{ [dbIndex] (arg1, arg2) SELECT ... WHERE id=? ...}}
  • Wobei 'arg?' beliebige QFQ Variablen sein koennen.
  • Die Spaces sind optional.
  • '(' Anstelle von '[' ist wichtig um den dbIndex von den Args unterscheiden zu koennen.
  • Sollte in einem Arg ein/mehrere '(' vorkommen, werden diese oeffnend/schliessend gezaehlt/gematched/uebersprungen und bis zum naechsten ',' oder ')' geparst.
  • Bei Report koennte folgendes moeglich sein:
    10.sql = [dbIndex] (arg1, arg2) SELECT ... WHERE id=? ...
    
    # alternative
    10.arg = arg1, arg2
    

#11 Updated by Carsten Rose 6 days ago

  • Subject changed from FE action: salveId, sqlInsert, sqlUpdate, sqlDelete, sqlBefore, sqlAfter, ... - extend to prepared statements to prepared statements - FE action: salveId, sqlInsert, sqlUpdate, sqlDelete, sqlBefore, sqlAfter
  • Target version changed from next2 to QFQCD19 - Wichtig

Also available in: Atom PDF