mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
Refactor Zig imports and file structure (part 1) (#21270)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
pub fn createBinding(globalObject: *JSC.JSGlobalObject) JSValue {
|
||||
pub fn createBinding(globalObject: *jsc.JSGlobalObject) JSValue {
|
||||
const binding = JSValue.createEmptyObjectWithNullPrototype(globalObject);
|
||||
binding.put(globalObject, ZigString.static("PostgresSQLConnection"), PostgresSQLConnection.js.getConstructor(globalObject));
|
||||
binding.put(globalObject, ZigString.static("init"), JSC.JSFunction.create(globalObject, "init", PostgresSQLContext.init, 0, .{}));
|
||||
binding.put(globalObject, ZigString.static("init"), jsc.JSFunction.create(globalObject, "init", PostgresSQLContext.init, 0, .{}));
|
||||
binding.put(
|
||||
globalObject,
|
||||
ZigString.static("createQuery"),
|
||||
JSC.JSFunction.create(globalObject, "createQuery", PostgresSQLQuery.call, 6, .{}),
|
||||
jsc.JSFunction.create(globalObject, "createQuery", PostgresSQLQuery.call, 6, .{}),
|
||||
);
|
||||
|
||||
binding.put(
|
||||
globalObject,
|
||||
ZigString.static("createConnection"),
|
||||
JSC.JSFunction.create(globalObject, "createQuery", PostgresSQLConnection.call, 2, .{}),
|
||||
jsc.JSFunction.create(globalObject, "createQuery", PostgresSQLConnection.call, 2, .{}),
|
||||
);
|
||||
|
||||
return binding;
|
||||
@@ -25,6 +25,6 @@ pub const types = @import("./postgres/PostgresTypes.zig");
|
||||
|
||||
const bun = @import("bun");
|
||||
|
||||
const JSC = bun.JSC;
|
||||
const JSValue = JSC.JSValue;
|
||||
const ZigString = JSC.ZigString;
|
||||
const jsc = bun.jsc;
|
||||
const JSValue = jsc.JSValue;
|
||||
const ZigString = jsc.ZigString;
|
||||
|
||||
Reference in New Issue
Block a user