Skip to content

Commit

Permalink
resync
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Nov 18, 2023
1 parent 4afe053 commit 4a38992
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const conn = new db('CSV', '/tmp')
var result;

// Test query
result = conn.query("SELECT version()");
result = conn.query("SELECT version(), chdb()");
console.log(result)

// Test session
Expand Down
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { dlopen, FFIType, suffix, CString, ptr } from "bun:ffi";

const path = `lib/libchdb_bun.${suffix}`;
Expand Down
1 change: 1 addition & 0 deletions lib/binding.bun
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ export function Execute(query: string, format: string): string {
if (result === null) {
throw new Error('Out of memory');
}
defer free_result(result)
return result;
}
5 changes: 4 additions & 1 deletion lib/libchdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ struct local_result

const char* ares_query(const char* queryStr, const char* format);
struct local_result* query_stable(int arg, char ** argv);
struct local_result * queryToBuffer(const char *queryStr, const char *format);
struct local_result* queryToBuffer(const char *queryStr, const char *format);

#ifdef __cplusplus
}

void free_result(local_result * result);

#endif

#endif

0 comments on commit 4a38992

Please sign in to comment.