<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<integrate-test-cases>
   <dml-test-case sql-case-id="insert_with_all_placeholders">
       <assertion parameters="1:int, 1:int, insert:String" expected-data-file="insert_for_order_1.xml" />
       <assertion parameters="2:int, 2:int, insert:String" expected-data-file="insert_for_order_2.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="insert_with_now_function">
        <assertion parameters="1:int, 1:int, 1:int" expected-data-file="insert_with_now_function.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="insert_without_parameters">
        <assertion expected-data-file="insert_for_order_1.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="insert_with_special_characters">
        <assertion expected-data-file="insert_for_order_1.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="insert_with_special_syntax">
        <assertion expected-data-file="insert_for_order_1.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="insert_with_multiple_values">
        <assertion expected-data-file="insert_multiple_values_for_order_1_2.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="insert_on_duplicate_key_update">
        <assertion parameters="1000:int, 10:int, update:String" expected-data-file="insert_on_duplicate_key_update.xml" />
    </dml-test-case>
    
    <!-- TODO fixme -->
    <!--<dml-test-case sql-case-id="insert_with_all_placeholders_for_table_identifier">-->
        <!--<assertion parameters="1:int, 1:int, insert:String" expected-data-file="insert_for_order_1.xml" />-->
        <!--<assertion parameters="2:int, 2:int, insert:String" expected-data-file="insert_for_order_2.xml" />-->
    <!--</dml-test-case>-->
    
    <dml-test-case sql-case-id="insert_without_columns_with_all_placeholders">
        <assertion parameters="1:int, 1:int, insert:String" expected-data-file="insert_for_order_1.xml" />
        <assertion parameters="2:int, 2:int, insert:String" expected-data-file="insert_for_order_2.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="insert_set_with_all_placeholders">
        <assertion parameters="1:int, 1:int, insert:String" expected-data-file="insert_for_order_1.xml" />
        <assertion parameters="2:int, 2:int, insert:String" expected-data-file="insert_for_order_2.xml" />
    </dml-test-case>
    
    <!-- TODO fixme -->
    <!--<dml-test-case sql-case-id="insert_set_with_all_placeholders_for_table_identifier">-->
        <!--<assertion parameters="1:int, 1:int, insert:String" expected-data-file="insert_for_order_1.xml" />-->
        <!--<assertion parameters="2:int, 2:int, insert:String" expected-data-file="insert_for_order_2.xml" />-->
    <!--</dml-test-case>-->
    
    <dml-test-case sql-case-id="insert_with_partial_placeholders">
        <assertion parameters="1:int, 1:int" expected-data-file="insert_for_order_1.xml" />
        <assertion parameters="2:int, 2:int" expected-data-file="insert_for_order_2.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="insert_set_with_partial_placeholders">
        <assertion parameters="1:int, 1:int" expected-data-file="insert_for_order_1.xml" />
        <assertion parameters="2:int, 2:int" expected-data-file="insert_for_order_2.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="insert_with_generate_key_column">
        <assertion parameters="1:int, 1:int, 1:int" expected-data-file="insert_with_generate_key_column.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="insert_without_columns_and_with_generate_key_column">
        <assertion parameters="1:int, 1:int, 1:int" expected-data-file="insert_with_generate_key_column.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="insert_set_with_generate_key_column">
        <assertion parameters="1:int, 1:int, 1:int" expected-data-file="insert_with_generate_key_column.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="insert_without_columns_and_without_generate_key_column">
        <assertion sharding-rule-type="dbtbl_with_masterslave" parameters="1:int, 1:int" expected-data-file="insert_with_generate_key_column.xml" />
        <!-- TODO add gen column on create table -->
        <!--<assertion parameters="1:int, 1:int" expected-data-file="insert_with_generate_key_column.xml" />-->
    </dml-test-case>
    
    <dml-test-case sql-case-id="insert_without_generate_key_column">
        <assertion parameters="1:int, 1:int" expected-data-file="insert_without_generate_key_column.xml" />
    </dml-test-case>

    <dml-test-case sql-case-id="insert_set_without_generate_key_column">
        <assertion parameters="1:int, 1:int" expected-data-file="insert_without_generate_key_column.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="insert_with_batch">
        <assertion parameters="1:int, 1:int, insert:String, 2:int, 2:int, insert:String" expected-data-file="batch_insert_for_order.xml" />
    </dml-test-case>

    <dml-test-case sql-case-id="insert_with_batch_and_irregular_parameters">
        <assertion parameters="1:int, 2:int, 2:int, insert:String" expected-data-file="batch_insert_for_order.xml" />
    </dml-test-case>

    <dml-test-case sql-case-id="insert_with_batch_and_composite_expression">
        <assertion parameters="1:int, 1:int, insert:String, 2:int, 2:int, insert:String" expected-data-file="batch_insert_for_order.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="insert_with_batch_and_with_generate_key_column">
        <assertion parameters="1:int, 1:int, 1:int, 2:int, 2:int, 2:int" expected-data-file="batch_insert_with_generate_key_column.xml" />
    </dml-test-case>
    
    <!--<dml-test-case sql-case-id="insert_with_batch_and_without_generate_key_column">-->
        <!--<assertion sharding-rule-type="dbtbl_with_masterslave" parameters="1:int, 1:int, 2:int, 2:int" expected-data-file="batch_insert_without_generate_key_column.xml" />-->
        <!--&lt;!&ndash; TODO add gen column on create table &ndash;&gt;-->
        <!--&lt;!&ndash;<assertion parameters="1:int, 1:int, 2:int, 2:int" expected-data-file="batch_insert_without_generate_key_column.xml" />&ndash;&gt;-->
    <!--</dml-test-case>-->
    
    <dml-test-case sql-case-id="update_without_alias">
        <assertion parameters="update:String, 1000:int, 10:int" expected-data-file="update.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="update_with_alias">
        <assertion parameters="update:String, 1000:int, 10:int" expected-data-file="update.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="update_without_condition">
        <assertion expected-data-file="update_without_condition.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="update_with_extra_keywords">
        <assertion parameters="update:String, 1000:int, 10:int" expected-data-file="update.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="update_with_special_character">
        <assertion parameters="update:String, 1000:int, 10:int" expected-data-file="update.xml" />
    </dml-test-case>

    <dml-test-case sql-case-id="update_with_special_comments">
        <assertion parameters="update:String, 1000:int, 10:int" expected-data-file="update.xml" />
    </dml-test-case>

    <dml-test-case sql-case-id="update_without_parameters">
        <assertion expected-data-file="update.xml" />
    </dml-test-case>

    <dml-test-case sql-case-id="update_with_or">
        <assertion parameters="1000:int, 0:int, 10:int" expected-data-file="update.xml" />
    </dml-test-case>

    <dml-test-case sql-case-id="update_with_column_equal_column">
        <assertion expected-data-file="update_with_column_equal_column.xml" />
    </dml-test-case>

    <dml-test-case sql-case-id="delete_with_sharding_value">
        <assertion parameters="1000:int, 10:int, init:String" expected-data-file="delete_with_sharding_value.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="delete_without_sharding_value">
        <assertion parameters="init:String" expected-data-file="delete_without_sharding_value.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="delete_with_special_character_without_sharding_value">
        <assertion expected-data-file="delete_without_sharding_value.xml" />
    </dml-test-case>

    <dml-test-case sql-case-id="delete_with_special_comments_without_sharding_value">
        <assertion expected-data-file="delete_with_special_comments_without_sharding_value.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="delete_with_special_comments_return_without_sharding_value">
        <assertion expected-data-file="delete_with_special_comments_return_without_sharding_value.xml" />
    </dml-test-case>
    
    <dml-test-case sql-case-id="delete_with_special_comments_returning_without_sharding_value">
        <assertion expected-data-file="delete_with_special_comments_returning_without_sharding_value.xml" />
    </dml-test-case>

    <dml-test-case sql-case-id="delete_with_alias">
        <assertion parameters="init:String" expected-data-file="delete_with_alias.xml" />
    </dml-test-case>
</integrate-test-cases>
