public interface SqlResource
Modifier and Type | Method and Description |
---|---|
SqlResourceDefinition |
getDefinition()
Returns SQL resource information defined by the user, including query, validated attributes and trigger.
|
SqlResourceMetaData |
getMetaData()
Returns meta data for SQL resource.
|
String |
getName()
Returns SQL resource name.
|
List<Trigger> |
getTriggers()
Returns triggers classes.
|
List<Map<String,Object>> |
read(Request request)
Executes query returning results as an object collection.
|
String |
read(Request request,
String mediaType)
Executes query returning results as a string.
|
WriteResponse |
write(Request request)
Executes database write (insert, update or delete).
|
SqlResourceDefinition getDefinition()
String getName()
SqlResourceMetaData getMetaData()
List<Map<String,Object>> read(Request request) throws SqlResourceException
request
- Request objectSqlResourceException
- if a database access error occursString read(Request request, String mediaType) throws SqlResourceException
request
- Request objectmediaType
- response format, use internet media type e.g. application/xmlSqlResourceException
- if a database access error occursWriteResponse write(Request request) throws SqlResourceException
request
- Request objectSqlResourceException
- if the request is invalid or a database access error or trigger exception occursCopyright © 2011-2018 restSQL Project Contributors