{"id":43843,"library":"sine-postgres","title":"sine-postgres","description":"A NestJS module providing a Postgres integration service using the pg client. Current version 0.1.3, early development with frequent releases. It wraps pg with NestJS dependency injection, offering a provider for executing queries. Differentiates from TypeORM/Prisma by staying close to raw SQL with minimal abstraction. Requires NestJS 10, pg 8, and RxJS.","status":"active","version":"0.1.3","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","typescript"],"install":[{"cmd":"npm install sine-postgres","lang":"bash","label":"npm"},{"cmd":"yarn add sine-postgres","lang":"bash","label":"yarn"},{"cmd":"pnpm add sine-postgres","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Decorators and module system","package":"@nestjs/common","optional":false},{"reason":"NestJS application foundation","package":"@nestjs/core","optional":false},{"reason":"PostgreSQL client","package":"pg","optional":false},{"reason":"Reactive extensions for NestJS","package":"rxjs","optional":false}],"imports":[{"note":"ESM only; CommonJS not supported.","wrong":"const PostgresModule = require('sine-postgres');","symbol":"PostgresModule","correct":"import { PostgresModule } from 'sine-postgres';"},{"note":"Named export from package root, not local path.","wrong":"import { PostgresService } from './postgres.service';","symbol":"PostgresService","correct":"import { PostgresService } from 'sine-postgres';"},{"note":"Custom decorator from sine-postgres package.","wrong":"import { InjectPostgres } from '@nestjs/common';","symbol":"InjectPostgres","correct":"import { InjectPostgres } from 'sine-postgres';"}],"quickstart":{"code":"import { Module } from '@nestjs/common';\nimport { PostgresModule } from 'sine-postgres';\nimport { AppController } from './app.controller';\nimport { AppService } from './app.service';\n\n@Module({\n  imports: [\n    PostgresModule.forRoot({\n      host: process.env.DB_HOST ?? 'localhost',\n      port: parseInt(process.env.DB_PORT ?? '5432'),\n      user: process.env.DB_USER ?? 'postgres',\n      password: process.env.DB_PASSWORD ?? '',\n      database: process.env.DB_NAME ?? 'mydb',\n    }),\n  ],\n  controllers: [AppController],\n  providers: [AppService],\n})\nexport class AppModule {}","lang":"typescript","description":"Demonstrates registering the PostgresModule with configuration using environment variables."},"warnings":[{"fix":"Pin to exact version and test upgrades.","message":"Version 0.1.x may introduce breaking changes without major version bump due to pre-1.0 state.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Inject PostgresService directly instead of using @InjectPostgres().","message":"Usage of @InjectPostgres() decorator is deprecated in favor of constructor injection via PostgresService.","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Use forRoot() only in root AppModule and forFeature() for feature modules.","message":"PostgresModule.forRoot() must be called only once; calling it again in child modules will create duplicate connections.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0.1.3':18 '10':51 '8':53 'abstract':48 'client':15 'close':42 'current':16 'depend':29 'develop':20 'differenti':37 'earli':19 'execut':35 'frequent':22 'inject':30 'integr':10 'javascript':56 'minim':47 'modul':6 'nestj':5,28,50 'offer':31 'pg':14,26,52 'postgr':3,9 'provid':7,33 'queri':36 'raw':44 'releas':23 'requir':49 'rxjs':55 'servic':11 'sine':2 'sine-postgr':1 'sql':45 'stay':41 'typeorm/prisma':39 'typescript':57 'use':12 'version':17 'wrap':25","created_at":"2026-06-05T17:01:44.951111+00:00","updated_at":"2026-06-05T17:01:44.951111+00:00","problems":[{"fix":"Run 'npm install sine-postgres' and ensure tsconfig.json includes 'node' in 'types' or 'moduleResolution' is set to 'node'.","cause":"Package not installed or TypeScript module resolution misconfigured.","error":"Cannot find module 'sine-postgres' or its corresponding type declarations."},{"fix":"Import PostgresModule in the feature module (e.g., via imports: [PostgresModule.forFeature()]).","cause":"PostgresModule not imported in the module where PostgresService is used.","error":"Nest can't resolve dependencies of the PostgresService (?). Please make sure that the argument PostgresModule at index [0] is available in the current context."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"sine-postgres","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}