mirror of
https://github.com/oven-sh/bun
synced 2026-02-17 14:22:01 +00:00
feat(MYSQL) Bun.SQL mysql support (#21968)
### What does this PR do? Add MySQL support, Refactor will be in a followup PR ### How did you verify your code works? A lot of tests --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: cirospaciari <6379399+cirospaciari@users.noreply.github.com>
This commit is contained in:
@@ -64,6 +64,7 @@ typedef union DataCellValue {
|
||||
double number;
|
||||
int32_t integer;
|
||||
int64_t bigint;
|
||||
uint64_t unsigned_bigint;
|
||||
uint8_t boolean;
|
||||
double date;
|
||||
double date_with_time_zone;
|
||||
@@ -90,6 +91,7 @@ enum class DataCellTag : uint8_t {
|
||||
TypedArray = 11,
|
||||
Raw = 12,
|
||||
UnsignedInteger = 13,
|
||||
UnsignedBigint = 14,
|
||||
};
|
||||
|
||||
enum class BunResultMode : uint8_t {
|
||||
@@ -161,6 +163,9 @@ static JSC::JSValue toJS(JSC::VM& vm, JSC::JSGlobalObject* globalObject, DataCel
|
||||
case DataCellTag::Bigint:
|
||||
return JSC::JSBigInt::createFrom(globalObject, cell.value.bigint);
|
||||
break;
|
||||
case DataCellTag::UnsignedBigint:
|
||||
return JSC::JSBigInt::createFrom(globalObject, cell.value.unsigned_bigint);
|
||||
break;
|
||||
case DataCellTag::Boolean:
|
||||
return jsBoolean(cell.value.boolean);
|
||||
break;
|
||||
@@ -317,7 +322,6 @@ static JSC::JSValue toJS(JSC::Structure* structure, DataCell* cells, uint32_t co
|
||||
ASSERT(!cell.isIndexedColumn());
|
||||
ASSERT(cell.isNamedColumn());
|
||||
if (names.has_value()) {
|
||||
|
||||
auto name = names.value()[i];
|
||||
object->putDirect(vm, Identifier::fromString(vm, name.name.toWTFString()), value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user