Hey there :slightly_smiling_face: I wondered what’...
# exposed
l
Hey there 🙂 I wondered what’s the rationale behind not matching the common sql-syntax with the
select
clause. Someone who’s used to sql would expect the dsl to work something like this:
Copy code
val gamailUsers = Users.select(id, name, email)
  .where { email like "%@gmail.com"}
  .map { ... }
But instead expose uses
slice
to do the projection. And select to do the selection. Why is this? I don’t realy have an opinion, I just want to know what the reason behind this decision was.
t
It's a historical thing which comes from a very first commits of initial creator of Exposed. I can create an issue to replace that methods. But now there is
selectAll
function, how do you think it should be renamed?
all
? Any suggestions?
l
That’s a good question. Like I said, I don’t really have an opinior, I was just curious 🙂 but imho
selectAll
is nice actually so I don’t know if it should be renamed
t
Then it will look like
FooTable.select(FooTable.bar).selectAll()
l
well that’s weird, I give you that. Maybe not change anything for now 😉
🧌 2
😄 1