diff --git a/docs/generators/mysql-schema.md b/docs/generators/mysql-schema.md
index be5ae0f443d..7963dd5fafb 100644
--- a/docs/generators/mysql-schema.md
+++ b/docs/generators/mysql-schema.md
@@ -8,6 +8,7 @@ sidebar_label: mysql-schema
|defaultDatabaseName|Default database name for all MySQL queries| ||
|identifierNamingConvention|Naming convention of MySQL identifiers(table names and column names). This is not related to database name which is defined by defaultDatabaseName option|
- **original**
- Do not transform original names
- **snake_case**
- Use snake_case names
|original|
|jsonDataTypeEnabled|Use special JSON MySQL data type for complex model properties. Requires MySQL version 5.7.8. Generates TEXT data type when disabled| |true|
+|namedParametersEnabled|Generates model prepared SQLs with named parameters, eg. :petName. Question mark placeholder used when option disabled.| |false|
## IMPORT MAPPING
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java
index fdf1d994e9b..334f9579aed 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java
@@ -20,10 +20,12 @@ import org.openapitools.codegen.*;
import org.openapitools.codegen.meta.features.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.apache.commons.lang3.StringUtils;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import java.io.File;
import static org.openapitools.codegen.utils.StringUtils.underscore;
@@ -35,6 +37,7 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
public static final String DEFAULT_DATABASE_NAME = "defaultDatabaseName";
public static final String JSON_DATA_TYPE_ENABLED = "jsonDataTypeEnabled";
public static final String IDENTIFIER_NAMING_CONVENTION = "identifierNamingConvention";
+ public static final String NAMED_PARAMETERS_ENABLED = "namedParametersEnabled";
public static final Integer ENUM_MAX_ELEMENTS = 65535;
public static final Integer IDENTIFIER_MAX_LENGTH = 64;
@@ -58,6 +61,7 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
protected String tableNamePrefix = "tbl_", tableNameSuffix = "";
protected String columnNamePrefix = "col_", columnNameSuffix = "";
protected Boolean jsonDataTypeEnabled = true;
+ protected Boolean namedParametersEnabled = false;
protected String identifierNamingConvention = "original";
public MysqlSchemaCodegen() {
@@ -81,6 +85,8 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
// clear import mapping (from default generator) as mysql does not use import directives
importMapping.clear();
+ setModelPackage("Model");
+ modelTemplateFiles.put("sql_query.mustache", ".sql");
//modelTestTemplateFiles.put("model_test.mustache", ".php");
// no doc files
// modelDocTemplateFiles.clear();
@@ -179,6 +185,7 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
cliOptions.clear();
addOption(DEFAULT_DATABASE_NAME, "Default database name for all MySQL queries", defaultDatabaseName);
addSwitch(JSON_DATA_TYPE_ENABLED, "Use special JSON MySQL data type for complex model properties. Requires MySQL version 5.7.8. Generates TEXT data type when disabled", jsonDataTypeEnabled);
+ addSwitch(NAMED_PARAMETERS_ENABLED, "Generates model prepared SQLs with named parameters, eg. :petName. Question mark placeholder used when option disabled.", namedParametersEnabled);
// we used to snake_case table/column names, let's add this option
CliOption identifierNamingOpt = new CliOption(IDENTIFIER_NAMING_CONVENTION,
@@ -226,10 +233,19 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
additionalProperties.put(JSON_DATA_TYPE_ENABLED, getJsonDataTypeEnabled());
}
+ if (additionalProperties.containsKey(NAMED_PARAMETERS_ENABLED)) {
+ this.setNamedParametersEnabled(Boolean.valueOf(additionalProperties.get(NAMED_PARAMETERS_ENABLED).toString()));
+ }
+
+ additionalProperties.put(NAMED_PARAMETERS_ENABLED, getNamedParametersEnabled());
+
if (additionalProperties.containsKey(IDENTIFIER_NAMING_CONVENTION)) {
this.setIdentifierNamingConvention((String) additionalProperties.get(IDENTIFIER_NAMING_CONVENTION));
}
+ // make model src path available in mustache template
+ additionalProperties.put("modelSrcPath", "./" + toSrcPath(modelPackage));
+
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
supportingFiles.add(new SupportingFile("mysql_schema.mustache", "", "mysql_schema.sql"));
}
@@ -1158,6 +1174,24 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
return this.jsonDataTypeEnabled;
}
+ /**
+ * Enables named parameters in prepared SQLs
+ *
+ * @param enabled true to enable, otherwise false
+ */
+ public void setNamedParametersEnabled(Boolean enabled) {
+ this.namedParametersEnabled = enabled;
+ }
+
+ /**
+ * Whether named parameters enabled or disabled in prepared SQLs
+ *
+ * @return true if enabled otherwise false
+ */
+ public Boolean getNamedParametersEnabled() {
+ return this.namedParametersEnabled;
+ }
+
/**
* Sets identifier naming convention for table names and column names.
* This is not related to database name which is defined by defaultDatabaseName option.
@@ -1184,4 +1218,22 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig
return this.identifierNamingConvention;
}
+ /**
+ * Slightly modified version of AbstractPhpCodegen.toSrcPath method.
+ *
+ * @param packageName package name
+ *
+ * @return path
+ */
+ public String toSrcPath(String packageName) {
+ // Trim prefix file separators from package path
+ String packagePath = StringUtils.removeStart(
+ // Replace period, backslash, forward slash with file separator in package name
+ packageName.replaceAll("[\\.\\\\/]", Matcher.quoteReplacement("/")),
+ File.separator
+ );
+
+ // Trim trailing file separators from the overall path
+ return StringUtils.removeEnd(packagePath, File.separator);
+ }
}
diff --git a/modules/openapi-generator/src/main/resources/mysql-schema/README.mustache b/modules/openapi-generator/src/main/resources/mysql-schema/README.mustache
index 54bda8398ac..ef01def2143 100644
--- a/modules/openapi-generator/src/main/resources/mysql-schema/README.mustache
+++ b/modules/openapi-generator/src/main/resources/mysql-schema/README.mustache
@@ -46,3 +46,11 @@ Produced file(`mysql_schema.sql`) contains every table definition. Current imple
1. Click **Import** link in left sidebar
2. In **File upload** fieldset click to **Choose Files** and find generated `mysql_schema.sql`
3. Push **Execute** button
+
+### Prepared SQL queries
+
+[Model folder]({{modelSrcPath}}) contains SQL queries(`SELECT *`, `SELECT`, `INSERT`, `UPDATE`, `DELETE`) usually suggested by `PHPMyAdmin` when you hit `SQL` tab. They are absolutely useless without adaptation to your needs. Copypaste them then edit.
+
+Important! Some of SQLs(`INSERT`/`UPDATE`) contains {{#namedParametersEnabled}}named parameters eg. :namedParam{{/namedParametersEnabled}}{{^namedParametersEnabled}}question marks(`?`) which are parameter placeholders{{/namedParametersEnabled}}. You need to bind values to these params to execute query.
+
+If your MySQL driver doesn't support named parameters(`PHP PDO` supports while `PHP mysqli` doesn't) you need to make sure that `namedParametersEnabled` generator option is disabled.
diff --git a/modules/openapi-generator/src/main/resources/mysql-schema/sql_query.mustache b/modules/openapi-generator/src/main/resources/mysql-schema/sql_query.mustache
new file mode 100644
index 00000000000..888ecb3e8a7
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/mysql-schema/sql_query.mustache
@@ -0,0 +1,27 @@
+--
+-- {{appName}}.{{#defaultDatabaseName}}
+-- Database: `{{{defaultDatabaseName}}}`{{/defaultDatabaseName}}
+-- Prepared SQL queries for {{#models}}{{#model}}'{{{name}}}'{{/model}}{{/models}} definition.
+--
+
+{{#models}}{{#model}}
+--
+-- SELECT template for table {{#vendorExtensions}}{{#x-mysqlSchema}}{{#tableDefinition}}`{{tblName}}`{{/tableDefinition}}{{/x-mysqlSchema}}{{/vendorExtensions}}
+--
+SELECT {{#vars}}{{#vendorExtensions}}{{#x-mysqlSchema}}{{#columnDefinition}}`{{colName}}`{{#hasMore}}, {{/hasMore}}{{/columnDefinition}}{{/x-mysqlSchema}}{{/vendorExtensions}}{{/vars}} FROM {{#vendorExtensions}}{{#x-mysqlSchema}}{{#tableDefinition}}{{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{{/defaultDatabaseName}}`{{tblName}}`{{/tableDefinition}}{{/x-mysqlSchema}}{{/vendorExtensions}} WHERE 1;
+
+--
+-- INSERT template for table {{#vendorExtensions}}{{#x-mysqlSchema}}{{#tableDefinition}}`{{tblName}}`{{/tableDefinition}}{{/x-mysqlSchema}}{{/vendorExtensions}}
+--
+INSERT INTO {{#vendorExtensions}}{{#x-mysqlSchema}}{{#tableDefinition}}{{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{{/defaultDatabaseName}}`{{tblName}}`{{/tableDefinition}}{{/x-mysqlSchema}}{{/vendorExtensions}}({{#vars}}{{#vendorExtensions}}{{#x-mysqlSchema}}{{#columnDefinition}}`{{colName}}`{{#hasMore}}, {{/hasMore}}{{/columnDefinition}}{{/x-mysqlSchema}}{{/vendorExtensions}}{{/vars}}) VALUES ({{#vars}}{{#vendorExtensions}}{{#x-mysqlSchema}}{{#columnDefinition}}{{#namedParametersEnabled}}:{{colName}}{{/namedParametersEnabled}}{{^namedParametersEnabled}}?{{/namedParametersEnabled}}{{#hasMore}}, {{/hasMore}}{{/columnDefinition}}{{/x-mysqlSchema}}{{/vendorExtensions}}{{/vars}});
+
+--
+-- UPDATE template for table {{#vendorExtensions}}{{#x-mysqlSchema}}{{#tableDefinition}}`{{tblName}}`{{/tableDefinition}}{{/x-mysqlSchema}}{{/vendorExtensions}}
+--
+UPDATE {{#vendorExtensions}}{{#x-mysqlSchema}}{{#tableDefinition}}{{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{{/defaultDatabaseName}}`{{tblName}}`{{/tableDefinition}}{{/x-mysqlSchema}}{{/vendorExtensions}} SET {{#vars}}{{#vendorExtensions}}{{#x-mysqlSchema}}{{#columnDefinition}}`{{colName}}` = {{#namedParametersEnabled}}:{{colName}}{{/namedParametersEnabled}}{{^namedParametersEnabled}}?{{/namedParametersEnabled}}{{#hasMore}}, {{/hasMore}}{{/columnDefinition}}{{/x-mysqlSchema}}{{/vendorExtensions}}{{/vars}} WHERE 1;
+
+--
+-- DELETE template for table {{#vendorExtensions}}{{#x-mysqlSchema}}{{#tableDefinition}}`{{tblName}}`{{/tableDefinition}}{{/x-mysqlSchema}}{{/vendorExtensions}}
+--
+DELETE FROM {{#vendorExtensions}}{{#x-mysqlSchema}}{{#tableDefinition}}{{#defaultDatabaseName}}`{{{defaultDatabaseName}}}`.{{/defaultDatabaseName}}`{{tblName}}`{{/tableDefinition}}{{/x-mysqlSchema}}{{/vendorExtensions}} WHERE 0;
+{{/model}}{{/models}}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/mysql/MysqlSchemaCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/mysql/MysqlSchemaCodegenTest.java
index aef8d55e0a0..e1917fd583a 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/mysql/MysqlSchemaCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/mysql/MysqlSchemaCodegenTest.java
@@ -274,6 +274,23 @@ public class MysqlSchemaCodegenTest {
Assert.assertFalse(codegen.getJsonDataTypeEnabled());
}
+ @Test
+ public void testSetNamedParametersEnabled() {
+ final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
+ codegen.setNamedParametersEnabled(true);
+ Assert.assertTrue(codegen.getNamedParametersEnabled());
+ codegen.setNamedParametersEnabled(false);
+ Assert.assertFalse(codegen.getNamedParametersEnabled());
+ }
+
+ @Test
+ public void testGetNamedParametersEnabled() {
+ final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
+ Assert.assertFalse(codegen.getNamedParametersEnabled());
+ codegen.setNamedParametersEnabled(true);
+ Assert.assertTrue(codegen.getNamedParametersEnabled());
+ }
+
@Test
public void testSetIdentifierNamingConvention() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/mysql/MysqlSchemaOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/mysql/MysqlSchemaOptionsTest.java
index 4aa7b8a5b26..5a57986cd25 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/mysql/MysqlSchemaOptionsTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/mysql/MysqlSchemaOptionsTest.java
@@ -42,5 +42,6 @@ public class MysqlSchemaOptionsTest extends AbstractOptionsTest {
verify(clientCodegen).setDefaultDatabaseName(MysqlSchemaOptionsProvider.DEFAULT_DATABASE_NAME_VALUE);
verify(clientCodegen).setJsonDataTypeEnabled(Boolean.valueOf(MysqlSchemaOptionsProvider.JSON_DATA_TYPE_ENABLED_VALUE));
verify(clientCodegen).setIdentifierNamingConvention(MysqlSchemaOptionsProvider.IDENTIFIER_NAMING_CONVENTION_VALUE);
+ verify(clientCodegen).setNamedParametersEnabled(Boolean.valueOf(MysqlSchemaOptionsProvider.NAMED_PARAMETERS_ENABLED_VALUE));
}
}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/MysqlSchemaOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/MysqlSchemaOptionsProvider.java
index d47eb9c3c9d..ccb40f73a0d 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/MysqlSchemaOptionsProvider.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/MysqlSchemaOptionsProvider.java
@@ -25,6 +25,7 @@ public class MysqlSchemaOptionsProvider implements OptionsProvider {
public static final String DEFAULT_DATABASE_NAME_VALUE = "database_name";
public static final String JSON_DATA_TYPE_ENABLED_VALUE = "false";
public static final String IDENTIFIER_NAMING_CONVENTION_VALUE = "snake_case";
+ public static final String NAMED_PARAMETERS_ENABLED_VALUE = "true";
@Override
public String getLanguage() {
@@ -37,6 +38,7 @@ public class MysqlSchemaOptionsProvider implements OptionsProvider {
return builder.put(MysqlSchemaCodegen.DEFAULT_DATABASE_NAME, DEFAULT_DATABASE_NAME_VALUE)
.put(MysqlSchemaCodegen.JSON_DATA_TYPE_ENABLED, JSON_DATA_TYPE_ENABLED_VALUE)
.put(MysqlSchemaCodegen.IDENTIFIER_NAMING_CONVENTION, IDENTIFIER_NAMING_CONVENTION_VALUE)
+ .put(MysqlSchemaCodegen.NAMED_PARAMETERS_ENABLED, NAMED_PARAMETERS_ENABLED_VALUE)
.build();
}
diff --git a/samples/schema/petstore/mysql/Model/$Special[modelName].sql b/samples/schema/petstore/mysql/Model/$Special[modelName].sql
new file mode 100644
index 00000000000..84f8232d4dc
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/$Special[modelName].sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for '$special[model.name]' definition.
+--
+
+
+--
+-- SELECT template for table `$special[model.name]`
+--
+SELECT `$special[property.name]` FROM `$special[model.name]` WHERE 1;
+
+--
+-- INSERT template for table `$special[model.name]`
+--
+INSERT INTO `$special[model.name]`(`$special[property.name]`) VALUES (?);
+
+--
+-- UPDATE template for table `$special[model.name]`
+--
+UPDATE `$special[model.name]` SET `$special[property.name]` = ? WHERE 1;
+
+--
+-- DELETE template for table `$special[model.name]`
+--
+DELETE FROM `$special[model.name]` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/200Response.sql b/samples/schema/petstore/mysql/Model/200Response.sql
new file mode 100644
index 00000000000..51bcd1fcb84
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/200Response.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for '200_response' definition.
+--
+
+
+--
+-- SELECT template for table `200_response`
+--
+SELECT `name`, `class` FROM `200_response` WHERE 1;
+
+--
+-- INSERT template for table `200_response`
+--
+INSERT INTO `200_response`(`name`, `class`) VALUES (?, ?);
+
+--
+-- UPDATE template for table `200_response`
+--
+UPDATE `200_response` SET `name` = ?, `class` = ? WHERE 1;
+
+--
+-- DELETE template for table `200_response`
+--
+DELETE FROM `200_response` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/AdditionalPropertiesAnyType.sql b/samples/schema/petstore/mysql/Model/AdditionalPropertiesAnyType.sql
new file mode 100644
index 00000000000..8bce3e93cd7
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/AdditionalPropertiesAnyType.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'AdditionalPropertiesAnyType' definition.
+--
+
+
+--
+-- SELECT template for table `AdditionalPropertiesAnyType`
+--
+SELECT `name` FROM `AdditionalPropertiesAnyType` WHERE 1;
+
+--
+-- INSERT template for table `AdditionalPropertiesAnyType`
+--
+INSERT INTO `AdditionalPropertiesAnyType`(`name`) VALUES (?);
+
+--
+-- UPDATE template for table `AdditionalPropertiesAnyType`
+--
+UPDATE `AdditionalPropertiesAnyType` SET `name` = ? WHERE 1;
+
+--
+-- DELETE template for table `AdditionalPropertiesAnyType`
+--
+DELETE FROM `AdditionalPropertiesAnyType` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/AdditionalPropertiesArray.sql b/samples/schema/petstore/mysql/Model/AdditionalPropertiesArray.sql
new file mode 100644
index 00000000000..3bc29bdc52a
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/AdditionalPropertiesArray.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'AdditionalPropertiesArray' definition.
+--
+
+
+--
+-- SELECT template for table `AdditionalPropertiesArray`
+--
+SELECT `name` FROM `AdditionalPropertiesArray` WHERE 1;
+
+--
+-- INSERT template for table `AdditionalPropertiesArray`
+--
+INSERT INTO `AdditionalPropertiesArray`(`name`) VALUES (?);
+
+--
+-- UPDATE template for table `AdditionalPropertiesArray`
+--
+UPDATE `AdditionalPropertiesArray` SET `name` = ? WHERE 1;
+
+--
+-- DELETE template for table `AdditionalPropertiesArray`
+--
+DELETE FROM `AdditionalPropertiesArray` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/AdditionalPropertiesBoolean.sql b/samples/schema/petstore/mysql/Model/AdditionalPropertiesBoolean.sql
new file mode 100644
index 00000000000..caaeaf37a9f
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/AdditionalPropertiesBoolean.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'AdditionalPropertiesBoolean' definition.
+--
+
+
+--
+-- SELECT template for table `AdditionalPropertiesBoolean`
+--
+SELECT `name` FROM `AdditionalPropertiesBoolean` WHERE 1;
+
+--
+-- INSERT template for table `AdditionalPropertiesBoolean`
+--
+INSERT INTO `AdditionalPropertiesBoolean`(`name`) VALUES (?);
+
+--
+-- UPDATE template for table `AdditionalPropertiesBoolean`
+--
+UPDATE `AdditionalPropertiesBoolean` SET `name` = ? WHERE 1;
+
+--
+-- DELETE template for table `AdditionalPropertiesBoolean`
+--
+DELETE FROM `AdditionalPropertiesBoolean` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/AdditionalPropertiesClass.sql b/samples/schema/petstore/mysql/Model/AdditionalPropertiesClass.sql
new file mode 100644
index 00000000000..d0a4dcf0c7b
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/AdditionalPropertiesClass.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'AdditionalPropertiesClass' definition.
+--
+
+
+--
+-- SELECT template for table `AdditionalPropertiesClass`
+--
+SELECT `map_string`, `map_number`, `map_integer`, `map_boolean`, `map_array_integer`, `map_array_anytype`, `map_map_string`, `map_map_anytype`, `anytype_1`, `anytype_2`, `anytype_3` FROM `AdditionalPropertiesClass` WHERE 1;
+
+--
+-- INSERT template for table `AdditionalPropertiesClass`
+--
+INSERT INTO `AdditionalPropertiesClass`(`map_string`, `map_number`, `map_integer`, `map_boolean`, `map_array_integer`, `map_array_anytype`, `map_map_string`, `map_map_anytype`, `anytype_1`, `anytype_2`, `anytype_3`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
+
+--
+-- UPDATE template for table `AdditionalPropertiesClass`
+--
+UPDATE `AdditionalPropertiesClass` SET `map_string` = ?, `map_number` = ?, `map_integer` = ?, `map_boolean` = ?, `map_array_integer` = ?, `map_array_anytype` = ?, `map_map_string` = ?, `map_map_anytype` = ?, `anytype_1` = ?, `anytype_2` = ?, `anytype_3` = ? WHERE 1;
+
+--
+-- DELETE template for table `AdditionalPropertiesClass`
+--
+DELETE FROM `AdditionalPropertiesClass` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/AdditionalPropertiesInteger.sql b/samples/schema/petstore/mysql/Model/AdditionalPropertiesInteger.sql
new file mode 100644
index 00000000000..fb1808f437f
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/AdditionalPropertiesInteger.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'AdditionalPropertiesInteger' definition.
+--
+
+
+--
+-- SELECT template for table `AdditionalPropertiesInteger`
+--
+SELECT `name` FROM `AdditionalPropertiesInteger` WHERE 1;
+
+--
+-- INSERT template for table `AdditionalPropertiesInteger`
+--
+INSERT INTO `AdditionalPropertiesInteger`(`name`) VALUES (?);
+
+--
+-- UPDATE template for table `AdditionalPropertiesInteger`
+--
+UPDATE `AdditionalPropertiesInteger` SET `name` = ? WHERE 1;
+
+--
+-- DELETE template for table `AdditionalPropertiesInteger`
+--
+DELETE FROM `AdditionalPropertiesInteger` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/AdditionalPropertiesNumber.sql b/samples/schema/petstore/mysql/Model/AdditionalPropertiesNumber.sql
new file mode 100644
index 00000000000..fabd2532401
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/AdditionalPropertiesNumber.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'AdditionalPropertiesNumber' definition.
+--
+
+
+--
+-- SELECT template for table `AdditionalPropertiesNumber`
+--
+SELECT `name` FROM `AdditionalPropertiesNumber` WHERE 1;
+
+--
+-- INSERT template for table `AdditionalPropertiesNumber`
+--
+INSERT INTO `AdditionalPropertiesNumber`(`name`) VALUES (?);
+
+--
+-- UPDATE template for table `AdditionalPropertiesNumber`
+--
+UPDATE `AdditionalPropertiesNumber` SET `name` = ? WHERE 1;
+
+--
+-- DELETE template for table `AdditionalPropertiesNumber`
+--
+DELETE FROM `AdditionalPropertiesNumber` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/AdditionalPropertiesObject.sql b/samples/schema/petstore/mysql/Model/AdditionalPropertiesObject.sql
new file mode 100644
index 00000000000..ca7c3b8786c
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/AdditionalPropertiesObject.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'AdditionalPropertiesObject' definition.
+--
+
+
+--
+-- SELECT template for table `AdditionalPropertiesObject`
+--
+SELECT `name` FROM `AdditionalPropertiesObject` WHERE 1;
+
+--
+-- INSERT template for table `AdditionalPropertiesObject`
+--
+INSERT INTO `AdditionalPropertiesObject`(`name`) VALUES (?);
+
+--
+-- UPDATE template for table `AdditionalPropertiesObject`
+--
+UPDATE `AdditionalPropertiesObject` SET `name` = ? WHERE 1;
+
+--
+-- DELETE template for table `AdditionalPropertiesObject`
+--
+DELETE FROM `AdditionalPropertiesObject` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/AdditionalPropertiesString.sql b/samples/schema/petstore/mysql/Model/AdditionalPropertiesString.sql
new file mode 100644
index 00000000000..4aff1cc73a3
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/AdditionalPropertiesString.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'AdditionalPropertiesString' definition.
+--
+
+
+--
+-- SELECT template for table `AdditionalPropertiesString`
+--
+SELECT `name` FROM `AdditionalPropertiesString` WHERE 1;
+
+--
+-- INSERT template for table `AdditionalPropertiesString`
+--
+INSERT INTO `AdditionalPropertiesString`(`name`) VALUES (?);
+
+--
+-- UPDATE template for table `AdditionalPropertiesString`
+--
+UPDATE `AdditionalPropertiesString` SET `name` = ? WHERE 1;
+
+--
+-- DELETE template for table `AdditionalPropertiesString`
+--
+DELETE FROM `AdditionalPropertiesString` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/Animal.sql b/samples/schema/petstore/mysql/Model/Animal.sql
new file mode 100644
index 00000000000..f53dd36d200
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/Animal.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'Animal' definition.
+--
+
+
+--
+-- SELECT template for table `Animal`
+--
+SELECT `className`, `color` FROM `Animal` WHERE 1;
+
+--
+-- INSERT template for table `Animal`
+--
+INSERT INTO `Animal`(`className`, `color`) VALUES (?, ?);
+
+--
+-- UPDATE template for table `Animal`
+--
+UPDATE `Animal` SET `className` = ?, `color` = ? WHERE 1;
+
+--
+-- DELETE template for table `Animal`
+--
+DELETE FROM `Animal` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/ApiResponse.sql b/samples/schema/petstore/mysql/Model/ApiResponse.sql
new file mode 100644
index 00000000000..8aac784b7f8
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/ApiResponse.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'ApiResponse' definition.
+--
+
+
+--
+-- SELECT template for table `ApiResponse`
+--
+SELECT `code`, `type`, `message` FROM `ApiResponse` WHERE 1;
+
+--
+-- INSERT template for table `ApiResponse`
+--
+INSERT INTO `ApiResponse`(`code`, `type`, `message`) VALUES (?, ?, ?);
+
+--
+-- UPDATE template for table `ApiResponse`
+--
+UPDATE `ApiResponse` SET `code` = ?, `type` = ?, `message` = ? WHERE 1;
+
+--
+-- DELETE template for table `ApiResponse`
+--
+DELETE FROM `ApiResponse` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/ArrayOfArrayOfNumberOnly.sql b/samples/schema/petstore/mysql/Model/ArrayOfArrayOfNumberOnly.sql
new file mode 100644
index 00000000000..082deafb159
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/ArrayOfArrayOfNumberOnly.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'ArrayOfArrayOfNumberOnly' definition.
+--
+
+
+--
+-- SELECT template for table `ArrayOfArrayOfNumberOnly`
+--
+SELECT `ArrayArrayNumber` FROM `ArrayOfArrayOfNumberOnly` WHERE 1;
+
+--
+-- INSERT template for table `ArrayOfArrayOfNumberOnly`
+--
+INSERT INTO `ArrayOfArrayOfNumberOnly`(`ArrayArrayNumber`) VALUES (?);
+
+--
+-- UPDATE template for table `ArrayOfArrayOfNumberOnly`
+--
+UPDATE `ArrayOfArrayOfNumberOnly` SET `ArrayArrayNumber` = ? WHERE 1;
+
+--
+-- DELETE template for table `ArrayOfArrayOfNumberOnly`
+--
+DELETE FROM `ArrayOfArrayOfNumberOnly` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/ArrayOfNumberOnly.sql b/samples/schema/petstore/mysql/Model/ArrayOfNumberOnly.sql
new file mode 100644
index 00000000000..c42349f9c8c
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/ArrayOfNumberOnly.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'ArrayOfNumberOnly' definition.
+--
+
+
+--
+-- SELECT template for table `ArrayOfNumberOnly`
+--
+SELECT `ArrayNumber` FROM `ArrayOfNumberOnly` WHERE 1;
+
+--
+-- INSERT template for table `ArrayOfNumberOnly`
+--
+INSERT INTO `ArrayOfNumberOnly`(`ArrayNumber`) VALUES (?);
+
+--
+-- UPDATE template for table `ArrayOfNumberOnly`
+--
+UPDATE `ArrayOfNumberOnly` SET `ArrayNumber` = ? WHERE 1;
+
+--
+-- DELETE template for table `ArrayOfNumberOnly`
+--
+DELETE FROM `ArrayOfNumberOnly` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/ArrayTest.sql b/samples/schema/petstore/mysql/Model/ArrayTest.sql
new file mode 100644
index 00000000000..ccd1fd5cd3a
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/ArrayTest.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'ArrayTest' definition.
+--
+
+
+--
+-- SELECT template for table `ArrayTest`
+--
+SELECT `array_of_string`, `array_array_of_integer`, `array_array_of_model` FROM `ArrayTest` WHERE 1;
+
+--
+-- INSERT template for table `ArrayTest`
+--
+INSERT INTO `ArrayTest`(`array_of_string`, `array_array_of_integer`, `array_array_of_model`) VALUES (?, ?, ?);
+
+--
+-- UPDATE template for table `ArrayTest`
+--
+UPDATE `ArrayTest` SET `array_of_string` = ?, `array_array_of_integer` = ?, `array_array_of_model` = ? WHERE 1;
+
+--
+-- DELETE template for table `ArrayTest`
+--
+DELETE FROM `ArrayTest` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/BigCat.sql b/samples/schema/petstore/mysql/Model/BigCat.sql
new file mode 100644
index 00000000000..32c275d935f
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/BigCat.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'BigCat' definition.
+--
+
+
+--
+-- SELECT template for table `BigCat`
+--
+SELECT `className`, `color`, `declawed`, `kind` FROM `BigCat` WHERE 1;
+
+--
+-- INSERT template for table `BigCat`
+--
+INSERT INTO `BigCat`(`className`, `color`, `declawed`, `kind`) VALUES (?, ?, ?, ?);
+
+--
+-- UPDATE template for table `BigCat`
+--
+UPDATE `BigCat` SET `className` = ?, `color` = ?, `declawed` = ?, `kind` = ? WHERE 1;
+
+--
+-- DELETE template for table `BigCat`
+--
+DELETE FROM `BigCat` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/BigCatAllOf.sql b/samples/schema/petstore/mysql/Model/BigCatAllOf.sql
new file mode 100644
index 00000000000..6b235376a49
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/BigCatAllOf.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'BigCat_allOf' definition.
+--
+
+
+--
+-- SELECT template for table `BigCat_allOf`
+--
+SELECT `kind` FROM `BigCat_allOf` WHERE 1;
+
+--
+-- INSERT template for table `BigCat_allOf`
+--
+INSERT INTO `BigCat_allOf`(`kind`) VALUES (?);
+
+--
+-- UPDATE template for table `BigCat_allOf`
+--
+UPDATE `BigCat_allOf` SET `kind` = ? WHERE 1;
+
+--
+-- DELETE template for table `BigCat_allOf`
+--
+DELETE FROM `BigCat_allOf` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/Capitalization.sql b/samples/schema/petstore/mysql/Model/Capitalization.sql
new file mode 100644
index 00000000000..8e230a104b1
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/Capitalization.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'Capitalization' definition.
+--
+
+
+--
+-- SELECT template for table `Capitalization`
+--
+SELECT `smallCamel`, `CapitalCamel`, `small_Snake`, `Capital_Snake`, `SCA_ETH_Flow_Points`, `ATT_NAME` FROM `Capitalization` WHERE 1;
+
+--
+-- INSERT template for table `Capitalization`
+--
+INSERT INTO `Capitalization`(`smallCamel`, `CapitalCamel`, `small_Snake`, `Capital_Snake`, `SCA_ETH_Flow_Points`, `ATT_NAME`) VALUES (?, ?, ?, ?, ?, ?);
+
+--
+-- UPDATE template for table `Capitalization`
+--
+UPDATE `Capitalization` SET `smallCamel` = ?, `CapitalCamel` = ?, `small_Snake` = ?, `Capital_Snake` = ?, `SCA_ETH_Flow_Points` = ?, `ATT_NAME` = ? WHERE 1;
+
+--
+-- DELETE template for table `Capitalization`
+--
+DELETE FROM `Capitalization` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/Cat.sql b/samples/schema/petstore/mysql/Model/Cat.sql
new file mode 100644
index 00000000000..d71c6fd0314
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/Cat.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'Cat' definition.
+--
+
+
+--
+-- SELECT template for table `Cat`
+--
+SELECT `className`, `color`, `declawed` FROM `Cat` WHERE 1;
+
+--
+-- INSERT template for table `Cat`
+--
+INSERT INTO `Cat`(`className`, `color`, `declawed`) VALUES (?, ?, ?);
+
+--
+-- UPDATE template for table `Cat`
+--
+UPDATE `Cat` SET `className` = ?, `color` = ?, `declawed` = ? WHERE 1;
+
+--
+-- DELETE template for table `Cat`
+--
+DELETE FROM `Cat` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/CatAllOf.sql b/samples/schema/petstore/mysql/Model/CatAllOf.sql
new file mode 100644
index 00000000000..5f2f0f9ca5c
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/CatAllOf.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'Cat_allOf' definition.
+--
+
+
+--
+-- SELECT template for table `Cat_allOf`
+--
+SELECT `declawed` FROM `Cat_allOf` WHERE 1;
+
+--
+-- INSERT template for table `Cat_allOf`
+--
+INSERT INTO `Cat_allOf`(`declawed`) VALUES (?);
+
+--
+-- UPDATE template for table `Cat_allOf`
+--
+UPDATE `Cat_allOf` SET `declawed` = ? WHERE 1;
+
+--
+-- DELETE template for table `Cat_allOf`
+--
+DELETE FROM `Cat_allOf` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/Category.sql b/samples/schema/petstore/mysql/Model/Category.sql
new file mode 100644
index 00000000000..f7d7166644d
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/Category.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'Category' definition.
+--
+
+
+--
+-- SELECT template for table `Category`
+--
+SELECT `id`, `name` FROM `Category` WHERE 1;
+
+--
+-- INSERT template for table `Category`
+--
+INSERT INTO `Category`(`id`, `name`) VALUES (?, ?);
+
+--
+-- UPDATE template for table `Category`
+--
+UPDATE `Category` SET `id` = ?, `name` = ? WHERE 1;
+
+--
+-- DELETE template for table `Category`
+--
+DELETE FROM `Category` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/ClassModel.sql b/samples/schema/petstore/mysql/Model/ClassModel.sql
new file mode 100644
index 00000000000..b1b86564005
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/ClassModel.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'ClassModel' definition.
+--
+
+
+--
+-- SELECT template for table `ClassModel`
+--
+SELECT `_class` FROM `ClassModel` WHERE 1;
+
+--
+-- INSERT template for table `ClassModel`
+--
+INSERT INTO `ClassModel`(`_class`) VALUES (?);
+
+--
+-- UPDATE template for table `ClassModel`
+--
+UPDATE `ClassModel` SET `_class` = ? WHERE 1;
+
+--
+-- DELETE template for table `ClassModel`
+--
+DELETE FROM `ClassModel` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/Client.sql b/samples/schema/petstore/mysql/Model/Client.sql
new file mode 100644
index 00000000000..dfa9066e92d
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/Client.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'Client' definition.
+--
+
+
+--
+-- SELECT template for table `Client`
+--
+SELECT `client` FROM `Client` WHERE 1;
+
+--
+-- INSERT template for table `Client`
+--
+INSERT INTO `Client`(`client`) VALUES (?);
+
+--
+-- UPDATE template for table `Client`
+--
+UPDATE `Client` SET `client` = ? WHERE 1;
+
+--
+-- DELETE template for table `Client`
+--
+DELETE FROM `Client` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/Dog.sql b/samples/schema/petstore/mysql/Model/Dog.sql
new file mode 100644
index 00000000000..3651dcd7609
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/Dog.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'Dog' definition.
+--
+
+
+--
+-- SELECT template for table `Dog`
+--
+SELECT `className`, `color`, `breed` FROM `Dog` WHERE 1;
+
+--
+-- INSERT template for table `Dog`
+--
+INSERT INTO `Dog`(`className`, `color`, `breed`) VALUES (?, ?, ?);
+
+--
+-- UPDATE template for table `Dog`
+--
+UPDATE `Dog` SET `className` = ?, `color` = ?, `breed` = ? WHERE 1;
+
+--
+-- DELETE template for table `Dog`
+--
+DELETE FROM `Dog` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/DogAllOf.sql b/samples/schema/petstore/mysql/Model/DogAllOf.sql
new file mode 100644
index 00000000000..7ec4439d71c
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/DogAllOf.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'Dog_allOf' definition.
+--
+
+
+--
+-- SELECT template for table `Dog_allOf`
+--
+SELECT `breed` FROM `Dog_allOf` WHERE 1;
+
+--
+-- INSERT template for table `Dog_allOf`
+--
+INSERT INTO `Dog_allOf`(`breed`) VALUES (?);
+
+--
+-- UPDATE template for table `Dog_allOf`
+--
+UPDATE `Dog_allOf` SET `breed` = ? WHERE 1;
+
+--
+-- DELETE template for table `Dog_allOf`
+--
+DELETE FROM `Dog_allOf` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/EnumArrays.sql b/samples/schema/petstore/mysql/Model/EnumArrays.sql
new file mode 100644
index 00000000000..2d656d049bb
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/EnumArrays.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'EnumArrays' definition.
+--
+
+
+--
+-- SELECT template for table `EnumArrays`
+--
+SELECT `just_symbol`, `array_enum` FROM `EnumArrays` WHERE 1;
+
+--
+-- INSERT template for table `EnumArrays`
+--
+INSERT INTO `EnumArrays`(`just_symbol`, `array_enum`) VALUES (?, ?);
+
+--
+-- UPDATE template for table `EnumArrays`
+--
+UPDATE `EnumArrays` SET `just_symbol` = ?, `array_enum` = ? WHERE 1;
+
+--
+-- DELETE template for table `EnumArrays`
+--
+DELETE FROM `EnumArrays` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/EnumClass.sql b/samples/schema/petstore/mysql/Model/EnumClass.sql
new file mode 100644
index 00000000000..35c582ae0aa
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/EnumClass.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'EnumClass' definition.
+--
+
+
+--
+-- SELECT template for table `EnumClass`
+--
+SELECT FROM `EnumClass` WHERE 1;
+
+--
+-- INSERT template for table `EnumClass`
+--
+INSERT INTO `EnumClass`() VALUES ();
+
+--
+-- UPDATE template for table `EnumClass`
+--
+UPDATE `EnumClass` SET WHERE 1;
+
+--
+-- DELETE template for table `EnumClass`
+--
+DELETE FROM `EnumClass` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/EnumTest.sql b/samples/schema/petstore/mysql/Model/EnumTest.sql
new file mode 100644
index 00000000000..fb411ce12b2
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/EnumTest.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'Enum_Test' definition.
+--
+
+
+--
+-- SELECT template for table `Enum_Test`
+--
+SELECT `enum_string`, `enum_string_required`, `enum_integer`, `enum_number`, `outerEnum` FROM `Enum_Test` WHERE 1;
+
+--
+-- INSERT template for table `Enum_Test`
+--
+INSERT INTO `Enum_Test`(`enum_string`, `enum_string_required`, `enum_integer`, `enum_number`, `outerEnum`) VALUES (?, ?, ?, ?, ?);
+
+--
+-- UPDATE template for table `Enum_Test`
+--
+UPDATE `Enum_Test` SET `enum_string` = ?, `enum_string_required` = ?, `enum_integer` = ?, `enum_number` = ?, `outerEnum` = ? WHERE 1;
+
+--
+-- DELETE template for table `Enum_Test`
+--
+DELETE FROM `Enum_Test` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/File.sql b/samples/schema/petstore/mysql/Model/File.sql
new file mode 100644
index 00000000000..a5deaa472d1
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/File.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'File' definition.
+--
+
+
+--
+-- SELECT template for table `File`
+--
+SELECT `sourceURI` FROM `File` WHERE 1;
+
+--
+-- INSERT template for table `File`
+--
+INSERT INTO `File`(`sourceURI`) VALUES (?);
+
+--
+-- UPDATE template for table `File`
+--
+UPDATE `File` SET `sourceURI` = ? WHERE 1;
+
+--
+-- DELETE template for table `File`
+--
+DELETE FROM `File` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/FileSchemaTestClass.sql b/samples/schema/petstore/mysql/Model/FileSchemaTestClass.sql
new file mode 100644
index 00000000000..d1928913325
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/FileSchemaTestClass.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'FileSchemaTestClass' definition.
+--
+
+
+--
+-- SELECT template for table `FileSchemaTestClass`
+--
+SELECT `file`, `files` FROM `FileSchemaTestClass` WHERE 1;
+
+--
+-- INSERT template for table `FileSchemaTestClass`
+--
+INSERT INTO `FileSchemaTestClass`(`file`, `files`) VALUES (?, ?);
+
+--
+-- UPDATE template for table `FileSchemaTestClass`
+--
+UPDATE `FileSchemaTestClass` SET `file` = ?, `files` = ? WHERE 1;
+
+--
+-- DELETE template for table `FileSchemaTestClass`
+--
+DELETE FROM `FileSchemaTestClass` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/FormatTest.sql b/samples/schema/petstore/mysql/Model/FormatTest.sql
new file mode 100644
index 00000000000..2ff0a26f98f
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/FormatTest.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'format_test' definition.
+--
+
+
+--
+-- SELECT template for table `format_test`
+--
+SELECT `integer`, `int32`, `int64`, `number`, `float`, `double`, `string`, `byte`, `binary`, `date`, `dateTime`, `uuid`, `password`, `BigDecimal` FROM `format_test` WHERE 1;
+
+--
+-- INSERT template for table `format_test`
+--
+INSERT INTO `format_test`(`integer`, `int32`, `int64`, `number`, `float`, `double`, `string`, `byte`, `binary`, `date`, `dateTime`, `uuid`, `password`, `BigDecimal`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
+
+--
+-- UPDATE template for table `format_test`
+--
+UPDATE `format_test` SET `integer` = ?, `int32` = ?, `int64` = ?, `number` = ?, `float` = ?, `double` = ?, `string` = ?, `byte` = ?, `binary` = ?, `date` = ?, `dateTime` = ?, `uuid` = ?, `password` = ?, `BigDecimal` = ? WHERE 1;
+
+--
+-- DELETE template for table `format_test`
+--
+DELETE FROM `format_test` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/HasOnlyReadOnly.sql b/samples/schema/petstore/mysql/Model/HasOnlyReadOnly.sql
new file mode 100644
index 00000000000..7da004508aa
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/HasOnlyReadOnly.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'hasOnlyReadOnly' definition.
+--
+
+
+--
+-- SELECT template for table `hasOnlyReadOnly`
+--
+SELECT `bar`, `foo` FROM `hasOnlyReadOnly` WHERE 1;
+
+--
+-- INSERT template for table `hasOnlyReadOnly`
+--
+INSERT INTO `hasOnlyReadOnly`(`bar`, `foo`) VALUES (?, ?);
+
+--
+-- UPDATE template for table `hasOnlyReadOnly`
+--
+UPDATE `hasOnlyReadOnly` SET `bar` = ?, `foo` = ? WHERE 1;
+
+--
+-- DELETE template for table `hasOnlyReadOnly`
+--
+DELETE FROM `hasOnlyReadOnly` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/List.sql b/samples/schema/petstore/mysql/Model/List.sql
new file mode 100644
index 00000000000..6306e30b49a
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/List.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'List' definition.
+--
+
+
+--
+-- SELECT template for table `List`
+--
+SELECT `123-list` FROM `List` WHERE 1;
+
+--
+-- INSERT template for table `List`
+--
+INSERT INTO `List`(`123-list`) VALUES (?);
+
+--
+-- UPDATE template for table `List`
+--
+UPDATE `List` SET `123-list` = ? WHERE 1;
+
+--
+-- DELETE template for table `List`
+--
+DELETE FROM `List` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/MapTest.sql b/samples/schema/petstore/mysql/Model/MapTest.sql
new file mode 100644
index 00000000000..98450b72933
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/MapTest.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'MapTest' definition.
+--
+
+
+--
+-- SELECT template for table `MapTest`
+--
+SELECT `map_map_of_string`, `map_of_enum_string`, `direct_map`, `indirect_map` FROM `MapTest` WHERE 1;
+
+--
+-- INSERT template for table `MapTest`
+--
+INSERT INTO `MapTest`(`map_map_of_string`, `map_of_enum_string`, `direct_map`, `indirect_map`) VALUES (?, ?, ?, ?);
+
+--
+-- UPDATE template for table `MapTest`
+--
+UPDATE `MapTest` SET `map_map_of_string` = ?, `map_of_enum_string` = ?, `direct_map` = ?, `indirect_map` = ? WHERE 1;
+
+--
+-- DELETE template for table `MapTest`
+--
+DELETE FROM `MapTest` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/MixedPropertiesAndAdditionalPropertiesClass.sql b/samples/schema/petstore/mysql/Model/MixedPropertiesAndAdditionalPropertiesClass.sql
new file mode 100644
index 00000000000..459a11aeb88
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/MixedPropertiesAndAdditionalPropertiesClass.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'MixedPropertiesAndAdditionalPropertiesClass' definition.
+--
+
+
+--
+-- SELECT template for table `MixedPropertiesAndAdditionalPropertiesClass`
+--
+SELECT `uuid`, `dateTime`, `map` FROM `MixedPropertiesAndAdditionalPropertiesClass` WHERE 1;
+
+--
+-- INSERT template for table `MixedPropertiesAndAdditionalPropertiesClass`
+--
+INSERT INTO `MixedPropertiesAndAdditionalPropertiesClass`(`uuid`, `dateTime`, `map`) VALUES (?, ?, ?);
+
+--
+-- UPDATE template for table `MixedPropertiesAndAdditionalPropertiesClass`
+--
+UPDATE `MixedPropertiesAndAdditionalPropertiesClass` SET `uuid` = ?, `dateTime` = ?, `map` = ? WHERE 1;
+
+--
+-- DELETE template for table `MixedPropertiesAndAdditionalPropertiesClass`
+--
+DELETE FROM `MixedPropertiesAndAdditionalPropertiesClass` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/Name.sql b/samples/schema/petstore/mysql/Model/Name.sql
new file mode 100644
index 00000000000..ba4aec67b77
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/Name.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'Name' definition.
+--
+
+
+--
+-- SELECT template for table `Name`
+--
+SELECT `name`, `snake_case`, `property`, `123Number` FROM `Name` WHERE 1;
+
+--
+-- INSERT template for table `Name`
+--
+INSERT INTO `Name`(`name`, `snake_case`, `property`, `123Number`) VALUES (?, ?, ?, ?);
+
+--
+-- UPDATE template for table `Name`
+--
+UPDATE `Name` SET `name` = ?, `snake_case` = ?, `property` = ?, `123Number` = ? WHERE 1;
+
+--
+-- DELETE template for table `Name`
+--
+DELETE FROM `Name` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/NumberOnly.sql b/samples/schema/petstore/mysql/Model/NumberOnly.sql
new file mode 100644
index 00000000000..2709f8589f3
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/NumberOnly.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'NumberOnly' definition.
+--
+
+
+--
+-- SELECT template for table `NumberOnly`
+--
+SELECT `JustNumber` FROM `NumberOnly` WHERE 1;
+
+--
+-- INSERT template for table `NumberOnly`
+--
+INSERT INTO `NumberOnly`(`JustNumber`) VALUES (?);
+
+--
+-- UPDATE template for table `NumberOnly`
+--
+UPDATE `NumberOnly` SET `JustNumber` = ? WHERE 1;
+
+--
+-- DELETE template for table `NumberOnly`
+--
+DELETE FROM `NumberOnly` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/Order.sql b/samples/schema/petstore/mysql/Model/Order.sql
new file mode 100644
index 00000000000..43af471ffb5
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/Order.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'Order' definition.
+--
+
+
+--
+-- SELECT template for table `Order`
+--
+SELECT `id`, `petId`, `quantity`, `shipDate`, `status`, `complete` FROM `Order` WHERE 1;
+
+--
+-- INSERT template for table `Order`
+--
+INSERT INTO `Order`(`id`, `petId`, `quantity`, `shipDate`, `status`, `complete`) VALUES (?, ?, ?, ?, ?, ?);
+
+--
+-- UPDATE template for table `Order`
+--
+UPDATE `Order` SET `id` = ?, `petId` = ?, `quantity` = ?, `shipDate` = ?, `status` = ?, `complete` = ? WHERE 1;
+
+--
+-- DELETE template for table `Order`
+--
+DELETE FROM `Order` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/OuterComposite.sql b/samples/schema/petstore/mysql/Model/OuterComposite.sql
new file mode 100644
index 00000000000..e5f2e0da769
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/OuterComposite.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'OuterComposite' definition.
+--
+
+
+--
+-- SELECT template for table `OuterComposite`
+--
+SELECT `my_number`, `my_string`, `my_boolean` FROM `OuterComposite` WHERE 1;
+
+--
+-- INSERT template for table `OuterComposite`
+--
+INSERT INTO `OuterComposite`(`my_number`, `my_string`, `my_boolean`) VALUES (?, ?, ?);
+
+--
+-- UPDATE template for table `OuterComposite`
+--
+UPDATE `OuterComposite` SET `my_number` = ?, `my_string` = ?, `my_boolean` = ? WHERE 1;
+
+--
+-- DELETE template for table `OuterComposite`
+--
+DELETE FROM `OuterComposite` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/OuterEnum.sql b/samples/schema/petstore/mysql/Model/OuterEnum.sql
new file mode 100644
index 00000000000..d30dd4b9f3a
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/OuterEnum.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'OuterEnum' definition.
+--
+
+
+--
+-- SELECT template for table `OuterEnum`
+--
+SELECT FROM `OuterEnum` WHERE 1;
+
+--
+-- INSERT template for table `OuterEnum`
+--
+INSERT INTO `OuterEnum`() VALUES ();
+
+--
+-- UPDATE template for table `OuterEnum`
+--
+UPDATE `OuterEnum` SET WHERE 1;
+
+--
+-- DELETE template for table `OuterEnum`
+--
+DELETE FROM `OuterEnum` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/Pet.sql b/samples/schema/petstore/mysql/Model/Pet.sql
new file mode 100644
index 00000000000..b4c6a135c03
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/Pet.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'Pet' definition.
+--
+
+
+--
+-- SELECT template for table `Pet`
+--
+SELECT `id`, `category`, `name`, `photoUrls`, `tags`, `status` FROM `Pet` WHERE 1;
+
+--
+-- INSERT template for table `Pet`
+--
+INSERT INTO `Pet`(`id`, `category`, `name`, `photoUrls`, `tags`, `status`) VALUES (?, ?, ?, ?, ?, ?);
+
+--
+-- UPDATE template for table `Pet`
+--
+UPDATE `Pet` SET `id` = ?, `category` = ?, `name` = ?, `photoUrls` = ?, `tags` = ?, `status` = ? WHERE 1;
+
+--
+-- DELETE template for table `Pet`
+--
+DELETE FROM `Pet` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/ReadOnlyFirst.sql b/samples/schema/petstore/mysql/Model/ReadOnlyFirst.sql
new file mode 100644
index 00000000000..f172b3484da
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/ReadOnlyFirst.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'ReadOnlyFirst' definition.
+--
+
+
+--
+-- SELECT template for table `ReadOnlyFirst`
+--
+SELECT `bar`, `baz` FROM `ReadOnlyFirst` WHERE 1;
+
+--
+-- INSERT template for table `ReadOnlyFirst`
+--
+INSERT INTO `ReadOnlyFirst`(`bar`, `baz`) VALUES (?, ?);
+
+--
+-- UPDATE template for table `ReadOnlyFirst`
+--
+UPDATE `ReadOnlyFirst` SET `bar` = ?, `baz` = ? WHERE 1;
+
+--
+-- DELETE template for table `ReadOnlyFirst`
+--
+DELETE FROM `ReadOnlyFirst` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/Return.sql b/samples/schema/petstore/mysql/Model/Return.sql
new file mode 100644
index 00000000000..89dd2190d9c
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/Return.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'Return' definition.
+--
+
+
+--
+-- SELECT template for table `Return`
+--
+SELECT `return` FROM `Return` WHERE 1;
+
+--
+-- INSERT template for table `Return`
+--
+INSERT INTO `Return`(`return`) VALUES (?);
+
+--
+-- UPDATE template for table `Return`
+--
+UPDATE `Return` SET `return` = ? WHERE 1;
+
+--
+-- DELETE template for table `Return`
+--
+DELETE FROM `Return` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/Tag.sql b/samples/schema/petstore/mysql/Model/Tag.sql
new file mode 100644
index 00000000000..d62633f8427
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/Tag.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'Tag' definition.
+--
+
+
+--
+-- SELECT template for table `Tag`
+--
+SELECT `id`, `name` FROM `Tag` WHERE 1;
+
+--
+-- INSERT template for table `Tag`
+--
+INSERT INTO `Tag`(`id`, `name`) VALUES (?, ?);
+
+--
+-- UPDATE template for table `Tag`
+--
+UPDATE `Tag` SET `id` = ?, `name` = ? WHERE 1;
+
+--
+-- DELETE template for table `Tag`
+--
+DELETE FROM `Tag` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/TypeHolderDefault.sql b/samples/schema/petstore/mysql/Model/TypeHolderDefault.sql
new file mode 100644
index 00000000000..fcfe3369527
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/TypeHolderDefault.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'TypeHolderDefault' definition.
+--
+
+
+--
+-- SELECT template for table `TypeHolderDefault`
+--
+SELECT `string_item`, `number_item`, `integer_item`, `bool_item`, `array_item` FROM `TypeHolderDefault` WHERE 1;
+
+--
+-- INSERT template for table `TypeHolderDefault`
+--
+INSERT INTO `TypeHolderDefault`(`string_item`, `number_item`, `integer_item`, `bool_item`, `array_item`) VALUES (?, ?, ?, ?, ?);
+
+--
+-- UPDATE template for table `TypeHolderDefault`
+--
+UPDATE `TypeHolderDefault` SET `string_item` = ?, `number_item` = ?, `integer_item` = ?, `bool_item` = ?, `array_item` = ? WHERE 1;
+
+--
+-- DELETE template for table `TypeHolderDefault`
+--
+DELETE FROM `TypeHolderDefault` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/TypeHolderExample.sql b/samples/schema/petstore/mysql/Model/TypeHolderExample.sql
new file mode 100644
index 00000000000..dcaf720c8fa
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/TypeHolderExample.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'TypeHolderExample' definition.
+--
+
+
+--
+-- SELECT template for table `TypeHolderExample`
+--
+SELECT `string_item`, `number_item`, `float_item`, `integer_item`, `bool_item`, `array_item` FROM `TypeHolderExample` WHERE 1;
+
+--
+-- INSERT template for table `TypeHolderExample`
+--
+INSERT INTO `TypeHolderExample`(`string_item`, `number_item`, `float_item`, `integer_item`, `bool_item`, `array_item`) VALUES (?, ?, ?, ?, ?, ?);
+
+--
+-- UPDATE template for table `TypeHolderExample`
+--
+UPDATE `TypeHolderExample` SET `string_item` = ?, `number_item` = ?, `float_item` = ?, `integer_item` = ?, `bool_item` = ?, `array_item` = ? WHERE 1;
+
+--
+-- DELETE template for table `TypeHolderExample`
+--
+DELETE FROM `TypeHolderExample` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/User.sql b/samples/schema/petstore/mysql/Model/User.sql
new file mode 100644
index 00000000000..91afbc9e245
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/User.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'User' definition.
+--
+
+
+--
+-- SELECT template for table `User`
+--
+SELECT `id`, `username`, `firstName`, `lastName`, `email`, `password`, `phone`, `userStatus` FROM `User` WHERE 1;
+
+--
+-- INSERT template for table `User`
+--
+INSERT INTO `User`(`id`, `username`, `firstName`, `lastName`, `email`, `password`, `phone`, `userStatus`) VALUES (?, ?, ?, ?, ?, ?, ?, ?);
+
+--
+-- UPDATE template for table `User`
+--
+UPDATE `User` SET `id` = ?, `username` = ?, `firstName` = ?, `lastName` = ?, `email` = ?, `password` = ?, `phone` = ?, `userStatus` = ? WHERE 1;
+
+--
+-- DELETE template for table `User`
+--
+DELETE FROM `User` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/Model/XmlItem.sql b/samples/schema/petstore/mysql/Model/XmlItem.sql
new file mode 100644
index 00000000000..59d643f2991
--- /dev/null
+++ b/samples/schema/petstore/mysql/Model/XmlItem.sql
@@ -0,0 +1,26 @@
+--
+-- OpenAPI Petstore.
+-- Prepared SQL queries for 'XmlItem' definition.
+--
+
+
+--
+-- SELECT template for table `XmlItem`
+--
+SELECT `attribute_string`, `attribute_number`, `attribute_integer`, `attribute_boolean`, `wrapped_array`, `name_string`, `name_number`, `name_integer`, `name_boolean`, `name_array`, `name_wrapped_array`, `prefix_string`, `prefix_number`, `prefix_integer`, `prefix_boolean`, `prefix_array`, `prefix_wrapped_array`, `namespace_string`, `namespace_number`, `namespace_integer`, `namespace_boolean`, `namespace_array`, `namespace_wrapped_array`, `prefix_ns_string`, `prefix_ns_number`, `prefix_ns_integer`, `prefix_ns_boolean`, `prefix_ns_array`, `prefix_ns_wrapped_array` FROM `XmlItem` WHERE 1;
+
+--
+-- INSERT template for table `XmlItem`
+--
+INSERT INTO `XmlItem`(`attribute_string`, `attribute_number`, `attribute_integer`, `attribute_boolean`, `wrapped_array`, `name_string`, `name_number`, `name_integer`, `name_boolean`, `name_array`, `name_wrapped_array`, `prefix_string`, `prefix_number`, `prefix_integer`, `prefix_boolean`, `prefix_array`, `prefix_wrapped_array`, `namespace_string`, `namespace_number`, `namespace_integer`, `namespace_boolean`, `namespace_array`, `namespace_wrapped_array`, `prefix_ns_string`, `prefix_ns_number`, `prefix_ns_integer`, `prefix_ns_boolean`, `prefix_ns_array`, `prefix_ns_wrapped_array`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
+
+--
+-- UPDATE template for table `XmlItem`
+--
+UPDATE `XmlItem` SET `attribute_string` = ?, `attribute_number` = ?, `attribute_integer` = ?, `attribute_boolean` = ?, `wrapped_array` = ?, `name_string` = ?, `name_number` = ?, `name_integer` = ?, `name_boolean` = ?, `name_array` = ?, `name_wrapped_array` = ?, `prefix_string` = ?, `prefix_number` = ?, `prefix_integer` = ?, `prefix_boolean` = ?, `prefix_array` = ?, `prefix_wrapped_array` = ?, `namespace_string` = ?, `namespace_number` = ?, `namespace_integer` = ?, `namespace_boolean` = ?, `namespace_array` = ?, `namespace_wrapped_array` = ?, `prefix_ns_string` = ?, `prefix_ns_number` = ?, `prefix_ns_integer` = ?, `prefix_ns_boolean` = ?, `prefix_ns_array` = ?, `prefix_ns_wrapped_array` = ? WHERE 1;
+
+--
+-- DELETE template for table `XmlItem`
+--
+DELETE FROM `XmlItem` WHERE 0;
+
diff --git a/samples/schema/petstore/mysql/README.md b/samples/schema/petstore/mysql/README.md
index 54bda8398ac..3fb447c4b7c 100644
--- a/samples/schema/petstore/mysql/README.md
+++ b/samples/schema/petstore/mysql/README.md
@@ -46,3 +46,11 @@ Produced file(`mysql_schema.sql`) contains every table definition. Current imple
1. Click **Import** link in left sidebar
2. In **File upload** fieldset click to **Choose Files** and find generated `mysql_schema.sql`
3. Push **Execute** button
+
+### Prepared SQL queries
+
+[Model folder](./Model) contains SQL queries(`SELECT *`, `SELECT`, `INSERT`, `UPDATE`, `DELETE`) usually suggested by `PHPMyAdmin` when you hit `SQL` tab. They are absolutely useless without adaptation to your needs. Copypaste them then edit.
+
+Important! Some of SQLs(`INSERT`/`UPDATE`) contains question marks(`?`) which are parameter placeholders. You need to bind values to these params to execute query.
+
+If your MySQL driver doesn't support named parameters(`PHP PDO` supports while `PHP mysqli` doesn't) you need to make sure that `namedParametersEnabled` generator option is disabled.