ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
ua_ has quit [Read error: Connection reset by peer]
ua_ has joined #crystal-lang
ua_ has quit [Read error: Connection reset by peer]
ua_ has joined #crystal-lang
ur5us_ has quit [Ping timeout: 252 seconds]
ur5us_ has joined #crystal-lang
<Sankalp> Awesome! 🎉
ur5us_ has quit [Ping timeout: 248 seconds]
sagax has quit [Ping timeout: 256 seconds]
sagax has joined #crystal-lang
Sankalp has quit [Ping timeout: 256 seconds]
Sankalp has joined #crystal-lang
Sankalp has quit [Ping timeout: 252 seconds]
Sankalp has joined #crystal-lang
jmdaemon has joined #crystal-lang
<Elouin> Hi, is there an orm for sqlite that works with 1.4?
jmdaemon has quit [Ping timeout: 260 seconds]
Sankalp has quit [Ping timeout: 252 seconds]
Sankalp has joined #crystal-lang
<FromGitter> <Blacksmoke16> Elouin: Depending your needs, it might be enough to just leverage https://crystal-lang.github.io/crystal-db/api/0.11.0/DB/Serializable.html. Tho you need to handle insert/updates yourself
Vexatos has quit [Ping timeout: 240 seconds]
Stephie has quit [Ping timeout: 260 seconds]
Stephie has joined #crystal-lang
Vexatos has joined #crystal-lang
<Elouin> Blacksmoke16: Thanks for the tip. Good to know that this exists. Though I want an ORM so I don't have to to inserts and updates myself.
<FromGitter> <Blacksmoke16> fair enough
<Elouin> Mainly because I don't want to fiddle with escaping and normalizing what the user is providing.
<FromGitter> <Blacksmoke16> fwiw, it would just be like `db.exec "insert into contacts values (?, ?)", "John Doe", 30`
<FromGitter> <Blacksmoke16> long as you use parameterized statements, it handles that for you
<Elouin> Thats injection safe?
<FromGitter> <Blacksmoke16> yea
<Elouin> Thanks a lot. Thats super nice and good to know.
<Elouin> There are only examples for mysql and postures. Would that work on SQLite too?
<FromGitter> <Blacksmoke16> yup
<Elouin> Ahh, OK. So the MySQL like syntax. Thanks. :)
<FromGitter> <Blacksmoke16> np
analogsalad has joined #crystal-lang
<FromGitter> <Blacksmoke16> works quite well. e.g. can do like `id = db.exec "insert into users (name, email) returning id", "Bob", "example@gmail.com", as: Int64`
<FromGitter> <Blacksmoke16> oops ⏎ ⏎ `id = db.exec "insert into users (name, email) values (?, ?) returning id", "Bob", "example@gmail.com", as: Int64`
<FromGitter> <Blacksmoke16> throw that in some module and is pretty easy to do like `SomeModule.save user`
analogsalad has quit [Quit: bye]
jmdaemon has joined #crystal-lang
analogsalad has joined #crystal-lang
void09 has quit []
void09 has joined #crystal-lang
void09 has quit [Client Quit]
void09 has joined #crystal-lang
jmd_ has joined #crystal-lang
jmdaemon has quit [Ping timeout: 240 seconds]
analogsalad has quit [Quit: bye]
ur5us_ has joined #crystal-lang
ur5us_ has quit [Remote host closed the connection]
ur5us_ has joined #crystal-lang
ur5us_ has quit [Ping timeout: 248 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 260 seconds]
greenbigfrog has joined #crystal-lang
ur5us has joined #crystal-lang