Nessuna descrizione
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

query.go 390B

12345678910111213141516
  1. package functions
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "git.x2erp.com/qdy/go-base/types"
  5. "git.x2erp.com/qdy/go-db/factory"
  6. )
  7. // 执行查询,返回JSON格式数据
  8. func QueryToJSON(dbFactory *factory.DBFactory) func(c *gin.Context, req types.QueryRequest) {
  9. return func(c *gin.Context, req types.QueryRequest) {
  10. result := dbFactory.QueryToJSON(req.SQL)
  11. c.JSON(200, result)
  12. }
  13. }