All Downloads are FREE. Search and download functionalities are using the official Maven repository.

public.javadoc.org.spincast.plugins.jdbc.statements.Statement.html Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version






Statement (org.spincast:spincast-framework 1.0.0 API)












org.spincast.plugins.jdbc.statements

Interface Statement

    • Method Detail

      • sql

        void sql(String sql)
        Appends some SQL to the query to launch. If you want to restart the query from scratch, you need to call clearSql() first!
      • clearSql

        void clearSql()
        Clears the current SQL query being built. Also removes any bound parameters.
      • clearSql

        void clearSql(boolean keepCurrentBoundParams)
        Clears the current SQL query being built.
        Parameters:
        keepCurrentBoundParams - if true, the currently bound parameters won't be cleared, only the query.
      • getSql

        String getSql(boolean friendly)
        Returns the current SQL query.
      • setInstant

        void setInstant(String string,
                        Instant instant)
        This replaces setTimestamp()!
      • setString

        void setString(String paramName,
                       String value)
      • setLong

        void setLong(String paramName,
                     Long value)
      • setFloat

        void setFloat(String paramName,
                      Float value)
      • setDouble

        void setDouble(String paramName,
                       Double value)
      • setInLong

        void setInLong(String paramName,
                       Set<Long> items)
        Explodes a collection of Long and replaces the specified param with them, so it can be used inside a
      • setInInteger

        void setInInteger(String paramName,
                          Set<Integer> items)
        Explodes a collection of Integer and replaces the specified param with them, so it can be used inside a
      • setInString

        void setInString(String paramName,
                         Set<String> items)
        Explodes a collection of String and replaces the specified param with them, so it can be used inside a IN(:ids) section.
      • setInStringFromEnumNames

        void setInStringFromEnumNames(String paramName,
                                      Set<? extends Enum<?>> enumItems)
        Explodes a collection of enum names and replaces the specified param with them, so it can be used inside a IN(:ids) section.
      • setInStringFromEnumNames

        void setInStringFromEnumNames(String paramName,
                                      Enum<?>... enumItems)
        Uses a list of enum names so it can be used inside a IN(:ids) section.
      • setLongList

        void setLongList(String paramName,
                         List<Long> items)
        Explodes a list of Long and replaces the specified param with them, so it can be used to replace a "ids list" inside a (PostgreSQL example): INNER JOIN UNNEST('{:idsList}'::int[]) WITH ORDINALITY o(id, ord) ON o.id = myMainTable.id

        This allows to retrieve a list of rows, using ids, *in the order the ids are specified*.

Copyright © 2019. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy