MySQL Forums
Forum List  »  Optimizer & Parser

Create a New Datatype
Posted by: Andy Gurzynski
Date: January 06, 2013 01:00AM

I would like to create a new datatype to the MySQL database. I program best using C# in a Visual Studio programming environment.

The type I would like to create is what could be called an interval type and would look like this:

[1/1/2012:1/10/2012]

I would also like to create operators on the type, so operations like the one below could be done:

set @interval1 := [1/1/2012:1/10/2012]
set @interval2 := [1/5/2012:1/15/2012]

select @interval1 overlaps @interval2

The result set of the select above that uses the type interval with the operator overlaps would be:

[1/5/2012:1/10/2012]

along with other operators on the interval type.

I would like to expand the SQL of MySQL to support my new type and the operators I develop with it.

My question is, is this possible? I would like to stay within my area of programming expertise, that is C# in a Visual Studio environment.

If possible, how large an effort would this be? Although I am most comfortable in a Visual Studio environment using C#, what would be the best environment, if programming expertise was not an issue?

Thank you

Options: ReplyQuote


Subject
Views
Written By
Posted
Create a New Datatype
2477
January 06, 2013 01:00AM
1246
January 07, 2013 11:01PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.