Comparing version 0.27.23-next.3 to 0.27.23-next.4
@@ -20,4 +20,28 @@ export const GroupByCountMember = '$count'; | ||
}; | ||
//p1 - make error info an actual error, important for exception handling, and also for auth.js errors that were mistic | ||
//p1 - add validators min,max,between(range) | ||
/*p1 - issues in https://stackblitz.com/edit/demo-allow-delete-based-on-other-entity: | ||
- don't like the ensure schema | ||
- seems like this didn't work well in their version of sqlite: | ||
``` | ||
@Entity<TaskUser>('TaskUsers', { | ||
id: ['taskId', 'userId'], | ||
}) | ||
``` | ||
- This could be better | ||
``` | ||
sqlExpression: async () => { | ||
if (!remult.authenticated()) return 'false'; | ||
return ( | ||
'1=' + | ||
(await sqlRelations(Task).taskUsers.$count({ | ||
userId: [remult.user?.id], | ||
canDelete: true, | ||
})) | ||
); | ||
}, | ||
``` | ||
- | ||
*/ | ||
//p1 - deleteAll({title:undefined}) should throw an error - not return 0 (with direct call to db) | ||
//p1 - remult-create, move db question ahead of auth - everyone needs a database, not everyone need auth | ||
//p1 - allow experimental route registration on remult server, with at least get route, and support redirect, read header and set header - (and the existing get html etc...) | ||
@@ -24,0 +48,0 @@ //p2 - add parameter all to deleteMany, and updateMany |
{ | ||
"name": "remult", | ||
"version": "0.27.23-next.3", | ||
"version": "0.27.23-next.4", | ||
"description": "A CRUD framework for full-stack TypeScript", | ||
@@ -5,0 +5,0 @@ "homepage": "https://remult.dev", |
@@ -103,3 +103,3 @@ import type { ClassType } from '../../classType.js'; | ||
*/ | ||
static toOne<entityType, toEntityType>(toEntityType: () => ClassType<toEntityType>, options?: (FieldOptions<entityType, toEntityType> & Pick<RelationOptions<entityType, toEntityType, any, any>, 'defaultIncluded'>) | RelationOptions<entityType, toEntityType, entityType> | keyof entityType): (target: any, context: string | ClassFieldDecoratorContextStub<any, toEntityType>, c?: any) => void; | ||
static toOne<entityType, toEntityType>(toEntityType: () => ClassType<toEntityType>, options?: (FieldOptions<entityType, toEntityType> & Pick<RelationOptions<entityType, toEntityType, any, any>, 'defaultIncluded'>) | RelationOptions<entityType, toEntityType, entityType> | keyof entityType): (target: any, context: ClassFieldDecoratorContextStub<entityType, toEntityType | undefined> | string, c?: any) => void; | ||
/** | ||
@@ -106,0 +106,0 @@ * Define a toMany relation between entities, indicating a one-to-many relationship. |
@@ -23,4 +23,28 @@ "use strict"; | ||
}; | ||
//p1 - make error info an actual error, important for exception handling, and also for auth.js errors that were mistic | ||
//p1 - add validators min,max,between(range) | ||
/*p1 - issues in https://stackblitz.com/edit/demo-allow-delete-based-on-other-entity: | ||
- don't like the ensure schema | ||
- seems like this didn't work well in their version of sqlite: | ||
``` | ||
@Entity<TaskUser>('TaskUsers', { | ||
id: ['taskId', 'userId'], | ||
}) | ||
``` | ||
- This could be better | ||
``` | ||
sqlExpression: async () => { | ||
if (!remult.authenticated()) return 'false'; | ||
return ( | ||
'1=' + | ||
(await sqlRelations(Task).taskUsers.$count({ | ||
userId: [remult.user?.id], | ||
canDelete: true, | ||
})) | ||
); | ||
}, | ||
``` | ||
- | ||
*/ | ||
//p1 - deleteAll({title:undefined}) should throw an error - not return 0 (with direct call to db) | ||
//p1 - remult-create, move db question ahead of auth - everyone needs a database, not everyone need auth | ||
//p1 - allow experimental route registration on remult server, with at least get route, and support redirect, read header and set header - (and the existing get html etc...) | ||
@@ -27,0 +51,0 @@ //p2 - add parameter all to deleteMany, and updateMany |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4962424
55829