app/com/google/strategic/demo/controllers/HomeController.java
public Result db() throws Exception {
        String inputDecoded="";
        HashMap<String, String> sqlResponse = new HashMap<>();
        fullfilmentInput = request().getQueryString("inp");
        inputDecoded = java.net.URLDecoder.decode(fullfilmentInput, "UTF-8");
        sqlOutput= connection.readDatabase(inputDecoded);
        sqlResponse.put("content", sqlOutput);
        return ok(Json.toJson(sqlResponse));

    }
//To generate results to Dialogflow Fullfilment component
To generate results to Dialogflow Fullfilment component
To generate results to Dialogflow Fullfilment component
public Result db() throws Exception {
        String inputDecoded="";
        HashMap<String, String> sqlResponse = new HashMap<>();
        fullfilmentInput = request().getQueryString("inp");
        inputDecoded = java.net.URLDecoder.decode(fullfilmentInput, "UTF-8");
        sqlOutput= connection.readDatabase(inputDecoded);
        sqlResponse.put("content", sqlOutput);
        return ok(Json.toJson(sqlResponse));
    }
public Result db ( ) throws Exception { String inputDecoded = "" ; HashMap < String , String > sqlResponse = new HashMap < > ( ) ; fullfilmentInput = request ( ) . getQueryString ( "inp" ) ; inputDecoded = java . net . URLDecoder . decode ( fullfilmentInput , "UTF-8" ) ; sqlOutput = connection . readDatabase ( inputDecoded ) ; sqlResponse . put ( "content" , sqlOutput ) ; return ok ( Json . toJson ( sqlResponse ) ) ; }
To generate results to Dialogflow Fullfilment component
To generate results to Dialogflow Fullfilment component