Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@nyffels/mynodeorm
Advanced tools
A full-fledged ORM framework for NodeJS and MySQL with develop friendly code aimed to handle database migrations, MySQL Query builder / helper and property mapping.
A full-fledged ORM framework for NodeJS and MySQL with develop friendly code aimed to handle database migrations, MySQL Query builder / helper and property mapping.
Use the npm package manager to install "MySQL Query Builder" by running the command
npm install @nyffels/mynodeorm
You need to map your class to a MySQL table and columns to use them in the QueryBuilder function. A mapping happens partial on class level and partial on property level. \
The @id decorator will allow the developer to fetch the class by it's id.
Key: string: This parameter is the ID used to link the string to a class
Class: object: this Object is the class itself declared under this decorator
@id(Key, Class)
The @table decorator contains the name of the table that is linked to this class.
mySqlTableName: string: This includes the MySQL table name linked to this class and will be used in the QueryBuilder
@table(mySqlTableName)
The @column decorator contains the name of the column that is linked to this property.
mySqlColumnName: string: This includes the MySQL column name linked to this property and will be used in the QueryBuidler
@column(mySqlColumnName)
The @type decorator contains the type of the column. If @type is missing of invalid the type will default to a string.
propertyType: number | boolean | date | datetime | string: The decorator contains information about the column type. For all the non-string values it is best practice to declare the types to be 100% certain on SQL generation.
@type(propertyType)
Example:
@id("exWork", WorkClass)\
@table("Ex_work")\
export class WorkClass {
@column("workStart")
@type("datetime")
start: Date;
@column("workEnd")
@type("datetime")
end: Date;
constructor() {}
}
TODO documentation
setConnection()
TODO documentation
getConnection(skipNoConnectionError = true)
TODO documentation
endConnection()
TODO documentation
doMutation(sqlQuery: string, options: QueryOptions | null = null)
TODO documentation
doQuery<T = any>(sqlQuery: string, options: QueryOptions | null = null)
TODO documentation
queryResultToObject<T = any>(classObject: Object, results: any[])
TODO documentation
parseString(value: string)
TODO documentation
parseNumber(value: number)
TODO documentation
parseBoolean(value: boolean, canBeNull = false)
TODO documentation
parseDate(date: Date, time = false)
TODO documentation
parseValue(sourceClass: any, property: string, value: any)
TODO documentation
Currently not available in the framework. This function will be released in a newer version.
Pull requests are welcome but open an issue first to discuss what you would like to change.
For major changes, please open an issue first to discuss what you would like to change.
MIT - Copyright (c) 2023-2024 Nyffels BV
github (https://github.com/Nyffels-Open-Source/mysql-query-builder)
npmjs (https://www.npmjs.com/package/@nyffels/mysql-query-builder)
Currently in Alpha development with possible breaking changes. Use this software at your own risk. Nyffels doesn't provide Release notes or changelogs at this stage of development.
FAQs
A full-fledged ORM framework for NodeJS and MySQL with develop friendly code aimed to handle database migrations, MySQL Query builder / helper and property mapping.
The npm package @nyffels/mynodeorm receives a total of 91 weekly downloads. As such, @nyffels/mynodeorm popularity was classified as not popular.
We found that @nyffels/mynodeorm 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.