@planetscale/database
Advanced tools
Comparing version 1.15.0 to 1.16.0
@@ -222,6 +222,7 @@ "use strict"; | ||
case 'BIT': | ||
case 'VARBINARY': | ||
case 'BINARY': | ||
case 'GEOMETRY': | ||
return (0, text_js_1.uint8Array)(value); | ||
case 'BINARY': | ||
case 'VARBINARY': | ||
return isText(field) ? value : (0, text_js_1.uint8Array)(value); | ||
case 'JSON': | ||
@@ -234,1 +235,14 @@ return value ? JSON.parse((0, text_js_1.decode)(value)) : value; | ||
exports.cast = cast; | ||
var Flags; | ||
(function (Flags) { | ||
Flags[Flags["NONE"] = 0] = "NONE"; | ||
Flags[Flags["ISINTEGRAL"] = 256] = "ISINTEGRAL"; | ||
Flags[Flags["ISUNSIGNED"] = 512] = "ISUNSIGNED"; | ||
Flags[Flags["ISFLOAT"] = 1024] = "ISFLOAT"; | ||
Flags[Flags["ISQUOTED"] = 2048] = "ISQUOTED"; | ||
Flags[Flags["ISTEXT"] = 4096] = "ISTEXT"; | ||
Flags[Flags["ISBINARY"] = 8192] = "ISBINARY"; | ||
})(Flags || (Flags = {})); | ||
function isText(field) { | ||
return ((field.flags ?? 0) & Flags.ISTEXT) === Flags.ISTEXT; | ||
} |
@@ -1,1 +0,1 @@ | ||
export declare const Version = "1.15.0"; | ||
export declare const Version = "1.16.0"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Version = void 0; | ||
exports.Version = '1.15.0'; | ||
exports.Version = '1.16.0'; |
@@ -213,6 +213,7 @@ import { format } from './sanitization.js'; | ||
case 'BIT': | ||
case 'VARBINARY': | ||
case 'BINARY': | ||
case 'GEOMETRY': | ||
return uint8Array(value); | ||
case 'BINARY': | ||
case 'VARBINARY': | ||
return isText(field) ? value : uint8Array(value); | ||
case 'JSON': | ||
@@ -224,1 +225,14 @@ return value ? JSON.parse(decode(value)) : value; | ||
} | ||
var Flags; | ||
(function (Flags) { | ||
Flags[Flags["NONE"] = 0] = "NONE"; | ||
Flags[Flags["ISINTEGRAL"] = 256] = "ISINTEGRAL"; | ||
Flags[Flags["ISUNSIGNED"] = 512] = "ISUNSIGNED"; | ||
Flags[Flags["ISFLOAT"] = 1024] = "ISFLOAT"; | ||
Flags[Flags["ISQUOTED"] = 2048] = "ISQUOTED"; | ||
Flags[Flags["ISTEXT"] = 4096] = "ISTEXT"; | ||
Flags[Flags["ISBINARY"] = 8192] = "ISBINARY"; | ||
})(Flags || (Flags = {})); | ||
function isText(field) { | ||
return ((field.flags ?? 0) & Flags.ISTEXT) === Flags.ISTEXT; | ||
} |
@@ -1,1 +0,1 @@ | ||
export declare const Version = "1.15.0"; | ||
export declare const Version = "1.16.0"; |
@@ -1,1 +0,1 @@ | ||
export const Version = '1.15.0'; | ||
export const Version = '1.16.0'; |
{ | ||
"name": "@planetscale/database", | ||
"version": "1.15.0", | ||
"version": "1.16.0", | ||
"description": "A Fetch API-compatible PlanetScale database driver", | ||
@@ -5,0 +5,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49381
892