#1 2011-02-07 20:01:58

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

SQLite3 Framework updated to 1.12 - including engine 3.7.5

The Synopse SQLite3 Database Framework was just released under version 1.12:
* internal SQLite3 database engine was updated to version 3.7.5, and SQL functions have been enhanced;
* now handle prepared SQL statements with a neutral automated syntax;
* with Delphi 2009/2010/XE, you can define directly Unicode string properties in TSQLRecord (will be stored as UTF-8);
* include some overloaded methods using Variants for direct property access (e.g. in any grid);
* SynPdf can now bookmarks and links methods, reuse any existing bitmap, and generate PDF/A-1 files;
* internal reporting now supports bookmarks and links (with on screen navigation), and better integrates with SynPdf;
* a lot of bug fixes, new methods and enhancements.


Here are the modifications, per each unit:

SynCommons.pas

- fixed issue "JSON floats decimal separator depends on language settings"
- new UTF8ToWideChar() overloaded function, with MaxDestChars parameter
- new FillIncreasing() procedure
- now handle our 32/64-bit variable-length integer encoding, via new FromVarUInt32/64 and ToVarUInt32/64 functions
- new TFileBufferReader and TFileBufferWriter objects, implementing very fast read/write access to huge files, with new 32/64-bit variable-length integer encoding and optimized storage of IDs or Offsets (used in TSynBigTable)
- new function UnQuoteSQLString()
- another review of Pos() calls in the code (now use our fast PosEx)
- TSynMemoryStream now replaces TRawUTF8Stream class, with constructors using either an AnsiString, either a memory buffer
- new TSynTable, TSynTableFieldProperties and TSynTableStatement classes to handle a generic database table storing field values using our SBF compact binary format (more compact than BSON, similar to Protocol Buffers)
- new WinAnsiToUnicodeString and Ansi7ToString functions
- new TTextWriter.AddBinToHex method
- new CompareOperator() functions and associated TCompareOperator type
- new IntToThousandString() function (used for TSynTests e.g.)
- new CreateInternalWindow() for creating a GDI message handler in any object

SQLite3Commons.pas

- now handle automaticaly prepared SQL statements: the parameters must be surrounded with :(...): in order to use an internal pool of prepared TSQLRequest statements; example of possible inlined values are  :(1234):  :(12.34): :(12E-34): :("text"): or  :('text'): (with double quoting inside the text, just like any SQL statement)
- with Delphi 2009/2010/XE, you can define any string parameter in your TSQLRecord definition (will be handle as sftUTF8Text field)
- with Delphi 2009/2010/XE, WriteObject, ReadObject and CopyObject functions now handle string (UnicodeString) properties, as TINIWriter.WriteObject method does also: UTF-8 encoding is used at the storage level
- new function SQLParamContent() to retrieve :(...): param content and type
- another review of Pos() calls in the code (now use our fast PosEx)
- some functions or type/const definitions moved to SynCommons in order to introduce new TSynTable class (TJSONWriter, IsRowID, GotoNextJSONField, TSynTableStatement...)
- new TSQLRestServer.CreateSQLMultiIndex method
- new TSQLTable.GetString and TSQLTable.GetVariant methods
- new TPropInfo.SetVariant/GetVariant/CopyValue methods
- new GetFieldValue/SetFieldValue and GetFieldVariant/SetFieldVariant methods for TSQLRecord
- fixed issue in TSQLTable.GetWP(), which truncated data in Grid display
- fixed issue in TSQLRestServerNamedPipe[Response] multi-thread architecture: FastMM in full debug mode detected that a block has been modified after being freed - now TSQLRestServerNamedPipeResponse is fully stand-alone

SQLite3.pas

- update SQLite3 engine to version 3.7.5
- now handle automaticaly prepared SQL statements: the parameters must be surrounded with :(...): in order to use an internal pool of prepared TSQLRequest statements
- fixed sqlite3_result_text() implementation
- added sqlite3_aggregate_context(), sqlite3_value_numeric_type() and sqlite3InternalFree() functions
- new CONCAT() function available in SQL statements to process fast string concatenation
- now handle automaticaly prepared SQL statements: the parameters must be surrounded with : ( ... ) :
- new sqlite3_stmt_readonly function and TSQLRequest.IsReadOnly property

SynPdf.pas

- can now generate PDF/A-1 files if the new PDFA1 property is set to true
- new CreateLink and CreateBookMark methods for TPdfDocument, to easily handle bookmarks and links
- new CreateOutline method for TPdfDocument, for direct outline adding
- new TPdfPage.PageLandscape and TPdfDocument.DefaultPageLandscape properties
- can use EMR_GDICOMMENT to embedd some SynPDF related data (like bookmarks, links, and document outline) in the source TMetaFile - used by TSQLite3Pages
- new TPdfTextString class, used to handle Unicode parameters (e.g. in TPdfInfo, which properties are now handling unicode encoding as expected)
- new CreateOrGetImage method to easily add a bitmap to the page, with internal caching: if the same bitmap content is sent more than once, only one TPDFImage will be used (used for emf enumeration, e.g. SQLite3Pages)
- now handle justified text from metafile (i.e. call to SetTextJustification Windows API will change the PDF word space as expected)
- Uniscribe API now made public (and documented as such), for TRenderPages
- fixed memory leak in TPdfOutlineRoot.Create
- fixed issue in TPdfDocumentGDI.VCLCanvasSize
- fixed issue with fixed-width font unicode characters display
- FontSub.dll library is loaded only once for the whole application

SynCrtSock.pas

- added connection check and exception handling in THttpServerSocket.GetRequest, which now is a function returning a boolean
- added DOS / TCP SYN Flood detection if THttpServerSocket.GetRequest spent more than 2 seconds to get header from HTTP Client

SQLite3HttpServer.pas

- TSQLite3HttpServer now handle multiple TSQLRestServer instances per one server (dispatching requests via the Root URI used)
- new AddServer method, to register a TSQLRestServer after launch
- new TSQLRestServer.OnlyJSONRequests property

SynGdiPlus.pas

- added code for error handling, via new TGdipStatus enumeration type
- now GDI+ handles are stored using THandle instead of plain integer type (in order to prepare a 64 bit version of the unit)
- fixed a problem in rendering bitmaps, e.g. as created in SQLite3Pages
- fixed a problem in rendering underlined text (GDI+ DrawDriverString doesn't handle underlined or stroken out fonts as expected)

SQLite3Pages.pas

- fixed one issue (in SynGdiPlus) for displaying bitmaps in anti-aliased mode and displaying underlined or stroken out text
- new ForceInternalAntiAliased method (true by default) using SynGdiPlus instead of GDI+ 1.1 native conversion
- OnStringToUnicodeEvent is now called for all text, whatever the alignment is
- new property BiDiMode, for formatting the text in right to left order
- added new DrawBMP overloaded method to add some bitmap as a (centered) paragraph, with some optional legend - bitmaps are now cached and reused in the exported PDF, if the same one is drawn multiple time in the document
- added new AddBookMark, AddOutline and AddLink methods (working also with the PDF export using SynPdf)
- live navigation via links in the preview screen, and via the new 'Bookmarks' popup menu entry
- additional ExportPDF* properties used during PDF export

This version compiles from Delphi 6 up to Delphi XE.

The full source code of the framework is available to download, licensed under a MPL/GPL/LGPL tri-license.
http://synopse.info/files/SynopseSQLite3.zip

Offline

#2 2011-02-09 11:30:23

WladiD
Member
From: Germany
Registered: 2010-10-27
Posts: 40

Re: SQLite3 Framework updated to 1.12 - including engine 3.7.5

I just installed it to have the new method TSQLRestServer.CreateSQLMultiIndex.

This and all other code (used by myself) works very well!

You are a real Open Source Fighter!

Thank you! (I think three exclamation marks are enough wink)

Offline

#3 2011-02-09 12:00:41

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: SQLite3 Framework updated to 1.12 - including engine 3.7.5

big_smile

Offline

#4 2011-03-23 06:15:21

hmcorbould
Member
From: Sydney NSW Australia
Registered: 2011-03-23
Posts: 1
Website

Re: SQLite3 Framework updated to 1.12 - including engine 3.7.5

I've downloaded the SQLite3 framework over the last day or so, and I run several of the Samples under Delphi 2010: Project02, Project03 server and client, TestSQLite3Pages, and SynTest.

In Project03Server, the line in Unit2:
   Server.CreateMissingTables; is missing its parameter.
It should be:
   Server.CreateMissingTables(cardinal);
I used (2) and then the server runs, allowing the client to be successfully tested.

In Project01, an Abstract Error occurs at the line:
   if Database.Add(Rec,true) = 0 then ....
There are two Add functions in SQLite3commons. The first one appears to be the function used in Project01 but I cannot figure out why the coding creates an Abstract Error which is a Delphi error not the error message programmed in Project01. I cannot get Project01 to run.

Finally, can anyone tell me where I can get the numerous components used in the "MainDemo" included in the Samples? Examples are: AdvToolBar, AdvPreviewMenu and so on. I can't find them anywhere on the Synopse website. Getting the "MainDemo" up and running looks like it will be a good learning process. I have downloaded the exe and can see the finished result.

Offline

#5 2011-03-23 07:22:20

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: SQLite3 Framework updated to 1.12 - including engine 3.7.5

Those components are supplied by TMS software.
They are commercial, but you've a trial version available.

My previous employer wanted to have such component layout on screen, so the easier for me was to use those components.
From my subjective POV, they are not so well written (a lot of duplicated code), but they do there work.

I'm currently finishing a version with native VCL components.
It's compiling and almost running. See in the source code repository http://synopse.info/fossil

Offline

#6 2011-05-19 12:10:14

migajek
Member
Registered: 2010-10-01
Posts: 89

Re: SQLite3 Framework updated to 1.12 - including engine 3.7.5

Hi,
I'm very glad to see the latest Fossil version to use TMS optionally.
The code is mentioned to be 1.13 release, however I'm not able to found 'official' release - just the Fossil leaves - which don't contain sqlite3.obj ... could you please tell me where to download official release?

Thanks,
m

Offline

#7 2011-05-19 15:01:12

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: SQLite3 Framework updated to 1.12 - including engine 3.7.5

The pure VCL part of the UI (with no TMS component use) is indeed working as expected.

There is no official release yet of the 1.13 revision.
The SQLite engine is about to be released in revision 3.7.6.3 (an issue was just discovered yesterday) and I want to include this safer version.

And take a look at http://synopse.info/fossil/wiki?name=Get+the+source note about how to get the .obj files corresponding to the Fossil Leaves.

Offline

#8 2011-05-21 13:26:06

migajek
Member
Registered: 2010-10-01
Posts: 89

Re: SQLite3 Framework updated to 1.12 - including engine 3.7.5

I understand, thank you smile

Offline

Board footer

Powered by FluxBB