SQLite
-
- Font of All Knowledge
- Posts: 3973
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: SQLite
I know I keep on with this this... but could DBAS not do the same job as SQLite.
If some Procedures and Functions to give the same names as the commands in SQLite, are written in S*BASIC, compiled as Externals in Qliberator, or added to a CLI, is this not the same,
OK the data format maybe different.
If some Procedures and Functions to give the same names as the commands in SQLite, are written in S*BASIC, compiled as Externals in Qliberator, or added to a CLI, is this not the same,
OK the data format maybe different.
Regards,
Derek
Derek
- Sparrowhawk
- Super Gold Card
- Posts: 649
- Joined: Wed Dec 15, 2010 12:33 pm
- Location: @131072
- Contact:
Re: SQLite
I think it would be a very big piece of work to convert SQL's declarative style into dbas' imperative one. Especially when dealing with joins, grouping and sub queries. Not impossible, and there are examples of this on other platforms, but certainly a non trivial exercise to cover all the bases (pun fully intended) .
Also, it's not just the language but the schema goodness such as indexes, constraints, sequences, foreign key relationships and cascades etc which make SQL so easy to use with structured data.
Anyway, I don't expect anyone to do this just because I've resurrected an old thread. It was more an enquiry as to whether it would be possible at all really.
Also, it's not just the language but the schema goodness such as indexes, constraints, sequences, foreign key relationships and cascades etc which make SQL so easy to use with structured data.
Anyway, I don't expect anyone to do this just because I've resurrected an old thread. It was more an enquiry as to whether it would be possible at all really.
a.k.a. Jean-Yves
-
- Font of All Knowledge
- Posts: 3973
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: SQLite
Hi,
I have compiled all the SQLite C module files to object files, except 3 files to make some changes to C68.
A problem one of the header files seem to be the use of: "LONG LONG" which implies 64 bit numbers, changing this to "long" allows the majority of files to compile to object files, is this okay, or should "LONG DOUBLE", be used in C68?
So, just got write the makefile...
I have compiled all the SQLite C module files to object files, except 3 files to make some changes to C68.
A problem one of the header files seem to be the use of: "LONG LONG" which implies 64 bit numbers, changing this to "long" allows the majority of files to compile to object files, is this okay, or should "LONG DOUBLE", be used in C68?
So, just got write the makefile...
Regards,
Derek
Derek
- NormanDunbar
- Forum Moderator
- Posts: 2277
- Joined: Tue Dec 14, 2010 9:04 am
- Location: Leeds, West Yorkshire, UK
- Contact:
Re: SQLite
Long long is 64 bit integer but long double is 64 bit float so the data type don't match and stuff won't work. Probably.
I've not used C68 for a while, and I'm not at my laptop, does it have the 'stdint.h' header file with int64_t? If so, you could probably change long long to be int64_t perhaps?
Cheers,
Norm.
I've not used C68 for a while, and I'm not at my laptop, does it have the 'stdint.h' header file with int64_t? If so, you could probably change long long to be int64_t perhaps?
Cheers,
Norm.
Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
- XorA
- Site Admin
- Posts: 1368
- Joined: Thu Jun 02, 2011 11:31 am
- Location: Shotts, North Lanarkshire, Scotland, UK
Re: SQLite
I think looking at the source 64bit types are not functional in C68, but there is some obvious signs they were due in the next (never released) version.NormanDunbar wrote:Long long is 64 bit integer but long double is 64 bit float so the data type don't match and stuff won't work. Probably.
I've not used C68 for a while, and I'm not at my laptop, does it have the 'stdint.h' header file with int64_t? If so, you could probably change long long to be int64_t perhaps?
-
- Font of All Knowledge
- Posts: 3973
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: SQLite
Hi,
SQLite3 supports 64 bit integers:
The sqlite3_int64 and sqlite_int64 types can store integer values between -9223372036854775808 and +9223372036854775807 inclusive. The sqlite3_uint64 and sqlite_uint64 types can store integer values between 0 and +18446744073709551615 inclusive.
I am looking to see if SQLite3 can be compiled with 32 bit integers only.
SQLite3 supports 64 bit integers:
The sqlite3_int64 and sqlite_int64 types can store integer values between -9223372036854775808 and +9223372036854775807 inclusive. The sqlite3_uint64 and sqlite_uint64 types can store integer values between 0 and +18446744073709551615 inclusive.
I am looking to see if SQLite3 can be compiled with 32 bit integers only.
Regards,
Derek
Derek
- mk79
- QL Wafer Drive
- Posts: 1349
- Joined: Sun Feb 02, 2014 10:54 am
- Location: Esslingen/Germany
- Contact:
Re: SQLite
Double is already 64-bit float, "long double" is implementation specific and is at least 64-bit but usually longer (can be 96 bit in C68's case). But long double support is incomplete anyway.NormanDunbar wrote:Long long is 64 bit integer but long double is 64 bit float so the data type don't match and stuff won't work. Probably.
Unlike long double there is no 64-bit support whatsoever as far as I can tell.I've not used C68 for a while, and I'm not at my laptop, does it have the 'stdint.h' header file with int64_t? If so, you could probably change long long to be int64_t perhaps?
Re: SQLite
As far as I remember, 64 bit integer support works with qdos-gcc, just not the C library support of course.
-
- Font of All Knowledge
- Posts: 3973
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: SQLite
Hi,
If I use QDOS-GCC to conpile the SQLite code with 64 bit integer support, how will the resultant executable work on a QL?
Or does it not matter...
If I use QDOS-GCC to conpile the SQLite code with 64 bit integer support, how will the resultant executable work on a QL?
Or does it not matter...
Regards,
Derek
Derek
-
- Font of All Knowledge
- Posts: 3973
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: SQLite
Hi,
I tried to compile sqlite-amalgamation 3380000 with qdos-gcc in the docker implementation of qdos-gcc, which gave 2 error messages saying some libraries are missing:
sys/resources.h
sys/mman.h
since the sqlite amalgation compiles in the modern GCC, I assume the the above libraries are missing from GCC 2.93 and added the GCC later on in its life span.
Can the above libraries be added to qdos-gcc ?
I tried to compile sqlite-amalgamation 3380000 with qdos-gcc in the docker implementation of qdos-gcc, which gave 2 error messages saying some libraries are missing:
sys/resources.h
sys/mman.h
since the sqlite amalgation compiles in the modern GCC, I assume the the above libraries are missing from GCC 2.93 and added the GCC later on in its life span.
Can the above libraries be added to qdos-gcc ?
Regards,
Derek
Derek