Re: [sqlite] looking for a solution of Object/Relation Mapping with sqlite

2009-09-10 Thread Jim Showalter
How complicated are your objects and queries? I've worked with Hibernate (a lot, actually), and it's good for some things and horrible for others and a menace in the hands of the wrong people. There simply is no substitute for understanding your schema and your queries. If you have a good

[sqlite] looking for a solution of Object/Relation Mapping with sqlite

2009-09-10 Thread Wenbo Zhao
Hi, all I have been looking for a simple and practical solution of Object/Relation Mapping over JDBC to use with sqlite. I think this should be a common problem for all users who write app with sqlite in java. On the net, it seems everybody is talking about Hibernate in this field. I'm new in

Re: [sqlite] how to pass function result to a blob ?

2009-09-10 Thread Simon Slavin
On 10 Sep 2009, at 8:34pm, yogibabu wrote: > UPDATE table1 SET stringblob = X'hex(string)' etc... > > it returns: unrecognized token x'hex', but when I put a variable by > hand it > works ok Check to see that one of the levels of API you're using is not trying to interpret the quotes

Re: [sqlite] how to pass function result to a blob ?

2009-09-10 Thread yogibabu
i have my data already in database, i want to perform some algorithms on it and put it within the database onto the same row, because this is binary data i must use blob functions for processing the data are registered by $pdo->sqliteCreateFunction interestingly, when I operate on strings by

Re: [sqlite] how to pass function result to a blob ?

2009-09-10 Thread Pavel Ivanov
Sorry, but I still don't quite understand what do you have and what are you trying to achieve. Now I understand it like you have some binary data in php and want to insert it into blob field. Then you should be able to do this: UPDATE table1 SET stringblob = ? ... And bind you binary data as

Re: [sqlite] how to pass function result to a blob ?

2009-09-10 Thread yogibabu
Pavel Ivanov-2 wrote: > > So why can't you do like this: > > sql = "UPDATE table1 SET stringblob = X'" . bin2hex(...) . "' ..."; > because I want this function to be called within database without looping it out through every row in php -- View this message in context:

[sqlite] ANN: StepSqlite PL/SQL Compiler 2.1a released

2009-09-10 Thread StepSqlite Team
Hi! Metatranz StepSqlite Team announces the release of StepSqlite 2.1a - a powerful, web-based PL/SQL compiler for SQLite. This version adds powerful new features like Windows support and improvements to existing features like TO_DATE() support. StepSqlite is available FREE (and without any

Re: [sqlite] how to pass function result to a blob ?

2009-09-10 Thread Pavel Ivanov
So why can't you do like this: sql = "UPDATE table1 SET stringblob = X'" . bin2hex(...) . "' ..."; Pavel On Thu, Sep 10, 2009 at 4:01 PM, yogibabu wrote: > > > > Pavel Ivanov-2 wrote: >> >> I don't really understand what you're trying to achieve, but what about >> >>

Re: [sqlite] how to pass function result to a blob ?

2009-09-10 Thread Pavel Ivanov
I don't really understand what you're trying to achieve, but what about UPDATE table1 SET stringblob = cast(hex(string) as blob) Pavel On Thu, Sep 10, 2009 at 3:34 PM, yogibabu wrote: > > table has two three columns: > > i want to be able to put a result of internal

[sqlite] how to pass function result to a blob ?

2009-09-10 Thread yogibabu
table has two three columns: i want to be able to put a result of internal sqlite3 function to a blob UPDATE table1 SET stringblob = hex(string) etc... but as a result of this query the "stringblob" column is populated by text's, not by blobs something like this should work but it

Re: [sqlite] Passing all columns as arguments to a function?

2009-09-10 Thread Robert Citek
On Thu, Sep 10, 2009 at 8:37 AM, Jean-Denis Muys wrote: > Is it possible to pass all columns of a table as arguments to a function in > a implicit way? As Igor wrote: no. > I tried this but it did not work: > > Create table studentMarks (French, English, Maths, Physics); >

Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Sebastian Bermudez
Objects maps to tables... fields maps to objects properties.. if you want just store all objects and read all objects create an entitites tables like: create table entity ( object as text ) and serialize that objects to database. --- El jue 10-sep-09, Shaun Seckman (Firaxis)

Re: [sqlite] Passing all columns as arguments to a function?

2009-09-10 Thread Igor Tandetnik
Jean-Denis Muys wrote: > Is it possible to pass all columns of a table as arguments to a > function in a implicit way? No. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] sqlite3_exec fails on arm

2009-09-10 Thread D. Richard Hipp
On Sep 10, 2009, at 2:23 AM, gprand wrote: > Program's output is: > OPENX 16 /database_file.db 01002 > OPEN16 /database_file.db > READ16100 0 0 > SQL error: database disk image is malformed This indicates that SQLite is reading the first 100 bytes of the database file

Re: [sqlite] create a view and add a column

2009-09-10 Thread Griggs, Donald
Regarding: "...I need to generate a view and add a ID column to that view. Is this possible?" I may well not be understanding your question, Tim. If so, you may want to provide more information, such as what software you're using to speak to the database, do you work with SQL, etc. If you

Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Pavel Ivanov
> Wouldnt using sqlite give me other benefits like easy > of reading and writing data ? > > Any other reasons why I would need a database vs a simple file dump ? Yes, there're benefits like easy searching by some attribute without loading everything into memory and maybe even without scanning

Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Kavita Raghunathan
Sounds worth looking at. I will, thanks! - Original Message - From: "Shaun Seckman (Firaxis)" To: "General Discussion of SQLite Database" Sent: Thursday, September 10, 2009 9:18:26 AM GMT -08:00 US/Canada Pacific Subject: Re: [sqlite]

Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Kavita Raghunathan
Interesting thought. Want to know more. Wouldnt using sqlite give me other benefits like easy of reading and writing data ? Any other reasons why I would need a database vs a simple file dump ? - Original Message - From: "Pavel Ivanov" To: "General Discussion of

Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Shaun Seckman (Firaxis)
You could either store the object as a blob in the database or if you had your own custom collection of these objects it's possible that you could create a virtual table that can be used as the glue between SQLite and this collection. -Shaun -Original Message- From:

Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Pavel Ivanov
So why do you think you need a database? If you want just a persistent storage then maybe simple dump of memory used by all entities into a file will be enough... Pavel On Thu, Sep 10, 2009 at 12:01 PM, Kavita Raghunathan wrote: > The entity consists of an

Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Kavita Raghunathan
The entity consists of an entity ID, and an attribute list. The attribute list could be thought of as an array of integers or vector of integers, and the like. The problem I'm encountering by my affinity towards object oriented is: I dont want to keep 2 sets of data. One inside sqlite, and one

Re: [sqlite] Question on converting objects into relational db

2009-09-10 Thread Ken
table might have columns, integer ID and BLOB entity. But it would be better if you could fully describe the "Entity" internal types instead of just a var arg... --- On Thu, 9/10/09, Kavita Raghunathan wrote: > From: Kavita Raghunathan

[sqlite] Question on converting objects into relational db

2009-09-10 Thread Kavita Raghunathan
I have a very high level question, not dealing with bits and bytes of sqlite: I currently have an object called entity_list, that has a list of all entities on the system. While thinking about it, it sounds like a list of entities is like having a database. Would it be possible to transfer

[sqlite] Importing data into sqlite

2009-09-10 Thread Kavita Raghunathan
Hi All, I'm still investigating the most effective way to import the db into sqlite that we are using as our embedded database. Of the following options, which one do you think works best, and is most extensible and future-proof? 1) Make a tab/csv delimited file with database, and install it

[sqlite] create a view and add a column

2009-09-10 Thread Tim Michelsen
Dear SQLite users, I normally access SQLite databases behind abstraction layers or application GUIs. For a current application in a webapplication I need to generate a view and add a ID cloumn to that view. Is this possible? Could you point me to an example on how this is achieved? Thanks in

[sqlite] Strange SIGSEGV while using SQLITE 3.6.17 on Linux Ubuntu 8.04

2009-09-10 Thread Alessandro Merolli
I'm running SQLite 3.6.17 (almagamation source) on linux Ubuntu 8.04 and i got a strange SIGSEGV (see stack below). The strange thing is: the pPager parameter to sqlite3PagerAcquire function is NULL but right above the stack, its value seems to be correct. Any help is appreciated. Please,

[sqlite] Comparison between Talend Integration Suite and Talend Open Studio

2009-09-10 Thread Rstat
Hi all, I have been working with Talend Open Studio for a few weeks now and would like to have your opinion. Is using Talend Integration Suite really better compared to using Talend Open Studio? On what kind of project can you not use Talend Open Studio and would be best to use Talend

[sqlite] Passing all columns as arguments to a function?

2009-09-10 Thread Jean-Denis Muys
Hi, Is it possible to pass all columns of a table as arguments to a function in a implicit way? I tried this but it did not work: Create table studentMarks (French, English, Maths, Physics); Insert into studentMarks values (12, 9, 15, 14); Insert into studentMarks values (14, 13, 12, 8); Select

Re: [sqlite] server process gives better concurrency - why?

2009-09-10 Thread dave lilley
Might i humbly suggest you do this 1. user app writes data in CSV format to a file (each user program has a defined datafile name and extension to it now if there is more than 1 file from the same user already in the directory it's extension is made unuiqe - eg user1.1, user1.2, user2.1 etc).

Re: [sqlite] sqlite3_exec fails on arm

2009-09-10 Thread gprand
Hi, my ARM7 is a LPC2478. It runs with 16MB RAM. OS is selfmade, consists of TNKernel, Microwindows-Nano-X, FLTK, Elm-Chans FAT-FS, lwIP. Compiler ist arm-elf-gcc 4.3.3. Application is linked against newlib-1.17.0. The SQLite test program: #include #include "sqlite3.h" static int