[#2634] Minor documentation bug: The MockDataProvider uses toLowerCase()
but upper-case SQL keywords
This commit is contained in:
parent
a768462811
commit
06bde8c032
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user