Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
typesql-cli
Advanced tools
Typesql: Generate type safe api for mysql databases.
Having the following query in select-products.sql
file.
SELECT
id,
product_name,
list_price
FROM products
WHERE discontinued = 0
AND list_price BETWEEN :minPrice AND :maxPrice
TypeSql will generate the types and function in the file select-products.ts
.
Then you can import the generate code and execute as following:
deno syntax:
npm install -g typesql-cli
Add the typesql.json
configuration file in project root folder. You can generate an template with cli command typesql init
.
{
"databaseUri": "mysql://root:password@localhost/mydb",
"sqlDir": "./sqls",
"target": "node"
}
sqls\
select-products.sql
insert-product.sql
update-product.sql
typesql compile --watch
to start typesql in watch mode. After that you will have one Typescript file for each query file.sqls\
select-products.sql
select-products.ts
insert-product.sql
insert-product.ts
update-product.sql
update-product.ts
const products = await selectProducts(...
const updateResult = await updateProduct(...
WARNING: This is an WIP experimental project. It is under active development and its API can change.
Issues reports and feature requests are welcome.
FAQs
**TypeSQL** generates typesafe Typescript APIs from your SQL statements. Write your queries in raw SQL and TypeSQL generates the type-safe APIs to execute those queries.
The npm package typesql-cli receives a total of 34 weekly downloads. As such, typesql-cli popularity was classified as not popular.
We found that typesql-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.