Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete revamp #51

Draft
wants to merge 84 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
f7f6960
feat: more complex schema to experiment with relations
WhyAsh5114 Nov 13, 2024
1291552
feat: make user linking optional on todos
WhyAsh5114 Nov 13, 2024
af6b27a
refactor: moving to one class per model
WhyAsh5114 Nov 13, 2024
7c1d289
refactor: better folder structure
WhyAsh5114 Nov 13, 2024
3ed5132
refactor: cleanup
WhyAsh5114 Nov 13, 2024
de8fc89
fix: use await to write all files properly
WhyAsh5114 Nov 13, 2024
cc463d2
refactor: cleaner writer functions and better structure
WhyAsh5114 Nov 13, 2024
2397a02
feat: implemented joins with other stores
WhyAsh5114 Nov 13, 2024
c2aeef0
cleanup: remove old API
WhyAsh5114 Nov 13, 2024
382c381
feat: added create and fillDefaults method
WhyAsh5114 Nov 14, 2024
0e582bc
feat: return created record with applied select and include statements
WhyAsh5114 Nov 14, 2024
bcd644b
feat: basic findUnique for now
WhyAsh5114 Nov 14, 2024
711bd7e
feat: add indexes to idb-interface for unique fields
WhyAsh5114 Nov 14, 2024
2d3f61d
fix: add key support for composite unique fields
WhyAsh5114 Nov 14, 2024
7b4a24c
feat: unique indexes and findUnique completion
WhyAsh5114 Nov 14, 2024
1c2745b
fix: use _db to indicate internal usage
WhyAsh5114 Nov 14, 2024
e0daf61
feat: added getNeededStoresForCreate and a utils file
WhyAsh5114 Nov 14, 2024
c678f34
feat: create transaction handling
WhyAsh5114 Nov 14, 2024
d68b7cc
feat: adding all relation types to applyRelations
WhyAsh5114 Nov 15, 2024
7bd1809
feat: simplified testing
WhyAsh5114 Nov 15, 2024
a46f596
fix: remove duplicate creations
WhyAsh5114 Nov 15, 2024
78f97f0
feat: created a basic page for testing queries directly
WhyAsh5114 Nov 15, 2024
d55a5fa
test: add testID for easier testing
WhyAsh5114 Nov 15, 2024
e81c600
fix: fixed create return bug and added test
WhyAsh5114 Nov 15, 2024
5f3d759
test: don't reuse server, need db reset when starting tests
WhyAsh5114 Nov 15, 2024
5685252
fix: add needed imports
WhyAsh5114 Nov 15, 2024
5d78bb1
refactor: better method name
WhyAsh5114 Nov 15, 2024
c5a2540
fix: re-fetch record after creation to apply new selects and includes
WhyAsh5114 Nov 15, 2024
8710f79
fix: remove redundant field
WhyAsh5114 Nov 15, 2024
0a86ad4
feat: separate methods for different concerns
WhyAsh5114 Nov 16, 2024
9bdb5c7
feat: better tx utilization
WhyAsh5114 Nov 16, 2024
9ff0d42
feat: added test for nestedCreate
WhyAsh5114 Nov 16, 2024
af53fd9
feat: use static site for sveltekit
WhyAsh5114 Nov 16, 2024
d4afcf8
feat: added a count method
WhyAsh5114 Nov 16, 2024
dcf43ce
feat: added basic count test
WhyAsh5114 Nov 16, 2024
0649ce8
lint: prettier
WhyAsh5114 Nov 16, 2024
115594d
ci: add psql service for testing equivalence
WhyAsh5114 Nov 16, 2024
ea3abc6
ci: use correct URL to connect to postgres service
WhyAsh5114 Nov 16, 2024
953779f
ci: try exposing port and setting vars on the service container
WhyAsh5114 Nov 16, 2024
3788dfd
ci: please work
WhyAsh5114 Nov 16, 2024
723be42
ci: this?
WhyAsh5114 Nov 16, 2024
62add53
ci: try without weird port mapping
WhyAsh5114 Nov 16, 2024
0a56808
ci: need weird port mapping coz 5432 is occupied by something ig
WhyAsh5114 Nov 16, 2024
3b110a6
style: use _ prefix for internal (non-API) methods of classes
WhyAsh5114 Nov 16, 2024
da476a3
feat: use singleton approach for prisma client
WhyAsh5114 Nov 16, 2024
9545239
feat: split up tests based on API reference
WhyAsh5114 Nov 16, 2024
7300fd5
feat: added findFirstOrThrow
WhyAsh5114 Nov 16, 2024
091de35
test: improve test names
WhyAsh5114 Nov 16, 2024
e2e898a
feat: simplify nested creates for one-to-one relationships
WhyAsh5114 Nov 16, 2024
7c1c5ef
lint: remove unneeded param in todo funcs
WhyAsh5114 Nov 16, 2024
95d90ad
test: added test for basic include
WhyAsh5114 Nov 17, 2024
e98c6d4
fix: fixed select bug and added test for basic select
WhyAsh5114 Nov 17, 2024
13d8b5e
test: added nested select test
WhyAsh5114 Nov 17, 2024
5014a24
lint: prettier
WhyAsh5114 Nov 17, 2024
25787e6
test: added test for nested create with meta on current field
WhyAsh5114 Nov 18, 2024
f4faf09
refactor: correct name
WhyAsh5114 Nov 18, 2024
61d1502
feat: added string filtering in utils
WhyAsh5114 Nov 18, 2024
d5b067c
feat: added where clause filtering for strings in model classes
WhyAsh5114 Nov 18, 2024
c117d66
test: added test for count with select clause
WhyAsh5114 Nov 18, 2024
9ce1920
lint: prettier
WhyAsh5114 Nov 18, 2024
7e4bcd0
feat: added int filtering
WhyAsh5114 Nov 18, 2024
884207d
fix: apply clauses in order and bugfix in where filter logic
WhyAsh5114 Nov 18, 2024
b4bf368
test: added some tests for equals filter
WhyAsh5114 Nov 19, 2024
df7f7e7
refactor: correct folder name
WhyAsh5114 Nov 23, 2024
ee32895
feat: added one to many relation handling for includes and selects
WhyAsh5114 Nov 23, 2024
4abe8e6
fix: correct names for nested create
WhyAsh5114 Nov 23, 2024
e21b150
feat: added the createMany api
WhyAsh5114 Nov 23, 2024
c3f21d9
fix: add optional tx param for createMany
WhyAsh5114 Nov 23, 2024
e9208cc
feat: added nested create for one to many relations
WhyAsh5114 Nov 23, 2024
0502da3
test: for nested create on one to many relations
WhyAsh5114 Nov 23, 2024
8df652d
feat: allow Float filtering using existing IntFilter
WhyAsh5114 Nov 23, 2024
45cc799
fix: type patch
WhyAsh5114 Nov 23, 2024
965ba3f
feat: convert different allowed types in create to record type
WhyAsh5114 Nov 23, 2024
f860322
feat: added BigInt filtering
WhyAsh5114 Nov 23, 2024
62ee93e
feat: added Boolean filtering
WhyAsh5114 Nov 23, 2024
5d28e8b
feat: added Bytes filtering
WhyAsh5114 Nov 23, 2024
72352b5
fix: remove incorrect condition
WhyAsh5114 Nov 23, 2024
8b46a7a
feat: added DateTime filtering
WhyAsh5114 Nov 23, 2024
ab08f74
test: massively simplified testing
WhyAsh5114 Nov 24, 2024
ce28063
fix: use filter for error statuses
WhyAsh5114 Nov 24, 2024
b79ccb1
test: added more tests
WhyAsh5114 Nov 24, 2024
d30c49f
fix: ignore unused vars for now
WhyAsh5114 Nov 24, 2024
1f0343f
feat: add all field types in model for testing
WhyAsh5114 Nov 24, 2024
aad93f3
feat: added findUniqueOrThrow api
WhyAsh5114 Nov 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,28 @@ jobs:
timeout-minutes: 60
runs-on: ubuntu-latest

services:
postgres:
image: postgres
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5433:5432

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Set DATABASE_URL environment variable
run: echo "DATABASE_URL=postgresql://postgres:postgres@localhost:5433/postgres" >> $GITHUB_ENV
- uses: ./.github/actions/
- name: Install Playwright Browsers
run: npx playwright install --with-deps
Expand Down
Loading
Loading