Package org.restheart.mongodb.services
Class CsvLoader
java.lang.Object
org.restheart.mongodb.services.CsvLoader
- All Implemented Interfaces:
ConfigurablePlugin,ExchangeTypeResolver<BsonFromCsvRequest,BsonResponse>,HandlingPlugin<BsonFromCsvRequest,BsonResponse>,Plugin,Service<BsonFromCsvRequest,BsonResponse>
service to upload a csv file in a collection
query parameters:
- db=<db_name> *required
- coll=<collection_name> *required
- id=<id_column_index> optional (default: no _id column, each row will get an new ObjectId)
- sep=<column_separator> optional (default: ,)
- props=<props> optional (default: no props) additional props to add to each row
- values=<values> optional (default: no values) values of additional props to add to each row
defined in conf file) of a tranformer to apply to imported data - update optional (default: no).use data to update matching documents");
- db=<db_name> *required
- coll=<collection_name> *required
- id=<id_column_index> optional (default: no _id column, each row will get an new ObjectId)
- sep=<column_separator> optional (default: ,)
- props=<props> optional (default: no props) additional props to add to each row
- values=<values> optional (default: no values) values of additional props to add to each row
defined in conf file) of a tranformer to apply to imported data - update optional (default: no).use data to update matching documents");
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(BsonFromCsvRequest request, BsonResponse response)Function<io.undertow.server.HttpServerExchange,BsonFromCsvRequest>request()Consumer<io.undertow.server.HttpServerExchange>Function<io.undertow.server.HttpServerExchange,BsonResponse>response()Consumer<io.undertow.server.HttpServerExchange>Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.restheart.plugins.ExchangeTypeResolver
requestType, responseTypeMethods inherited from interface org.restheart.plugins.Service
handleOptions
-
Field Details
-
FILTER_PROPERTY
- See Also:
- Constant Field Values
-
-
Constructor Details
-
CsvLoader
public CsvLoader()
-
-
Method Details
-
handle
- Specified by:
handlein interfaceService<BsonFromCsvRequest,BsonResponse>- Throws:
Exception
-
requestInitializer
- Specified by:
requestInitializerin interfaceService<BsonFromCsvRequest,BsonResponse>
-
responseInitializer
- Specified by:
responseInitializerin interfaceService<BsonFromCsvRequest,BsonResponse>
-
request
- Specified by:
requestin interfaceService<BsonFromCsvRequest,BsonResponse>
-
response
- Specified by:
responsein interfaceService<BsonFromCsvRequest,BsonResponse>
-