mirror of
https://github.com/chaisql/chai.git
synced 2025-10-05 07:36:56 +08:00
Thread safe statements (#406)
Previously, expressions and params were evaluated during the planning phase. This change builds the query plan without evaluating params and expressions which are then evaluated only during the execution phase.
This commit is contained in:
@@ -75,9 +75,9 @@ func TestParserUpdate(t *testing.T) {
|
||||
|
||||
require.NoError(t, err)
|
||||
require.Len(t, q.Statements, 1)
|
||||
stmt := q.Statements[0].(*statement.UpdateStmt)
|
||||
stmt := q.Statements[0].(*statement.StreamStmt)
|
||||
require.False(t, stmt.IsReadOnly())
|
||||
require.EqualValues(t, test.expected, stmt.ToStream().Stream)
|
||||
require.EqualValues(t, test.expected, q.Statements[0].(*statement.StreamStmt).Stream)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user