net.snowflake.client.core.bind

## Class BindUploader

- java.lang.Object
- - net.snowflake.client.core.bind.BindUploader

All Implemented Interfaces:
  Closeable, AutoCloseable

    public class BindUploader
    extends Object
    implements Closeable

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static int` `arrayBindValueCount(Map<String,ParameterBindingDTO> bindValues)` Compute the number of array bind values in the given bind map
`void` `close()` Close uploader, deleting the local temporary directory This class can be used in a try-with-resources statement, which ensures that the temporary directory is cleaned up even when exceptions occur
`Path` `getBindDir()`
`String` `getStagePath()`
`static boolean` `isArrayBind(Map<String,ParameterBindingDTO> bindValues)`
`static BindUploader` `newInstance(SFSession session, String stageDir)` Create a new BindUploader which will upload to the given stage name Ensures temporary directory for file writing exists
`void` `setFileSize(int fileSize)`
`void` `upload(Map<String,ParameterBindingDTO> bindValues)` Upload the bindValues to stage

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### newInstance

    public static BindUploader newInstance(SFSession session,
                                           String stageDir)
                                    throws BindException

Create a new BindUploader which will upload to the given stage name Ensures temporary directory for file writing exists

Parameters:
  `stageDir` -
Returns:
  BindUploader
Throws:
  `BindException`

#### upload

    public void upload(Map<String,ParameterBindingDTO> bindValues)
                throws BindException

Upload the bindValues to stage

Parameters:
  `bindValues` -
Throws:
  `BindException`

#### close

    public void close()

Close uploader, deleting the local temporary directory This class can be used in a try-with-resources statement, which ensures that the temporary directory is cleaned up even when exceptions occur

Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `AutoCloseable`

#### setFileSize

    public void setFileSize(int fileSize)

#### getStagePath

    public String getStagePath()

#### getBindDir

    public Path getBindDir()

#### arrayBindValueCount

    public static int arrayBindValueCount(Map<String,ParameterBindingDTO> bindValues)

Compute the number of array bind values in the given bind map

Parameters:
  `bindValues` - the bind map
Returns:
  0 if bindValues is null, has no binds, or is not an array bind n otherwise, where n is the number of binds in the array bind

#### isArrayBind

    public static boolean isArrayBind(Map<String,ParameterBindingDTO> bindValues)