[#2634] Minor documentation bug: The MockDataProvider uses toLowerCase()

but upper-case SQL keywords
This commit is contained in:
Lukas Eder 2013-07-11 00:39:38 +02:00
parent a768462811
commit 06bde8c032
3 changed files with 6 additions and 6 deletions

View File

@ -9684,12 +9684,12 @@ Result<BookRecord> result = create.selectFrom(BOOK).where(BOOK.ID.equal(5)).fetc
String sql = ctx.sql();
// Exceptions are propagated through the JDBC and jOOQ APIs
if (sql.toLowerCase().startsWith("DROP")) {
if (sql.toUpperCase().startsWith("DROP")) {
throw new SQLException("Statement not supported: " + sql);
}
// You decide, whether any given statement returns results, and how many
else if (sql.toLowerCase().startsWith("SELECT")) {
else if (sql.toUpperCase().startsWith("SELECT")) {
// Always return one author record
Result<AuthorRecord> result = create.newResult(AUTHOR);

View File

@ -10073,12 +10073,12 @@ Result<BookRecord> result = create.selectFrom(BOOK).where(BOOK.ID.equal(5)).fetc
String sql = ctx.sql();
// Exceptions are propagated through the JDBC and jOOQ APIs
if (sql.toLowerCase().startsWith("DROP")) {
if (sql.toUpperCase().startsWith("DROP")) {
throw new SQLException("Statement not supported: " + sql);
}
// You decide, whether any given statement returns results, and how many
else if (sql.toLowerCase().startsWith("SELECT")) {
else if (sql.toUpperCase().startsWith("SELECT")) {
// Always return one author record
Result<AuthorRecord> result = create.newResult(AUTHOR);

View File

@ -10095,12 +10095,12 @@ Result<BookRecord> result = create.selectFrom(BOOK).where(BOOK.ID.equal(5)).fetc
String sql = ctx.sql();
// Exceptions are propagated through the JDBC and jOOQ APIs
if (sql.toLowerCase().startsWith("DROP")) {
if (sql.toUpperCase().startsWith("DROP")) {
throw new SQLException("Statement not supported: " + sql);
}
// You decide, whether any given statement returns results, and how many
else if (sql.toLowerCase().startsWith("SELECT")) {
else if (sql.toUpperCase().startsWith("SELECT")) {
// Always return one author record
Result<AuthorRecord> result = create.newResult(AUTHOR);