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:
Ciro Spaciari
2025-08-21 15:28:15 -07:00
committed by GitHub
parent efdbe3b54f
commit ecbf103bf5
107 changed files with 10184 additions and 1387 deletions

View File

@@ -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);