Package fi.evident.dalesbred

Examples of fi.evident.dalesbred.SqlSyntaxException


        } else if (lexer.lookingAt(":")) {
            sqlBuilder.append('?');
            parameterNames.add(parseName());

        } else if (lexer.lookingAt("?")) {
            throw new SqlSyntaxException("SQL cannot contain traditional ? placeholders.", lexer.sql);

        } else {
            sqlBuilder.append(lexer.readChar());
        }
    }
View Full Code Here


        lexer.expect(":");
        String name = lexer.readRegexp(IDENTIFIER_PATTERN);
        if (name != null)
            return name;
        else
            throw new SqlSyntaxException("SQL cannot end to named parameter without name", lexer.sql);
    }
View Full Code Here

        private void expect(@NotNull String prefix) {
            if (lookingAt(prefix))
                offset += prefix.length();
            else
                throw new SqlSyntaxException("expected '" + prefix + '\'', sql);
        }
View Full Code Here

                offset = nextHit + skippableBlock.end.length();
            } else {
                if (skippableBlock.blockEndsWhenStreamRunsOut)
                    offset = sql.length();
                else
                    throw new SqlSyntaxException("Block end not found: \"" + skippableBlock.end + "\".", sql);
            }

            return sql.substring(startOffset, offset);
        }
View Full Code Here

TOP

Related Classes of fi.evident.dalesbred.SqlSyntaxException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.