Skip to content

Commit

Permalink
🐛 Auto convert varchar from buffer to string
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas2D committed Aug 10, 2021
1 parent 8af2fb3 commit 4344570
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ class Client_Firebird extends Client {
});
})
);
} else if (colVal instanceof Buffer) {
rows[rowIndex][colKey] = colVal.toString("utf8");
}
});
});
Expand Down
1 change: 0 additions & 1 deletion tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ describe("Knex Firebird Dialect", () => {
.insert({ id: 101, account_name: "knex", user_id: 1 });

const users = await knex.select("*").from("users");
console.info(users);
expect(users).toMatchSnapshot();

const accounts = await knex.select("*").from("accounts");
Expand Down

0 comments on commit 4344570

Please sign in to comment.