Project

General

Profile

Actions

Feature #4023

open

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

Added by Carsten Rose about 5 years ago. Updated almost 3 years ago.

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

0%

Estimated time:
Discuss:
Prio Planung:

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.
Actions #1

Updated by Carsten Rose about 5 years ago

  • Target version set to next9
Actions #2

Updated by Carsten Rose about 5 years ago

  • Target version changed from next9 to 0.21
Actions #3

Updated by Carsten Rose about 5 years ago

  • Tracker changed from Support to Feature
Actions #4

Updated by Carsten Rose about 5 years ago

  • Priority changed from Urgent to Normal
Actions #5

Updated by Carsten Rose about 5 years ago

  • Target version changed from 0.21 to 0.22
Actions #6

Updated by Carsten Rose about 5 years ago

  • Target version changed from 0.22 to 0.23
Actions #7

Updated by Carsten Rose almost 5 years ago

  • Target version changed from 0.23 to next7
Actions #8

Updated by Carsten Rose almost 3 years ago

  • Description updated (diff)
Actions #9

Updated by Carsten Rose almost 3 years ago

  • Description updated (diff)
Actions #10

Updated by Carsten Rose almost 3 years 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
    
Actions #11

Updated by Carsten Rose almost 3 years 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 next7 to next6
Actions #12

Updated by Carsten Rose almost 3 years ago

  • Status changed from New to Some day maybe
Actions #13

Updated by Carsten Rose almost 3 years ago

  • Status changed from Some day maybe to New
Actions

Also available in: Atom PDF