Skip to content

Go (Golang) library to parse and apply Kendo data query on a MongoDB database using mgo.

License

Notifications You must be signed in to change notification settings

x22n/kendo-data-query

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3c74d79 · Jul 1, 2019

History

8 Commits
Jun 14, 2019
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019
Jun 14, 2019
Jul 1, 2019
Jul 1, 2019
Jun 14, 2019
Jun 14, 2019
Jul 1, 2019
Jul 1, 2019
Jul 1, 2019

Repository files navigation

Kendo data query for Go

Build Status codecov GoDoc Go Report Card

Go (Golang) library to parse and apply Kendo data query on a MongoDB database using mgo.



Install

go get -u github.com/x22n/kendo-data-query

Examples

Handler example

func MyHandler(w http.ResponseWriter, r *http.Request) {
    ds, err := kendo.NewDataStateFromRequest(ctx.Request)
    if err != nil {
        // Error handling
    }
    ...
    // the following should not be directly in the handler, for reference only
    session, err := mgo.DialWithInfo(mongoDBDialInfo)
    collection := session.DB("db").C("collection")
    dr := ds.Apply(collection)
}

DataResult example

{"data":[{"title":"cat","due":1.98},{"title":"dog","due":8.21},...],"total":325}

Limitations

  • Does not support multiple sorts on base columns BUT supports multiple sorted groups
  • Only supports and logic between filters
  • Only supports avg and sum aggregates

Roadmap

  • Support for or logic between filters
  • Support for complex/nested filters
  • Support for more aggregates

About

Go (Golang) library to parse and apply Kendo data query on a MongoDB database using mgo.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages