{"repo":"SierraSoftworks/connor","free":true,"listed":false,"github":"https://github.com/SierraSoftworks/connor","clone":"git clone https://github.com/SierraSoftworks/connor.git","description":"Connor is a condition evaluator for Go inspired by MongoDB's query language","language":"Go","stars":11,"topics":["golang","conditions","mongodb","mongodb-query-language"],"license":"MIT","category":"data-pipelines","readme_excerpt":"Connor Flexible condition DSL for Go Connor is a simple condition DSL and evaluator for Go inspired by MongoDB's query language. It aims to provide a simple and straightforward means to express conditions against map[string]interface{} objects for everything from rules engines to query tools. Connor only implements a subset of MongoDB's query language, the most commonly used methods, however it has been designed to make adding new operators simple and straightforward should you require them. Example Operators Connor has a number of built in operators which enable you to quickly compare a number of common data structures to one another. The following are supported operators for use in your conditions. Equality $eq Inequality $ne Greater Than $gt Greater Than or Equal $ge Less Than $lt Less Than or Equal $le Set Contains $in Set Excludes $nin String Contains $contains Logical And $and Logical Or $or Custom Operators Connor supports registering your own custom operators for any additional condition evaluation you wish to perform. These operators are registered using the Register() method and are expected to match the following interface: The following is an example of an operator which determines whether the data is nil. You can then use this operator as the following example shows, or specify false to check for non-nil values.","default_branch":null,"files":null,"tree":[],"storefront":"/r/SierraSoftworks","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/SierraSoftworks/connor/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}