Re: [sqlite] Adding Custom Column Data Types

2009-01-28 Thread Mike McGonagle
Thanks, Everyone. I think I understand this enough to at least attempt
to test it, unfortunately, it will probably be a couple of days before
them. I will let you know the results...


Mike


On Wed, Jan 28, 2009 at 2:24 AM, MikeW  wrote:
> Mike McGonagle  writes:
>
>>
>> Hello all,
>>
>> I am in the process of integrating SQLite into a multimedia
>> environment/programming language. One thing that I would like to be
>> able to do is support all the various datatypes in this language, and
>> one in particular is a list of other primitive datatypes. Is there a
>> way to add a "user-type" so that when 'sqlite3_column_type' is called,
>> it would return a unique ID for this "user-type"?
>>
>> I am hoping that I can use this to do some further processing to the
>> stored data to convert it back into the native format the environment
>> uses.
>>
>> Or is there a better way?
>>
>> Thanks,
>>
>> Mike
>>
>
> An alternative is to use the sqlite3_column_decltype()
> http://www.sqlite.org/c3ref/column_decltype.html
> function to read back the string name with which the column
> was originally created.
>
> MikeW
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Peace may sound simple—one beautiful word— but it requires everything
we have, every quality, every strength, every dream, every high ideal.
—Yehudi Menuhin (1916–1999), musician
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Adding Custom Column Data Types

2009-01-28 Thread MikeW
Mike McGonagle  writes:

> 
> Hello all,
> 
> I am in the process of integrating SQLite into a multimedia
> environment/programming language. One thing that I would like to be
> able to do is support all the various datatypes in this language, and
> one in particular is a list of other primitive datatypes. Is there a
> way to add a "user-type" so that when 'sqlite3_column_type' is called,
> it would return a unique ID for this "user-type"?
> 
> I am hoping that I can use this to do some further processing to the
> stored data to convert it back into the native format the environment
> uses.
> 
> Or is there a better way?
> 
> Thanks,
> 
> Mike
> 

An alternative is to use the sqlite3_column_decltype()
http://www.sqlite.org/c3ref/column_decltype.html
function to read back the string name with which the column
was originally created.

MikeW



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Adding Custom Column Data Types

2009-01-27 Thread John Stanton
We do thisby usig the Sqlite "Declared Type" (which can be anything you 
choose) and intercepting it in a layer of software between Sqlite and 
the application language manager.  For example we have a decimal number 
type, a date type etc.  The data is stored as Sqlite TEXT or FLOAT but 
the interface handle transformatiuon into the decimal or date format 
exopecrted by the host langauge processor.

MikeW wrote:
> Mike McGonagle  writes:
>
>   
>> Hello all,
>>
>> I am in the process of integrating SQLite into a multimedia
>> environment/programming language. One thing that I would like to be
>> able to do is support all the various datatypes in this language, and
>> one in particular is a list of other primitive datatypes. Is there a
>> way to add a "user-type" so that when 'sqlite3_column_type' is called,
>> it would return a unique ID for this "user-type"?
>>
>> I am hoping that I can use this to do some further processing to the
>> stored data to convert it back into the native format the environment
>> uses.
>>
>> Or is there a better way?
>>
>> Thanks,
>>
>> Mike
>>
>> 
>
> Another separate field for the data type ?
>
> MikeW
>
> == gmane padding ===
> == gmane padding ===
> == gmane padding ===
> == gmane padding ===
> == gmane padding ===
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>   

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Adding Custom Column Data Types

2009-01-27 Thread MikeW
Mike McGonagle  writes:

> 
> Hello all,
> 
> I am in the process of integrating SQLite into a multimedia
> environment/programming language. One thing that I would like to be
> able to do is support all the various datatypes in this language, and
> one in particular is a list of other primitive datatypes. Is there a
> way to add a "user-type" so that when 'sqlite3_column_type' is called,
> it would return a unique ID for this "user-type"?
> 
> I am hoping that I can use this to do some further processing to the
> stored data to convert it back into the native format the environment
> uses.
> 
> Or is there a better way?
> 
> Thanks,
> 
> Mike
> 

Another separate field for the data type ?

MikeW

== gmane padding ===
== gmane padding ===
== gmane padding ===
== gmane padding ===
== gmane padding ===



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Adding Custom Column Data Types

2009-01-23 Thread Mike McGonagle
Hello all,

I am in the process of integrating SQLite into a multimedia
environment/programming language. One thing that I would like to be
able to do is support all the various datatypes in this language, and
one in particular is a list of other primitive datatypes. Is there a
way to add a "user-type" so that when 'sqlite3_column_type' is called,
it would return a unique ID for this "user-type"?

I am hoping that I can use this to do some further processing to the
stored data to convert it back into the native format the environment
uses.

Or is there a better way?

Thanks,

Mike


-- 
Peace may sound simple—one beautiful word— but it requires everything
we have, every quality, every strength, every dream, every high ideal.
—Yehudi Menuhin (1916–1999), musician
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users