Sha256: 364bbf522475fc5af44ae33aee3e61f17dfd7518a18677c195f928cf53aede28

Contents?: true

Size: 1.78 KB

Versions: 6

Compression:

Stored size: 1.78 KB

Contents

default:
  context:
    node_name: '@node'
    node: 'cleanWater'
    visitor: 'ant'
  src: "blogs where blog.title = 'a wiki with Zena' in site"
  sql: "%Q{SELECT nodes.* FROM idx_projects AS sc1,nodes WHERE #{secure_scope('nodes')} AND sc1.blog_title = 'a wiki with Zena' AND nodes.id = sc1.node_id AND nodes.kpath LIKE 'NPPB%' ORDER BY nodes.zip ASC}"
  res: 'a wiki with Zena'

# CUSTOM TABLE BASED INDEX

get_kpath_from_class:
  src: "blogs where contact.name = 'xx' in site"
  sql: "%Q{SELECT nodes.* FROM idx_projects AS sc1,nodes WHERE #{secure_scope('nodes')} AND sc1.contact_name = 'xx' AND nodes.id = sc1.node_id AND nodes.kpath LIKE 'NPPB%' ORDER BY nodes.zip ASC}"

get_kpath_from_class_with_function:
  src: "blogs where tag.created_at.year = 'xx' in site"
  sql: "%Q{SELECT nodes.* FROM idx_projects AS sc1,nodes WHERE #{secure_scope('nodes')} AND year(sc1.tag_created_at) = 'xx' AND nodes.id = sc1.node_id AND nodes.kpath LIKE 'NPPB%' ORDER BY nodes.zip ASC}"

many_keys:
  src: "blogs where blog.title = 'a wiki with Zena' and contact.name = 'cont' in site"
  sql: "%Q{SELECT nodes.* FROM idx_projects AS sc1,nodes WHERE #{secure_scope('nodes')} AND sc1.blog_title = 'a wiki with Zena' AND sc1.contact_name = 'cont' AND nodes.id = sc1.node_id AND nodes.kpath LIKE 'NPPB%' ORDER BY nodes.zip ASC}"
  res: 'a wiki with Zena'

or_keys:
  src: "blogs where blog.title = 'bad' or contact.name = 'cont' in site"
  sql: "%Q{SELECT nodes.* FROM idx_projects AS sc1,nodes WHERE #{secure_scope('nodes')} AND ((sc1.blog_title = 'bad' AND nodes.id = sc1.node_id) OR (sc1.contact_name = 'cont' AND nodes.id = sc1.node_id)) AND nodes.kpath LIKE 'NPPB%' GROUP BY nodes.id ORDER BY nodes.zip ASC}"
  res: 'a wiki with Zena'

id_key:
  src: "blogs where id = 29 in site"
  sql: '!/idx_projects/'
  res: 'a wiki with Zena'

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
zena-1.1.1 test/integration/query_node/idx_scope.yml
zena-1.1.0 test/integration/query_node/idx_scope.yml
zena-1.0.0 test/integration/query_node/idx_scope.yml
zena-1.0.0.rc3 test/integration/query_node/idx_scope.yml
zena-1.0.0.rc2 test/integration/query_node/idx_scope.yml
zena-1.0.0.rc1 test/integration/query_node/idx_scope.yml