StarlaneStudios / cirql

🔧 A flexible SurrealDB ORM & query builder with Zod powered validation 🏋️‍♂️
https://cirql.starlane.studio/
MIT License
205 stars 5 forks source link

timeNow() is not exported from cirql #9

Closed itzjustalan closed 1 year ago

itzjustalan commented 1 year ago

Describe the bug Module '"cirql"' has no exported member 'timeNow'.

Example https://cirql.starlane.studio/docs/guide/basic-usage#raw-query-values--operators

const profile = await cirql.execute({ 
    query: create('organisation').setAll({
        name: 'Example',
        isEnabled: eq('$enable'),
        createdAt: eq(timeNow()) // time::now()
    }),
    schema: Organisation,
    params: {
        enable: true
    }
});

Expected behavior for it to work

Environment:

macjuul commented 1 year ago

We renamed this function a few releases ago. The docs will be updated to reflect this soon.

You can now use

import { time } from 'cirql';

time.now()