-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor to QueryBuilder * chore: changeset * Implement Update and Insert, and start tests * Advanced order by options * Switch test to use enums * Delete() method * Refactor: do not require a near useless prepare() method * Insert() and Update() tests * Rename variable to be tableName * Refactor Model to use QueryBuilder * Upsert() method * Remove unnecessary types * Check insert and update objects are not empty * Surround table names with backticks to prevent unusual chars issues
- Loading branch information
Showing
7 changed files
with
596 additions
and
204 deletions.
There are no files selected for viewing
This file contains 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,7 @@ | ||
--- | ||
"d1-orm": minor | ||
--- | ||
|
||
[breaking] feat: Switch to use a QueryBuilder instead of duplicate code in the Model class | ||
|
||
This will be much more expandable in future to support things like advanced where querying, using operators other than AND, joins, etc. |
This file contains 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 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from "./database"; | ||
export * from "./model"; | ||
export * from "./datatypes"; | ||
export * from "./database.js"; | ||
export * from "./model.js"; | ||
export * from "./datatypes.js"; | ||
export * from "./queryBuilder.js"; |
This file contains 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.