The Lewis card (which has id 27)
{ :name=> 'Lewis' } # OR
{ :id=> 27 } # OR
'Lewis' #OR
27
All of the following are hashes -- the outer {} is implicitCards with "lew" in the name
:name => [:match, 'lew'] #OR
:name => ['~', 'lew']
All company cards
:type => :Company #codename OR
:type => 'Company' #cardname
All company cards
:type => :Company #codename OR
:type => 'Company' #cardname
Cards where the content is 'off':
:content => [:eq, 'off'] #OR
:content => ['=', 'off] #OR
:content => 'off' #OR
:eq => 'off' #OR
'=' => 'off'
Cards where the content is "30".
:content => 30 #OR
:content => '30' #OR
:eq => 30 .....
Cards where the content matches 'pleeze':
:content => [:match, 'pleeze'] #OR
:content => ['~', 'pleeze'] #or, I guess... :val => %{ ~ pleeze } OR
:match => 'pleeze' #OR
'~' => 'pleeze'
Cards where the content is greater than "30"
:content => ['>', 30] #OR
:content => [:gt, 30] #OR
:gt => 30
'~' => 30
Cards where the cardtype is Person or Company
:type => [:in, 'Person', :Company]
Cards with SiteMaster role
:role => 'SiteMaster' #returns cards with user (account) extension OR
:role => 4 #role id
Cards with Anonymous role
:role => :anon
Role Cards of roles that Lewis belongs to
:member => 'Lewis' #returns role cards (cards with role extension). OR
:member => 27 # user id
Cards Lewis has edited
:editor => 'Lewis' # OR
:editor => 27 # user id
(note we could also do card defs for these role,user, and cardtype things eventually, but I don't think it's pressing)
Cards connected to Lewis card
:plus => [ {:name => 'Lewis' }, nil ] # full plus def -- [part, connection] OR
:plus => ['Lewis', nil ] # full plus def -- [part, connection] OR
:plus => { :name=>'Lewis' } # if only one card def, assumes part OR
:plus => 'Lewis' #card def shorthand with name OR
:plus => 27 #card def shorthand with id
Cards with a connection card that is a date
:plus => [nil, { :type =>'Date' }]
Cards that connect to Lewis and form Image cards
:plus => ['Lewis', { :type => 'Image' }]
Connection cards of which Lewis is part
:part => {:name=>'Lewis' } #OR
:part => 'Lewis'
Connection cards of which Lewis is the right part
:right=>'Lewis'
Image cards that are connections of which Lewis is part
:type => 'Image',
:part => 'Lewis'
Cards that link to -- or transclude -- 'Site Map'
:refer_to => { :name => 'Site Map' } #OR
:refer_to => 'Site Map'
Card that are linked to or transcluded by 'Foo'
:referred_to_by => 'Foo'
Cards that link to 'Site Map'
:link_to => 'Site Map'
Cards that transclude 'Site Map'
:include => 'Site Map'
Cards with broken links
:link_to => :_none
Cards that are linked to from - or transcluded by - 'Site Map'
:included_by => 'Site Map'
Cards that are linked to from 'Site Map'
:linked_to_by => 'Site Map'
Organizations that work for Immigrants in Lane County (where both are connected to the organization by pointers
:type => 'Organization',
:plus => ['place', { :refer_to => 'Lane County' } ],
:plus => ['topic', { :refers_to => 'Immigrants' } ]
CONTEXT: LEWIS CARD
Cards Lewis has edited
:editor => :_self
Cards connected to Lewis card
:plus => :_self
CONTEXT: COMPANY CARD
Company Cards
:type => :_self
CONTEXT: Lewis+address
Lewis+state Card
:left=> :_left,
:right=>'state'
Cards Lewis has edited
:editor => :_left
Up to 20 User cards
:type => :User,
:limit => 20
User cards in alphabetical order
:type => :User,
:sort => :alpha
User cards in alphabetical order, number 20 to 40
:type => :User,
:sort => :alpha,
:limit => '20,20' #or however that works in SQL
User cards in reverse alphabetical order
:type => :User,
:sort => :alpha,
:dir => :desc
Cards that are commonly connected to Company cards
:plus => {:type=>'Company'},
:sort => :plusses
NOTE Sort orders: :alpha, :update, :create, :plusses (kind of thinking last edit should be default?)
Number of user cards
:type => :User,
:return => :count
NOTE Return values: :list, :count (for first we just do limit 1...)FUTURE:
(I don't think we should bother with this yet)
Card that are Address cards or have "home" as their tag
:or => { :type=>:Address,
:right => 'home' }