Skip to content

docs: complete API reference and CONTRIBUTING guide (Phase 2)#23

Merged
AWaterColorPen merged 1 commit intomainfrom
feature/phase2-api-docs-and-contributing
Apr 24, 2026
Merged

docs: complete API reference and CONTRIBUTING guide (Phase 2)#23
AWaterColorPen merged 1 commit intomainfrom
feature/phase2-api-docs-and-contributing

Conversation

@AWaterColorPen
Copy link
Copy Markdown
Owner

Phase 2 — API Reference & CONTRIBUTING Guide

This PR completes the final two Phase 2 documentation tasks.

docs/api.md — Full API Reference (new file)

Covers every public type and function in both the top-level olapsql package and the api/types sub-package:

  • Configuration — fields, both usage modes (with/without live DB)
  • ManagerNewManager, RunSync, RunChan, BuildSQL, BuildTransaction, SetLogger, GetClients, GetDictionary; each with parameters, return values, and a code example
  • Clients / ClientsOption — all methods: RegisterByKV, RegisterByOption, SetLogger, Get, BuildDB, BuildSQL, NewClients
  • DBOption — DSN and Type fields
  • Dictionary / Option / AdapterOption — schema loading
  • Package-level helpersRunSync, RunChan, BuildResultSync, BuildResultChan
  • Query — all fields with descriptions; Go struct and JSON construction examples
  • TimeInterval — semantics and generated SQL
  • Filter — all FilterOperatorType constants with SQL equivalents, leaf vs. tree usage, examples
  • Metric — all MetricType constants with SQL patterns; TOML composition example
  • Dimension — all DimensionType constants
  • OrderBy / Limit / Result — fields and iteration example
  • DBType — all supported backends

CONTRIBUTING.md — Complete Contributor Guide (replaces stub)

  • Prerequisites (Go 1.22, SQLite; ClickHouse not required for tests)
  • Fork + clone + sync workflow
  • Full project layout table with one-line descriptions
  • Running tests (all, single package, pattern, coverage)
  • Writing tests guide
  • Code style rules (gofmt, godoc, any over interface{}, no panic in lib code)
  • Commit message convention (Conventional Commits)
  • PR checklist
  • Step-by-step instructions for adding: new DB backend, new metric type, new filter operator
  • Releases and versioning policy (SemVer, breaking-change PR requirements)

Part of

Phase 2: Documentation — spec

With this PR, all Phase 2 tasks are complete.

- docs/api.md: full API reference covering Manager, Configuration,
  Query, TimeInterval, Filter (with operator/value type tables),
  OrderBy, Limit, and Result types
- CONTRIBUTING.md: expand stub into complete contributor guide —
  dev environment, project layout, test instructions, PR checklist,
  commit message convention, code style, and new-backend guide
- README.md: add API Reference entry to documentation table
@AWaterColorPen AWaterColorPen force-pushed the feature/phase2-api-docs-and-contributing branch from 87bf6b0 to 493bab6 Compare April 24, 2026 13:48
@AWaterColorPen AWaterColorPen merged commit fa3bd9d into main Apr 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant