cete icon indicating copy to clipboard operation
cete copied to clipboard

Feature Request: Query Language Support

Open adewaleafolabi opened this issue 6 years ago • 1 comments

Cete really works well as KV, however, I'd like to be able to do basic queries also. BadgerHold provides querying a Badger database. Could this be integrated into Cete thank you

BadgerHold Queries

  • Equal - Where("field").Eq(value)
  • Not Equal - Where("field").Ne(value)
  • Greater Than - Where("field").Gt(value)
  • Less Than - Where("field").Lt(value)
  • Less than or Equal To - Where("field").Le(value)
  • Greater Than or Equal To - Where("field").Ge(value)
  • In - Where("field").In(val1, val2, val3)
  • IsNil - Where("field").IsNil()
  • Regular Expression - Where("field").RegExp(regexp.MustCompile("ea"))
  • Matches Function - Where("field").MatchFunc(func(ra *RecordAccess) (bool, error))
  • Skip - Where("field").Eq(value).Skip(10)
  • Limit - Where("field").Eq(value).Limit(10)
  • SortBy - Where("field").Eq(value).SortBy("field1", "field2")
  • Reverse - Where("field").Eq(value).SortBy("field").Reverse()
  • Index - Where("field").Eq(value).Index("indexName")

adewaleafolabi avatar Oct 14 '19 11:10 adewaleafolabi

Genji is able to do this. You can write standard SQL and it runs against badger It uses badger. But also boltdb if you want. But it has no replication. :(

I think that genji and cete project should team up. Or cete should start using the genji lib. Genji is designed as an embedded dB and so it's possible

joeblew99 avatar Dec 24 '19 19:12 joeblew99