Package | Description |
---|---|
org.restsql.core |
Contains core framework interfaces, an API for deployments that use
restSQL as a library, rather than an HTTP service.
|
org.restsql.core.impl |
Contains core framework implementation.
|
org.restsql.core.impl.mysql | |
org.restsql.core.impl.postgresql | |
org.restsql.core.impl.serial | |
org.restsql.core.sqlresource |
Contains classes that model the SQL Resource definition XML document.
|
org.restsql.service |
Contains HTTP interface classes.
|
Modifier and Type | Class and Description |
---|---|
static class |
Factory.SqlResourceFactoryException
Indicates an error in creating a SQL Resource object from a definition.
|
class |
InvalidRequestException
Exception is thrown when a request does not meet expectations.
|
Modifier and Type | Method and Description |
---|---|
void |
Trigger.afterDelete(Request request) |
void |
AbstractTrigger.afterDelete(Request request) |
void |
Trigger.afterInsert(Request request) |
void |
AbstractTrigger.afterInsert(Request request) |
void |
Trigger.afterSelect(Request request) |
void |
AbstractTrigger.afterSelect(Request request) |
void |
Trigger.afterUpdate(Request request) |
void |
AbstractTrigger.afterUpdate(Request request) |
void |
Trigger.beforeDelete(Request request) |
void |
AbstractTrigger.beforeDelete(Request request) |
void |
Trigger.beforeInsert(Request request) |
void |
AbstractTrigger.beforeInsert(Request request) |
void |
Trigger.beforeSelect(Request request) |
void |
AbstractTrigger.beforeSelect(Request request) |
void |
Trigger.beforeUpdate(Request request) |
void |
AbstractTrigger.beforeUpdate(Request request) |
WriteResponse |
RequestDeserializer.execWrite(HttpRequestAttributes httpAttributes,
Request.Type requestType,
List<RequestValue> resIds,
SqlResource sqlResource,
String requestBody,
RequestLogger requestLogger)
Executes write request.
|
int |
SequenceManager.getCurrentValue(Connection connection,
String sequenceName)
Retrieves current sequence value.
|
static Request |
Factory.getRequest(HttpRequestAttributes httpAttributes)
Builds request from URI.
|
Request |
Factory.RequestFactory.getRequest(HttpRequestAttributes httpAttributes) |
static RequestDeserializer |
Factory.getRequestDeserializer(String mediaType)
Returns request deserializer.
|
RequestDeserializer |
Factory.RequestDeserializerFactory.getRequestDeserializer(String mediaType) |
static ResponseSerializer |
Factory.getResponseSerializer(String mediaType)
Returns response serializer for media type.
|
ResponseSerializer |
Factory.ResponseSerializerFactory.getResponseSerializer(String mediaType) |
static SqlResource |
Factory.getSqlResource(String resName)
Returns SQL Resource for named resource.
|
SqlResource |
Factory.SqlResourceFactory.getSqlResource(String resName) |
static SqlResourceMetaData |
Factory.getSqlResourceMetaData(String resName,
SqlResourceDefinition definition,
SqlBuilder sqlBuilder)
Returns meta data object for definition.
|
void |
SqlResourceMetaData.init(String sqlResourceName,
SqlResourceDefinition definition,
SqlBuilder sqlBuilder) |
List<Map<String,Object>> |
SqlResource.read(Request request)
Executes query returning results as an object collection.
|
String |
SqlResource.read(Request request,
String mediaType)
Executes query returning results as a string.
|
static void |
Factory.reloadSqlResource(String resName)
Reloads definition from the source using configured SqlResourceFactory.
|
void |
Factory.SqlResourceFactory.reloadSqlResource(String resName) |
void |
SequenceManager.setNextValue(Connection connection,
String table,
String sequenceName,
int nextval,
boolean printAction)
Resets sequence to desired value.
|
WriteResponse |
SqlResource.write(Request request)
Executes database write (insert, update or delete).
|
Modifier and Type | Method and Description |
---|---|
static void |
TriggerManager.executeTriggers(String sqlResource,
Request request,
boolean before)
Executes all trigger defined for the resource.
|
int |
AbstractSequenceManager.getCurrentValue(Connection connection,
String sequenceName) |
Request |
RequestFactoryImpl.getRequest(HttpRequestAttributes httpAttributes)
Builds request from URI.
|
SqlResource |
SqlResourceFactoryImpl.getSqlResource(String resName) |
void |
AbstractSqlResourceMetaData.init(String resName,
SqlResourceDefinition definition,
SqlBuilder sqlBuilder)
Populates metadata using definition.
|
List<Map<String,Object>> |
SqlResourceImpl.read(Request request)
Executes query returning results as an object collection.
|
String |
SqlResourceImpl.read(Request request,
String mediaType)
Executes query returning results as a string.
|
void |
SqlResourceFactoryImpl.reloadSqlResource(String resName)
Reloads definition using the current file.
|
WriteResponse |
SqlResourceImpl.write(Request request)
Executes database write (insert, update or delete).
|
Constructor and Description |
---|
SqlResourceImpl(String name,
SqlResourceDefinition definition,
SqlResourceMetaData metaData,
SqlBuilder sqlBuilder,
List<Trigger> triggers) |
Modifier and Type | Method and Description |
---|---|
void |
MySqlSequenceManager.setNextValue(Connection connection,
String table,
String sequenceName,
int nextval,
boolean printAction) |
Modifier and Type | Method and Description |
---|---|
void |
PostgreSqlSequenceManager.setNextValue(Connection connection,
String table,
String sequenceName,
int nextval,
boolean printAction) |
Modifier and Type | Method and Description |
---|---|
WriteResponse |
XmlRequestDeserializer.execWrite(HttpRequestAttributes httpAttributes,
Request.Type requestType,
List<RequestValue> resIds,
SqlResource sqlResource,
String requestBody,
RequestLogger requestLogger)
Executes write request.
|
WriteResponse |
JsonRequestDeserializer.execWrite(HttpRequestAttributes httpAttributes,
Request.Type requestType,
List<RequestValue> resIds,
SqlResource sqlResource,
String requestBody,
RequestLogger requestLogger) |
RequestDeserializer |
RequestDeserializerFactoryImpl.getRequestDeserializer(String mediaType)
Returns request deserializer for media type.
|
ResponseSerializer |
ResponseSerializerFactoryImpl.getResponseSerializer(String mediaType)
Returns response serializer for media type.
|
Modifier and Type | Method and Description |
---|---|
static void |
SqlResourceDefinitionUtils.validate(SqlResourceDefinition definition)
Throws SqlResourceException if definition meets one of the following criteria:
No query element
No metadata element
No database element with default database name
No Parent table element
More than one Parent, Child or Join table elements
|
Modifier and Type | Method and Description |
---|---|
static javax.ws.rs.core.Response |
HttpRequestHelper.handleException(javax.servlet.http.HttpServletRequest httpRequest,
String requestBody,
String requestMediaType,
SqlResourceException exception,
RequestLogger requestLogger)
Determines exception type, logs issue and returns appropriate http status with the exception message in the body.
|
Copyright © 2011-2018 restSQL Project Contributors