Re: [sqlite] file system interface?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave Dyer wrote: > While discussing possible sqlite applications today, it occurred to > me that you could present a sqlite database as a mountable file > system. That is relatively trivial to do using FUSE on systems that support it. > One of the major impediments to using sqlite to store images, for > example, is that you can't view or manipulate them using your standard > image tools. While SQLite is fully capable of storing large (up to 1GB) BLOBs, the general approach if you need to interoperate with other applications is to store the files seperately and store the filename in SQLite. > Has anyone done somthing like this? People choose a database over a filesystem for a reason :-) If something like images is your primary focus you can use the filesystem and store additional information in extended attributes. You can also base your system around the OS tool for searching and storing information about files (eg SpotLight on Mac, Beagle/Tracker on Linux). Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIkVM7mOOfHg372QQRArwBAKDBB4BWoApbrO/umUAwRoymJksieQCffNRn ezIQx2R44NjGVhLKwynPRCA= =pYlm -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] file system interface?
While discussing possible sqlite applications today, it occurred to me that you could present a sqlite database as a mountable file system. Some BLOB objects would be presented as files, with attributes such as directory names and file dates stored as ancillary fields. One of the major impediments to using sqlite to store images, for example, is that you can't view or manipulate them using your standard image tools. Has anyone done somthing like this? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] winDelete retry-on-failure functionality isn't working
would appreciate any confirmation that it works for you :) On 7/30/08, Jeremy Spiegel <[EMAIL PROTECTED]> wrote: > > Shane, > > Just saw the checkin for the fix. Thanks! > > :) Jeremy > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Shane Harrelson > Sent: Wednesday, July 30, 2008 8:38 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] winDelete retry-on-failure functionality isn't > working > > GetFileAttributes() returns INVALID_FILE_ATTRIBUTES with an error of > ERROR_ACCESS_DENIED if the file is in a "pending delete" state. I'll > update > the retry logic in os_win.c in winDelete() to add this additional check. > I > believe that should improve the situation (as long as the other > application > which has the db journal file temporarily open closes it in the > MX_DELETION_ATTEMPTS * 100ms time frame.) > > Of course, ERROR_ACCESS_DENIED can also be returned if you have > insufficient > privileges to access the file, but I don't think retrying the delete in > this > situation is bad either. > > The return should also be modified to return SQLITE_OK only when > GetFileAttributes() returns INVALID_FILE_ATTRIBUTES with an error of > ERROR_FILE_NOT_FOUND. I'll make this change as well. > > HTH. > -Shane > > > On 7/29/08, Jeremy Spiegel <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > winDelete in os_win.c has retry functionality to try multiple times to > > delete a file if a virus scanner or indexing program has a handle open > > on that file. We've seen SQLite failures that have been tracked down > to > > other apps temporarily opening our db journal files, so we believe > that > > the retry behavior could be very valuable to us. > > > > In order to check for failure, winDelete checks that DeleteFileW > returns > > zero and that GetFileAttributesW doesn't return > INVALID_FILE_ATTRIBUTES. > > However, when I try calling DeleteFileW on a file with a handle open > on > > that file, I see DeleteFileW returning 1 (success) and I see > > GetFileAttributesW returning INVALID_FILE_ATTRIBUTES, I think because > > even though the file still exists it is in a "delete pending" state. > > > > The code below illustrates the problem. Thanks for any help you can > > provide! > > > > :) Jeremy Spiegel > > > > > > #include > > #include > > #include > > > > int _tmain(int argc, _TCHAR* argv[]) > > { > >DWORD dwDesiredAccess = GENERIC_READ | GENERIC_WRITE; > >DWORD dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE | > > FILE_SHARE_DELETE; > >DWORD dwCreationDisposition = OPEN_ALWAYS; > >DWORD dwFlagsAndAttributes = FILE_ATTRIBUTE_TEMPORARY > >| FILE_ATTRIBUTE_HIDDEN > >| FILE_FLAG_DELETE_ON_CLOSE > >| FILE_FLAG_RANDOM_ACCESS; > > > >HANDLE h = CreateFileW(L"c:\\test.txt", > >dwDesiredAccess, > >dwShareMode, > >NULL, > >dwCreationDisposition, > >dwFlagsAndAttributes, > >NULL > >); > > > >if( h==INVALID_HANDLE_VALUE ) > >printf("error\n"); > > > >int rc = DeleteFileW( L"c:\\test.txt" ); > >if ( rc == 0 ) > >printf("DeleteFileW failed\n"); > > > >if ( GetFileAttributesW( L"c:\\test.txt" ) != 0x ) > >printf( "File still exists\n"); > > > >HANDLE h2 = CreateFileW(L"c:\\test.txt", > >dwDesiredAccess, > >dwShareMode, > >NULL, > >dwCreationDisposition, > >dwFlagsAndAttributes, > >NULL > >); > > > >if ( h2 == INVALID_HANDLE_VALUE ) > >printf( "Error: 0x%x", GetLastError() ); > > > >CloseHandle(h); > >return 0; > > } > > ___ > > 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 > ___ > 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] winDelete retry-on-failure functionality isn't working
Shane, Just saw the checkin for the fix. Thanks! :) Jeremy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Shane Harrelson Sent: Wednesday, July 30, 2008 8:38 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] winDelete retry-on-failure functionality isn't working GetFileAttributes() returns INVALID_FILE_ATTRIBUTES with an error of ERROR_ACCESS_DENIED if the file is in a "pending delete" state. I'll update the retry logic in os_win.c in winDelete() to add this additional check. I believe that should improve the situation (as long as the other application which has the db journal file temporarily open closes it in the MX_DELETION_ATTEMPTS * 100ms time frame.) Of course, ERROR_ACCESS_DENIED can also be returned if you have insufficient privileges to access the file, but I don't think retrying the delete in this situation is bad either. The return should also be modified to return SQLITE_OK only when GetFileAttributes() returns INVALID_FILE_ATTRIBUTES with an error of ERROR_FILE_NOT_FOUND. I'll make this change as well. HTH. -Shane On 7/29/08, Jeremy Spiegel <[EMAIL PROTECTED]> wrote: > > Hi, > > winDelete in os_win.c has retry functionality to try multiple times to > delete a file if a virus scanner or indexing program has a handle open > on that file. We've seen SQLite failures that have been tracked down to > other apps temporarily opening our db journal files, so we believe that > the retry behavior could be very valuable to us. > > In order to check for failure, winDelete checks that DeleteFileW returns > zero and that GetFileAttributesW doesn't return INVALID_FILE_ATTRIBUTES. > However, when I try calling DeleteFileW on a file with a handle open on > that file, I see DeleteFileW returning 1 (success) and I see > GetFileAttributesW returning INVALID_FILE_ATTRIBUTES, I think because > even though the file still exists it is in a "delete pending" state. > > The code below illustrates the problem. Thanks for any help you can > provide! > > :) Jeremy Spiegel > > > #include > #include > #include > > int _tmain(int argc, _TCHAR* argv[]) > { >DWORD dwDesiredAccess = GENERIC_READ | GENERIC_WRITE; >DWORD dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE | > FILE_SHARE_DELETE; >DWORD dwCreationDisposition = OPEN_ALWAYS; >DWORD dwFlagsAndAttributes = FILE_ATTRIBUTE_TEMPORARY >| FILE_ATTRIBUTE_HIDDEN >| FILE_FLAG_DELETE_ON_CLOSE >| FILE_FLAG_RANDOM_ACCESS; > >HANDLE h = CreateFileW(L"c:\\test.txt", >dwDesiredAccess, >dwShareMode, >NULL, >dwCreationDisposition, >dwFlagsAndAttributes, >NULL >); > >if( h==INVALID_HANDLE_VALUE ) >printf("error\n"); > >int rc = DeleteFileW( L"c:\\test.txt" ); >if ( rc == 0 ) >printf("DeleteFileW failed\n"); > >if ( GetFileAttributesW( L"c:\\test.txt" ) != 0x ) >printf( "File still exists\n"); > >HANDLE h2 = CreateFileW(L"c:\\test.txt", >dwDesiredAccess, >dwShareMode, >NULL, >dwCreationDisposition, >dwFlagsAndAttributes, >NULL >); > >if ( h2 == INVALID_HANDLE_VALUE ) >printf( "Error: 0x%x", GetLastError() ); > >CloseHandle(h); >return 0; > } > ___ > 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 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Sqlite bug with aggregate counts query that excludes null values?
On Jul 30, 2008, at 7:14 PM, Tim Dao wrote: > I ran into strange behavior in dealing with Sqlite 3.5.9 on a 6 > million > record table I was using in development and wanted to see if I could > duplicate the error in an entirely separate instance so I tried it > from > Firefox 3.0 + SqliteManager Plugin much to the same effect. > > Basically when running a group by query where you want to attain > counts of > dupes, i.e. > > select fieldname, count(1) from moz_formhistory > where fieldname is not null > group by fieldname having count(1) > 1; > > I get corrupted fieldnames with correct counts. > > > select fieldname, count(1) from moz_formhistory > --where fieldname is not null > group by fieldname having count(1) > 1; > > Running the above yields correct results. This is the same problem reported by ticket #3201 http://www.sqlite.org/cvstrac/tktview?tn=3201 which would fixed by check-in [5341] http://www.sqlite.org/cvstrac/chngview?cn=5341 on 2008-07-04. The fix appears in SQLite release 3.6.0. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Sqlite bug with aggregate counts query that excludes null values?
I ran into strange behavior in dealing with Sqlite 3.5.9 on a 6 million record table I was using in development and wanted to see if I could duplicate the error in an entirely separate instance so I tried it from Firefox 3.0 + SqliteManager Plugin much to the same effect. Basically when running a group by query where you want to attain counts of dupes, i.e. select fieldname, count(1) from moz_formhistory where fieldname is not null group by fieldname having count(1) > 1; I get corrupted fieldnames with correct counts. select fieldname, count(1) from moz_formhistory --where fieldname is not null group by fieldname having count(1) > 1; Running the above yields correct results. I know Sqlite to be considered an ubiquitous database if any, so I was surprised to see this sort of behavior. Can anyone else duplicate or explain what may be wrong with either Sqlite or my expectations from my SQL statement? Thanks, Tim ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Shared cache question
What should be the expected behavior of existing connections when sqlite3_enable_shared_cache() is enabled, and then another database is ATTACH'ed to the pre-cache-enabled connection? And further complicate things by saying that the attached database is using vtables and the original connection is not. What I'm wondering is . could we enhance sqlite3_open_v2() to add a flag for shared cache enabled, rather than have it be a global setting? I'd like to have some connections on a shared cache, and some not . and be able to attach non-cache-enabled databases to existing connections and have fts3 work. Robert ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] ANN: sqliteman 1.2.0
Hello! В сообщении от Wednesday 30 July 2008 20:21:53 Christophe Leske написал(а): > Hi Petr, > > > I'm glad I can announce new stable version of Sqliteman - the GUI for > > developers and admins: > > http://sqliteman.com/ > > I gave it a try, and it seems as if SQLiteman can´t handle extensions > for databases, is this right? TkSQLite can handle extensions and a lot of functions are included. Best regards, Alexey. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] ANN: sqliteman 1.2.0
Hi Petr, > I'm glad I can announce new stable version of Sqliteman - the GUI for > developers and admins: > http://sqliteman.com/ > I gave it a try, and it seems as if SQLiteman can´t handle extensions for databases, is this right? -- Christophe Leske www.multimedial.de - [EMAIL PROTECTED] http://www.linkedin.com/in/multimedial Lessingstr. 5 - 40227 Duesseldorf - Germany 0211 261 32 12 - 0177 249 70 31 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] winDelete retry-on-failure functionality isn't working
GetFileAttributes() returns INVALID_FILE_ATTRIBUTES with an error of ERROR_ACCESS_DENIED if the file is in a "pending delete" state. I'll update the retry logic in os_win.c in winDelete() to add this additional check. I believe that should improve the situation (as long as the other application which has the db journal file temporarily open closes it in the MX_DELETION_ATTEMPTS * 100ms time frame.) Of course, ERROR_ACCESS_DENIED can also be returned if you have insufficient privileges to access the file, but I don't think retrying the delete in this situation is bad either. The return should also be modified to return SQLITE_OK only when GetFileAttributes() returns INVALID_FILE_ATTRIBUTES with an error of ERROR_FILE_NOT_FOUND. I'll make this change as well. HTH. -Shane On 7/29/08, Jeremy Spiegel <[EMAIL PROTECTED]> wrote: > > Hi, > > winDelete in os_win.c has retry functionality to try multiple times to > delete a file if a virus scanner or indexing program has a handle open > on that file. We've seen SQLite failures that have been tracked down to > other apps temporarily opening our db journal files, so we believe that > the retry behavior could be very valuable to us. > > In order to check for failure, winDelete checks that DeleteFileW returns > zero and that GetFileAttributesW doesn't return INVALID_FILE_ATTRIBUTES. > However, when I try calling DeleteFileW on a file with a handle open on > that file, I see DeleteFileW returning 1 (success) and I see > GetFileAttributesW returning INVALID_FILE_ATTRIBUTES, I think because > even though the file still exists it is in a "delete pending" state. > > The code below illustrates the problem. Thanks for any help you can > provide! > > :) Jeremy Spiegel > > > #include > #include > #include > > int _tmain(int argc, _TCHAR* argv[]) > { >DWORD dwDesiredAccess = GENERIC_READ | GENERIC_WRITE; >DWORD dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE | > FILE_SHARE_DELETE; >DWORD dwCreationDisposition = OPEN_ALWAYS; >DWORD dwFlagsAndAttributes = FILE_ATTRIBUTE_TEMPORARY >| FILE_ATTRIBUTE_HIDDEN >| FILE_FLAG_DELETE_ON_CLOSE >| FILE_FLAG_RANDOM_ACCESS; > >HANDLE h = CreateFileW(L"c:\\test.txt", >dwDesiredAccess, >dwShareMode, >NULL, >dwCreationDisposition, >dwFlagsAndAttributes, >NULL >); > >if( h==INVALID_HANDLE_VALUE ) >printf("error\n"); > >int rc = DeleteFileW( L"c:\\test.txt" ); >if ( rc == 0 ) >printf("DeleteFileW failed\n"); > >if ( GetFileAttributesW( L"c:\\test.txt" ) != 0x ) >printf( "File still exists\n"); > >HANDLE h2 = CreateFileW(L"c:\\test.txt", >dwDesiredAccess, >dwShareMode, >NULL, >dwCreationDisposition, >dwFlagsAndAttributes, >NULL >); > >if ( h2 == INVALID_HANDLE_VALUE ) >printf( "Error: 0x%x", GetLastError() ); > >CloseHandle(h); >return 0; > } > ___ > 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] SQLITE_CORE use for ??
Thanks a lot for the clarification. --- Marco Bambini http://www.sqlabs.net http://www.sqlabs.net/blog/ http://www.sqlabs.net/realsqlserver/ On Jul 30, 2008, at 4:28 PM, D. Richard Hipp wrote: > > On Jul 30, 2008, at 10:22 AM, Marco Bambini wrote: > >> Can someone clarify this point please? >> I mean, if I want to compile sqlite in a way that it should be able >> to >> load extensions, SQLITE_CORE could be defined or not? >> Or if it doesn't matter, what is its role? >> > > A developer using SQLite in their product should never have to mess > with SQLITE_CORE. The SQLITE_CORE macro is for internal use only. If > you find a case where you think you have to set SQLITE_CORE manually > in order to compile SQLite, that is bug - either in SQLite itself or > in your use of SQLite. > > > D. Richard Hipp > [EMAIL PROTECTED] > > > > ___ > 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] ANN: sqliteman 1.2.0
I can access your home page but time out on the links. Petr Vanek wrote: > hello all sqlite users, > > I'm glad I can announce new stable version of Sqliteman - the GUI for > developers and admins: > http://sqliteman.com/ > > Sqliteman introduction: > http://sqliteman.com/index.php/page/2.html > > Your oppinions and suggestions are welcomed. > > all the best > Petr Vanek > > P.S.: the full announcement follows > > Full release notes: > > The best developer's and/or admin's GUI tool for Sqlite3 > databases in the world. No joking here (or just a bit > only) - it contains the most complette feature set of > all tools available. > > Sqliteman is real multiplatform software - it's reported > to be run on Linux, MS Windows, MacOS, *BSD and more natively. > > 1.2.0 approaches after ten months of development, testing, > and using the previously released 1.0.x and SVN snapshot > versions. I'd like to send a big kudo to all people > involved in this era. You know who you are. > > Sourceforge.net contains only the source code and Windows/Mac > binaries. Packaging of Sqliteman for your distribution is on > your software vendor. But there are some packages prepared > for you already (see below). > > Windows Big Fat Note: Setup package will install Sqliteman > into system via installer. Plain zip file can be unpacked > anywhere and run without any installation. Yet Another > > Another Note for MS Windows users: I do not use MS Windows > extensively. If you are facing with any problem let me know > to get it working. > > Project homepage: http://sqliteman.com > Feature requests and bugs: http://sqliteman.com/bugtracker > Source code, MS Windows and MacOS binaries: > http://sourceforge.net/projects/sqliteman/ > Suse and Fedora packages URL: > http://software.opensuse.org/download/home:/subik/ > > And what about future? > > The development won't stop. Maybe it will be slower a little > bit now just because Sqliteman can handle what I need from > this software. Anyway there are some plans how to improve > it more. > > You can speed up your requests with your patches or e.g. technical > (hardware/software) or financial support. See "Support development" > > > > Changes: > * Features: > - full ALTER TABLE support (by step-by-step scripting) > - extended Preferences for SQL Editor, Data Viewer and application startup > - database PRAGMAs handling > - implemented so called Table Populator (create testing data) > - data export/import > - complete user documentation > - BLOBs handling: load/save/show size > - real NULL values handling > - extended direct tables content editation > > * Look and Feel > - new professionally designed icon > - ability to integrate with KDE4 themes > - updated translations > > * Internals: > - bugfixes > - internal SQL parser is rewritten (merged with TOra code) > - new SQL text editor (QScintilla based one) > - Sqliteman can be used with Qt 4.2.x but the 4.3.x or later is stronlgy > recomended. > > > ___ > 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] SQLITE_CORE use for ??
On Jul 30, 2008, at 10:22 AM, Marco Bambini wrote: > Can someone clarify this point please? > I mean, if I want to compile sqlite in a way that it should be able to > load extensions, SQLITE_CORE could be defined or not? > Or if it doesn't matter, what is its role? > A developer using SQLite in their product should never have to mess with SQLITE_CORE. The SQLITE_CORE macro is for internal use only. If you find a case where you think you have to set SQLITE_CORE manually in order to compile SQLite, that is bug - either in SQLite itself or in your use of SQLite. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLITE_CORE use for ??
Can someone clarify this point please? I mean, if I want to compile sqlite in a way that it should be able to load extensions, SQLITE_CORE could be defined or not? Or if it doesn't matter, what is its role? Thanks. --- Marco Bambini http://www.sqlabs.net http://www.sqlabs.net/blog/ http://www.sqlabs.net/realsqlserver/ On Jul 30, 2008, at 3:45 PM, Mihai Limbasan wrote: > Kevin Tang wrote: >> Dear all, >> >> After I upgrade to SQLite 3.6.0, I found that I must add >> "SQLITE_CORE" in >> PreProcessor to build my program. >> >> What is the "SQLITE_CORE" use for?? >> >> Thanks, >> Kevin Tang. >> >> > When defined, SQLITE_CORE prevents the redefinition of some API > functions in sqlite3ext.h. From that file: > > /* > ** The following macros redefine the API routines so that they are > ** redirected throught the global sqlite3_api structure. > ** > ** This header file is also used by the loadext.c source file > ** (part of the main SQLite library - not an extension) so that > ** it can get access to the sqlite3_api_routines structure > ** definition. But the main library does not want to redefine > ** the API. So the redefinition macros are only valid if the > ** SQLITE_CORE macros is undefined. > */ > > ___ > 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] SQLITE_CORE use for ??
Kevin Tang wrote: Dear all, After I upgrade to SQLite 3.6.0, I found that I must add "SQLITE_CORE" in PreProcessor to build my program. What is the "SQLITE_CORE" use for?? Thanks, Kevin Tang. When defined, SQLITE_CORE prevents the redefinition of some API functions in sqlite3ext.h. From that file: /* ** The following macros redefine the API routines so that they are ** redirected throught the global sqlite3_api structure. ** ** This header file is also used by the loadext.c source file ** (part of the main SQLite library - not an extension) so that ** it can get access to the sqlite3_api_routines structure ** definition. But the main library does not want to redefine ** the API. So the redefinition macros are only valid if the ** SQLITE_CORE macros is undefined. */ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] About file name encoding under Linux
On Jul 30, 2008, at 6:54 AM, 宋浩 wrote: > I've got a problem here regarding file name encoding under Linux: > when you > say that file names feed to sqlite3_open() functions should be > encoded in > UTF-8, do you really mean that? > > I mean, as far as I can tell, under Linux, the file name submitted to > program by the user should be the one directly passed to APIs like > open(), > with no encoding conversions required. e.g., if the current locale is > zh_CN.GB18030, (simplified Chinese, encoded in China national standard > encoding GB18030), then the file name argument passed to the program > is > encoded in GB18030, and this exact byte stream (without any encodig > conversion) shoud be passed to system APIs. Correct me if I'm wrong > here, > please. I designed and implemented SQLite under the assumption that unix always uses UTF-8 filename encodings. D. Richard Hipp [EMAIL PROTECTED] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLITE_CORE use for ??
Dear all, After I upgrade to SQLite 3.6.0, I found that I must add "SQLITE_CORE" in PreProcessor to build my program. What is the "SQLITE_CORE" use for?? Thanks, Kevin Tang. -- Kevin Tang. - CEO秘笈: http://superceo.blogspot.com/ 職青區Blog: http://gigworker.blogspot.com/ GIG Life 網站: http://www.giglife.org/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Convert the CURRENT_TIMESTAMP
On Tue, Jul 29, 2008 at 02:03:01PM -0700, Joanne Pham wrote: > I still have the problem to set the result of the below statement to > variable so I can print out mulitple times without the executing the > select statement over and over again. create a view? > select '#device local time = ' || > (case strftime('%w', d) when '0' then 'SUN' when '1' then 'MON' when '2' > then 'TUE' when '3' then 'WED' when '4' then 'THUR' when '5' then 'FRI' when > '6' then 'SAT' end) || ' ' || > (case strftime('%m', d) when '01' then 'JAN' when '02' then 'FEB' when '03' > then 'MAR' when '04' then 'APR' when '05' then 'MAY' when '06' then 'JUN' > when '07' then 'JUL' when '08' then 'AUG' when '09' then 'SEP' when '10' > then 'OCT' when '11' then 'NOV' when '12' then 'DEC' end) || ' ' || > strftime('%d %H:%M:%S %Y', d,'localtime') || ', ' > from (select CURRENT_TIMESTAMP as d) ; this seems like a really painful thing to do in sql when the calling language almost certainly has far easier ways to do this (and you could make the sql simpler too probably) ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] About file name encoding under Linux
"??" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've got a problem here regarding file name encoding under Linux: > when you say that file names feed to sqlite3_open() functions should > be encoded in UTF-8, do you really mean that? > > So if I convert the file name from current locale encoding to UTF-8, > then the SQLite library code will need to convert it back before pass > it to system APIs, do the SQLite developers really implement it that > way? At least on Windows, yes, it's indeed implemented this way (the native Windows API for opening a file accepts file names either in system default codepage, or in UTF-16; SQLite probably uses the latter flavor). Don't know about Linux. My guess is, it's done this way because file names may appear in a SQL statement (see ATTACH), and the statement's text has to be in either UTF-8 or UTF-16. So for consistency, all means of opening a file accept the same encoding. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] OS X precompiled command line binary
The precompiled binary of the command line program for OS X appears not to have been built with a readline library. Is there any particular reason for this? (the version supplied with OS X Leopard (3.4.0), is so complied. Thanks, -- Tim ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] About file name encoding under Linux
I've got a problem here regarding file name encoding under Linux: when you say that file names feed to sqlite3_open() functions should be encoded in UTF-8, do you really mean that? I mean, as far as I can tell, under Linux, the file name submitted to program by the user should be the one directly passed to APIs like open(), with no encoding conversions required. e.g., if the current locale is zh_CN.GB18030, (simplified Chinese, encoded in China national standard encoding GB18030), then the file name argument passed to the program is encoded in GB18030, and this exact byte stream (without any encodig conversion) shoud be passed to system APIs. Correct me if I'm wrong here, please. So if I convert the file name from current locale encoding to UTF-8, then the SQLite library code will need to convert it back before pass it to system APIs, do the SQLite developers really implement it that way? -- 宋浩 Song, Hao Institute for Theoretical Computer Science Tsinghua University, Beijing, P.R.China ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] ANN: sqliteman 1.2.0
hello all sqlite users, I'm glad I can announce new stable version of Sqliteman - the GUI for developers and admins: http://sqliteman.com/ Sqliteman introduction: http://sqliteman.com/index.php/page/2.html Your oppinions and suggestions are welcomed. all the best Petr Vanek P.S.: the full announcement follows Full release notes: The best developer's and/or admin's GUI tool for Sqlite3 databases in the world. No joking here (or just a bit only) - it contains the most complette feature set of all tools available. Sqliteman is real multiplatform software - it's reported to be run on Linux, MS Windows, MacOS, *BSD and more natively. 1.2.0 approaches after ten months of development, testing, and using the previously released 1.0.x and SVN snapshot versions. I'd like to send a big kudo to all people involved in this era. You know who you are. Sourceforge.net contains only the source code and Windows/Mac binaries. Packaging of Sqliteman for your distribution is on your software vendor. But there are some packages prepared for you already (see below). Windows Big Fat Note: Setup package will install Sqliteman into system via installer. Plain zip file can be unpacked anywhere and run without any installation. Yet Another Another Note for MS Windows users: I do not use MS Windows extensively. If you are facing with any problem let me know to get it working. Project homepage: http://sqliteman.com Feature requests and bugs: http://sqliteman.com/bugtracker Source code, MS Windows and MacOS binaries: http://sourceforge.net/projects/sqliteman/ Suse and Fedora packages URL: http://software.opensuse.org/download/home:/subik/ And what about future? The development won't stop. Maybe it will be slower a little bit now just because Sqliteman can handle what I need from this software. Anyway there are some plans how to improve it more. You can speed up your requests with your patches or e.g. technical (hardware/software) or financial support. See "Support development" Changes: * Features: - full ALTER TABLE support (by step-by-step scripting) - extended Preferences for SQL Editor, Data Viewer and application startup - database PRAGMAs handling - implemented so called Table Populator (create testing data) - data export/import - complete user documentation - BLOBs handling: load/save/show size - real NULL values handling - extended direct tables content editation * Look and Feel - new professionally designed icon - ability to integrate with KDE4 themes - updated translations * Internals: - bugfixes - internal SQL parser is rewritten (merged with TOra code) - new SQL text editor (QScintilla based one) - Sqliteman can be used with Qt 4.2.x but the 4.3.x or later is stronlgy recomended. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users