7 Commits (master)

Author SHA1 Message Date
Aravinth Manivannan 88e1bfc146
feat: setup zola to deploy website 2 years ago
Aravinth Manivannan bfb7185801
feat: package docker img 2 years ago
Aravinth Manivannan b7fe7ea5d5
chore: rename gists to gitpad 2 years ago
Aravinth Manivannan 6b60e2a064
feat: add gists_gists, gists_comments and gists_comments & related methods
The following changes are implemented for both db-sqlx-postgres and

TABLE gists_gists
    Stores gist metadata with unique index on gists_gists.public_id for fast

TABLE gists_comments
    Stores comment metadata

TABLE gists_privacy
    Stores gist privacy: sqlx currently doesn't have support Postgres
    enums(ref: https://github.com/launchbadge/sqlx/issues/1171), so storing
    possible privacy values as references from this table.

    This table shouldn't be mutated during runtime. Possible values are
    already recorded in database during migrations. All runtime operations
    on this table must only take references.

    Each implementation of GistDatabase also includes a method called
    privacy_exists, which is called during tests to ensure that
    migrations are successful.

VIEW gists_gists_view
    Gist lookups combines data from gists_users, gists_gists and
    gists_privacy. This SQL view boots performance(I think?). At any rate,
    it is much nicer to work with.

    Database indexes are i64 in SQLite while i32 in Postgres
2 years ago
Aravinth Manivannan 28bbdaebad feat: setup tests 2 years ago
Aravinth Manivannan b28a7d0cfb feat: bootstrap database ops
- db-core: defines base database traits that are required for gists
- db-sqlx-postgres: implements db-core for postgres flavor of the sqlx
- db-sqlx-sqlite: implements db-core for sqlite flavor of the sqlx
2 years ago
Aravinth Manivannan 85ab813816 init 2 years ago