CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/sqlite-go-best-practices

SQLite best practices for Go — WAL mode, foreign_keys, busy_timeout, SetMaxOpenConns, context-aware queries, transactions, migrations

98

2.36x
Quality

99%

Does it follow best practices?

Impact

97%

2.36x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-3/

Local Note-Taking App

Problem/Feature Description

A developer wants to build a local note-taking CLI application in Go that stores data in SQLite. The app should be a simple command-line tool, not a web server.

The app needs to support:

  • Creating a new note with a title and body
  • Listing all notes, ordered by creation date (newest first)
  • Searching notes by title (case-insensitive substring match)
  • Deleting a note by ID
  • Tagging notes: each note can have multiple tags, and the user can list notes by tag

Each note has: id (integer primary key), title, body, created_at, updated_at. Tags have: id (integer primary key), name (unique). A join table links notes to tags.

Output Specification

Produce:

  • main.go -- CLI entry point that parses subcommands (create, list, search, delete, tag, list-by-tag)
  • db.go -- Database connection and migration setup
  • notes.go -- Functions for all note operations
  • go.mod -- Module file with required dependencies

The code should be complete Go with no placeholders or TODO comments.

evals

tile.json