close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 9 years ago

Last modified 9 years ago

#1893 assigned task

Native driver for embedded database SQLite

Reported by: Víctor de Buen Remiro Owned by: Jorge
Priority: high Milestone: TOL Extensions
Component: Database Version: head
Severity: major Keywords:
Cc:

Description

Se necesita un driver nativo para la base de datos SQLite embebida en C/C++

Change History (15)

comment:1 Changed 9 years ago by Víctor de Buen Remiro

In revision [7009] Refs #1893

comment:2 Changed 9 years ago by Víctor de Buen Remiro

(In [7010]) Refs #1893

comment:3 Changed 9 years ago by Víctor de Buen Remiro

(In [7011]) Refs #1893

comment:4 Changed 9 years ago by Víctor de Buen Remiro

(In [7012]) Refs #1893

comment:5 Changed 9 years ago by Víctor de Buen Remiro

(In [7013]) Refs #1893

comment:6 Changed 9 years ago by Jorge

(In [7014]) refs #1893, reglas para construir tolsqlite

comment:7 Changed 9 years ago by Víctor de Buen Remiro

(In [7015]) Refs #1893

comment:8 Changed 9 years ago by Víctor de Buen Remiro

(In [7016]) Refs #1893
Removing redundant error messages

comment:9 Changed 9 years ago by Víctor de Buen Remiro

(In [7025]) Refs #1893
Fixing errors

comment:10 Changed 9 years ago by Víctor de Buen Remiro

(In [7048]) Refs #1893
Adding driver to DBCopnnect

comment:11 Changed 9 years ago by Víctor de Buen Remiro

Status: newassigned

Falla la compilación de libtolsqlite con GNU en WIN32

[100%] Building C object dbdrivers/CMakeFiles/tolsqlite0.dir/libtolsqlite.c.obj
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:29:9: error: expected '=', ',', ';', 'asm' or '_
_attribute__' before '<' token
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:40:3: warning: data definition has no type or st
orage class [enabled by default]
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:40:3: warning: type defaults to 'int' in declara
tion of 'sqlited' [-Wimplicit-int]
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:48:1: warning: return type defaults to 'int' [-W
return-type]
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c: In function 'DLLEXPORT':
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:48:16: error: expected declaration specifiers be
fore 'sqlite_PutHCIWriter'
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:58:1: error: expected declaration specifiers bef
ore 'DLLEXPORT'
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:88:1: error: expected declaration specifiers bef
ore 'DLLEXPORT'
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:106:1: error: expected declaration specifiers be
fore 'DLLEXPORT'
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:114:1: error: expected declaration specifiers be
fore 'DLLEXPORT'
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:121:1: error: expected declaration specifiers be
fore 'DLLEXPORT'
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:127:1: error: expected declaration specifiers be
fore 'DLLEXPORT'
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:137:1: error: expected declaration specifiers be
fore 'DLLEXPORT'
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:162:1: error: expected declaration specifiers be
fore 'DLLEXPORT'
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:184:1: error: expected declaration specifiers be
fore 'DLLEXPORT'
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:197:1: error: expected declaration specifiers be
fore 'DLLEXPORT'
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:205:1: error: expected declaration specifiers be
fore 'DLLEXPORT'
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:217:1: error: expected declaration specifiers be
fore 'DLLEXPORT'
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:238:1: error: expected declaration specifiers be
fore 'DLLEXPORT'
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:258:1: error: expected declaration specifiers be
fore 'DLLEXPORT'
E:\prj\tolp\tolp\trunk\tol\dbdrivers\libtolsqlite.c:276:1: error: expected declaration specifiers be
fore 'DLLEXPORT'

comment:12 Changed 9 years ago by Jorge

(In [7069]) refs #1893, en release compilamos con -O2 debido al siguiente error reportado desde sqlite3.c:

C:\Users\toldevel\trunk\tol\dbdrivers\sqlite\sqlite3.c: In function 'sqlite3IsNaN':
C:\Users\toldevel\trunk\tol\dbdrivers\sqlite\sqlite3.c:24664:3: error: #error SQLite will not work correctly with the -f
fast-math option of GCC

comment:13 Changed 9 years ago by Pedro Gea

(In [7079]) Refs #1893
Ese .h es para postgres. Aquí no hace falta.

comment:14 Changed 9 years ago by Jorge

(In [7174]) refs #1893, detectamos si tenemos isnan y definimos HAVE_ISNAN, asi podemos compilar -Ofast

comment:15 Changed 9 years ago by Víctor de Buen Remiro

Hay un problema cuando hay un campo REAL con valor NULL, pues devuelve la cadena vacía "". Este es el ejemplo más sencillo posible

Set DBTable("select 0/0 as x")

Además saca este mensaje:

Warning: [1] (Funcion DBTable) La consulta debería devolver un texto, una fecha o un número en el campo 1

Creo que internamente NULL no tiene tipo en SqLite
Entiendo que habría que cortocircuitarlo en sqlite_GetAsReal pero yo soy incapaz de compilar TOL

Note: See TracTickets for help on using tickets.