@@ -53,36 +53,7 @@ public virtual async Task<DbDataReader> ExecuteReaderAsync(string commandText, M
53
53
54
54
private PayloadData CreateQueryPayload ( string commandText , MySqlParameterCollection parameterCollection )
55
55
{
56
- var statementPreparerOptions = StatementPreparerOptions . None ;
57
- if ( m_command . Connection . AllowUserVariables || m_command . CommandType == CommandType . StoredProcedure )
58
- statementPreparerOptions |= StatementPreparerOptions . AllowUserVariables ;
59
- if ( m_command . Connection . DateTimeKind == DateTimeKind . Utc )
60
- statementPreparerOptions |= StatementPreparerOptions . DateTimeUtc ;
61
- else if ( m_command . Connection . DateTimeKind == DateTimeKind . Local )
62
- statementPreparerOptions |= StatementPreparerOptions . DateTimeLocal ;
63
- if ( m_command . CommandType == CommandType . StoredProcedure )
64
- statementPreparerOptions |= StatementPreparerOptions . AllowOutputParameters ;
65
-
66
- switch ( m_command . Connection . GuidFormat )
67
- {
68
- case MySqlGuidFormat . Char36 :
69
- statementPreparerOptions |= StatementPreparerOptions . GuidFormatChar36 ;
70
- break ;
71
- case MySqlGuidFormat . Char32 :
72
- statementPreparerOptions |= StatementPreparerOptions . GuidFormatChar32 ;
73
- break ;
74
- case MySqlGuidFormat . Binary16 :
75
- statementPreparerOptions |= StatementPreparerOptions . GuidFormatBinary16 ;
76
- break ;
77
- case MySqlGuidFormat . TimeSwapBinary16 :
78
- statementPreparerOptions |= StatementPreparerOptions . GuidFormatTimeSwapBinary16 ;
79
- break ;
80
- case MySqlGuidFormat . LittleEndianBinary16 :
81
- statementPreparerOptions |= StatementPreparerOptions . GuidFormatLittleEndianBinary16 ;
82
- break ;
83
- }
84
-
85
- var preparer = new StatementPreparer ( commandText , parameterCollection , statementPreparerOptions ) ;
56
+ var preparer = new StatementPreparer ( commandText , parameterCollection , m_command . CreateStatementPreparerOptions ( ) ) ;
86
57
return new PayloadData ( preparer . ParseAndBindParameters ( ) , isPooled : true ) ;
87
58
}
88
59
0 commit comments