Skip to content

Commit

Permalink
improve TableSchemaForClient
Browse files Browse the repository at this point in the history
  • Loading branch information
prostgles committed Nov 30, 2024
1 parent 92ae32c commit 465a6db
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/runClientRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export const runClientRequest = async function(this: Prostgles, args: Args){
*/
const tableCommand = tableHandler[command] satisfies undefined | TableMethodFunctionWithRulesAndLocalParams;
if(!tableCommand) throw `Invalid or disallowed command provided: ${command}`;
//TODO: why does this not work?
// const result = await (tableCommand as TableMethodFunctionWithRulesAndLocalParams)(param1, param2, param3, validRules, localParams);
// return result;
//@ts-ignore
Expand Down
10 changes: 10 additions & 0 deletions tests/server/DBoGenerated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,16 @@ export type DBSchemaGenerated = {
id: string;
};
};
newly_created_table: {
is_view: false;
select: true;
insert: true;
update: true;
delete: true;
columns: {
id?: null | number;
};
};
obj_table: {
is_view: false;
select: true;
Expand Down

0 comments on commit 465a6db

Please sign in to comment.