Tabnine Logo
InsertColumnsImpl
Code IndexAdd Tabnine to your IDE (free)

How to use
InsertColumnsImpl
in
com.nhaarman.sqlitebuilder.impl

Best Java code snippets using com.nhaarman.sqlitebuilder.impl.InsertColumnsImpl (Showing top 6 results out of 315)

origin: nhaarman/SQLiteBuilder

@NotNull
@Override
public InsertColumns columns(@NotNull final String... columnNames) {
 return new InsertColumnsImpl(columnNames, this);
}
origin: nhaarman/SQLiteBuilder

ValuesImpl(@NotNull final Object[] expressions, @NotNull final InsertColumnsImpl previous) {
 if (expressions.length != previous.getColumnCount()) {
  throw new IllegalArgumentException(String.format("Invalid number of expressions. Supplied %d columns and %d expressions.", previous.getColumnCount(), expressions.length));
 }
 mExpressions = expressions;
 mPrevious = previous;
}
origin: nhaarman/SQLiteBuilder

@Test
public void prependTo_singleColumn_prependsProperSql() {
 /* Given */
 InsertColumnsImpl insertColumns = new InsertColumnsImpl(new String[] {"a"}, mock(SqlPart.class));
 RawSqlBuilder builder = new RawSqlBuilderImpl();
 /* When */
 insertColumns.prependTo(builder);
 /* Then */
 assertThat(builder.toString(), is("(a)"));
}
origin: nhaarman/SQLiteBuilder

 @Test
 public void values_returnsNotNullValue() {
  /* Given */
  InsertColumnsImpl insertColumns = new InsertColumnsImpl(new String[] {"a", "b", "c"}, mock(SqlPart.class));

  /* When */
  Values result = insertColumns.values(1, 2, 3);

  /* Then */
  assertThat(result, is(notNullValue()));
 }
}
origin: nhaarman/SQLiteBuilder

@Test
public void previous_returnsProperItem() {
 /* Given */
 SqlPart sqlPart = mock(SqlPart.class);
 InsertColumnsImpl insertColumns = new InsertColumnsImpl(new String[] {"a", "b", "c"}, sqlPart);
 /* When */
 SqlPart result = insertColumns.previous();
 /* Then */
 assertThat(result, is(sqlPart));
}
origin: nhaarman/SQLiteBuilder

@Test
public void prependTo_multipleColumns_prependsProperSql() {
 /* Given */
 InsertColumnsImpl insertColumns = new InsertColumnsImpl(new String[] {"a", "b", "c"}, mock(SqlPart.class));
 RawSqlBuilder builder = new RawSqlBuilderImpl();
 /* When */
 insertColumns.prependTo(builder);
 /* Then */
 assertThat(builder.toString(), is("(a,b,c)"));
}
com.nhaarman.sqlitebuilder.implInsertColumnsImpl

Most used methods

  • <init>
  • getColumnCount
  • prependTo
  • previous
  • values

Popular in Java

  • Running tasks concurrently on multiple threads
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Sublime Text plugins
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