Skip to content

Instantly share code, notes, and snippets.

@marshall007
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save marshall007/3f5f0f97329d9f1497f7 to your computer and use it in GitHub Desktop.

Select an option

Save marshall007/3f5f0f97329d9f1497f7 to your computer and use it in GitHub Desktop.
r.table('orders').indexCreate('ordered', function (row) {
return [ row('dateOrdered'), row('labCode'), row('bucketId') ];
})
// works
r.table('orders').between(
[ r.time(2014, 1, 1, 'Z'), '', 'efbe740b-3fb8-496d-894e-a2f100228af4' ],
[ r.time(2014, 6, 30, 'Z'), 'Z', 'efbe740b-3fb8-496d-894e-a2f100228af4' ],
{ index: 'ordered' }
)
// doesn't work
r.table('orders').between(
[ r.time(2014, 1, 1, 'Z'), null, 'efbe740b-3fb8-496d-894e-a2f100228af4' ],
[ r.time(2014, 6, 30, 'Z'), null, 'efbe740b-3fb8-496d-894e-a2f100228af4' ],
{ index: 'ordered' }
)
// => RqlRuntimeError: Array keys can only contain numbers, strings, bools, pseudotypes, or arrays (got null of type NULL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment