-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from ariflogs/dev
Docs update for installation & contributing
- Loading branch information
Showing
9 changed files
with
106 additions
and
26 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 |
---|---|---|
|
@@ -2,4 +2,5 @@ src | |
test | ||
.github | ||
.gitignore | ||
TODO.md | ||
TODO.md | ||
CONTRIBUTING.md |
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,28 @@ | ||
## Before You Contribute | ||
|
||
### Raise an Issue First | ||
|
||
Before you invest a significant amount of time on a change, please create a issue describing your proposal. This will help us to make sure that the change is in line with the project's goals, roadmap and avoid duplicate work. | ||
|
||
### Avoid Dependencies | ||
|
||
We want to keep the project as lightweight as possible. So, please avoid adding any new dependencies unless it's absolutely necessary. | ||
|
||
--- | ||
|
||
## Contributing | ||
|
||
- Fork the repository on GitHub to your personal account. | ||
- Clone your forked repository to your local development environment. | ||
- Create a new branch for your feature or bug fix: `git checkout -b your-branch-name` | ||
- Install the project dependencies: `pnpm i` | ||
- Run the project in development mode: `pnpm dev` | ||
- Make changes to your local repository. | ||
- Commit your changes and push them to your forked repository. | ||
- Open a pull request from your forked repository to the **dev branch** of this repository. | ||
|
||
## Code Licensing | ||
|
||
Your contributions are subject to the project's open-source(MIT) license. By submitting a PR, you agree to release your code under this license. | ||
|
||
## Thanks for your contribution! |
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
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
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,21 @@ | ||
import { mappings } from "config/mapping.mjs"; | ||
import { SqlCommandOptions } from "./sql.mjs"; | ||
|
||
export type MongoCommandOptions = "find" | "insertMany"; | ||
|
||
export interface MongoQueryType { | ||
[key: string]: { | ||
[operator: string]: string | number; | ||
}; | ||
} | ||
|
||
export interface MongoFieldSelectionType { | ||
[key: string]: 1 | 0; | ||
} | ||
|
||
export interface MongoFindOperationType { | ||
select: (typeof mappings)["mongodb"]["commands"]["select"]; // sql -> mongodb | ||
collection: string; | ||
query: MongoQueryType; | ||
fields: MongoFieldSelectionType; | ||
} |
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,12 +1,14 @@ | ||
interface filterType { | ||
export type SqlCommandOptions = "select" | "insert"; | ||
|
||
interface FilterType { | ||
column: string; | ||
operator: "="; | ||
value: string | number; | ||
} | ||
|
||
export interface ParsedSqlType { | ||
command: "select"; | ||
command: SqlCommandOptions; | ||
table: string; | ||
columns: string[]; | ||
filters: filterType[] | null; | ||
filters: FilterType[] | null; | ||
} |
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