Re: [sqlite] SQLite port to RTOS

2013-09-04 Thread John McKown
I can answer one question. There is an entire C language API of sqlite
functions that your application can call. You don't need to create and
execute some sort of "command line" interface. The C API is documented here:
http://sqlite.org/c3ref/intro.html

I know nothing about RTOS, but if it does not have a "file", where does it
store long term data? If that storage area does not look like a file system
(i.e. no fopen/fread/fwrite type I/O functions), you will need to write
what is called a VFS (Virtual File System) to make it look like a file to
sqlite. More on that is documented here: http://www.sqlite.org/vfs.html

There is some example VFS code, in C, distributed with sqlite. This is
something else which I am not too familiar with.



On Wed, Sep 4, 2013 at 12:27 AM, Pratheek Prakash  wrote:

> Hi Kees Nuyt,
> That was really helpful. Also I have another
> doubt. Eventually I will be running sqlite integrated with other modules in
> a board. As far as I have read I suppose that sqlite treat a database as a
> file. Adding data to the database and retrieving data from the database is
> equivalent to write() and read() file operations. But in board where can I
> create that database file like creating one in computer? Is it possible?
> Also for communicating with the sqlite library do I need to use command
> line interface always? Because in board its not possible. Can I call those
> library functions directly from the application?
>  It will be really helpful if you can provide me with
> some inputs on these
>
> Regards
> Pratheek
>
>
-- 
As of next week, passwords will be entered in Morse code.

Maranatha! <><
John McKown
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite port to RTOS

2013-09-04 Thread Kees Nuyt
On Wed, 4 Sep 2013 10:57:44 +0530, Pratheek Prakash
 wrote:


> Hi Kees Nuyt,
> 
> That was really helpful. Also I have another doubt.
> Eventually I will be running sqlite integrated with other
> modules in a board. 

That is what SQLite is made for.

> As far as I have read I suppose that sqlite treats
> a database as a file. 

Yes, a SQLite database is a file. SQLite will also creaste
journal files (in the same directory as the database) and
possibly temporary files (elsewhere in the filesystem).

> Adding data to the database and retrieving data from the
> database is equivalent to write() and read() file
> operations. But in board where can I create that database
> file like creating one in computer? Is it possible? 

Creating a database is as simple as opening it, and
creating one or more tables using SQL statements.
In principle you only have to implement a VFS to port
SQLite to a new platform, the VFS is so to speak the
operating system abstraction layer (See my previous message).
The VFSses for Windows and POSIX (Unix and the like) are 
included in the source tree, some other people may have 
implemented VFSses for other operating systems.

As far as SQLite is concerned, a C program using SQLite will
be the same on any operating system, and the database file
itself is portable between all platforms.

> Also for communicating with the sqlite library do I need
> to use command line interface always? 

No, the command line interface is a reference
implementations and development tool. It can also be used
productively from shell scripts.

> Because in board its
> not possible. Can I call those library functions directly
> from the application?

SQLite is an embedded SQL database library. Typically it
is used via the C API, or by using a wrapper for other
languages. Canonical program structure:

Program init
sqlite3_open_v2()
sqlite3_prepare_v2()

Statement execution
loop
sqlite3_bind_*()
sqlite3_step()
sqlite3_column_*()
end loop
sqlite3_reset()

Program exit
sqlite3_finalize()
sqlite3_close()

Please note that some of these entry points have a _v2()
version, which is the preferred version.
Please read the docs of each of those API entry points
carefully, and don't forget to check the status after each
and every call.


> It will be really helpful if you can provide me with some
> inputs on these

You'll have to read more of the documentation, and experiment.

Here are a few more pointers:

http://sqlite.org/docs.html

http://sqlite.org/c3ref/intro.html
http://sqlite.org/cintro.html

http://sqlite.org/arch.html

Coding examples:
http://icculus.org/~chunky/stuff/sqlite3_example/

Last but not least: The hint of Donald Griggs of about
a day ago is very valuable!


-- 
Groet, Cordialement, Pozdrawiam, Regards,

Kees Nuyt

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite port to RTOS

2013-09-03 Thread Pratheek Prakash

Thank you very much Donald Griggs

On 9/3/2013 6:18 PM, Donald Griggs wrote:

Hello, Prakash,

In addition to John McKown's fine advice, you might possibly want to
attempt to contact Kritesh Tripathi, who posted in 2012 that he was using
sqlite with iTron RTOS, which seems it may be a cousin of ulTron RTOS
(correct?).

http://search.gmane.org/?author=kritesh+tripathi=date

I do *not* know if Tripathi was involved in the *porting* of sqlite to
iTron, or just its use with iTron.

If you get no response from the developer list, it may just be that no one
there has experience with ulTron RTOS.

Best of luck,
  Donald Griggs








On Tue, Sep 3, 2013 at 8:06 AM, John McKown <john.archie.mck...@gmail.com>wrote:


I think you're on the wrong list. This is more a "how to use" type forum.
You might want to subscribe to sqlite-dev (
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-dev) where the
developers hang out. You may not have gotten any response because nobody
here has tried and so has no experience to relate. I don't know anything
about RTOS, so I certainly can't help any.

Why not just try and see what happens? That's what I tend to do.


On Tue, Sep 3, 2013 at 6:59 AM, Pratheek Prakash
<prathe...@tataelxsi.co.in>wrote:


Hi,
 Somebody please shed some light on my doubt...

Regards
Pratheek

On 8/26/2013 6:33 PM, Pratheek Prakash wrote:


Hi all,
 I had downloaded the SQLite ver 3.8 code base from the

SQLite

website. In the documentation they say that it supports Unix (Linux, Mac
OS-X, Android, iOS) and Windows (Win32, WinCE, WinRT). I would like to

port

SQLite to uITRON RTOS. Is it possible to port the code to an RTOS? If
possible what could be the main challenges that I may face?
 Waiting for your valuable inputs.

Regards
Pratheek


__**_
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<

http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>




--
Best wishes
Pratheek Prakash
Senior Engineer
TATA ELXSI
Mobile: +91 7736721417


__**_
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<

http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>


--
As of next week, passwords will be entered in Morse code.

Maranatha! <><
John McKown
___
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





--
Best wishes
Pratheek Prakash
Senior Engineer
TATA ELXSI
Mobile: +91 7736721417


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite port to RTOS

2013-09-03 Thread Pratheek Prakash

Hi Kees Nuyt,
That was really helpful. Also I have another 
doubt. Eventually I will be running sqlite integrated with other modules 
in a board. As far as I have read I suppose that sqlite treat a database 
as a file. Adding data to the database and retrieving data from the 
database is equivalent to write() and read() file operations. But in 
board where can I create that database file like creating one in 
computer? Is it possible? Also for communicating with the sqlite library 
do I need to use command line interface always? Because in board its not 
possible. Can I call those library functions directly from the application?
 It will be really helpful if you can provide me 
with some inputs on these


Regards
Pratheek



On 9/4/2013 1:23 AM, Kees Nuyt wrote:

On Mon, 26 Aug 2013 18:33:02 +0530, Pratheek Prakash
<prathe...@tataelxsi.co.in> wrote:


Hi all,
 I had downloaded the SQLite ver 3.8 code base from the
SQLite website. In the documentation they say that it supports Unix
(Linux, Mac OS-X, Android, iOS) and Windows (Win32, WinCE, WinRT). I
would like to port SQLite to uITRON RTOS. Is it possible to port the
code to an RTOS? If possible what could be the main challenges that I
may face?
 Waiting for your valuable inputs.

The main task you will face is writing a sqlite VFS module for your
operating system. The Unix VFS may serve as an example.
A good starting point in the documentation is:
http://sqlite.org/custombuild.html


Regards
Pratheek



--
Best wishes
Pratheek Prakash
Senior Engineer
TATA ELXSI
Mobile: +91 7736721417


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite port to RTOS

2013-09-03 Thread Kees Nuyt
On Mon, 26 Aug 2013 18:33:02 +0530, Pratheek Prakash
<prathe...@tataelxsi.co.in> wrote:

>Hi all,
> I had downloaded the SQLite ver 3.8 code base from the 
>SQLite website. In the documentation they say that it supports Unix 
>(Linux, Mac OS-X, Android, iOS) and Windows (Win32, WinCE, WinRT). I 
>would like to port SQLite to uITRON RTOS. Is it possible to port the 
>code to an RTOS? If possible what could be the main challenges that I 
>may face?
> Waiting for your valuable inputs.

The main task you will face is writing a sqlite VFS module for your
operating system. The Unix VFS may serve as an example.
A good starting point in the documentation is:
http://sqlite.org/custombuild.html

>Regards
>Pratheek

-- 
Groet, Cordialement, Pozdrawiam, Regards,

Kees Nuyt

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite port to RTOS

2013-09-03 Thread Donald Griggs
Hello, Prakash,

In addition to John McKown's fine advice, you might possibly want to
attempt to contact Kritesh Tripathi, who posted in 2012 that he was using
sqlite with iTron RTOS, which seems it may be a cousin of ulTron RTOS
(correct?).

http://search.gmane.org/?author=kritesh+tripathi=date

I do *not* know if Tripathi was involved in the *porting* of sqlite to
iTron, or just its use with iTron.

If you get no response from the developer list, it may just be that no one
there has experience with ulTron RTOS.

Best of luck,
 Donald Griggs








On Tue, Sep 3, 2013 at 8:06 AM, John McKown <john.archie.mck...@gmail.com>wrote:

> I think you're on the wrong list. This is more a "how to use" type forum.
> You might want to subscribe to sqlite-dev (
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-dev) where the
> developers hang out. You may not have gotten any response because nobody
> here has tried and so has no experience to relate. I don't know anything
> about RTOS, so I certainly can't help any.
>
> Why not just try and see what happens? That's what I tend to do.
>
>
> On Tue, Sep 3, 2013 at 6:59 AM, Pratheek Prakash
> <prathe...@tataelxsi.co.in>wrote:
>
> > Hi,
> > Somebody please shed some light on my doubt...
> >
> > Regards
> > Pratheek
> >
> > On 8/26/2013 6:33 PM, Pratheek Prakash wrote:
> >
> >> Hi all,
> >> I had downloaded the SQLite ver 3.8 code base from the
> SQLite
> >> website. In the documentation they say that it supports Unix (Linux, Mac
> >> OS-X, Android, iOS) and Windows (Win32, WinCE, WinRT). I would like to
> port
> >> SQLite to uITRON RTOS. Is it possible to port the code to an RTOS? If
> >> possible what could be the main challenges that I may face?
> >> Waiting for your valuable inputs.
> >>
> >> Regards
> >> Pratheek
> >>
> >>
> >> __**_
> >> sqlite-users mailing list
> >> sqlite-users@sqlite.org
> >> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>
> >>
> >>
> >>
> >
> > --
> > Best wishes
> > Pratheek Prakash
> > Senior Engineer
> > TATA ELXSI
> > Mobile: +91 7736721417
> >
> >
> > __**_
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>
> >
>
>
>
> --
> As of next week, passwords will be entered in Morse code.
>
> Maranatha! <><
> John McKown
> ___
> 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 port to RTOS

2013-09-03 Thread Pratheek Prakash

Thank you very much Mr.McKown

On 9/3/2013 5:36 PM, John McKown wrote:

I think you're on the wrong list. This is more a "how to use" type forum.
You might want to subscribe to sqlite-dev (
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-dev) where the
developers hang out. You may not have gotten any response because nobody
here has tried and so has no experience to relate. I don't know anything
about RTOS, so I certainly can't help any.

Why not just try and see what happens? That's what I tend to do.


On Tue, Sep 3, 2013 at 6:59 AM, Pratheek Prakash
<prathe...@tataelxsi.co.in>wrote:


Hi,
 Somebody please shed some light on my doubt...

Regards
Pratheek

On 8/26/2013 6:33 PM, Pratheek Prakash wrote:


Hi all,
 I had downloaded the SQLite ver 3.8 code base from the SQLite
website. In the documentation they say that it supports Unix (Linux, Mac
OS-X, Android, iOS) and Windows (Win32, WinCE, WinRT). I would like to port
SQLite to uITRON RTOS. Is it possible to port the code to an RTOS? If
possible what could be the main challenges that I may face?
 Waiting for your valuable inputs.

Regards
Pratheek


__**_
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>




--
Best wishes
Pratheek Prakash
Senior Engineer
TATA ELXSI
Mobile: +91 7736721417


__**_
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>







--
Best wishes
Pratheek Prakash
Senior Engineer
TATA ELXSI
Mobile: +91 7736721417


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite port to RTOS

2013-09-03 Thread John McKown
I think you're on the wrong list. This is more a "how to use" type forum.
You might want to subscribe to sqlite-dev (
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-dev) where the
developers hang out. You may not have gotten any response because nobody
here has tried and so has no experience to relate. I don't know anything
about RTOS, so I certainly can't help any.

Why not just try and see what happens? That's what I tend to do.


On Tue, Sep 3, 2013 at 6:59 AM, Pratheek Prakash
<prathe...@tataelxsi.co.in>wrote:

> Hi,
> Somebody please shed some light on my doubt...
>
> Regards
> Pratheek
>
> On 8/26/2013 6:33 PM, Pratheek Prakash wrote:
>
>> Hi all,
>> I had downloaded the SQLite ver 3.8 code base from the SQLite
>> website. In the documentation they say that it supports Unix (Linux, Mac
>> OS-X, Android, iOS) and Windows (Win32, WinCE, WinRT). I would like to port
>> SQLite to uITRON RTOS. Is it possible to port the code to an RTOS? If
>> possible what could be the main challenges that I may face?
>> Waiting for your valuable inputs.
>>
>> Regards
>> Pratheek
>>
>>
>> __**_
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>
>>
>>
>>
>
> --
> Best wishes
> Pratheek Prakash
> Senior Engineer
> TATA ELXSI
> Mobile: +91 7736721417
>
>
> __**_
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>
>



-- 
As of next week, passwords will be entered in Morse code.

Maranatha! <><
John McKown
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite port to RTOS

2013-09-03 Thread Pratheek Prakash

Hi,
Somebody please shed some light on my doubt...

Regards
Pratheek

On 8/26/2013 6:33 PM, Pratheek Prakash wrote:

Hi all,
I had downloaded the SQLite ver 3.8 code base from the 
SQLite website. In the documentation they say that it supports Unix 
(Linux, Mac OS-X, Android, iOS) and Windows (Win32, WinCE, WinRT). I 
would like to port SQLite to uITRON RTOS. Is it possible to port the 
code to an RTOS? If possible what could be the main challenges that I 
may face?

Waiting for your valuable inputs.

Regards
Pratheek


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users





--
Best wishes
Pratheek Prakash
Senior Engineer
TATA ELXSI
Mobile: +91 7736721417


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite port to RTOS

2013-08-26 Thread Pratheek Prakash

Hi all,
I had downloaded the SQLite ver 3.8 code base from the 
SQLite website. In the documentation they say that it supports Unix 
(Linux, Mac OS-X, Android, iOS) and Windows (Win32, WinCE, WinRT). I 
would like to port SQLite to uITRON RTOS. Is it possible to port the 
code to an RTOS? If possible what could be the main challenges that I 
may face?

Waiting for your valuable inputs.

Regards
Pratheek


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users