frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Testing SQL logic without a real database

1•chrisulson•2h ago
Show HN: Testing SQL logic without a real database

Over the years I kept fighting the same problem when testing repository code:

real database tests are slow

Docker/TestContainers add friction and startup time

mocks don’t validate SQL behavior

SQLite introduces dialect differences

integration tests are too late for fast feedback

So I built an in-memory SQL engine focused on validating SQL behavior during unit tests.

It plugs into IDbConnection, allowing repository code (Dapper or raw SQL) to run unchanged.

What it does

emulates SQL dialect behavior

validates constraints and query logic

supports multiple providers (MySQL, SQL Server, PostgreSQL, Oracle, SQLite, DB2)

simulates version-specific behavior

provides execution metrics and plan insights

runs entirely in memory (no infrastructure)

The goal is not to replace integration tests.

It’s to catch SQL logic issues earlier and keep tests fast, deterministic, and portable.

Why not SQLite in-memory?

SQLite is great, but testing against it means testing SQLite semantics.

Teams often hit:

type mismatches

dialect drift

query compatibility differences

adaptation layers in test code

This approach keeps behavior aligned with the target database rules.

Current work

I’m working on tooling to reduce friction further:

Visual Studio & VS Code extensions

mapping tables, views, and procedures locally

generating in-memory schemas automatically

keeping test schemas aligned with real databases

Background

The core originated from a previous internal project and includes extensive compatibility tests to validate behavior across database versions and frameworks.

Looking for feedback

Curious how others handle SQL testing trade-offs.

If this problem space resonates with you, contributions and real-world scenarios are very welcome. The project is open source and evolving, and additional dialect behaviors, edge cases, and tooling improvements can make it more useful for everyone.

Repo: https://github.com/christianulson/DbSqlLikeMem Nuget: https://www.nuget.org/packages/DbSqlLikeMem

Comments

chrisulson•1h ago
Built after years fighting slow DB tests and dialect drift issues. Curious how others balance unit vs integration testing for SQL-heavy systems.

How Louis Theroux Took on the Manosphere

https://www.gq-magazine.co.uk/article/louis-theroux-vs-the-manosphere
1•mellosouls•33s ago•0 comments

Human Brain Cells on a Chip Learned to Play Doom in a Week

https://m.slashdot.org/story/452896
1•computersuck•2m ago•0 comments

Show HN: CanaryAI – Claude Code Security Monitoring Tool

https://github.com/jx887/homebrew-canaryai
1•jx887•5m ago•0 comments

Pure Rust, zero dependencies AI models, runs locally, free forever

https://huggingface.co/qoranet
1•blockmandev•7m ago•1 comments

Show HN: Circuitchat, a Tor-first encrypted messaging program using Noise

https://github.com/uncognic/circuitchat
1•uncognic•8m ago•0 comments

Samsung Galaxy update removes Android recovery menu tools, including sideloading

https://9to5google.com/2026/02/27/samsung-galaxy-update-android-recovery-menu-removed/
1•josephcsible•16m ago•0 comments

OpenAI Reaches A.I. Agreement With Defense Dept. After Anthropic Clash

https://www.nytimes.com/2026/02/27/technology/openai-reaches-ai-agreement-with-defense-dept-after...
3•jbegley•20m ago•0 comments

Bird Losses Are Accelerating

https://www.nytimes.com/2026/02/26/climate/bird-declines.html
4•lxm•25m ago•0 comments

India disrupts access to popular developer platform Supabase with blocking order

https://techcrunch.com/2026/02/27/india-disrupts-access-to-popular-developer-platform-supabase-wi...
1•pouwerkerk•26m ago•0 comments

A Day in the Life of an Enshittificator [video]

https://www.youtube.com/watch?v=T4Upf_B9RLQ
1•ianrahman•32m ago•0 comments

We may Soon have City-Spanning 900 MHz Mesh Networks (2021)

https://cheapskatesguide.org/articles/900mhz-mesh.html
1•ColinWright•35m ago•0 comments

System prompt change Claude's reasoning depth – side-by-side comparison tool

https://claude.ai/public/artifacts/eba2a270-dd61-4f0c-a276-34a53e604f13
2•Yuudaiikoma•35m ago•1 comments

Build your own Command Line with ANSI escape codes (2016)

https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html
1•vinhnx•35m ago•0 comments

The Enshittificator [video]

https://vimeo.com/1168468796
2•gurjeet•36m ago•0 comments

SUNN O))) HalfLife Fer Mmxxv

https://sunn.southernlord.com/sunn-o-halflife-fer-mmxxv/
2•rglover•36m ago•0 comments

YouTube now determines your watch list [video]

https://www.youtube.com/watch?v=7U_LhzgwJ4U&list=RD7U_LhzgwJ4U
2•bilekas•40m ago•0 comments

Binance's MAGA-Branding Strategy

https://www.thenation.com/article/economy/binance-crypto-trump/
2•petethomas•40m ago•0 comments

As We May Think (1945)

https://en.wikipedia.org/wiki/As_We_May_Think
2•ColinWright•43m ago•0 comments

Estimating π with a Coin

https://arxiv.org/abs/2602.14487
2•vismit2000•44m ago•0 comments

The Mountain Eagle Is Now Online

https://www.mountaineagle.net/articles/display/?entry_short=the-mountain-eagle-is-now-online
2•retrocog•49m ago•1 comments

German Tank Problem

https://en.wikipedia.org/wiki/German_tank_problem
1•ColinWright•51m ago•0 comments

Latency

https://cheat.sh/latency
1•vismit2000•52m ago•0 comments

Show HN: Agents-lint – detect stale paths and context rot in AGENTS.md files

https://github.com/giacomo/agents-lint
1•devGiacomo•52m ago•1 comments

Show HN: Recall – Persistent Memory for Claude Code via MCP Hooks

https://recallmcp.com
1•elfenleid•53m ago•0 comments

The Reason Anthropic Wants Guardrails

https://www.theatlantic.com/ideas/2026/02/anthropic-pentagon-ai/686172/
1•Stratoscope•54m ago•1 comments

Ask HN: How do products get priced after the bubble bursts?

1•AbstractH24•54m ago•1 comments

Joint Statement from OpenAI and Microsoft

https://openai.com/index/continuing-microsoft-partnership/
3•alex_young•59m ago•0 comments

OpenAI reaches deal to deploy AI models on U.S. DoW classified network

https://www.reuters.com/business/openai-reaches-deal-deploy-ai-models-us-department-war-classifie...
26•erhuve•1h ago•9 comments

Six Simple Machines: Lever, Wheel, Pulley, Inclined Plane, Wedge, and Screw

https://en.wikipedia.org/wiki/Simple_machine
1•gurjeet•1h ago•0 comments

Drug-resistant strain of deadly 'ancient fever' spreading to US

https://www.dailymail.co.uk/health/article-15598967/typhoid-fever-surging-drug-resistant-US-UK.html
1•Bender•1h ago•0 comments