summaryrefslogtreecommitdiffstats
path: root/src/declarative/extra/qmlsqlquery.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/extra/qmlsqlquery.cpp')
-rw-r--r--src/declarative/extra/qmlsqlquery.cpp36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/declarative/extra/qmlsqlquery.cpp b/src/declarative/extra/qmlsqlquery.cpp
index 70b3bdd..5bd1459 100644
--- a/src/declarative/extra/qmlsqlquery.cpp
+++ b/src/declarative/extra/qmlsqlquery.cpp
@@ -77,18 +77,19 @@ public:
values will only apply when the SqlQuery exec() slot is called.
\qml
- <SqlQuery>
- SELECT * FROM mytable WHERE name LIKE :value
- <bindings>
- <SqlBind name=":value" value="{searchText + '%'}"/>
- </bindings>
- </SqlQuery>
- <SqlQuery>
- SELECT * FROM mytable WHERE type = ?
- <bindings>
- <SqlBind value="simple"/>
- </bindings>
- <SqlQuery>
+ SqlQuery {
+ query: "SELECT * FROM mytable WHERE name LIKE :value"
+ bindings: SqlBind {
+ name: ":value"
+ value: searchText + '%'
+ }
+ }
+ SqlQuery {
+ query: "SELECT * FROM mytable WHERE type = ?"
+ bindings: SqlBind {
+ value: "simple"
+ }
+ }
\endqml
*/
@@ -254,11 +255,12 @@ public:
appropriate table column name for the result column.
\qml
- <SqlQuery connection="{qmlConnectionId}" query="DELETE FROM mytable"/>
- <SqlQuery connection="connectionName">
- SELECT * FROM mytable
- </SqlQuery>
- <SqlQuery>SELECT id AS recordId, (firstName || ' ' || lastName) AS fullName FROM mytable</SqlQuery>
+ SqlQuery { connection: qmlConnectionId; query: "DELETE FROM mytable" }
+ SqlQuery {
+ connection: "connectionName"
+ query: "SELECT * FROM mytable"
+ }
+ SqlQuery { query: "SELECT id AS recordId, (firstName || ' ' || lastName) AS fullName FROM mytable" }
\endqml
*/