You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now Alasql expression compiler does not check operand types and delegates this work to JavaScript, so I need to create special range_*() functions for these operations, like:
int4range — Range of integer
int8range — Range of bigint
numrange — Range of numeric
tsrange — Range of timestamp without time zone
tstzrange — Range of timestamp with time zone
daterange — Range of date
But for Alasql all of them will be realized with only 'typeless' range. Do I need to keep all these 6 types or can use only one, like: RANGE(1,2)?
Should I implement '::' as an additional form to CAST/CONVERT functions?
Is declarative, functional and readable, so I like it over special operators.
Typeless ranges are fine.
My usage is for a school booking system, I try to keep all the data in the client side and store the database on S3 file storage rather than having a central database, this can keep the cost low. Since the cost and speed of sending 1mb of data to the browser is relatively low now, sending the entire database to the browser is cheap, which was not the case in the past.
The typical usage is trying to find if some date and times have free available timeslots, for a date range like 13th to 16th of October during the times of 9am to 12pm and 3pm to 6pm, try to find what items exist in the database which also match other criteria. Then many other types of queries relates to ranges and dates.
I'm surprised to get such a good response! Thought, I wonder how efficient this would be.
Activity
agershun commentedon Feb 4, 2015
Thank you for request! May I ask you to answer on the following questions:
Now Alasql expression compiler does not check operand types and delegates this work to JavaScript, so I need to create special range_*() functions for these operations, like:
or create special range operators (like @>):
Which option is better on your opinion?
But for Alasql all of them will be realized with only 'typeless' range. Do I need to keep all these 6 types or can use only one, like: RANGE(1,2)?
Thank you!
PhilAndrew commentedon Feb 4, 2015
Thanks for the fast response! I suggest:
Is declarative, functional and readable, so I like it over special operators.
Typeless ranges are fine.
My usage is for a school booking system, I try to keep all the data in the client side and store the database on S3 file storage rather than having a central database, this can keep the cost low. Since the cost and speed of sending 1mb of data to the browser is relatively low now, sending the entire database to the browser is cheap, which was not the case in the past.
The typical usage is trying to find if some date and times have free available timeslots, for a date range like 13th to 16th of October during the times of 9am to 12pm and 3pm to 6pm, try to find what items exist in the database which also match other criteria. Then many other types of queries relates to ranges and dates.
I'm surprised to get such a good response! Thought, I wonder how efficient this would be.
mathiasrw commentedon Jul 14, 2015
I have added this as a featurerequest: http://feathub.com/agershun/alasql/+22