summaryrefslogtreecommitdiff
path: root/ext/librethinkdbxx/test/upstream/regression/469.yaml
blob: 6c399aeae80325affbadc674feac427ca6fec928 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
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})