WQL

WQL, pronounced "wuckle", stands for Wagn Query Language — a query language based on an organic wiki structure.


WQL provides syntax for finding lists of cards, a staple of Wagn sites.

 

Examples

The following is a search card for all the User cards:

If you edited that card, you would find the following WQL query:

{ "type": "User" }

which roughly translates to:

Find all cards of the type "User."

or, more casually:

Gimme all the User cards.

See many more examples at WQL Syntax.

 

How To

To create a search, you set a card's type to Search and then enter WQL Syntax.

 

(Note for developers: in Search cards, WQL is expressed in JSON, but in the code, it can be expressed in Ruby.)

 

Tips

  • There are two main ways of creating lists on Wagn: by Pointers, in which users create lists manually, and by Searches which use WQL to find cards dynamically.
  • You can specify views for the items returned by a WQL query, which is how a lot of Wagn's presentation powers are manifested.
 
  • View
  • Changes
  • Options
  • Related
  • Edit

  • I'm having a WQL problem and don't know where to ask for help.

     

    My User cards have a +Locations Visited pointer, and I want a Location+Visitors to be a search that lists everyone who included the location in their Locations Visited plus card.

     

    Visitors+*rform looks like this:

    {"plus":["Locations Visited", {"refer_to":"_left"}]}

     

    Which gives me this:

    NoMethodError: undefined method `to_key' for nil:NilClass

     

    If I replace "_left" with the location name in quotes, it works.

     

    What do I need to do to make it work? Also, I'd be happy to move this discussion elsewhere if it doesn't belong.

      --Brandon Quinn.....Mon Oct 12 12:29:36 -0700 2009


    try "_self" instead of "_left". Currently, "_self" refers to the card on which the search is based (ie, the left card), *not* to the search card itself. This is inexcusably confusing, so we're very likely to introduce and migrate to a new nomenclature eventually, but we haven't really determined the best solution yet.

     

    Re belonging, we're now moving to a system where we're trying to steer most of these questions through "support tickets", where we think our community of power users will be more likely to see it. But no need to move this one :)

      --Ethan McCutchen.....Mon Oct 12 13:06:54 -0700 2009

    try it

     

    wagneers

    intro

    videos

    features

    syntax

    weekly calls

    ideas

     

    twitter

    mailing list

     

    developers

    roadmap

    next release

    tickets

    pack API

    REST API

    one-pager

     

    github

    mailing list

     

    wagn.org

    recent

    todo