commit bae9918adebc3ce115e489f0117b663c94b258ad Author: Vinícius Garcia Date: Tue Mar 29 22:39:17 2022 -0300 Initial Home page diff --git a/Home.md b/Home.md new file mode 100644 index 0000000..9316d3d --- /dev/null +++ b/Home.md @@ -0,0 +1,57 @@ +Welcome to the ksql wiki! + +# KissSQL + +KissSQL or the "Keep it Simple" SQL package was created to offer an +actually simple and satisfactory tool for interacting with SQL Databases. + +The core idea on `ksql` is to offer an easy to use interface, +the actual comunication with the database is decoupled so we can use +`ksql` on top of `pgx`, `database/sql` and possibly other tools. +You can even create you own backend adapter for `ksql` which is +useful in some situations. + +## Why `ksql`? + +ksql is meant to improve on the existing ecosystem by providing +a well-designed database package that has: + +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 +- A succinct and idiomatic Go idiom reducing the cognitive complexity of your code +- Easy ways of mocking your database when you need to +- Support for all common relational database: `mysql`, `sqlite`, `sqlserver` and `postgres` + +Some special use-cases also have some special support: + +- The `QueryChunks()` method helps you in the few situations when you might + need to load in a single query more data than would fit in memory. +- For saving you time when you are selecting all fields from a struct you + can omit the `SELECT ...` part of the query which causes ksql to write + this part for you saving a lot of work when working with big structs/tables. +- The Nested Structs feature will help you reuse existing structs/models when working with JOINs. + +**Supported Drivers:** + +ksql is well decoupled from its backend implementation which makes +it easy to change the actual technology used, currently we already +support the following options: + +- Using the `database/sql` as the backend we support the following drivers: + - `"postgres"` + - `"sqlite3"` + - `"mysql"` + - `"sqlserver"` +- We also support `pgx` (actually `pgxpool`) as the backend which + is a lot faster for Postgres databases. + +If you need a new `database/sql` driver or backend adapter included +please open an issue or make your own implementation +and submit it as a Pull Request.