File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed
Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 22 "name" : " @objectstack/plugin-driver-memory" ,
33 "version" : " 0.0.1" ,
44 "description" : " Example: In-Memory Database Driver for ObjectStack" ,
5- "main" : " dist/index.js" ,
6- "types" : " dist/index.d.ts" ,
5+ "main" : " dist/src/ index.js" ,
6+ "types" : " dist/src/ index.d.ts" ,
77 "scripts" : {
88 "build" : " tsc" ,
99 "dev" : " tsc -w"
Original file line number Diff line number Diff line change @@ -185,13 +185,8 @@ const port = 3004;
185185
186186( async ( ) => {
187187 console . log ( '--- Starting ObjectStack Server ---' ) ;
188- try {
189- await loadPlugins ( ) ;
190- console . log ( '--- Plugins Loaded ---' ) ;
191- } catch ( err ) {
192- console . error ( 'Failed to load plugins:' , err ) ;
193- }
194-
188+ // Plugin loading is now handled by DataEngine constructor/init
189+
195190 console . log ( `Server is running on http://localhost:${ port } ` ) ;
196191
197192 serve ( {
Original file line number Diff line number Diff line change @@ -85,6 +85,16 @@ export class DataEngine {
8585 return this . ql . insert ( objectName , data ) ;
8686 }
8787
88+ async update ( objectName : string , id : string , data : any ) {
89+ this . ensureSchema ( objectName ) ;
90+ return this . ql . update ( objectName , id , data ) ;
91+ }
92+
93+ async delete ( objectName : string , id : string ) {
94+ this . ensureSchema ( objectName ) ;
95+ return this . ql . delete ( objectName , id ) ;
96+ }
97+
8898 private ensureSchema ( name : string ) : ServiceObject {
8999 const schema = SchemaRegistry . getObject ( name ) ;
90100 if ( ! schema ) throw new Error ( `Unknown object: ${ name } ` ) ;
You can’t perform that action at this time.
0 commit comments