Package org.h2gis.functions.io.csv
Class CSVDriverFunction
- java.lang.Object
-
- org.h2gis.functions.io.csv.CSVDriverFunction
-
- All Implemented Interfaces:
org.h2gis.api.DriverFunction
public class CSVDriverFunction extends Object implements org.h2gis.api.DriverFunction
Basic CSV importer and exporter- Author:
- Erwan Bocher, Sylvain PALOMINOS (UBS 2019)
-
-
Field Summary
Fields Modifier and Type Field Description static StringDESCRIPTION
-
Constructor Summary
Constructors Constructor Description CSVDriverFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]exportTable(Connection connection, String tableReference, File fileName, boolean deleteFiles, org.h2gis.api.ProgressVisitor progress)String[]exportTable(Connection connection, String tableReference, File fileName, String csvOptions, boolean deleteFiles, org.h2gis.api.ProgressVisitor progress)String[]exportTable(Connection connection, String tableReference, File fileName, String csvOptions, org.h2gis.api.ProgressVisitor progress)Export a table or a query to a CSV fileString[]exportTable(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress)String[]getExportFormats()StringgetFormatDescription(String format)org.h2gis.api.DriverFunction.IMPORT_DRIVER_TYPEgetImportDriverType()String[]getImportFormats()String[]importFile(Connection connection, String tableReference, File fileName, boolean deleteTables, org.h2gis.api.ProgressVisitor progress)String[]importFile(Connection connection, String tableReference, File fileName, String csvOptions, boolean deleteTables, org.h2gis.api.ProgressVisitor progress)String[]importFile(Connection connection, String tableReference, File fileName, String csvOptions, org.h2gis.api.ProgressVisitor progress)String[]importFile(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress)booleanisSpatialFormat(String extension)
-
-
-
Field Detail
-
DESCRIPTION
public static String DESCRIPTION
-
-
Method Detail
-
getImportDriverType
public org.h2gis.api.DriverFunction.IMPORT_DRIVER_TYPE getImportDriverType()
- Specified by:
getImportDriverTypein interfaceorg.h2gis.api.DriverFunction
-
getImportFormats
public String[] getImportFormats()
- Specified by:
getImportFormatsin interfaceorg.h2gis.api.DriverFunction
-
getExportFormats
public String[] getExportFormats()
- Specified by:
getExportFormatsin interfaceorg.h2gis.api.DriverFunction
-
getFormatDescription
public String getFormatDescription(String format)
- Specified by:
getFormatDescriptionin interfaceorg.h2gis.api.DriverFunction
-
isSpatialFormat
public boolean isSpatialFormat(String extension)
- Specified by:
isSpatialFormatin interfaceorg.h2gis.api.DriverFunction
-
exportTable
public String[] exportTable(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException
- Specified by:
exportTablein interfaceorg.h2gis.api.DriverFunction- Throws:
SQLExceptionIOException
-
exportTable
public String[] exportTable(Connection connection, String tableReference, File fileName, boolean deleteFiles, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException
- Specified by:
exportTablein interfaceorg.h2gis.api.DriverFunction- Throws:
SQLExceptionIOException
-
exportTable
public String[] exportTable(Connection connection, String tableReference, File fileName, String csvOptions, boolean deleteFiles, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException
- Specified by:
exportTablein interfaceorg.h2gis.api.DriverFunction- Throws:
SQLExceptionIOException
-
exportTable
public String[] exportTable(Connection connection, String tableReference, File fileName, String csvOptions, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException
Export a table or a query to a CSV file- Specified by:
exportTablein interfaceorg.h2gis.api.DriverFunction- Parameters:
connection- Active connection, do not close this connection.tableReference- [[catalog.]schema.]table referencefileName- File path to readcsvOptions- the CSV options ie "charset=UTF-8 fieldSeparator=| fieldDelimiter=,"progress-- Throws:
SQLExceptionIOException
-
importFile
public String[] importFile(Connection connection, String tableReference, File fileName, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException
- Specified by:
importFilein interfaceorg.h2gis.api.DriverFunction- Throws:
SQLExceptionIOException
-
importFile
public String[] importFile(Connection connection, String tableReference, File fileName, String csvOptions, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException
- Specified by:
importFilein interfaceorg.h2gis.api.DriverFunction- Parameters:
connection- Active connection, do not close this connection.tableReference- [[catalog.]schema.]table referencefileName- File path to readcsvOptions- the CSV options ie "charset=UTF-8 fieldSeparator=| fieldDelimiter=,"progress-- Throws:
SQLExceptionIOException
-
importFile
public String[] importFile(Connection connection, String tableReference, File fileName, boolean deleteTables, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException
- Specified by:
importFilein interfaceorg.h2gis.api.DriverFunction- Throws:
SQLExceptionIOException
-
importFile
public String[] importFile(Connection connection, String tableReference, File fileName, String csvOptions, boolean deleteTables, org.h2gis.api.ProgressVisitor progress) throws SQLException, IOException
- Specified by:
importFilein interfaceorg.h2gis.api.DriverFunction- Throws:
SQLExceptionIOException
-
-