Issue Details#848 Making queries more flexible and widely used

  • Priority: Normal
  • Number: 848
  • Type: Feature
  • Status: Assigned
  • Age: 1757 Days
  • Assignee: dykam


In an attempt to make queries clearer and easier to use, I've been thinking about a bunch of changes I want to apply:

Structure queries
  • , is a multi-value seperator. E.g.: b:redstone,dirt
  • : is a section separator. E.g. r:we:spawnregion
  • " is the usual thing, allow spaces. E.g. k:"a spaced keyword"
  • = is assignment. E.g.: `
Allow queries in more places.
  • Predefined queries (with variables). Like mixin's.
    Query: chat: a:player-chat p:$0
    Usage: q:chat:Dykam r:40
  • Filters. Basically purge queries with before:0d
Refactor the query object

Possibly transform it into some linked list or nested structure of sorts, where each node is a parameter. You can then easily transform, combine and verify them.

These are my ideas and I will try to get something workable in the next week.


dykam Gravatar

dykam April 1, 2014 1:33 PM

Issue reported.

botsko Gravatar

botsko April 1, 2014 2:17 PM

This sounds like a great plan, it'll help make things more consistent and the stronger the abstraction/query building the easier it'll be to fix.

While you're working on these, try to keep in mind that I'll eventually be restructuring queries a little to fix:

  • bug 836
  • I've always been wanting to abstract out the query building to very easily allow for other syntax, like postgres, sqlite, etc
  • Status → Accepted
dykam Gravatar

dykam April 1, 2014 2:22 PM

Note I was mostly keeping just the QueryParameter object in mind, not the SQL query generation. However the abstractions I have in mind should make query generation easier. More notably, you would be able to add in custom parameters, and have the query generator warn the user that it was unable to process some parameter.

This would make it also easier to implement basic other-sql-query support, by not requiring full support right away.

botsko Gravatar

botsko April 1, 2014 2:23 PM

Ok great. I just wanted to make sure you were aware of pending changes in that area.

botsko Gravatar

botsko April 1, 2014 2:24 PM

  • Assignee → dykam
  • Status → Assigned

Update Issue

Add your comments to this issue!

Creating a free account will let you immediately report issues on this project, as well as comment on existing issues, save your filters, and more!!