[sqlite] Suggestion to add "locate" as a broader version of "instr"

2014-02-14 Thread Max Vlasov
Hi,

Some time ago when there was no "instr" functions, I looked at Mysql help
pages and implemented a user function "locate" as the one that allows
searching starting a particular position in the string. With two parameters
form it was just identical to "instr" only the order of parameters was
reversed. As I see, the latest sqlite has only "instr".

It's not a big deal, but I noticed that "locate" with three parameters
becomes convenient for CTE recursive queries since it allows search
sequentially in the string. For example, a little bulky at last, but I
managed to do "comma-list to dataset" query

I suppose implementing "locate" and doing "instr" as a call to "locate"
would cost the developers probably no more than a hundred of bytes for the
final binary

Thanks

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


Re: [sqlite] Is IBatis / MyBatis ORM Framework supports SQLite Client Database

2014-02-14 Thread Hari Hara Sudhan Ramachandran
thanks



On Fri, Feb 14, 2014 at 11:29 AM, Richard Hipp  wrote:

> On Fri, Feb 14, 2014 at 11:24 AM, Hari Hara Sudhan Ramachandran <
> loginsud...@gmail.com> wrote:
>
> >  i tried to establish Database
> > connection using Mybatis ( IBatis ) framework.
> >
>
> This sounds like a question for the Mybatis developers.  I don't know
> anything about Mybatis.
>
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Thank You
Hari Hara Sudhan R
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Is IBatis / MyBatis ORM Framework supports SQLite Client Database

2014-02-14 Thread Richard Hipp
On Fri, Feb 14, 2014 at 11:24 AM, Hari Hara Sudhan Ramachandran <
loginsud...@gmail.com> wrote:

>  i tried to establish Database
> connection using Mybatis ( IBatis ) framework.
>

This sounds like a question for the Mybatis developers.  I don't know
anything about Mybatis.

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


[sqlite] Is IBatis / MyBatis ORM Framework supports SQLite Client Database

2014-02-14 Thread Hari Hara Sudhan Ramachandran
Hi All,

please guide me to resolve the below issue.

We have an web application developed on Oracle Mobile server architecture.
We are using oracle 10G with Oracle Lite as an Client Database.
Application developed using JSF + Spring + Ibatis (ORM) framework.

We are using Windows Handheld machines ( Small size Laptop) having tomcat
server which is capable of running our web application pointing to Client
Database reside in the Handheld machine. so, users will use our web
application and do the changes and sync back the data at end of the day.

Oracle & Oracle client Database we are using are very old version.
as part of upgrade, we are planning to move to Oracle 11g + SQLite.

i am getting the below exception, when i tried to establish Database
connection using Mybatis ( IBatis ) framework.

*Feb 13, 2014 12:51:59 PM
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions*

*INFO: Loading XML bean definitions from class path resource
[org/springframework/jdbc/support/sql-error-codes.xml]*

*Feb 13, 2014 12:52:00 PM
org.springframework.jdbc.support.SQLErrorCodesFactory *

*INFO: SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL,
MySQL, Oracle, PostgreSQL, Sybase]*

*Feb 13, 2014 12:52:00 PM
org.springframework.jdbc.support.SQLErrorCodesFactory getErrorCodes*

*WARNING: Error while extracting database product name - falling back to
empty error codes*

*org.springframework.jdbc.support.MetaDataAccessException: Could not get
Connection for extracting meta data; nested exception is
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get
JDBC Connection; nested exception is java.sql.SQLException:
java.sql.SQLException: SQLite.Exception: unknown error in open*



Please guide me.
is i am missing any Libraries or Mybatis is not supporting SQLite Database.

if so, what are the other well developed ORM framework supports SQLite
Database.

i am waiting for your earliest reply.

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


Re: [sqlite] database table is locked issue

2014-02-14 Thread Sandu Buraga
> > I have a process with several threads working in the same time on a

> > database file. I have 0 or 1 writers and 0 or N readers at a moment. All

> > write accesses are isolated in transactions, I am using WAL and shared

> > cache, but sometimes during the DELETE statemens I get "database table
is

> > locked" errors, either in the write or read thread.



> Have you set a timeout value for all your connections ?  If you haven't,
SQLite never does any waiting for locks at all, it just returns an error.

You were right the busy timeout was set only for one of the connections.
But, anyway the table lock continued to be triggered immediately not
waiting to pass 2500 ms.

I thought that WAL should've solved this aspect about the concurrency, but
it seems that for DELETE statements it still needs to lock the table
somehow.

Regards

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


Re: [sqlite] SQLITE3 + php, problem "fetchArray(SQLITE3_ASSOC)"

2014-02-14 Thread Simon Slavin

On 14 Feb 2014, at 11:08am, Alberto Gioia  wrote:

> I wrote a web application that uses a combination of webserver, php and 
> sqlite.
> A page uses a connection to a DB to generate with a choice a "select box", 
> all work good on pc.
> I have installed all need on a embedded linux using 
> "lighttpd-1.4.32+php-5.4.6-sqlite3-3.7.1".
> The connection is ok, the query is ok, but when use this istruction:
> 
> fetchArray(SQLITE3_ASSOC)
> 
> all is locked and the rest of the code is not executed, it seems it goes into 
> loop.

Please look at any error messages produced by PHP or Apache.  You should find 
at least a log file produced by Apache which has an error message in.

If you cannot find an error message, instead of using ->fetchArray() please try 
to fetch just one row using ->querySingle() and see whether you get a similar 
problem.

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


Re: [sqlite] SQlite3 Performnace

2014-02-14 Thread Simon Slavin

On 14 Feb 2014, at 8:54am, techi eth  wrote:

>> What are the changes in performance if I have single SQlite3 Database file
>> (Contain 'N' table) or  'N' Database file each contain single table.

> I have database on single Disk.In that case i see it is better to create
> separate database file.If i am not wrong i will get better edge over
> concurrency in this case ?

If both files are on one disk there is no speed advantage in creating two small 
database files over one big database file.  Your storage device will still only 
do one operation at one time: it will access only one sector of disk or one 
segment of Solid State DRAM.  You will not notice any significant improvement 
in the time taken just by having two files on the same slow device.

> What do you mean by SQlite3 Query with I/O bound ?

The speed of a SQLite operation is usually "bound" to the speed of your 
"Input/Output" device.  Get a faster Input/Output device (i.e. faster storage 
device) and your speed will increase.

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


[sqlite] SQLITE3 + php, problem "fetchArray(SQLITE3_ASSOC)"

2014-02-14 Thread Alberto Gioia

Hi all,
I wrote a web application that uses a combination of webserver, php and 
sqlite.
A page uses a connection to a DB to generate with a choice a "select 
box", all work good on pc.
I have installed all need on a embedded linux using 
"lighttpd-1.4.32+php-5.4.6-sqlite3-3.7.1".

The connection is ok, the query is ok, but when use this istruction:

fetchArray(SQLITE3_ASSOC)

all is locked and the rest of the code is not executed, it seems it goes 
into loop.


You can help me to understand this problem?
If you need more information ask me.

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


Re: [sqlite] SQlite3 Performnace

2014-02-14 Thread techi eth
Thanks.

I have database on single Disk.In that case i see it is better to create
separate database file.If i am not wrong i will get better edge over
concurrency in this case ?

What do you mean by SQlite3 Query with I/O bound ?



On Thu, Feb 13, 2014 at 9:22 AM, Hick Gunter  wrote:

> .timer on (in the sqlite shell)
>
> Unless you are storing the databases on different disks AND your SQLite
> queries are IO bound I don't expect any performance gains.
>
> -Ursprüngliche Nachricht-
> Von: techi eth [mailto:techi...@gmail.com]
> Gesendet: Donnerstag, 13. Februar 2014 10:11
> An: General Discussion of SQLite Database
> Betreff: [sqlite] SQlite3 Performnace
>
> Hi,
>
>
>
> Is there any way I can check SQlite3 Database read/write timing for
> performance measurement.
>
>
> What are the changes in performance if I have single SQlite3 Database file
> (Contain 'N' table) or  'N' Database file each contain single table.
>
>
>
> Regards,
>
> Techi
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
> --
>  Gunter Hick
> Software Engineer
> Scientific Games International GmbH
> Klitschgasse 2 - 4, A - 1130 Vienna, Austria
> FN 157284 a, HG Wien
> Tel: +43 1 80100 0
> E-Mail: h...@scigames.at
>
> This e-mail is confidential and may well also be legally privileged. If
> you have received it in error, you are on notice as to its status and
> accordingly please notify us immediately by reply e-mail and then delete
> this message from your system. Please do not copy it or use it for any
> purposes, or disclose its contents to any person as to do so could be a
> breach of confidence. Thank you for your cooperation.
> ___
> 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