Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
kysely-singlestore
Advanced tools
Kysely dialects, plugins and other goodies for SingleStore (formerly MemSQL)
Kysely dialects, plugins and other goodies for SingleStore (formerly MemSQL).
npm i kysely-singlestore
npm i kysely-singlestore kysely
yarn add kysely-singlestore kysely
pnpm add kysely-singlestore kysely
This package uses/extends some Kysely types and classes, which are imported using it's NPM package name -- not a relative file path or CDN url.
To fix that, add an import_map.json
file.
{
"imports": {
"kysely": "https://cdn.jsdelivr.net/npm/kysely@0.22.0/dist/esm/index.js"
}
}
SingleStore Data API allows executing SQL queries in the browser and is a great fit for serverless functions and other auto-scaling compute services. It does not support transactions at this point in time.
Older versions of node are also supported, just swap undici
with node-fetch
.
import {Kysely} from 'kysely'
import {SingleStoreDataApiDialect, SingleStoreDataType} from 'kysely-singlestore'
import {fetch} from 'undici'
interface Database {
person: {
id: string
first_name: string | null
last_name: string | null
}
pet: {
id: string
name: string
owner_id: string
}
}
const db = new Kysely<Database>({
dialect: new SingleStoreDataApiDialect({
database: '<database>',
deserialization: {
castDatesAsNativeDates: true,
castTinyIntAsBoolean: true,
deserialize: (value, dataType, columnName) =>
dataType === SingleStoreDataType.Json && columnName === 'pet' ? new Pet(value) : undefined,
unwrapDecimals: true,
},
fetch,
hostname: '<hostname>',
password: '<password>',
username: '<username>',
}),
})
import {Kysely} from 'kysely'
import {SingleStoreDataApiDialect, SingleStoreDataType} from 'kysely-singlestore'
interface Database {
person: {
id: string
first_name: string | null
last_name: string | null
}
pet: {
id: string
name: string
owner_id: string
}
}
const db = new Kysely<Database>({
dialect: new SingleStoreDataApiDialect({
database: '<database>',
deserialization: {
castDatesAsNativeDates: true,
castTinyIntAsBoolean: true,
deserialize: (value, dataType, columnName) =>
dataType === SingleStoreDataType.Json && columnName === 'pet' ? new Pet(value) : undefined,
unwrapDecimals: true,
},
fetch: window.fetch.bind(window),
hostname: '<hostname>',
password: '<password>',
username: '<username>',
}),
})
import {Kysely} from 'https://cdn.jsdelivr.net/npm/kysely@0.22.0/dist/esm/index.js'
import {
SingleStoreDataApiDialect,
SingleStoreDataType,
} from 'https://cdn.jsdelivr.net/npm/kysely-singlestore@latest/dist/esm/index.js'
interface Database {
person: {
id: string
first_name: string | null
last_name: string | null
}
pet: {
id: string
name: string
owner_id: string
}
}
const db = new Kysely<Database>({
dialect: new SingleStoreDataApiDialect({
database: '<database>',
deserialization: {
castDatesAsNativeDates: true,
castTinyIntAsBoolean: true,
deserialize: (value, dataType, columnName) =>
dataType === SingleStoreDataType.Json && columnName === 'pet' ? new Pet(value) : undefined,
unwrapDecimals: true,
},
fetch: fetch,
hostname: '<hostname>',
password: '<password>',
username: '<username>',
}),
})
SingleStore is wire-compatible with MySQL so you can connect to it using mysql2
in node environments, and take advantage of connection pools and transactions.
MIT License, see LICENSE
FAQs
Kysely dialects, plugins and other goodies for SingleStore (formerly MemSQL)
The npm package kysely-singlestore receives a total of 3 weekly downloads. As such, kysely-singlestore popularity was classified as not popular.
We found that kysely-singlestore demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.