Interface DatabaseApi
public interface DatabaseApi
This API is for creating, listing, and deleting a Database
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Same as create(String, null, null)void
This operation creates a new database within the specified instance.boolean
This operation deletes the specified database for the specified database instance.com.google.common.collect.FluentIterable
<String> list()
This operation lists the databases for the specified database instance.
-
Method Details
-
create
@Named("database:create") @POST @Path("/databases") @Consumes("application/json") void create(String database) Same as create(String, null, null)- See Also:
-
create
@Named("database:create") @POST @Path("/databases") @Consumes("application/json") void create(String database, String character_set, String collate) This operation creates a new database within the specified instance.- Parameters:
database
- The name of the database to be createdcharacter_set
- Optional. Set of symbols and encodings. The default character set is utf8.collate
- Optional. Set of rules for comparing characters in a character set. The default value for collate is utf8_general_ci.
-
delete
@Named("databases:delete") @DELETE @Path("/databases/{name}") @Consumes("application/json") boolean delete(@PathParam("name") String databaseName) This operation deletes the specified database for the specified database instance.- Parameters:
databaseName
- The name for the specified database.- Returns:
- true if successful.
-
list
@Named("database:list") @GET @Path("/databases") @Consumes("application/json") com.google.common.collect.FluentIterable<String> list()This operation lists the databases for the specified database instance.- Returns:
- The list of Databases.
-