Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing methods #36

Open
bhamon opened this issue Feb 22, 2024 · 5 comments
Open

missing methods #36

bhamon opened this issue Feb 22, 2024 · 5 comments

Comments

@bhamon
Copy link

bhamon commented Feb 22, 2024

It seems that there is a diff between the online documentation (https://docs.surrealdb.com/docs/integration/sdks/nodejs) and the actual implemented methods.

Website:

connect
close
use
info
signup
signin
invalidate
authenticate
let
unset
query
select
create
insert
update
merge
patch
delete

Source (from src/lib.rs and index.d.ts):

connect
use
set
signup
signin
invalidate
authenticate
unset
query
select
create
update
merge
patch
delete
version
health

Diff (red for missing methods, green for extra ones):

< close
< info
< let
< insert
---
> set
> version
> health

Which version is right?

@rodneysantos
Copy link

Hey, I'm unsure if this will help, but I switched to surrealdb.js, and everything is there (I think).

@bhamon
Copy link
Author

bhamon commented Feb 23, 2024

Unfortunately I need the embedded RocksDB support for my project.
The most important missing method for me is close to properly close the db between restarts (related to #32).

@4F2E4A2E
Copy link

4F2E4A2E commented Apr 8, 2024

I am missing the close function as well, only v0.3.0 on npm atm.
Here is the content of node_modules/.pnpm/[email protected]/node_modules/surrealdb.node/index.d.ts

/* tslint:disable */
/* eslint-disable */

/* auto-generated by NAPI-RS */

export class Surreal {
  constructor()
  connect(endpoint: string, opts?: any | undefined | null): Promise<void>
  use(value: any): Promise<void>
  set(key: string, value: any): Promise<void>
  unset(key: string): Promise<void>
  signup(credentials: any): Promise<any>
  signin(credentials: any): Promise<any>
  invalidate(): Promise<void>
  authenticate(token: string): Promise<void>
  query(sql: string, bindings?: any | undefined | null): Promise<any>
  select(resource: string): Promise<any>
  create(resource: string, data?: any | undefined | null): Promise<any>
  update(resource: string, data?: any | undefined | null): Promise<any>
  merge(resource: string, data: any): Promise<any>
  patch(resource: string, data: any): Promise<any>
  delete(resource: string): Promise<any>
  version(): Promise<any>
  health(): Promise<void>
}

@micovi
Copy link

micovi commented May 3, 2024

Hello, is there any status for the missing functions? I am particulary interested in insert method.

@Luxbit
Copy link

Luxbit commented May 6, 2024

It would be nice to have interface consistency between the different libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants