@burakboduroglu/penote 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +223 -0
- package/CHANGELOG.md +64 -0
- package/CONTRIBUTING.md +102 -0
- package/Java-Notes/jpa_hibernate.md +168 -0
- package/Java-Notes/lombok.md +41 -0
- package/Java-Notes/readme.md +15 -0
- package/Java-Notes/spring_boot_framework.md +227 -0
- package/Javascript-Notes/async_js.md +82 -0
- package/Javascript-Notes/closures_currying_compose.md +63 -0
- package/Javascript-Notes/javascirpt_array_methods.md +339 -0
- package/Javascript-Notes/readme.md +16 -0
- package/Javascript-Notes/regex_part_1.md +258 -0
- package/LICENSE +21 -0
- package/MongoDB-Notes/mongodb_basic_1.md +1 -0
- package/MongoDB-Notes/readme.md +13 -0
- package/Python-Notes/advanced_python_1.md +142 -0
- package/Python-Notes/advanced_python_2.md +155 -0
- package/Python-Notes/python_basic_1.md +132 -0
- package/Python-Notes/python_basic_2.md +137 -0
- package/Python-Notes/python_basic_3.md +139 -0
- package/Python-Notes/python_db_process.md +126 -0
- package/Python-Notes/readme.md +18 -0
- package/README.md +179 -0
- package/SQL-Notes/psql_on_terminal.md +26 -0
- package/SQL-Notes/readme.md +16 -0
- package/SQL-Notes/sql_advanced_1.md +92 -0
- package/SQL-Notes/sql_basic_1.md +114 -0
- package/SQL-Notes/sql_basic_2.md +92 -0
- package/assets/demo.png +0 -0
- package/assets/penote-logo.svg +34 -0
- package/library/cli.js +1253 -0
- package/library/index.html +475 -0
- package/package.json +57 -0
package/README.md
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="assets/penote-logo.svg" alt="penote logo" width="140">
|
|
4
|
+
|
|
5
|
+
# penote
|
|
6
|
+
|
|
7
|
+
**Agentic learning docs — programming notes agents and humans can both read, search, and open.**
|
|
8
|
+
|
|
9
|
+
[**Install from npm →**](#install)
|
|
10
|
+
|
|
11
|
+
[](https://github.com/burakboduroglu/penote/actions/workflows/ci.yml)
|
|
12
|
+
[](https://www.npmjs.com/package/@burakboduroglu/penote)
|
|
13
|
+
[](https://github.com/burakboduroglu/penote/releases)
|
|
14
|
+
[](LICENSE)
|
|
15
|
+
[](https://github.com/burakboduroglu/penote/commits)
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+

|
|
19
|
+

|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
Learning material that sits in plain Markdown, organised by topic, and stays usable from a terminal, a TUI, or a browser. The same files are what AI agents read through `AGENTS.md` and what you open when you need a concept again — no CMS, no build step, no dependency tree for the notes themselves.
|
|
27
|
+
|
|
28
|
+
> The npm package is **`@burakboduroglu/penote`**. The CLI binary is **`penote`**.
|
|
29
|
+
> Previously published as `devnotetr` / `devnote` — that name is retired.
|
|
30
|
+
|
|
31
|
+
## What it is
|
|
32
|
+
|
|
33
|
+
A small library of programming notes (Java, JavaScript, Python, SQL, MongoDB) plus a zero-dependency Node.js CLI that lists, searches, and opens them. Content lives in category folders; the tooling only discovers and presents it.
|
|
34
|
+
|
|
35
|
+
Notes are written in Turkish with technical terms left in English where that is clearer. The repository surface — README, contributing docs, issue forms — is English so the project sits alongside the rest of the open-source set.
|
|
36
|
+
|
|
37
|
+
## Highlights
|
|
38
|
+
|
|
39
|
+
| | Feature | How it works |
|
|
40
|
+
| --- | ------- | ------------ |
|
|
41
|
+
| 📚 | **Topic folders** | One category per language/domain; CLI derives names from the path. |
|
|
42
|
+
| 🔍 | **Search** | Filter by category and keyword from the terminal. |
|
|
43
|
+
| 🖥️ | **Three surfaces** | Editor, interactive TUI, or local Web UI — same Markdown source. |
|
|
44
|
+
| 🤖 | **Agent-ready** | `AGENTS.md` tells coding agents how to add notes and leave the CLI intact. |
|
|
45
|
+
| 🪶 | **Zero runtime deps** | Node.js 18+ built-ins only for the CLI and a single-file Web UI. |
|
|
46
|
+
| 📦 | **npm package** | `penote` on your PATH after installing `@burakboduroglu/penote`. |
|
|
47
|
+
|
|
48
|
+
## Topics
|
|
49
|
+
|
|
50
|
+
| Category | Covers |
|
|
51
|
+
| -------- | ------ |
|
|
52
|
+
| Java | Lombok, JPA / Hibernate, Spring Boot |
|
|
53
|
+
| JavaScript | Array methods, closures, currying, async, regex |
|
|
54
|
+
| Python | Basics, advanced topics, database operations |
|
|
55
|
+
| SQL | Basic queries, advanced SQL, `psql` on the terminal |
|
|
56
|
+
| MongoDB | Basic CRUD and querying |
|
|
57
|
+
|
|
58
|
+
## Install
|
|
59
|
+
|
|
60
|
+
**npm** — [@burakboduroglu/penote](https://www.npmjs.com/package/@burakboduroglu/penote)
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
bun add -g @burakboduroglu/penote
|
|
64
|
+
penote help
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**From source** — no install step required beyond [bun](https://bun.sh):
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
git clone https://github.com/burakboduroglu/penote.git
|
|
71
|
+
cd penote
|
|
72
|
+
bun library/cli.js help
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Quick start
|
|
76
|
+
|
|
77
|
+
<img src="assets/demo.png" alt="penote list filtered to the Java category" width="820">
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
penote list
|
|
81
|
+
penote list --cat java
|
|
82
|
+
penote search hibernate
|
|
83
|
+
penote open --tui
|
|
84
|
+
penote open --editor
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## CLI reference
|
|
88
|
+
|
|
89
|
+
| Command | What it does |
|
|
90
|
+
| ------- | ------------ |
|
|
91
|
+
| `penote help` | Show commands |
|
|
92
|
+
| `penote list` | List every note |
|
|
93
|
+
| `penote list --cat java` | List notes in a category |
|
|
94
|
+
| `penote list --cat py --search temel` | Category + keyword filter |
|
|
95
|
+
| `penote search hibernate` | Search all notes |
|
|
96
|
+
| `penote open 3` | Open note `#3` in the editor |
|
|
97
|
+
| `penote open --tui` | Interactive TUI |
|
|
98
|
+
| `penote open --editor` | Open the Web UI in a browser |
|
|
99
|
+
| `penote open --browser 6` | Open note `#6` in the browser |
|
|
100
|
+
|
|
101
|
+
### TUI keys
|
|
102
|
+
|
|
103
|
+
`penote open --tui` is three steps: pick a category, pick a note, pick how to open it.
|
|
104
|
+
|
|
105
|
+
| Key | Action |
|
|
106
|
+
| --- | ------ |
|
|
107
|
+
| ↑ / ↓ | Move |
|
|
108
|
+
| Enter | Confirm the current step |
|
|
109
|
+
| `p` | Markdown preview |
|
|
110
|
+
| `e` | Open in editor |
|
|
111
|
+
| `b` | Open in browser |
|
|
112
|
+
| Backspace | Go back |
|
|
113
|
+
| `q` | Quit |
|
|
114
|
+
|
|
115
|
+
## Web UI
|
|
116
|
+
|
|
117
|
+
`library/index.html` is a single-file vanilla UI: category filters, instant search, and a detail view for each note. Start it with:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
penote open --editor
|
|
121
|
+
# or from a clone
|
|
122
|
+
bun library/cli.js open --editor
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Requirements
|
|
126
|
+
|
|
127
|
+
- [Node.js](https://nodejs.org) 18 or newer to run the published CLI
|
|
128
|
+
- [bun](https://bun.sh) for local development
|
|
129
|
+
- No runtime dependencies for the CLI or Web UI
|
|
130
|
+
|
|
131
|
+
## Project layout
|
|
132
|
+
|
|
133
|
+
```text
|
|
134
|
+
penote/ # GitHub repo name (local folder)
|
|
135
|
+
├── Java-Notes/ # Topic notes (Turkish Markdown)
|
|
136
|
+
├── Javascript-Notes/
|
|
137
|
+
├── Python-Notes/
|
|
138
|
+
├── SQL-Notes/
|
|
139
|
+
├── MongoDB-Notes/
|
|
140
|
+
├── library/
|
|
141
|
+
│ ├── cli.js # CLI / TUI entry (`penote`)
|
|
142
|
+
│ └── index.html # Web UI
|
|
143
|
+
├── assets/
|
|
144
|
+
│ └── penote-logo.svg
|
|
145
|
+
├── AGENTS.md
|
|
146
|
+
├── CHANGELOG.md
|
|
147
|
+
├── CODE_OF_CONDUCT.md
|
|
148
|
+
├── CONTRIBUTING.md
|
|
149
|
+
├── LICENSE
|
|
150
|
+
├── README.md
|
|
151
|
+
└── SECURITY.md
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Development
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
git clone https://github.com/burakboduroglu/penote.git
|
|
158
|
+
cd penote
|
|
159
|
+
bun library/cli.js list
|
|
160
|
+
bun library/cli.js search hibernate
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
| Command | What it does |
|
|
164
|
+
| ------- | ------------ |
|
|
165
|
+
| `bun library/cli.js list` | Smoke-test note discovery |
|
|
166
|
+
| `bun library/cli.js search <kw>` | Smoke-test search |
|
|
167
|
+
| `bun library/cli.js open --editor` | Local Web UI |
|
|
168
|
+
| `bun run start` | Same as `bun library/cli.js` |
|
|
169
|
+
| `bun run dev` | Open the Web UI |
|
|
170
|
+
|
|
171
|
+
CI runs the list/search smoke checks on Node 18, 20, and 22.
|
|
172
|
+
|
|
173
|
+
## Contributing
|
|
174
|
+
|
|
175
|
+
Bugs, note fixes, and small CLI/Web improvements are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md) first. Security reports go through [SECURITY.md](SECURITY.md), not the public tracker.
|
|
176
|
+
|
|
177
|
+
## License
|
|
178
|
+
|
|
179
|
+
[MIT](LICENSE) © Burak Boduroğlu
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
## PSQL ON TERMINAL 🚀👩🚀
|
|
2
|
+
|
|
3
|
+
### `\l :`
|
|
4
|
+
- List all databases
|
|
5
|
+
|
|
6
|
+
### `\l+ :`
|
|
7
|
+
- List all databases with more details
|
|
8
|
+
|
|
9
|
+
### `\c <database_name> :`
|
|
10
|
+
- Connect to a database
|
|
11
|
+
|
|
12
|
+
### `\dt :`
|
|
13
|
+
- List all tables
|
|
14
|
+
|
|
15
|
+
### `\d <table_name> :`
|
|
16
|
+
- List all columns of a table
|
|
17
|
+
|
|
18
|
+
### `\du :`
|
|
19
|
+
- List all users
|
|
20
|
+
|
|
21
|
+
### `\du+ :`
|
|
22
|
+
- List all users with more details
|
|
23
|
+
|
|
24
|
+
### `\q :`
|
|
25
|
+
- Quit
|
|
26
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
### About SQL-Notes 🚀
|
|
2
|
+
|
|
3
|
+
Kişisel SQL notları — Markdown formatında düzenlenmiştir.
|
|
4
|
+
|
|
5
|
+
### Table of Contents 📚
|
|
6
|
+
|
|
7
|
+
| File Name | Topics |
|
|
8
|
+
| --------- | ------ |
|
|
9
|
+
| [sql_basic_1.md](sql_basic_1.md) | Basic SQL |
|
|
10
|
+
| [sql_basic_2.md](sql_basic_2.md) | WHERE clause |
|
|
11
|
+
| [sql_advanced_1.md](sql_advanced_1.md) | Advanced SQL |
|
|
12
|
+
| [psql_on_terminal.md](psql_on_terminal.md) | psql in the terminal |
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
[← README](../README.md)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
## SQL Advanced - 1 🚀👩🚀
|
|
2
|
+
|
|
3
|
+
### 1. SQL - Data Types
|
|
4
|
+
|
|
5
|
+
- **Numeric** - `INT`, `FLOAT`, `DECIMAL`
|
|
6
|
+
- **String** - `CHAR`, `VARCHAR`, `TEXT`
|
|
7
|
+
- **Date/Time** - `DATE`, `DATETIME`, `TIMESTAMP`
|
|
8
|
+
- **Boolean** - `BOOLEAN`
|
|
9
|
+
|
|
10
|
+
### 2. SQL - Operators
|
|
11
|
+
|
|
12
|
+
- **Arithmetic** - `+`, `-`, `*`, `/`, `MOD`
|
|
13
|
+
- **Comparison** - `=`, `!=`, `<>`, `>`, `<`, `>=`, `<=`
|
|
14
|
+
- **Logical** - `AND`, `OR`, `NOT`
|
|
15
|
+
|
|
16
|
+
### 3. SQL - Functions
|
|
17
|
+
|
|
18
|
+
- **Aggregate** - `COUNT`, `SUM`, `AVG`, `MIN`, `MAX`
|
|
19
|
+
- **String** - `CONCAT`, `LENGTH`, `LOWER`, `UPPER`, `SUBSTRING`
|
|
20
|
+
- **Date/Time** - `CURDATE`, `CURTIME`, `NOW`, `YEAR`, `MONTH`, `DAY`
|
|
21
|
+
|
|
22
|
+
### 4. SQL - Constraints
|
|
23
|
+
|
|
24
|
+
- **NOT NULL** - Ensures that a column cannot have a NULL value
|
|
25
|
+
- **UNIQUE** - Ensures that all values in a column are different
|
|
26
|
+
- **PRIMARY KEY** - A combination of a NOT NULL and UNIQUE. Uniquely identifies each row in a table
|
|
27
|
+
- **FOREIGN KEY** - Uniquely identifies a row/record in another table
|
|
28
|
+
- **CHECK** - Ensures that all values in a column satisfies a specific condition
|
|
29
|
+
- **DEFAULT** - Sets a default value for a column when no value is specified
|
|
30
|
+
- **CREATE INDEX** - Used to create and retrieve data from the database very quickly
|
|
31
|
+
|
|
32
|
+
### 5. SQL - Joins
|
|
33
|
+
|
|
34
|
+
- **INNER JOIN** - Returns records that have matching values in both tables
|
|
35
|
+
- **LEFT JOIN** - Returns all records from the left table, and the matched records from the right table
|
|
36
|
+
- **RIGHT JOIN** - Returns all records from the right table, and the matched records from the left table
|
|
37
|
+
- **FULL JOIN** - Returns all records when there is a match in either left or right table
|
|
38
|
+
|
|
39
|
+
### 6. SQL - Distinct
|
|
40
|
+
|
|
41
|
+
- **DISTINCT** - Returns only distinct (different) values
|
|
42
|
+
|
|
43
|
+
### 7. SQL - Wildcards
|
|
44
|
+
|
|
45
|
+
- **%** - The percent sign represents zero, one, or multiple characters
|
|
46
|
+
- **\_** - The underscore represents a single character
|
|
47
|
+
- **[charlist]** - The bracket represents any single character within the brackets
|
|
48
|
+
- **[!charlist]** - The exclamation mark represents any single character not in the brackets
|
|
49
|
+
|
|
50
|
+
### 8. SQL - Aliases
|
|
51
|
+
|
|
52
|
+
- **AS** - Used to give a table, or a column in a table, a temporary name
|
|
53
|
+
|
|
54
|
+
### 9. SQL - Comments
|
|
55
|
+
|
|
56
|
+
- **--** - Single line comment
|
|
57
|
+
- **/\* \*/** - Multi-line comment
|
|
58
|
+
|
|
59
|
+
### 10. SQL - Order By
|
|
60
|
+
|
|
61
|
+
- **ORDER BY** - Used to sort the result-set in ascending or descending order
|
|
62
|
+
|
|
63
|
+
### 11. SQL - Group By
|
|
64
|
+
|
|
65
|
+
- **GROUP BY** - Used in conjunction with the aggregate functions to group the result-set by one or more columns
|
|
66
|
+
- example: `SELECT COUNT(*), country FROM customers GROUP BY country;`
|
|
67
|
+
|
|
68
|
+
### 12. SQL - Having
|
|
69
|
+
|
|
70
|
+
- **HAVING** - Used with the GROUP BY clause to filter groups of rows that have a common column value
|
|
71
|
+
- example: `SELECT COUNT(*), country FROM customers GROUP BY country HAVING COUNT(*) > 5;`
|
|
72
|
+
|
|
73
|
+
### 13. SQL - Top
|
|
74
|
+
|
|
75
|
+
- **TOP** - Used to specify the number of records to return
|
|
76
|
+
- example: `SELECT TOP 3 * FROM customers;`
|
|
77
|
+
|
|
78
|
+
### 14. SQL - Subqueries
|
|
79
|
+
|
|
80
|
+
- **Subquery** - A query within another query and embedded within the WHERE clause
|
|
81
|
+
- example: `SELECT * FROM customers WHERE country = 'USA' AND city IN (SELECT city FROM customers WHERE country = 'UK');`
|
|
82
|
+
|
|
83
|
+
### 15. SQL - Check
|
|
84
|
+
|
|
85
|
+
- **CHECK** - Ensures that all values in a column satisfies a specific condition
|
|
86
|
+
- example: `CREATE TABLE Persons (ID int NOT NULL, LastName varchar(255) NOT NULL, FirstName varchar(255), Age int, CHECK (Age>=18));`
|
|
87
|
+
|
|
88
|
+
### 16. SQL - Unique
|
|
89
|
+
|
|
90
|
+
- **UNIQUE** - Ensures that all values in a column are different
|
|
91
|
+
- example: `CREATE TABLE Persons (ID int NOT NULL, LastName varchar(255) NOT NULL, FirstName varchar(255), Age int, UNIQUE (ID));`
|
|
92
|
+
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
## SQL Basics - 1 🚀👩🚀
|
|
2
|
+
|
|
3
|
+
### - Data Manipulation Commands
|
|
4
|
+
|
|
5
|
+
- `SELECT` - used to retrieve data from a database
|
|
6
|
+
example:
|
|
7
|
+
|
|
8
|
+
```sql
|
|
9
|
+
SELECT column1, column2, ...
|
|
10
|
+
FROM table_name;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
- `UPDATE` - used to update existing data within a database
|
|
14
|
+
example:
|
|
15
|
+
|
|
16
|
+
```sql
|
|
17
|
+
UPDATE table_name
|
|
18
|
+
SET column1 = value1, column2 = value2, ...
|
|
19
|
+
WHERE condition;
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- `DELETE` - used to delete records from a database
|
|
23
|
+
example:
|
|
24
|
+
|
|
25
|
+
```sql
|
|
26
|
+
DELETE FROM table_name
|
|
27
|
+
WHERE condition;
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- `INSERT INTO` - used to insert new data into a database
|
|
31
|
+
example:
|
|
32
|
+
|
|
33
|
+
```sql
|
|
34
|
+
INSERT INTO table_name (column1, column2, column3, ...)
|
|
35
|
+
VALUES (value1, value2, value3, ...);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
- `TRUNCATE TABLE` - used to remove all records from a table, including all spaces allocated for the records are removed
|
|
39
|
+
example:
|
|
40
|
+
|
|
41
|
+
```sql
|
|
42
|
+
TRUNCATE TABLE table_name;
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### - Database Manipulation Commands
|
|
48
|
+
|
|
49
|
+
- `CREATE DATABASE` - used to create a new database
|
|
50
|
+
example:
|
|
51
|
+
|
|
52
|
+
```sql
|
|
53
|
+
CREATE DATABASE database_name;
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
- `ALTER DATABASE` - used to modify a database
|
|
57
|
+
example:
|
|
58
|
+
|
|
59
|
+
```sql
|
|
60
|
+
ALTER DATABASE database_name
|
|
61
|
+
MODIFY COLUMN column_name datatype;
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- `DROP DATABASE` - used to delete a database
|
|
65
|
+
example:
|
|
66
|
+
|
|
67
|
+
```sql
|
|
68
|
+
DROP DATABASE database_name;
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
- `CREATE TABLE` - used to create a new table
|
|
72
|
+
example:
|
|
73
|
+
|
|
74
|
+
```sql
|
|
75
|
+
CREATE TABLE table_name (
|
|
76
|
+
column1 datatype,
|
|
77
|
+
column2 datatype,
|
|
78
|
+
column3 datatype,
|
|
79
|
+
....
|
|
80
|
+
);
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
- `ALTER TABLE` - used to modify a table
|
|
84
|
+
example:
|
|
85
|
+
|
|
86
|
+
```sql
|
|
87
|
+
ALTER TABLE table_name
|
|
88
|
+
ADD column_name datatype;
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
- `DROP TABLE` - used to delete a table
|
|
92
|
+
example:
|
|
93
|
+
|
|
94
|
+
```sql
|
|
95
|
+
DROP TABLE table_name;
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
- `CREATE INDEX` - used to create an index (search key)
|
|
99
|
+
example:
|
|
100
|
+
|
|
101
|
+
```sql
|
|
102
|
+
CREATE INDEX index_name
|
|
103
|
+
ON table_name (column_name);
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
- `DROP INDEX` - used to delete an index
|
|
107
|
+
example:
|
|
108
|
+
|
|
109
|
+
```sql
|
|
110
|
+
DROP INDEX index_name
|
|
111
|
+
ON table_name;
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
## SQL Basics - 2 🚀👩🚀
|
|
2
|
+
|
|
3
|
+
### - "WHERE" clause
|
|
4
|
+
|
|
5
|
+
- "WHERE" clause is used to filter the records based on some condition.
|
|
6
|
+
example:
|
|
7
|
+
|
|
8
|
+
```sql
|
|
9
|
+
SELECT * FROM table_name WHERE column_name = value;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
- "WHERE" clause can be used with "AND" and "OR" operators.
|
|
13
|
+
example:
|
|
14
|
+
|
|
15
|
+
```sql
|
|
16
|
+
SELECT * FROM table_name WHERE column_name = value AND column_name = value;
|
|
17
|
+
SELECT * FROM table_name WHERE column_name = value OR column_name = value;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- "WHERE" clause can be used with "IN" operator.
|
|
21
|
+
- "IN" operator is used to specify multiple values in a "WHERE" clause.
|
|
22
|
+
example:
|
|
23
|
+
|
|
24
|
+
```sql
|
|
25
|
+
SELECT * FROM table_name WHERE column_name IN (value1, value2, value3);
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- "WHERE" clause can be used with "BETWEEN" operator.
|
|
29
|
+
- "BETWEEN" operator is used to specify a range of values in a "WHERE" clause.
|
|
30
|
+
example:
|
|
31
|
+
|
|
32
|
+
```sql
|
|
33
|
+
SELECT * FROM table_name WHERE column_name BETWEEN value1 AND value2;
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- "WHERE" clause can be used with "LIKE" operator.
|
|
37
|
+
- "LIKE" operator is used to search for a pattern in a "WHERE" clause.
|
|
38
|
+
example:
|
|
39
|
+
|
|
40
|
+
```sql
|
|
41
|
+
SELECT * FROM table_name WHERE column_name LIKE 'value%';
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- "WHERE" clause can be used with "NOT" operator.
|
|
45
|
+
example:
|
|
46
|
+
|
|
47
|
+
```sql
|
|
48
|
+
SELECT * FROM table_name WHERE NOT column_name = value;
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- "WHERE" clause can be used with "IS NULL" operator.
|
|
52
|
+
example:
|
|
53
|
+
|
|
54
|
+
```sql
|
|
55
|
+
SELECT * FROM table_name WHERE column_name IS NULL;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- "WHERE" clause can be used with "IS NOT NULL" operator.
|
|
59
|
+
example:
|
|
60
|
+
|
|
61
|
+
```sql
|
|
62
|
+
SELECT * FROM table_name WHERE column_name IS NOT NULL;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
- "WHERE" clause can be used with "ORDER BY" clause.
|
|
66
|
+
example:
|
|
67
|
+
|
|
68
|
+
```sql
|
|
69
|
+
SELECT * FROM table_name WHERE column_name = value ORDER BY column_name;
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
- "WHERE" clause can be used with "GROUP BY" clause.
|
|
73
|
+
- "GROUP BY" clause is used to group the result-set by one or more columns.
|
|
74
|
+
example:
|
|
75
|
+
|
|
76
|
+
```sql
|
|
77
|
+
SELECT * FROM table_name WHERE column_name = value GROUP BY column_name;
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Table of Where Clause Operators
|
|
81
|
+
|
|
82
|
+
| Operator | Description |
|
|
83
|
+
| -------- | --------------------------------------------------------------------------- |
|
|
84
|
+
| = | Equal |
|
|
85
|
+
| > | Greater than |
|
|
86
|
+
| < | Less than |
|
|
87
|
+
| >= | Greater than or equal |
|
|
88
|
+
| <= | Less than or equal |
|
|
89
|
+
| <> | Not equal. Note: In some versions of SQL this operator may be written as != |
|
|
90
|
+
| BETWEEN | Between a certain range |
|
|
91
|
+
| LIKE | Search for a pattern |
|
|
92
|
+
| IN | To specify multiple possible values for a column |
|
package/assets/demo.png
ADDED
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
penote mark: a geometric "pn" monogram with an AI sparkle, on a rounded
|
|
3
|
+
indigo tile. Quiet app-icon language — same family as portkill / macshelf.
|
|
4
|
+
The monogram is drawn on a 512 grid and scaled to 0.9 so the sparkle keeps
|
|
5
|
+
a clear top-right corner.
|
|
6
|
+
-->
|
|
7
|
+
<svg width="512" height="512" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="title desc">
|
|
8
|
+
<title id="title">penote logo</title>
|
|
9
|
+
<desc id="desc">Indigo rounded tile with a lowercase pn monogram and a sparkle.</desc>
|
|
10
|
+
<defs>
|
|
11
|
+
<linearGradient id="plate" x1="72" y1="40" x2="440" y2="472" gradientUnits="userSpaceOnUse">
|
|
12
|
+
<stop stop-color="#A5B4FC"/>
|
|
13
|
+
<stop offset="0.45" stop-color="#6366F1"/>
|
|
14
|
+
<stop offset="1" stop-color="#3730A3"/>
|
|
15
|
+
</linearGradient>
|
|
16
|
+
</defs>
|
|
17
|
+
|
|
18
|
+
<rect width="512" height="512" rx="139" fill="url(#plate)"/>
|
|
19
|
+
|
|
20
|
+
<!-- pn monogram: p = stem + descender + bowl, n = stem + shoulder -->
|
|
21
|
+
<g transform="translate(25.6, 30) scale(0.9)"
|
|
22
|
+
fill="none" stroke="#0B1026" stroke-width="44" stroke-linecap="round">
|
|
23
|
+
<path d="M108 144 V368"/>
|
|
24
|
+
<path d="M108 144 A98 78 0 0 1 108 300"/>
|
|
25
|
+
<path d="M280 300 V206"/>
|
|
26
|
+
<path d="M280 206 A62 62 0 0 1 404 206 V300"/>
|
|
27
|
+
</g>
|
|
28
|
+
|
|
29
|
+
<!-- AI sparkle -->
|
|
30
|
+
<path
|
|
31
|
+
d="M412 62 C412 95 419 102 452 102 C419 102 412 109 412 142
|
|
32
|
+
C412 109 405 102 372 102 C405 102 412 95 412 62 Z"
|
|
33
|
+
fill="#F8FAFF"/>
|
|
34
|
+
</svg>
|