> -----Original Message----- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] > On Behalf Of Dagdamor > Sent: Tuesday, December 07, 2010 12:46 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] enums > > john darnell <john.darn...@walsworth.com> писал(а) в своём письме Wed, 08 > Dec 2010 00:22:54 +0600: > > > I have no better reason than that I'm used to it in my dealings with > > MySQL and C++. > > > > It could save developer time and disk space, however, if it were > > efficiently implemented. > > > > From the sense of your comment, I get that the answer is no...Oh well. > > At least I learned something today. > > > > Thanks for the information, Max. > > > > R, > > John > > > >> -----Original Message----- > >> From: sqlite-users-boun...@sqlite.org > >> [mailto:sqlite-users-boun...@sqlite.org] > >> On Behalf Of Max Vlasov > >> Sent: Tuesday, December 07, 2010 12:15 PM > >> To: General Discussion of SQLite Database > >> Subject: Re: [sqlite] enums > >> > >> On Tue, Dec 7, 2010 at 8:38 PM, john darnell > >> <john.darn...@walsworth.com>wrote: > >> > >> > Is there any way to build an SQLite table that recognizes enums? > >> > > >> > >> Hmm, I always thought that this is better to be implemented by a > >> separate > >> table and lookup join. Can you name a reason to do this internally by > >> sqlite? > >> > >> Max Vlasov > > Enums are useful for keeping your data correct - i.e. you declate > a field as enum('alpha','beta','gamma') and you can be sure that that > field will be holding only one of those values, and nothing more, never. > > Internally these values held as integers (0, 1, 2), one byte per field, > so they won't waste too much space :) > > But SQLite has a principle of free-typing (or manifest typing), so I'm > not sure how enums idea conflicts with that principle... > > -- > Regards, > Serge Igitov
I cannot find a reference to "enum" in any SQLite documentation. Hmm. I suppose I could write a quick little function and use it as the Default... On a completely off-topic subject, Mr. Igitov, your moniker is Dagdamor...for a moment there I thought you might be Irish Celt (Dagda meaning "the good father" and was a principle Irish god in olden times), but "Igitov" kinda makes me think otherwise. Chat with me offline (meaning, "outside the list") if you are interested in pursuing this wholly trivial but still interesting topic. R, John _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users