목록TIL (75)
devlog_owen

TYPEORM을 쓰면 따로 레파지토리 파일을 안만들어도 되는 이유 TypeORM은 데이터베이스 작업을 추상화하는 ORM 라이브러리다. TypeORM은 엔티티를 중심으로 데이터베이스 조작을 수행하게 해준다.TypeORM에서는 Repository 패턴이 내장되어 있어, 개발자가 따로 레파지토리를 만들지 않아도된다. 이 Repository는 엔티티에 대한 모든 데이터베이스 작업을 처리한다. 예를 들어, save, remove, find 등의 작업을 수행하는 메소드가 이미 구현되어 있다. 이를 통해 개발자는 SQL 쿼리를 직접 작성하지 않고도, 데이터베이스 작업을 수행할 수 있다. 또한, TypeORM의 Repository는 사용자 정의 메소드를 추가할 수 있어, 복잡한 쿼리를 수행하거나 특정 비즈니스 로직을 ..

typeorm은 배열을 받기 어렵다 원래는 date를 배열로 받으려고 했는데 문자열로밖에 데이터베이스에 받아와지지않았다. 그래서 결국 테이블을 하나 더 만들어서 수정하기로 결정했다. 테이블을 하나 더 추가해서 만들면 데이터베이스 정규화를 적용하는 또 한가지의 방법으로 이는 데이터 중복을 줄이고 유지보수의 용이성을 키울 수 있다. nest.js에서 이미지업로드 https://docs.nestjs.com/techniques/file-upload Documentation | NestJS - A progressive Node.js framework Nest is a framework for building efficient, scalable Node.js server-side applications. It us..

에러 해결1 ERROR [ExceptionHandler] Nest can't resolve dependencies of the TypeOrmCoreModule (TypeOrmModuleOptions, ?). Please make sure that the argument ModuleRef at index [1] is available in the TypeOrmCoreModule context. Potential solutions: - Is TypeOrmCoreModule a valid NestJS module? - If ModuleRef is a provider, is it part of the current TypeOrmCoreModule? - If ModuleRef is exported from a s..

ERD 작성 https://drawsql.app/teams/own-project/diagrams/ticketing-event ticketing_event | DrawSQL Database schema diagram for ticketing_event. drawsql.app 필수기능만 구현하려고 만들었는데 생각보다 ERD가 좀 간단한거같아서 (테이블 3개...) 좀 헷갈린다. 개인프로젝트 참고자료 [nestjs 공식문서 - typeorm relation] https://docs.nestjs.com/techniques/database#relations Documentation | NestJS - A progressive Node.js framework Nest is a framework for buildin..

function isPrime(number) { if( number

1. 추상화 팩토리 예시코드 // Creational Patterns-Abstract Factory interface FruitsFarm { createJam(): Jam; createJuice(): Juice; } // Concrete Factory 1 class MandarinFarm implements FruitsFarm { createJam(): Jam { return new MandarinJam(); } createJuice(): Juice { return new MandarinJuice(); } } // Concrete Factory 2 class StrawberryFarm implements FruitsFarm { createJam(): Jam { return new StrawberryJam..

LLM에게 대체되지 않는 개발자가 되려면 LLM: LLM은 Large Language Model의 약자로, 거대언어모델이라는 뜻이다. 언어모델(LM)을 더욱 확장한 개념으로 인간의 언어를 이해하고 생성하도록 훈련된 인공지능을 통칭 실력있는 개발자가 되어야한다. 당연한 소리긴한데 사실 실력없는 사람들(=지금의 나)에게는 암울한 말이다. 오늘의 나보다 내일의 나가 좀 더 나은 개발자여야하고 내가 나를 믿어야한다. 자신있는 개발자가 되자. 실력있는 개발자란? 주니어개발자 중에서는 올바른 사고를 가지고 포텐셜이 있고 재기발랄한 사람 =>신뢰가 중요 시니어개발자는 경력이 중요하고 어떤 역량을 가진지가 중요. 회사 거르기 & 회사 면접 꿀팁 개발팀장이 면접에 오지않는 경우 면접질문이 형편없는 경우(애인있으ㅓ?) 내..

타입스크립트 기본 세팅 npm init -y tsc --init --rootDir ./src --outDir ./dist --esModuleInterop --module commonjs --strict true --allowJS true --checkJS true "scripts": { "start": "tsc && node ./dist/index.js", "build": "tsc --build", "clean": "tsc --build --clean" }, package.json을 위 코드로 수정함. 나중에 실행하기 편하도록 설정. 별다방 프로그램 코드 interface Beverage { name: string; price: number; } interface User { id: number; nam..