Skip to content

Commit 9ac939a

Browse files
committed
Update README #5
1 parent 4cef711 commit 9ac939a

File tree

2 files changed

+42
-54
lines changed

2 files changed

+42
-54
lines changed

README.md

Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ The SQLite Plugin is a pre-packaged, plug-and-play integration component for the
44

55
This plugin is automatically installed by the FlowSynx engine when selected within the platform. It is not intended for manual installation or standalone developer use outside the FlowSynx environment.
66

7-
---
8-
97
## Purpose
108

119
The SQLite Plugin allows FlowSynx users to:
@@ -15,75 +13,63 @@ The SQLite Plugin allows FlowSynx users to:
1513
- Perform data transformation and filtering inline using SQL.
1614
- Integrate SQLite operations into automation workflows without writing code.
1715

18-
---
19-
2016
## Supported Operations
2117

22-
- **query**: Executes a SQL `SELECT` query and returns the result set as JSON.
23-
- **execute**: Executes a SQL command (`INSERT`, `UPDATE`, `DELETE`, etc.) and returns the number of affected rows.
24-
25-
---
18+
- **query**: Executes a SQL `SELECT` query and returns the result set as structured data (see below).
19+
- **execute**: Executes a SQL command (`INSERT`, `UPDATE`, `DELETE`, etc.) and returns the number of affected rows (or null if using structured data input).
2620

2721
## Plugin Specifications
2822

2923
The plugin requires the following configuration:
30-
- ConnectionString (string): **Required.** The PostgreSQL connection string used to connect to the database. Example:
24+
- `ConnectionString` (string): **Required.** The SQLite connection string used to connect to the database. Example:
3125
```
3226
Data Source=C:\databases\flowdata.db
3327
```
3428

35-
---
36-
3729
## Input Parameters
3830

39-
The plugin accepts the following parameters:
31+
The plugin accepts the following parameters (see `InputParameter`):
4032

41-
- `Operation` (string): **Required.** The type of operation to perform. Supported values are `query` and `execute`.
42-
- `Sql` (string): **Required.** The SQL query or command to execute. Use parameter placeholders (e.g., `@id`, `@name`) for dynamic values.
33+
- `Operation` (string): **Required.** The type of operation to perform. Supported values are `query` and `execute`.
34+
- `Sql` (string): **Required.** The SQL query or command to execute. Use parameter placeholders (e.g., `@id`, `@name`) for dynamic values.
4335
- `Params` (object): Optional. A dictionary of parameter names and values to be used in the SQL template.
36+
- `Data` (object): Optional. Used for structured data operations (e.g., bulk inserts/updates). Should be a `PluginContext` object with a `StructuredData` property containing a list of dictionaries.
4437

4538
### Example input
4639

4740
```json
4841
{
4942
"Operation": "query",
5043
"Sql": "SELECT id, name, email FROM users WHERE country = @country",
51-
"Parameters": {
44+
"Params": {
5245
"country": "Norway"
5346
}
5447
}
5548
```
5649

57-
---
58-
5950
## Debugging Tips
6051

61-
- Ensure the `ConnectionString` is correct and the file is accessible from the FlowSynx environment.
62-
- Use parameter placeholders (`@parameterName`) in the SQL to prevent SQL injection and enable parameterization.
63-
- Validate that all required parameters are provided in the `Params` dictionary.
64-
- If a query returns no results, verify that your SQL `WHERE` conditions are correct and the target table contains matching data.
65-
66-
---
52+
- Ensure the `ConnectionString` is correct and the file is accessible from the FlowSynx environment.
53+
- Use parameter placeholders (`@parameterName`) in the SQL to prevent SQL injection and enable parameterization.
54+
- Validate that all required parameters are provided in the `Params` dictionary.
55+
- If a query returns no results, verify that your SQL `WHERE` conditions are correct and the target table contains matching data.
56+
- For bulk operations, ensure `Data` is a valid `PluginContext` with a `StructuredData` list.
6757

6858
## SQLite Limitations
6959

7060
When using SQLite within FlowSynx, keep the following considerations in mind:
7161

72-
- **No Parallel Writes**: SQLite allows only one write operation at a time. If multiple workflows attempt to write simultaneously, you may encounter locking errors. Consider queueing or serializing writes in high-concurrency scenarios.
73-
- **File-based Database**: SQLite databases are single files. Ensure the file is on a filesystem accessible to the FlowSynx runtime.
74-
- **Data Type Affinity**: SQLite uses dynamic typing (data type affinity), meaning values are stored based on the content rather than strict column types. Validate data formats explicitly when interacting with other systems.
75-
- **Size and Performance**: SQLite is best suited for lightweight workloads. For large datasets or heavy concurrent access, consider using a server-based database (e.g., PostgreSQL, MySQL).
76-
- **In-Memory Databases**: If using an in-memory database (`:memory:`), the database contents exist only during the lifetime of the plugin execution and will not persist across operations.
77-
78-
---
62+
- **No Parallel Writes**: SQLite allows only one write operation at a time. If multiple workflows attempt to write simultaneously, you may encounter locking errors. Consider queueing or serializing writes in high-concurrency scenarios.
63+
- **File-based Database**: SQLite databases are single files. Ensure the file is on a filesystem accessible to the FlowSynx runtime.
64+
- **Data Type Affinity**: SQLite uses dynamic typing (data type affinity), meaning values are stored based on the content rather than strict column types. Validate data formats explicitly when interacting with other systems.
65+
- **Size and Performance**: SQLite is best suited for lightweight workloads. For large datasets or heavy concurrent access, consider using a server-based database (e.g., PostgreSQL, MySQL).
66+
- **In-Memory Databases**: If using an in-memory database (`:memory:`), the database contents exist only during the lifetime of the plugin execution and will not persist across operations.
7967

8068
## Security Notes
8169

82-
- SQL commands are executed using parameterized queries to prevent SQL injection.
83-
- The plugin does not store credentials or data outside of execution unless explicitly configured.
84-
- Only authorized FlowSynx platform users can view or modify configurations.
85-
86-
---
70+
- SQL commands are executed using parameterized queries to prevent SQL injection.
71+
- The plugin does not store credentials or data outside of execution unless explicitly configured.
72+
- Only authorized FlowSynx platform users can view or modify configurations.
8773

8874
## License
8975

src/README.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ The SQLite Plugin allows FlowSynx users to:
1919

2020
## Supported Operations
2121

22-
- **query**: Executes a SQL `SELECT` query and returns the result set as JSON.
23-
- **execute**: Executes a SQL command (`INSERT`, `UPDATE`, `DELETE`, etc.) and returns the number of affected rows.
22+
- **query**: Executes a SQL `SELECT` query and returns the result set as structured data (see below).
23+
- **execute**: Executes a SQL command (`INSERT`, `UPDATE`, `DELETE`, etc.) and returns the number of affected rows (or null if using structured data input).
2424

2525
---
2626

2727
## Plugin Specifications
2828

2929
The plugin requires the following configuration:
30-
- ConnectionString (string): **Required.** The PostgreSQL connection string used to connect to the database. Example:
30+
- `ConnectionString` (string): **Required.** The SQLite connection string used to connect to the database. Example:
3131
```
3232
Data Source=C:\databases\flowdata.db
3333
```
@@ -36,19 +36,20 @@ Data Source=C:\databases\flowdata.db
3636

3737
## Input Parameters
3838

39-
The plugin accepts the following parameters:
39+
The plugin accepts the following parameters (see `InputParameter`):
4040

41-
- `Operation` (string): **Required.** The type of operation to perform. Supported values are `query` and `execute`.
42-
- `Sql` (string): **Required.** The SQL query or command to execute. Use parameter placeholders (e.g., `@id`, `@name`) for dynamic values.
41+
- `Operation` (string): **Required.** The type of operation to perform. Supported values are `query` and `execute`.
42+
- `Sql` (string): **Required.** The SQL query or command to execute. Use parameter placeholders (e.g., `@id`, `@name`) for dynamic values.
4343
- `Params` (object): Optional. A dictionary of parameter names and values to be used in the SQL template.
44+
- `Data` (object): Optional. Used for structured data operations (e.g., bulk inserts/updates). Should be a `PluginContext` object with a `StructuredData` property containing a list of dictionaries.
4445

4546
### Example input
4647

4748
```json
4849
{
4950
"Operation": "query",
5051
"Sql": "SELECT id, name, email FROM users WHERE country = @country",
51-
"Parameters": {
52+
"Params": {
5253
"country": "Norway"
5354
}
5455
}
@@ -58,30 +59,31 @@ The plugin accepts the following parameters:
5859

5960
## Debugging Tips
6061

61-
- Ensure the `ConnectionString` is correct and the file is accessible from the FlowSynx environment.
62-
- Use parameter placeholders (`@parameterName`) in the SQL to prevent SQL injection and enable parameterization.
63-
- Validate that all required parameters are provided in the `Params` dictionary.
64-
- If a query returns no results, verify that your SQL `WHERE` conditions are correct and the target table contains matching data.
62+
- Ensure the `ConnectionString` is correct and the file is accessible from the FlowSynx environment.
63+
- Use parameter placeholders (`@parameterName`) in the SQL to prevent SQL injection and enable parameterization.
64+
- Validate that all required parameters are provided in the `Params` dictionary.
65+
- If a query returns no results, verify that your SQL `WHERE` conditions are correct and the target table contains matching data.
66+
- For bulk operations, ensure `Data` is a valid `PluginContext` with a `StructuredData` list.
6567

6668
---
6769

6870
## SQLite Limitations
6971

7072
When using SQLite within FlowSynx, keep the following considerations in mind:
7173

72-
- **No Parallel Writes**: SQLite allows only one write operation at a time. If multiple workflows attempt to write simultaneously, you may encounter locking errors. Consider queueing or serializing writes in high-concurrency scenarios.
73-
- **File-based Database**: SQLite databases are single files. Ensure the file is on a filesystem accessible to the FlowSynx runtime.
74-
- **Data Type Affinity**: SQLite uses dynamic typing (data type affinity), meaning values are stored based on the content rather than strict column types. Validate data formats explicitly when interacting with other systems.
75-
- **Size and Performance**: SQLite is best suited for lightweight workloads. For large datasets or heavy concurrent access, consider using a server-based database (e.g., PostgreSQL, MySQL).
76-
- **In-Memory Databases**: If using an in-memory database (`:memory:`), the database contents exist only during the lifetime of the plugin execution and will not persist across operations.
74+
- **No Parallel Writes**: SQLite allows only one write operation at a time. If multiple workflows attempt to write simultaneously, you may encounter locking errors. Consider queueing or serializing writes in high-concurrency scenarios.
75+
- **File-based Database**: SQLite databases are single files. Ensure the file is on a filesystem accessible to the FlowSynx runtime.
76+
- **Data Type Affinity**: SQLite uses dynamic typing (data type affinity), meaning values are stored based on the content rather than strict column types. Validate data formats explicitly when interacting with other systems.
77+
- **Size and Performance**: SQLite is best suited for lightweight workloads. For large datasets or heavy concurrent access, consider using a server-based database (e.g., PostgreSQL, MySQL).
78+
- **In-Memory Databases**: If using an in-memory database (`:memory:`), the database contents exist only during the lifetime of the plugin execution and will not persist across operations.
7779

7880
---
7981

8082
## Security Notes
8183

82-
- SQL commands are executed using parameterized queries to prevent SQL injection.
83-
- The plugin does not store credentials or data outside of execution unless explicitly configured.
84-
- Only authorized FlowSynx platform users can view or modify configurations.
84+
- SQL commands are executed using parameterized queries to prevent SQL injection.
85+
- The plugin does not store credentials or data outside of execution unless explicitly configured.
86+
- Only authorized FlowSynx platform users can view or modify configurations.
8587

8688
---
8789

0 commit comments

Comments
 (0)