Skip to content

Commit e4a005e

Browse files
committed
init
0 parents  commit e4a005e

30 files changed

+32955
-0
lines changed

.gitignore

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
/tmp
26+
/.idea

README.md

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# SQL-DOM
2+
3+
Set of React components to build SQL queries
4+
5+
## !!!WIP!!!
6+
7+
### Usage
8+
9+
```tsx
10+
const DEFAULT_DATA = {
11+
key: nanoid(),
12+
type: NodeType.Query,
13+
data: {},
14+
children: [
15+
{
16+
key: nanoid(),
17+
type: NodeType.CTEs,
18+
data: {},
19+
children: []
20+
},
21+
createSelectData(),
22+
],
23+
}
24+
25+
function App() {
26+
const [data, setData] = useState<Data>(DEFAULT_DATA);
27+
const dataHandler = createHandler(data, setData);
28+
29+
const [queryContext, setQueryContext] = useState<NodeContext>(DEFAULT_NODE_CONTEXT);
30+
31+
return (<div>
32+
<h2>Query Builder</h2>
33+
{createNode({data, context: queryContext, trigger: dataHandler})}
34+
</div>)
35+
}
36+
```
37+
38+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
39+
40+
## Available Scripts
41+
42+
In the project directory, you can run:
43+
44+
### `npm start`
45+
46+
Runs the app in the development mode.\
47+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
48+
49+
The page will reload if you make edits.\
50+
You will also see any lint errors in the console.
51+
52+
### `npm test`
53+
54+
Launches the test runner in the interactive watch mode.\
55+
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more
56+
information.
57+
58+
### `npm run build`
59+
60+
Builds the app for production to the `build` folder.\
61+
It correctly bundles React in production mode and optimizes the build for the best performance.
62+
63+
The build is minified and the filenames include the hashes.\
64+
Your app is ready to be deployed!
65+
66+
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
67+
68+
### `npm run eject`
69+
70+
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
71+
72+
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will
73+
remove the single build dependency from your project.
74+
75+
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right
76+
into your project so you have full control over them. All of the commands except `eject` will still work, but they will
77+
point to the copied scripts so you can tweak them. At this point you’re on your own.
78+
79+
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you
80+
shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t
81+
customize it when you are ready for it.
82+
83+
## Learn More
84+
85+
You can learn more in
86+
the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
87+
88+
To learn React, check out the [React documentation](https://reactjs.org/).

0 commit comments

Comments
 (0)