Minor improvements on the text of the README file

pull/16/head
Vinícius Garcia 2022-02-22 22:40:37 -03:00
parent 4c3ee41976
commit 9b18a8fbcf
1 changed files with 25 additions and 24 deletions

View File

@ -81,29 +81,30 @@ but work on different databases, they are:
> Note: If you want numbers see our [Benchmark section](https://github.com/vingarcia/ksql#benchmark-comparison) below > Note: If you want numbers see our [Benchmark section](https://github.com/vingarcia/ksql#benchmark-comparison) below
ksql is meant to improve on the existing ecosystem by optimizing ksql is meant to improve on the existing ecosystem by providing
for the most interesting use-cases with as little extra baggage a well-designed database package that has:
possible, offering among other things:
- An easier time setting up and learning it 1. A small number of easy-to-use helper functions for common use cases
2. Support for more complicated use-cases by allowing
the user to write SQL directly
This strategy allows the API to be
- Very simple with a small number of functions
- Harness all the power of SQL, by just allowing the user to type SQL
- Less opportunities for making mistakes, which makes code reviews easier - Less opportunities for making mistakes, which makes code reviews easier
- A succinct and idiomatic Go idiom reducing the cognitive - A succinct and idiomatic Go idiom reducing the cognitive complexity of your code
complexity of your code - Easy ways of mocking your database when you need to
- Easy ways of mocking your database when you need to. - Support for all common relational database: `mysql`, `sqlite`, `sqlserver` and `postgres`
- Support for all common databases
- No DSL: Use SQL for your queries
And for a few important use-cases that cannot follow these rules perfectly, Some special use-cases also have some special support:
we have carefully chosen a few powerful abstractions that might be
slightly more complicated to learn, such as:
- The `QueryChunks()` function which is necessary for the few - The `QueryChunks()` method helps you in the few situations when you might
situations when you might load big amounts of the data in a need to load in a single query more data than would fit in memory.
single query. - For saving you time when you are selecting all fields from a struct you
- And the possibility of omitting the `SELECT ...` part of the can omit the `SELECT ...` part of the query which causes ksql to write
query which causes ksql to write this part for you saving a this part for you saving a lot of work when working with big structs/tables.
lot of work when working with big structs/tables. - The Nested Structs feature will help you reuse existing structs/models when working with JOINs.
- Support for nesting structs when working with JOINs.
**Supported Drivers:** **Supported Drivers:**
@ -576,10 +577,10 @@ that we actually care about, so it's better not to use composite structs.
This library has a few helper functions for helping your tests: This library has a few helper functions for helping your tests:
- `kstructs.FillStructWith(struct interface{}, dbRow map[string]interface{}) error` - `ksqltest.FillStructWith(struct interface{}, dbRow map[string]interface{}) error`
- `kstructs.FillSliceWith(structSlice interface{}, dbRows []map[string]interface{}) error` - `ksqltest.FillSliceWith(structSlice interface{}, dbRows []map[string]interface{}) error`
- `kstructs.StructToMap(struct interface{}) (map[string]interface{}, error)` - `ksqltest.StructToMap(struct interface{}) (map[string]interface{}, error)`
- `kstructs.CallFunctionWithRows(fn interface{}, rows []map[string]interface{}) (map[string]interface{}, error)` - `ksqltest.CallFunctionWithRows(fn interface{}, rows []map[string]interface{}) (map[string]interface{}, error)`
If you want to see examples (we have examples for all the public functions) just If you want to see examples (we have examples for all the public functions) just
read the example tests available on our [example service](./examples/example_service) read the example tests available on our [example service](./examples/example_service)
@ -692,7 +693,7 @@ is configured to kill the containers after 20 seconds.
- Add tests for tables using composite keys - Add tests for tables using composite keys
- Add support for serializing structs as other formats such as YAML - Add support for serializing structs as other formats such as YAML
- Update `kstructs.FillStructWith` to work with `ksql:"..,json"` tagged attributes - Update `ksqltest.FillStructWith` to work with `ksql:"..,json"` tagged attributes
- Create a way for users to submit user defined dialects - Create a way for users to submit user defined dialects
- Improve error messages - Improve error messages
- Add support for the update function to work with maps for partial updates - Add support for the update function to work with maps for partial updates