Hey, folks.
We have a MySql database we need to connect to on this project, and having
trouble getting asynchronous requests to work.
If we use `dbconn->typed_query`, we get the expected response.
With promise_query, seeing: `SQL status: still running...`
Chris Angelico promises (pun intended) to pry further into it, and I hope you
don't mind more spam from me in the meantime.
mixed q = dbconn->promise_query("select 1 from dual");
werror("Promise: %O\n", q);
mixed result = await(q);
werror("Result: %O\n", result);
werror("Rows: %O\n", result->get());
}
WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future
version.
Query result: ({ /* 1 element */
([ /* 1 element */
"1": 1
])
})
Create future mysql(/*mysql-test.gotagtech.com via TCP/IP*/) "select 1 from
dual" 0
Create future result mysql(/*mysql-test.gotagtech.com via TCP/IP*/) "select 1
from dual" 0
Callback got ({ /* 1 element */
({ /* 1 element */
1
})
})
Callback got 0
Future succeeded "select 1 from dual"
Promise: __builtin.Sql.Promise(no
Promise: __builtin.Sql.Promise(no future,FutureResult from query: "select 1
from dual", bindings: 0
recordcount: 1
SQL status: still running...)
Thanks much and have a good and great one.
Mike