# Introduction

## [<img src="https://2154266987-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6Cj9YOkgfxVUcuxarFc%2Fuploads%2Fgit-blob-f613aa027421fe0eeebfc0d8f4134bde1f02a2f0%2Flogo.svg?alt=media" alt="daita" data-size="line">](https://daita.ch) TLDR

Daita provides an easy way to interact with relational databases. It's goal is to provide the full flexibility of sql within the typescript syntax to provide the best developer experience.

```typescript
// fetch the 5 highest mountains
const mountains = await client.select({
    select: {
       mountain: field(Mountain, 'name'),
       height: field(Moutain, 'height'),
    },
    from: table(Mountain),
    orderBy: desc(field(Moutain, 'height')),
    limit: 5,
})
// const mountains: { mountain: string, height: number }[]
```

### Quick Overview

Daita contains different multiple modules with different purposes. They build on top of each other, but can be used independently.

![Daita overview](https://2154266987-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6Cj9YOkgfxVUcuxarFc%2Fuploads%2Fgit-blob-ace6847e44b7c49436897241c85321096c06496c%2Fdaita-overview.png?alt=media)

* **Postgres / SQLite / MariaDB Adapter**

  Database drivers for connecting, formatting and executing sql commands.
* **Http Adapter**

  Database proxy to use relational databases over HTTP.
* **Relational**

  SQL Language interfaces and query builder functions.
* **ORM**

  Schema definition and data migrations with support for schemas, tables, indices and views.
* **cli**

  Setting up new projects, generating and applying database migrations.
* **eslint**

  Enforcing best practices and preventing invalid sql queries.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.daita.ch/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
