You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@s2graph.apache.org by "Daewon Jeong (JIRA)" <ji...@apache.org> on 2018/04/11 08:19:00 UTC
[jira] [Assigned] (S2GRAPH-194) Provides a way to remove `service`
[ https://issues.apache.org/jira/browse/S2GRAPH-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daewon Jeong reassigned S2GRAPH-194:
------------------------------------
Assignee: Daewon Jeong
> Provides a way to remove `service`
> -----------------------------------
>
> Key: S2GRAPH-194
> URL: https://issues.apache.org/jira/browse/S2GRAPH-194
> Project: S2Graph
> Issue Type: Bug
> Reporter: Daewon Jeong
> Assignee: Daewon Jeong
> Priority: Minor
>
> I was looking for a bug while looking at the API to create the `deleteService` function in `graphql`.
> The code below is a management API that delete the service.
> {noformat}
>
> def delete (id: Int) (implicit session: DBSession = AutoSession) = \{
> val service = findById (id)
> val serviceName = service.serviceName
> sql "" delete from service_columns where id = $ {id} "". execute.apply ()
> val cacheKeys = List (s "id = $ id", s "serviceName = $ serviceName")
> cacheKeys.foreach \{key =>
> expireCache (key)
> expireCaches (key)
> }
> }
> {noformat}
> After deleting all of the serviceColumns associated with it, but there is no part to erase the service.
> Improvement direction.
> # Check whether the label associated with the service exists
> # Add a friendly error message (change return type from Boolean to Try)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)