Tabnine Logo
JdbcTestUtils.readScript
Code IndexAdd Tabnine to your IDE (free)

How to use
readScript
method
in
org.springframework.test.jdbc.JdbcTestUtils

Best Java code snippets using org.springframework.test.jdbc.JdbcTestUtils.readScript (Showing top 2 results out of 315)

origin: apache/servicemix-bundles

/**
 * Read a script from the provided {@code LineNumberReader}, using
 * "{@code --}" as the comment prefix, and build a {@code String} containing
 * the lines.
 * @param lineNumberReader the {@code LineNumberReader} containing the script
 * to be processed
 * @return a {@code String} containing the script lines
 * @see #readScript(LineNumberReader, String)
 * @deprecated as of Spring 4.0.3, in favor of using
 * {@link org.springframework.jdbc.datasource.init.ScriptUtils#readScript(LineNumberReader, String, String)}
 */
@Deprecated
public static String readScript(LineNumberReader lineNumberReader) throws IOException {
  return readScript(lineNumberReader, ScriptUtils.DEFAULT_COMMENT_PREFIX);
}
origin: scottysinclair/barleydb

public static void executeScript(Connection con, String script, boolean continueOnError) throws Exception {
  LineNumberReader in = new LineNumberReader(new StringReader( script ));
  List<String> statements = new LinkedList<>();
  JdbcTestUtils.splitSqlScript(JdbcTestUtils.readScript(in), ';', statements);
  if (continueOnError){
    con.setAutoCommit(true);
org.springframework.test.jdbcJdbcTestUtilsreadScript

Javadoc

Read a script from the provided LineNumberReader, using " --" as the comment prefix, and build a String containing the lines.

Popular methods of JdbcTestUtils

  • countRowsInTable
    Count the rows in the given table.
  • deleteFromTables
    Delete all rows from the specified tables.
  • deleteFromTableWhere
    Delete rows from the given table, using the provided WHERE clause.If the provided WHERE clause conta
  • dropTables
    Drop the specified tables.
  • countRowsInTableWhere
    Count the rows in the given table, using the provided WHERE clause.If the provided WHERE clause cont
  • splitSqlScript
  • executeSqlScript
    Execute the given SQL script.The script will typically be loaded from the classpath. There should be

Popular in Java

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • setContentView (Activity)
  • Menu (java.awt)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now