[haXe] extending String

Danny Wilson danny at decube.net
Thu Feb 15 22:47:12 CET 2007


Hey Nicolas,

Are you still working on the SPOD improvements with CREATE TABLE statement  
generation? Or is it not targeted to be opensource?

If you don't have time for it, I was busy doing some SPOD improving  
classes and could help you finish...

Kind regards,
Danny Wilson

On Mon, 30 Oct 2006 09:29:16 +0100, Nicolas Cannasse  
<ncannasse at motion-twin.com> wrote:

> In 1.08, you can simply have your class extends haxe.Rtti and you will
> get an XML describing the class as it was typed at compilation time. You
> can also define the following :
>
> typedef VarChar<Const> = String
>
> var name : VarChar<25>;
>
> It's the same as writing var name : String except that in the XML you
> will get the type VarChar<I25> which can be used to generate the create
> table accordingly. I've already starting writing some code which does
> the create table and enables you to list & edit databases but nothing
> fancy yet ;)
>
> I have not worked on data validation. I think that for instance you can
> configure MySQL5 to get an error when doing an insert/update with a
> invalid value (for example a string that is too much long). I guess it's
> better to have that being handled at the DB level.
>
> Nicolas



More information about the Haxe mailing list