{"repo":"gajus/slonik","free":true,"listed":false,"github":"https://github.com/gajus/slonik","clone":"git clone https://github.com/gajus/slonik.git","description":"A Node.js PostgreSQL client with runtime and build time type safety, and composable SQL.","language":"TypeScript","stars":4932,"topics":["postgresql","postgres","nodejs","javascript","typescript"],"license":null,"category":"databases-storage","readme_excerpt":"Slonik A battle-tested Node.js PostgreSQL client with strict types, detailed logging and assertions. Principles - Promotes writing raw SQL. - Discourages ad-hoc dynamic generation of SQL. Read: Stop using Knex.js Features - Runtime validation. - Assertions and type safety. - Safe connection handling. - Safe transaction handling. - Safe value interpolation. - Transaction nesting. - Transaction events. - Transaction retrying. - Query retrying. - Detailed logging. - Asynchronous stack trace resolution. - Middlewares. - Mapped errors. - ESLint plugin. Contents - Slonik - Sponsors - Principles - Features - Contents - About Slonik - Battle-Tested - Origin of the name - Repeating code patterns and type safety - Protecting against unsafe connection handling - Protecting against unsafe transaction handling - Protecting against unsafe value interpolation - Documentation - Usage - Connection URI - Create connection - End connection pool - Describing the current state of the connection pool - API - Default configuration - Checking out a client from the connection pool - Events - How are they different? - pg vs slonik - pg-promise vs slonik - postgres vs slonik - Type parsers - Built-in type parsers - Interceptors - Interceptor methods - Community interceptors - Recipes - Inserting large number of rows - Routing queries to different connections - Building Utility Statements - Inserting vector data - Runtime validation - Motivation - Result parser interceptor - Example use of sql.type - Pe","default_branch":null,"files":null,"tree":[],"storefront":"/r/gajus","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gajus/slonik/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}