Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach committed Jun 26, 2024
1 parent f91d36d commit 2c17ba5
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,23 @@ See [Mariaex Compatibility](https://github.com/elixir-ecto/myxql/blob/master/MAR

## Data representation

```
MySQL Elixir
----- ------
NULL nil
bool 1 | 0
int 42
float 42.0
decimal #Decimal<42.0> # (1)
date ~D[2013-10-12] # (2)
time ~T[00:37:14] # (3)
datetime ~N[2013-10-12 00:37:14] # (2), (4)
timestamp ~U[2013-10-12 00:37:14Z] # (2), (4)
json %{"foo" => "bar"} # (5)
char "é"
text "myxql"
binary <<1, 2, 3>>
bit <<1::size(1), 0::size(1)>>
point, polygon, ... %Geo.Point{coordinates: {0.0, 1.0}}, ... # (6)
```
| MySQL | Elixir |
|-------------------------|-------------------------------------------------|
| `NULL` | `nil` |
| `bool` | `0`, `1` |
| `int` | `42` |
| `float` | `42.0` |
| `decimal` | `#Decimal<42.0>` (1) |
| `date` | `~D[2013-10-12]` (2) |
| `time` | `~T[00:37:14]` (3) |
| `datetime` | `~N[2013-10-12 00:37:14]` (2), (4) |
| `timestamp` | `~U[2013-10-12 00:37:14Z]` (2), (4) |
| `json` | `%{"foo" => "bar"}` (5) |
| `char` | `"é"` |
| `text` | `"myxql"` |
| `binary` | `<<1, 2, 3>>` |
| `bit` | `<<1::size(1), 0::size(1)>>` |
| `point`, `polygon`, ... | `%Geo.Point{coordinates: {0.0, 1.0}}, ...` (6) |

Notes:

Expand Down

0 comments on commit 2c17ba5

Please sign in to comment.