I can't get data in datatables... but I can get a record
I'm using beego and PostgreSQL.
This is the controller
func (c *UploadController) AjaxData(){
var Qtab datatables.Data
Qtab.Ctx = c.Input()//datatables get
Qtab.DBName = "upload"
Qtab.TableName = "uploads" //modles tables name
Qtab.Columns = []string{"Id","AppId","ProspectId","DocType","Path"} //datatables columns arrange
Qtab.Order = []string{"","AppId","ProspectId","DocType","Path"}
Qtab.SearchFilter = []string{"DocType","Path"} //datatables filter
datatables.RegisterColumns[Qtab.TableName] = new([]models.User) //register result
rs , _ := Qtab.Table()
c.Data["json"] = rs
c.ServeJSON()
//
{
"data": [],
"draw": 0,
"recordsFiltered": 6,
"recordsTotal": 6
}