-
Notifications
You must be signed in to change notification settings - Fork 3
Use on demand sync strategy for the todo items #38
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
936011c
Update the tanstack db packages
fulopkovacs e95cb86
Pass down the whole href to the api handlers
fulopkovacs 7497b2c
Show the search string in the APIRequestsPanel
fulopkovacs c283e5f
Show the search string in the API Requests panel
fulopkovacs f23816a
Initial commit - load the todo items on demand
fulopkovacs 3a74711
Remove any unnecessary data fetches for the todoItems
fulopkovacs c8c87f5
Fix the issue of changes disappearing when the user switch between pr…
fulopkovacs 56e1792
This is not necessary anymore
fulopkovacs 4c47340
Show a loading skeleton for the tasks when they are being loaded afte…
fulopkovacs 5db4211
Import types from the main @tanstack/db entry point
fulopkovacs e4c2b18
Remove a console log
fulopkovacs 43501c1
Remove some duplicated logic
fulopkovacs 67f2390
Handle some edge cases
fulopkovacs a288094
Apparently, using singletons on the server leads to data leaks
fulopkovacs a3f32ec
Remove an unnecessary type casting
fulopkovacs 21e953d
Remove code that was not used
fulopkovacs 85cb0d0
Fix a type error
fulopkovacs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ALTER TABLE "todo_items" ADD COLUMN "project_id" text NOT NULL;--> statement-breakpoint | ||
| ALTER TABLE "todo_items" ADD CONSTRAINT "todo_items_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| CREATE INDEX "todo_items_project_id_idx" ON "todo_items" USING btree ("project_id"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,323 @@ | ||
| { | ||
| "id": "bec13a12-e3c0-460a-8fd3-76c386221c9d", | ||
| "prevId": "58ddc186-dd38-49a3-81e4-b0e9c8528908", | ||
| "version": "7", | ||
| "dialect": "postgresql", | ||
| "tables": { | ||
| "public.boards": { | ||
| "name": "boards", | ||
| "schema": "", | ||
| "columns": { | ||
| "id": { | ||
| "name": "id", | ||
| "type": "text", | ||
| "primaryKey": true, | ||
| "notNull": true | ||
| }, | ||
| "name": { | ||
| "name": "name", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true | ||
| }, | ||
| "description": { | ||
| "name": "description", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": false | ||
| }, | ||
| "created_at": { | ||
| "name": "created_at", | ||
| "type": "date", | ||
| "primaryKey": false, | ||
| "notNull": true | ||
| }, | ||
| "project_id": { | ||
| "name": "project_id", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true | ||
| } | ||
| }, | ||
| "indexes": {}, | ||
| "foreignKeys": { | ||
| "boards_project_id_projects_id_fk": { | ||
| "name": "boards_project_id_projects_id_fk", | ||
| "tableFrom": "boards", | ||
| "tableTo": "projects", | ||
| "columnsFrom": [ | ||
| "project_id" | ||
| ], | ||
| "columnsTo": [ | ||
| "id" | ||
| ], | ||
| "onDelete": "cascade", | ||
| "onUpdate": "no action" | ||
| } | ||
| }, | ||
| "compositePrimaryKeys": {}, | ||
| "uniqueConstraints": {}, | ||
| "policies": {}, | ||
| "checkConstraints": {}, | ||
| "isRLSEnabled": false | ||
| }, | ||
| "public.projects": { | ||
| "name": "projects", | ||
| "schema": "", | ||
| "columns": { | ||
| "id": { | ||
| "name": "id", | ||
| "type": "text", | ||
| "primaryKey": true, | ||
| "notNull": true | ||
| }, | ||
| "name": { | ||
| "name": "name", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true | ||
| }, | ||
| "description": { | ||
| "name": "description", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true | ||
| }, | ||
| "created_at": { | ||
| "name": "created_at", | ||
| "type": "date", | ||
| "primaryKey": false, | ||
| "notNull": true | ||
| } | ||
| }, | ||
| "indexes": {}, | ||
| "foreignKeys": {}, | ||
| "compositePrimaryKeys": {}, | ||
| "uniqueConstraints": { | ||
| "projects_name_unique": { | ||
| "name": "projects_name_unique", | ||
| "nullsNotDistinct": false, | ||
| "columns": [ | ||
| "name" | ||
| ] | ||
| } | ||
| }, | ||
| "policies": {}, | ||
| "checkConstraints": {}, | ||
| "isRLSEnabled": false | ||
| }, | ||
| "public.seed_script_runs": { | ||
| "name": "seed_script_runs", | ||
| "schema": "", | ||
| "columns": { | ||
| "id": { | ||
| "name": "id", | ||
| "type": "text", | ||
| "primaryKey": true, | ||
| "notNull": true | ||
| }, | ||
| "created_at": { | ||
| "name": "created_at", | ||
| "type": "date", | ||
| "primaryKey": false, | ||
| "notNull": true | ||
| }, | ||
| "state": { | ||
| "name": "state", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": false | ||
| } | ||
| }, | ||
| "indexes": {}, | ||
| "foreignKeys": {}, | ||
| "compositePrimaryKeys": {}, | ||
| "uniqueConstraints": {}, | ||
| "policies": {}, | ||
| "checkConstraints": {}, | ||
| "isRLSEnabled": false | ||
| }, | ||
| "public.todo_items": { | ||
| "name": "todo_items", | ||
| "schema": "", | ||
| "columns": { | ||
| "id": { | ||
| "name": "id", | ||
| "type": "text", | ||
| "primaryKey": true, | ||
| "notNull": true | ||
| }, | ||
| "title": { | ||
| "name": "title", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true | ||
| }, | ||
| "description": { | ||
| "name": "description", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": false | ||
| }, | ||
| "created_at": { | ||
| "name": "created_at", | ||
| "type": "date", | ||
| "primaryKey": false, | ||
| "notNull": true | ||
| }, | ||
| "board_id": { | ||
| "name": "board_id", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true | ||
| }, | ||
| "project_id": { | ||
| "name": "project_id", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true | ||
| }, | ||
| "priority": { | ||
| "name": "priority", | ||
| "type": "integer", | ||
| "primaryKey": false, | ||
| "notNull": false, | ||
| "default": 0 | ||
| }, | ||
| "position": { | ||
| "name": "position", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true | ||
| } | ||
| }, | ||
| "indexes": { | ||
| "todo_items_board_id_position_idx": { | ||
| "name": "todo_items_board_id_position_idx", | ||
| "columns": [ | ||
| { | ||
| "expression": "board_id", | ||
| "isExpression": false, | ||
| "asc": true, | ||
| "nulls": "last" | ||
| }, | ||
| { | ||
| "expression": "position", | ||
| "isExpression": false, | ||
| "asc": true, | ||
| "nulls": "last" | ||
| } | ||
| ], | ||
| "isUnique": false, | ||
| "concurrently": false, | ||
| "method": "btree", | ||
| "with": {} | ||
| }, | ||
| "todo_items_project_id_idx": { | ||
| "name": "todo_items_project_id_idx", | ||
| "columns": [ | ||
| { | ||
| "expression": "project_id", | ||
| "isExpression": false, | ||
| "asc": true, | ||
| "nulls": "last" | ||
| } | ||
| ], | ||
| "isUnique": false, | ||
| "concurrently": false, | ||
| "method": "btree", | ||
| "with": {} | ||
| } | ||
| }, | ||
| "foreignKeys": { | ||
| "todo_items_board_id_boards_id_fk": { | ||
| "name": "todo_items_board_id_boards_id_fk", | ||
| "tableFrom": "todo_items", | ||
| "tableTo": "boards", | ||
| "columnsFrom": [ | ||
| "board_id" | ||
| ], | ||
| "columnsTo": [ | ||
| "id" | ||
| ], | ||
| "onDelete": "cascade", | ||
| "onUpdate": "no action" | ||
| }, | ||
| "todo_items_project_id_projects_id_fk": { | ||
| "name": "todo_items_project_id_projects_id_fk", | ||
| "tableFrom": "todo_items", | ||
| "tableTo": "projects", | ||
| "columnsFrom": [ | ||
| "project_id" | ||
| ], | ||
| "columnsTo": [ | ||
| "id" | ||
| ], | ||
| "onDelete": "cascade", | ||
| "onUpdate": "no action" | ||
| } | ||
| }, | ||
| "compositePrimaryKeys": {}, | ||
| "uniqueConstraints": {}, | ||
| "policies": {}, | ||
| "checkConstraints": {}, | ||
| "isRLSEnabled": false | ||
| }, | ||
| "public.users": { | ||
| "name": "users", | ||
| "schema": "", | ||
| "columns": { | ||
| "id": { | ||
| "name": "id", | ||
| "type": "text", | ||
| "primaryKey": true, | ||
| "notNull": true | ||
| }, | ||
| "name": { | ||
| "name": "name", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true | ||
| }, | ||
| "age": { | ||
| "name": "age", | ||
| "type": "integer", | ||
| "primaryKey": false, | ||
| "notNull": true | ||
| }, | ||
| "email": { | ||
| "name": "email", | ||
| "type": "text", | ||
| "primaryKey": false, | ||
| "notNull": true | ||
| } | ||
| }, | ||
| "indexes": {}, | ||
| "foreignKeys": {}, | ||
| "compositePrimaryKeys": {}, | ||
| "uniqueConstraints": { | ||
| "users_email_unique_tempdbid": { | ||
| "name": "users_email_unique_tempdbid", | ||
| "nullsNotDistinct": false, | ||
| "columns": [ | ||
| "email" | ||
| ] | ||
| } | ||
| }, | ||
| "policies": {}, | ||
| "checkConstraints": {}, | ||
| "isRLSEnabled": false | ||
| } | ||
| }, | ||
| "enums": {}, | ||
| "schemas": {}, | ||
| "sequences": {}, | ||
| "roles": {}, | ||
| "policies": {}, | ||
| "views": {}, | ||
| "_meta": { | ||
| "columns": {}, | ||
| "schemas": {}, | ||
| "tables": {} | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.