public class

JdbcTestUtils

extends Object
java.lang.Object
   ↳ org.springframework.test.jdbc.JdbcTestUtils

Class Overview

JdbcTestUtils is a collection of JDBC related utility methods for use in unit and integration testing scenarios.

Summary

Public Constructors
JdbcTestUtils()
Public Methods
static boolean containsSqlScriptDelimiters(String script, char delim)
Does the provided SQL script contain the specified delimiter?
static String readScript(LineNumberReader lineNumberReader)
Read a script from the LineNumberReader and build a String containing the lines.
static void splitSqlScript(String script, char delim, List<String> statements)
Split an SQL script into separate statements delimited with the provided delimiter character.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public JdbcTestUtils ()

Public Methods

public static boolean containsSqlScriptDelimiters (String script, char delim)

Does the provided SQL script contain the specified delimiter?

Parameters
script the SQL script
delim character delimiting each statement - typically a ';' character

public static String readScript (LineNumberReader lineNumberReader)

Read a script from the LineNumberReader and build a String containing the lines.

Parameters
lineNumberReader the LineNumberReader containing the script to be processed
Returns
  • String containing the script lines
Throws
IOException

public static void splitSqlScript (String script, char delim, List<String> statements)

Split an SQL script into separate statements delimited with the provided delimiter character. Each individual statement will be added to the provided List.

Parameters
script the SQL script
delim character delimiting each statement - typically a ';' character
statements the List that will contain the individual statements