This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhangyang-zerotierone/ext/librethinkdbxx/test/upstream/regression/469.yaml
2017-11-02 07:05:11 -07:00

140 lines
5.0 KiB
YAML

desc: Issue #469: add pkey term
tests:
- cd: r.db_create('d469')
ot: partial({'dbs_created':1})
- cd: r.db('d469').table_create('t469')
ot: partial({'tables_created':1})
- cd: r.db('d469').table('t469').index_create('x')
ot: {'created':1}
- cd: r.db('d469').table('t469').index_wait('x').pluck('index', 'ready')
ot: [{'ready':True, 'index':'x'}]
- cd: r.minval.info()
ot: {'type':'MINVAL'}
- cd: r.maxval.info()
ot: {'type':'MAXVAL'}
- cd: r(null).info()
py: r.expr(null).info()
ot: {'type':'NULL'}
- rb: r(true).info
py: r.expr(True).info()
js: r(true).info()
ot: {'type':'BOOL','value':'true'}
- rb: r(1).info
py: r.expr(1).info()
js: r(1).info()
ot: {'type':'NUMBER','value':'1'}
- rb: r('1').info
py: r.expr('1').info()
js: r('1').info()
ot: {'type':'STRING','value':('"1"')}
- rb: r([1]).info
py: r.expr([1]).info()
js: r([1]).info()
ot: {'type':'ARRAY','value':"[\n\t1\n]"}
- rb: r({:a => 1}).info
py: r.expr({'a':1}).info()
js: r({a:1}).info()
ot: {'type':'OBJECT','value':"{\n\t\"a\":\t1\n}"}
- cd: r.db('d469').info()
ot: partial({'type':'DB','name':'d469'})
- cd: r.db('d469').table('t469').info()
ot: {'type':'TABLE','name':'t469','id':uuid(),
'db':{'type':'DB','name':'d469','id':uuid()},
'primary_key':'id', 'indexes':['x'], 'doc_count_estimates':[0]}
- rb: r.db('d469').table('t469').filter{true}.info
py: r.db('d469').table('t469').filter(lambda x:True).info()
js: r.db('d469').table('t469').filter(function(x) { return true; }).info()
ot: {'type':'SELECTION<STREAM>',
'table':{'type':'TABLE','name':'t469','id':uuid(),
'db':{'type':'DB','name':'d469','id':uuid()},
'primary_key':'id', 'indexes':['x'], 'doc_count_estimates':[0]}}
- rb: r.db('d469').table('t469').map{|x| 1}.info
py: r.db('d469').table('t469').map(lambda x:1).info()
js: r.db('d469').table('t469').map(function(x) { return 1; }).info()
ot: {'type':'STREAM'}
- cd: r.db('d469').table('t469').between(0, 1).info()
ot: {'index':'id',
'left_bound':0,
'left_bound_type':'closed',
'right_bound':1,
'right_bound_type':'open',
'sorting':'UNORDERED',
'table':{'db':{'id':uuid(), 'name':'d469', 'type':'DB'},
'doc_count_estimates':[0],
'id':uuid(),
'indexes':['x'],
'name':'t469',
'primary_key':'id',
'type':'TABLE'},
'type':'TABLE_SLICE'}
- cd: r.db('d469').table('t469').between(0, 1, {index:'a'}).info()
py: r.db('d469').table('t469').between(0, 1, index='a').info()
ot: {'index':'a',
'left_bound':0,
'left_bound_type':'closed',
'right_bound':1,
'right_bound_type':'open',
'sorting':'UNORDERED',
'table':{'db':{'id':uuid(), 'name':'d469', 'type':'DB'},
'doc_count_estimates':[0],
'id':uuid(),
'indexes':['x'],
'name':'t469',
'primary_key':'id',
'type':'TABLE'},
'type':'TABLE_SLICE'}
- cd: r.db('d469').table('t469').order_by({index:'a'}).between(0, 1, {index:'a'}).info()
py: r.db('d469').table('t469').order_by(index='a').between(0, 1, index='a').info()
ot: {'index':'a',
'left_bound':0,
'left_bound_type':'closed',
'right_bound':1,
'right_bound_type':'open',
'sorting':'ASCENDING',
'table':{'db':{'id':uuid(), 'name':'d469', 'type':'DB'},
'doc_count_estimates':[0],
'id':uuid(),
'indexes':['x'],
'name':'t469',
'primary_key':'id',
'type':'TABLE'},
'type':'TABLE_SLICE'}
- cd: r.db('d469').table('t469').between(r.minval, r.maxval).info()
ot: {'index':'id',
'left_bound_type':'unbounded',
'right_bound_type':'unbounded',
'sorting':'UNORDERED',
'table':{'db':{'id':uuid(), 'name':'d469', 'type':'DB'},
'doc_count_estimates':[0],
'id':uuid(),
'indexes':['x'],
'name':'t469',
'primary_key':'id',
'type':'TABLE'},
'type':'TABLE_SLICE'}
- cd: r.db('d469').table('t469').between(r.maxval, r.minval).info()
ot: {'index':'id',
'left_bound_type':'unachievable',
'right_bound_type':'unachievable',
'sorting':'UNORDERED',
'table':{'db':{'id':uuid(), 'name':'d469', 'type':'DB'},
'doc_count_estimates':[0],
'id':uuid(),
'indexes':['x'],
'name':'t469',
'primary_key':'id',
'type':'TABLE'},
'type':'TABLE_SLICE'}
- cd: r.db_drop('d469')
ot: partial({'dbs_dropped':1})