Class Helpers
java.lang.Object
io.github.torand.fastersql.statement.Helpers
Provides statement utility functions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringparamMarkers(long count) Generates a string with comma separated statement parameter markers.static ObjectunwrapOptional(Object obj) Returns the wrapped object if specified object is an optional, else returns the object itself.static <T> Collection<T> unwrapSuppliers(Supplier<T>... suppliers) Returns a collection of non-null values produces by the specified suppliers.
-
Method Details
-
paramMarkers
Generates a string with comma separated statement parameter markers.- Parameters:
count- the number of parameter markers.- Returns:
- the generated parameter marker string.
-
unwrapOptional
Returns the wrapped object if specified object is an optional, else returns the object itself.- Parameters:
obj- the object.- Returns:
- the unwrapped object.
-
unwrapSuppliers
Returns a collection of non-null values produces by the specified suppliers.- Type Parameters:
T- the supplier value type.- Parameters:
suppliers- the suppliers.- Returns:
- the collection of supplied values.
-