x/mysql2@v1.0.5

MySQL client for Deno with focus on performance. Supports prepared statements, non-utf8 encodings, binary log protocol, compression much more
GitHub Stars
1
Latest
lib/
import * as mysql2 from "https://deno.land/x/mysql2@v1.0.5/mod.ts";

Variables

Charsets.ARMSCII8
Charsets.ARMSCII8_BIN
Charsets.ARMSCII8_GENERAL_CI
Charsets.ASCII
Charsets.ASCII_BIN
Charsets.ASCII_GENERAL_CI
Charsets.BIG5
Charsets.BIG5_BIN
Charsets.BIG5_CHINESE_CI
Charsets.BINARY
Charsets.CP1250
Charsets.CP1250_BIN
Charsets.CP1250_CROATIAN_CI
Charsets.CP1250_CZECH_CS
Charsets.CP1250_GENERAL_CI
Charsets.CP1250_POLISH_CI
Charsets.CP1251
Charsets.CP1251_BIN
Charsets.CP1251_BULGARIAN_CI
Charsets.CP1251_GENERAL_CI
Charsets.CP1251_GENERAL_CS
Charsets.CP1251_UKRAINIAN_CI
Charsets.CP1256
Charsets.CP1256_BIN
Charsets.CP1256_GENERAL_CI
Charsets.CP1257
Charsets.CP1257_BIN
Charsets.CP1257_GENERAL_CI
Charsets.CP1257_LITHUANIAN_CI
Charsets.CP850
Charsets.CP850_BIN
Charsets.CP850_GENERAL_CI
Charsets.CP852
Charsets.CP852_BIN
Charsets.CP852_GENERAL_CI
Charsets.CP866
Charsets.CP866_BIN
Charsets.CP866_GENERAL_CI
Charsets.CP932
Charsets.CP932_BIN
Charsets.CP932_JAPANESE_CI
Charsets.DEC8
Charsets.DEC8_BIN
Charsets.DEC8_SWEDISH_CI
Charsets.EUCJPMS
Charsets.EUCJPMS_BIN
Charsets.EUCJPMS_JAPANESE_CI
Charsets.EUCKR
Charsets.EUCKR_BIN
Charsets.EUCKR_KOREAN_CI
Charsets.GB18030
Charsets.GB18030_BIN
Charsets.GB18030_CHINESE_CI
Charsets.GB18030_UNICODE_520_CI
Charsets.GB2312
Charsets.GB2312_BIN
Charsets.GB2312_CHINESE_CI
Charsets.GBK
Charsets.GBK_BIN
Charsets.GBK_CHINESE_CI
Charsets.GEOSTD8
Charsets.GEOSTD8_BIN
Charsets.GEOSTD8_GENERAL_CI
Charsets.GREEK
Charsets.GREEK_BIN
Charsets.GREEK_GENERAL_CI
Charsets.HEBREW
Charsets.HEBREW_BIN
Charsets.HEBREW_GENERAL_CI
Charsets.HP8
Charsets.HP8_BIN
Charsets.HP8_ENGLISH_CI
Charsets.KEYBCS2
Charsets.KEYBCS2_BIN
Charsets.KEYBCS2_GENERAL_CI
Charsets.KOI8R
Charsets.KOI8R_BIN
Charsets.KOI8R_GENERAL_CI
Charsets.KOI8U
Charsets.KOI8U_BIN
Charsets.KOI8U_GENERAL_CI
Charsets.LATIN1
Charsets.LATIN1_BIN
Charsets.LATIN1_DANISH_CI
Charsets.LATIN1_GENERAL_CI
Charsets.LATIN1_GENERAL_CS
Charsets.LATIN1_GERMAN1_CI
Charsets.LATIN1_GERMAN2_CI
Charsets.LATIN1_SPANISH_CI
Charsets.LATIN1_SWEDISH_CI
Charsets.LATIN2
Charsets.LATIN2_BIN
Charsets.LATIN2_CROATIAN_CI
Charsets.LATIN2_CZECH_CS
Charsets.LATIN2_GENERAL_CI
Charsets.LATIN2_HUNGARIAN_CI
Charsets.LATIN5
Charsets.LATIN5_BIN
Charsets.LATIN5_TURKISH_CI
Charsets.LATIN7
Charsets.LATIN7_BIN
Charsets.LATIN7_ESTONIAN_CS
Charsets.LATIN7_GENERAL_CI
Charsets.LATIN7_GENERAL_CS
Charsets.MACCE
Charsets.MACCE_BIN
Charsets.MACCE_GENERAL_CI
Charsets.MACROMAN
Charsets.MACROMAN_BIN
Charsets.MACROMAN_GENERAL_CI
Charsets.SJIS
Charsets.SJIS_BIN
Charsets.SJIS_JAPANESE_CI
Charsets.SWE7
Charsets.SWE7_BIN
Charsets.SWE7_SWEDISH_CI
Charsets.TIS620
Charsets.TIS620_BIN
Charsets.TIS620_THAI_CI
Charsets.UCS2
Charsets.UCS2_BIN
Charsets.UCS2_CROATIAN_CI
Charsets.UCS2_CZECH_CI
Charsets.UCS2_DANISH_CI
Charsets.UCS2_ESPERANTO_CI
Charsets.UCS2_ESTONIAN_CI
Charsets.UCS2_GENERAL_CI
Charsets.UCS2_GENERAL_MYSQL500_CI
Charsets.UCS2_GERMAN2_CI
Charsets.UCS2_HUNGARIAN_CI
Charsets.UCS2_ICELANDIC_CI
Charsets.UCS2_LATVIAN_CI
Charsets.UCS2_LITHUANIAN_CI
Charsets.UCS2_PERSIAN_CI
Charsets.UCS2_POLISH_CI
Charsets.UCS2_ROMAN_CI
Charsets.UCS2_ROMANIAN_CI
Charsets.UCS2_SINHALA_CI
Charsets.UCS2_SLOVAK_CI
Charsets.UCS2_SLOVENIAN_CI
Charsets.UCS2_SPANISH_CI
Charsets.UCS2_SPANISH2_CI
Charsets.UCS2_SWEDISH_CI
Charsets.UCS2_TURKISH_CI
Charsets.UCS2_UNICODE_520_CI
Charsets.UCS2_UNICODE_CI
Charsets.UCS2_VIETNAMESE_CI
Charsets.UJIS
Charsets.UJIS_BIN
Charsets.UJIS_JAPANESE_CI
Charsets.UTF16
Charsets.UTF16_BIN
Charsets.UTF16_CROATIAN_CI
Charsets.UTF16_CZECH_CI
Charsets.UTF16_DANISH_CI
Charsets.UTF16_ESPERANTO_CI
Charsets.UTF16_ESTONIAN_CI
Charsets.UTF16_GENERAL_CI
Charsets.UTF16_GERMAN2_CI
Charsets.UTF16_HUNGARIAN_CI
Charsets.UTF16_ICELANDIC_CI
Charsets.UTF16_LATVIAN_CI
Charsets.UTF16_LITHUANIAN_CI
Charsets.UTF16_PERSIAN_CI
Charsets.UTF16_POLISH_CI
Charsets.UTF16_ROMAN_CI
Charsets.UTF16_ROMANIAN_CI
Charsets.UTF16_SINHALA_CI
Charsets.UTF16_SLOVAK_CI
Charsets.UTF16_SLOVENIAN_CI
Charsets.UTF16_SPANISH_CI
Charsets.UTF16_SPANISH2_CI
Charsets.UTF16_SWEDISH_CI
Charsets.UTF16_TURKISH_CI
Charsets.UTF16_UNICODE_520_CI
Charsets.UTF16_UNICODE_CI
Charsets.UTF16_VIETNAMESE_CI
Charsets.UTF16LE
Charsets.UTF16LE_BIN
Charsets.UTF16LE_GENERAL_CI
Charsets.UTF32
Charsets.UTF32_BIN
Charsets.UTF32_CROATIAN_CI
Charsets.UTF32_CZECH_CI
Charsets.UTF32_DANISH_CI
Charsets.UTF32_ESPERANTO_CI
Charsets.UTF32_ESTONIAN_CI
Charsets.UTF32_GENERAL_CI
Charsets.UTF32_GERMAN2_CI
Charsets.UTF32_HUNGARIAN_CI
Charsets.UTF32_ICELANDIC_CI
Charsets.UTF32_LATVIAN_CI
Charsets.UTF32_LITHUANIAN_CI
Charsets.UTF32_PERSIAN_CI
Charsets.UTF32_POLISH_CI
Charsets.UTF32_ROMAN_CI
Charsets.UTF32_ROMANIAN_CI
Charsets.UTF32_SINHALA_CI
Charsets.UTF32_SLOVAK_CI
Charsets.UTF32_SLOVENIAN_CI
Charsets.UTF32_SPANISH_CI
Charsets.UTF32_SPANISH2_CI
Charsets.UTF32_SWEDISH_CI
Charsets.UTF32_TURKISH_CI
Charsets.UTF32_UNICODE_520_CI
Charsets.UTF32_UNICODE_CI
Charsets.UTF32_VIETNAMESE_CI
Charsets.UTF8
Charsets.UTF8_BIN
Charsets.UTF8_CROATIAN_CI
Charsets.UTF8_CZECH_CI
Charsets.UTF8_DANISH_CI
Charsets.UTF8_ESPERANTO_CI
Charsets.UTF8_ESTONIAN_CI
Charsets.UTF8_GENERAL_CI
Charsets.UTF8_GENERAL_MYSQL500_CI
Charsets.UTF8_GENERAL50_CI
Charsets.UTF8_GERMAN2_CI
Charsets.UTF8_HUNGARIAN_CI
Charsets.UTF8_ICELANDIC_CI
Charsets.UTF8_LATVIAN_CI
Charsets.UTF8_LITHUANIAN_CI
Charsets.UTF8_PERSIAN_CI
Charsets.UTF8_POLISH_CI
Charsets.UTF8_ROMAN_CI
Charsets.UTF8_ROMANIAN_CI
Charsets.UTF8_SINHALA_CI
Charsets.UTF8_SLOVAK_CI
Charsets.UTF8_SLOVENIAN_CI
Charsets.UTF8_SPANISH_CI
Charsets.UTF8_SPANISH2_CI
Charsets.UTF8_SWEDISH_CI
Charsets.UTF8_TOLOWER_CI
Charsets.UTF8_TURKISH_CI
Charsets.UTF8_UNICODE_520_CI
Charsets.UTF8_UNICODE_CI
Charsets.UTF8_VIETNAMESE_CI
Charsets.UTF8MB4
Charsets.UTF8MB4_0900_AI_CI
Charsets.UTF8MB4_0900_AS_CI
Charsets.UTF8MB4_0900_AS_CS
Charsets.UTF8MB4_0900_BIN
Charsets.UTF8MB4_BIN
Charsets.UTF8MB4_CROATIAN_CI
Charsets.UTF8MB4_CS_0900_AI_CI
Charsets.UTF8MB4_CS_0900_AS_CS
Charsets.UTF8MB4_CZECH_CI
Charsets.UTF8MB4_DA_0900_AI_CI
Charsets.UTF8MB4_DA_0900_AS_CS
Charsets.UTF8MB4_DANISH_CI
Charsets.UTF8MB4_DE_PB_0900_AI_CI
Charsets.UTF8MB4_DE_PB_0900_AS_CS
Charsets.UTF8MB4_EO_0900_AI_CI
Charsets.UTF8MB4_EO_0900_AS_CS
Charsets.UTF8MB4_ES_0900_AI_CI
Charsets.UTF8MB4_ES_0900_AS_CS
Charsets.UTF8MB4_ES_TRAD_0900_AI_CI
Charsets.UTF8MB4_ES_TRAD_0900_AS_CS
Charsets.UTF8MB4_ESPERANTO_CI
Charsets.UTF8MB4_ESTONIAN_CI
Charsets.UTF8MB4_ET_0900_AI_CI
Charsets.UTF8MB4_ET_0900_AS_CS
Charsets.UTF8MB4_GENERAL_CI
Charsets.UTF8MB4_GERMAN2_CI
Charsets.UTF8MB4_HR_0900_AI_CI
Charsets.UTF8MB4_HR_0900_AS_CS
Charsets.UTF8MB4_HU_0900_AI_CI
Charsets.UTF8MB4_HU_0900_AS_CS
Charsets.UTF8MB4_HUNGARIAN_CI
Charsets.UTF8MB4_ICELANDIC_CI
Charsets.UTF8MB4_IS_0900_AI_CI
Charsets.UTF8MB4_IS_0900_AS_CS
Charsets.UTF8MB4_JA_0900_AS_CS
Charsets.UTF8MB4_JA_0900_AS_CS_KS
Charsets.UTF8MB4_LA_0900_AI_CI
Charsets.UTF8MB4_LA_0900_AS_CS
Charsets.UTF8MB4_LATVIAN_CI
Charsets.UTF8MB4_LITHUANIAN_CI
Charsets.UTF8MB4_LT_0900_AI_CI
Charsets.UTF8MB4_LT_0900_AS_CS
Charsets.UTF8MB4_LV_0900_AI_CI
Charsets.UTF8MB4_LV_0900_AS_CS
Charsets.UTF8MB4_PERSIAN_CI
Charsets.UTF8MB4_PL_0900_AI_CI
Charsets.UTF8MB4_PL_0900_AS_CS
Charsets.UTF8MB4_POLISH_CI
Charsets.UTF8MB4_RO_0900_AI_CI
Charsets.UTF8MB4_RO_0900_AS_CS
Charsets.UTF8MB4_ROMAN_CI
Charsets.UTF8MB4_ROMANIAN_CI
Charsets.UTF8MB4_RU_0900_AI_CI
Charsets.UTF8MB4_RU_0900_AS_CS
Charsets.UTF8MB4_SINHALA_CI
Charsets.UTF8MB4_SK_0900_AI_CI
Charsets.UTF8MB4_SK_0900_AS_CS
Charsets.UTF8MB4_SL_0900_AI_CI
Charsets.UTF8MB4_SL_0900_AS_CS
Charsets.UTF8MB4_SLOVAK_CI
Charsets.UTF8MB4_SLOVENIAN_CI
Charsets.UTF8MB4_SPANISH_CI
Charsets.UTF8MB4_SPANISH2_CI
Charsets.UTF8MB4_SV_0900_AI_CI
Charsets.UTF8MB4_SV_0900_AS_CS
Charsets.UTF8MB4_SWEDISH_CI
Charsets.UTF8MB4_TR_0900_AI_CI
Charsets.UTF8MB4_TR_0900_AS_CS
Charsets.UTF8MB4_TURKISH_CI
Charsets.UTF8MB4_UNICODE_520_CI
Charsets.UTF8MB4_UNICODE_CI
Charsets.UTF8MB4_VI_0900_AI_CI
Charsets.UTF8MB4_VI_0900_AS_CS
Charsets.UTF8MB4_VIETNAMESE_CI
Charsets.UTF8MB4_ZH_0900_AS_CS
CharsetToEncoding
connect
createQuery
escape
escapeId
format
raw
Types.BIT
Types.BLOB
Types.DATE
Types.DATETIME
Types.DECIMAL
Types.default
Types.DOUBLE
Types.ENUM
Types.FLOAT
Types.GEOMETRY
Types.INT24
Types.JSON
Types.LONG
Types.LONG_BLOB
Types.LONGLONG
Types.MEDIUM_BLOB
Types.NEWDATE
Types.NEWDECIMAL
Types.NULL
Types.SET
Types.SHORT
Types.STRING
Types.TIME
Types.TIMESTAMP
Types.TINY
Types.TINY_BLOB
Types.VAR_STRING
Types.VARCHAR
Types.YEAR

mysql2

MySQL client for Deno with focus on performance. Supports prepared statements, non-utf8 encodings, binary log protocol, compression much more

fock by https://github.com/sidorares/node-mysql2

usage

import * as mysql2 from "https://deno.land/x/mysql2@v1.0.0/mod.ts";

const pool = mysql2.createPool({
  host: "127.0.0.1",
  port: 3306,
  user: "test_user",
  password: "test_password",
  database: "nest_database",
  connectionLimit: 4,
});
const result = await pool.query("SELECT 1");
console.log(result[0]); // [ { "1": 1 } ]
await pool.end();