selahattinunlu / laravel-api-query-builder

Laravel & Lumen Api Query Builder Package
331 stars 66 forks source link

Null values #16

Closed robsontenorio closed 7 years ago

robsontenorio commented 7 years ago

I cant find examples about null values

https://github.com/selahattinunlu/laravel-api-query-builder/wiki/Other-Examples

Is that possible? /users?updated_at=null

selahattinunlu commented 7 years ago

@robsontenorio There is no way for now. I will handle it.

robsontenorio commented 7 years ago

@selahattinunlu Thanks! By the way not null statment woud be usefull as well ;)

selahattinunlu commented 7 years ago

@robsontenorio Great! Thanks! By the way, I may not finish today. But I hope I can finish it tomorrow :)

selahattinunlu commented 7 years ago

@robsontenorio

We need a token to determine it. "null" may cause a problem when a column has got "null" value as string.

Do you have any suggestion about it?

robsontenorio commented 7 years ago

It is really a good question. I think you should release an version with a token chosen by you, and wait for people and bugs around it.

I like "null", because its hard some one use "null" as string value for database field.

robsontenorio commented 7 years ago

updated_at=[null] ?

selahattinunlu commented 7 years ago

@robsontenorio I think it can be better instead of "null". 👍

?updated_at=[null] (whereNull) ?updated_at!=[null] (whereNotNull)

selahattinunlu commented 7 years ago

@robsontenorio I released new version. Can you please inform me after trying?

robsontenorio commented 7 years ago

@selahattinunlu worked like a charm :) By the way, will you consider #15 ? My implementation has 4 lines changed.

selahattinunlu commented 7 years ago

Great! :) I will handle to the other problem at the first opportunity. @robsontenorio