Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
eojuk
Advanced tools
Readme
어죽은 테이블 작성 쿼리를 ORM 코드들로 변환해주는 유용한 도구입니다. 기존 RAW Query를 마이그레이션하거나 ERD 도구에서 추출해낸 쿼리를 기반으로 엔티티 코드를 작성하기 좋습니다.
https://myyrakle.github.io/eojuk-guksu-page/
설치는 npm을 이용해 간단하게 수행할 수 있습니다.
npm install -g eojuk
다음과 같은 쿼리 파일이 있을 경우
CREATE TABLE "tb_user" (
"user_no" serial8 NOT NULL,
"reg_date" timestamptz DEFAULT CURRENT_TIMESTAMP NOT NULL,
"foo" varchar(100) DEFAULT '' NOT NULL,
"complete_yn" boolean DEFAULT false NOT NULL
);
COMMENT ON COLUMN "tb_user"."user_no" IS '기본키';
COMMENT ON COLUMN "tb_user"."nickname" IS '닉네임';
COMMENT ON COLUMN "tb_user"."user_uuid" IS 'UUID';
COMMENT ON COLUMN "tb_user"."language" IS '사용언어';
COMMENT ON COLUMN "tb_user"."correct_count" IS '맞춘 문제';
COMMENT ON COLUMN "tb_user"."wrong_count" IS '틀린 문제';
COMMENT ON COLUMN "tb_user"."device_type" IS 'PC인지 모바일인지';
COMMENT ON COLUMN "tb_user"."reg_date" IS '등록일시';
COMMENT ON COLUMN "tb_user"."complete_yn" IS '다 풀었는지';
ALTER TABLE "tb_user" ADD CONSTRAINT "PK_TB_USER" PRIMARY KEY (
"user_no"
);
어죽을 사용하기만 하면 아래와 같이 테이블 코드를 자동으로 생성해줍니다.
import { literal } from 'sequelize';
import {
Model,
Table,
Column,
HasMany,
CreatedAt,
UpdatedAt,
DeletedAt,
DataType,
Sequelize,
HasOne,
DefaultScope,
Scopes,
Index,
createIndexDecorator,
ForeignKey,
BelongsTo,
PrimaryKey,
AllowNull,
Default,
Comment,
} from 'sequelize-typescript';
@Table({
tableName: 'tb_user',
paranoid: false,
freezeTableName: true,
timestamps: false,
createdAt: false,
updatedAt: false,
deletedAt: false,
// schema: 'cp',
})
export class tb_user extends Model {
@Comment(`기본키`)
@Column({
primaryKey: true,
autoIncrement: true,
type: DataType.INTEGER,
allowNull: false,
})
user_no: number;
@Comment(`등록일시`)
@Column({
type: 'timestamptz',
allowNull: false,
default: litreal("current_timestamp"),
})
reg_date: Date;
@Comment(``)
@Column({
type: DataType.STRING,
allowNull: false,
})
foo: string;
@Comment(`다 풀었는지`)
@Column({
type: DataType.BOOLEAN,
allowNull: false,
})
complete_yn: boolean;
}
mysql 쿼리를 typeorm 형식으로 내보내기
eojuk -i .\test\mysql\test1.sql -dir .\test\ -db mysql -o typeorm
postgresql 쿼리를 sequelize-typescript 형식으로 내보내기
eojuk -i .\test\pg\test2.sql -dir .\test\ -db pg -o sequelize-typescript --schema foo
postgresql 쿼리를 mongery 형식으로 내보내기
eojuk -i .\test\pg\test_for_go.sql -dir .\test\ -db pg -o mongery --schema foo
FAQs
![](https://img.shields.io/badge/language-Typescript-yellow) ![](https://img.shields.io/badge/version-0.10.5-brightgreen) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)]()
The npm package eojuk receives a total of 0 weekly downloads. As such, eojuk popularity was classified as not popular.
We found that eojuk demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.