This repository was archived by the owner on Jun 12, 2026. It is now read-only.
Conversation
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
🔗 Linked issue
❓ Type of change
📚 Description
Database/InitializeDatabase/DeleteDatabaseto newSchema/SchemaInstance/CreateDatabaseSchemaInstanceAPIValueProxy.Proxy<T>withValueProxy<T>andValueProxy.ProxyOrVal<T>withValueProxyOrValue<T>DataControllerto infer schema name from table metadata instead of requiring an explicitschemaNameparameterGetTablesFromSchema/DEFAULT_SCHEMAwithgetTablesForSchemaQuery.Foreignto useinstanceof Streamcheck instead of duck-typing (query.lookup)Query.Get,Query.List,Query.Deletefor newTable<any>generics and revisedgetAll/orderBysignaturesinsertreturn type from{ generated_keys }tostring[]Deletereturn type fromResult.Write<any>tonumberCreateDatabaseSchemaInstanceandschemaNameconvention, switch module sources from package to git📝 Checklist
Greptile Summary
Successfully migrated from the old
DatabaseAPI to the newSchema/SchemaInstanceAPI (AQL2). This is a comprehensive migration that updates all core components, tests, and playground code to use the new database schema patterns.Key Changes:
Database/InitializeDatabase/DeleteDatabasewithSchema/SchemaInstance/CreateDatabaseSchemaInstanceValueProxy.Proxy<T>toValueProxy<T>andValueProxy.ProxyOrVal<T>toValueProxyOrValue<T>DataControllernow automatically infers schema name from table metadata instead of requiring it as a parameterQuery.Foreignusinginstanceof Streaminstead of duck-typinggetAll(value, index)instead ofgetAll(index, value),orderBywith 2 params instead of 3{ generated_keys: string[] }tostring[]Result.Write<any>tonumberMigration Quality:
The migration is thorough and consistent across all files. Type definitions are properly updated, tests pass the new patterns, and the playground demonstrates correct usage.
Confidence Score: 5/5
Important Files Changed
Query.Foreignto useinstanceof Streamcheck, replacedValueProxy.Proxy<T>withValueProxy<T>, updated API signatures forGet,List, andDeletefunctionsschemaNameparameter fromDataController, now infers from table metadata; updated imports fromGetTablesFromSchematogetTablesForSchema; changedinsertreturn type from object to arrayValueProxy.Proxy<T>toValueProxy<T>andValueProxy.ProxyOrVal<T>toValueProxyOrValue<T>; changed import fromGetTablesFromSchematogetTablesForSchemaInitializeDatabasetoCreateDatabaseSchemaInstancepattern; added schema name parameter to table registration; updated insert result handling from.generated_keysto direct array accessInitializeDatabaseFromSchemawithCreateDatabaseSchemaInstance; removed config parameter fromconstructfunction; simplified module initializationDataControllersignature to removeschemaNameparameter; corrected return types forNewandDeleteroutesFlowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Old API: Database/InitializeDatabase] --> B[New API: Schema/SchemaInstance] B --> C[CreateDatabaseSchemaInstance schemaName, instanceName] C --> D[Schema.get schemaName] D --> E[instance instanceName] E --> F[table tableName] G[DataController tableClass, def, base, schemaName?] --> H[DataController tableClass, def, base] H --> I[Infer schemaName from table metadata] J[ValueProxy.Proxy T] --> K[ValueProxy T] L[ValueProxy.ProxyOrVal T] --> M[ValueProxyOrValue T] N[insert returns generated_keys] --> O[insert returns string array] P[delete returns Result.Write] --> Q[delete returns number] R[getAll index, value] --> S[getAll value, index] T[orderBy key, dir, indexed] --> U[orderBy key, dir]Last reviewed commit: 12ab3b2