[sqlite] Consuming Visual studio extension SDKs in a remote build

2015-02-23 Thread Saurav Sarkar
Hi All,



I am new to .NET and developing an universal Windows application.



I am using Visual Studio extension for SQLite for WinRT and Windows Phone.



http://www.sqlite.org/2015/sqlite-wp81-winrt-3080801.vsix

http://www.sqlite.org/2015/sqlite-winrt81-3080801.vsix



I can perfectly install the extensions and work with locally.



My question is about the remotely building (continuous integration) of my
application through msbuild in TFS.

Does the build machines need to have the same version of SQLite SDKs
installed manually in order to resolve the dependency ?



There can be multiple project in my TFS collection which can refer to
separate version of VSIX files . Both versions can not co exist together.
What happens then ?





Can I somehow upload the vsix file to our package management software
(Nexus) and refer from there.

We have been building other dependencies as Nuget packages from Nexus.

There might be number of packages required for different architecture and
other component's packages.



Any help will be hugely appreciated.





Thanks and Best Regards,

Saurav


[sqlite] Using incremental BLOB functions against a BLOB column in a virtual table

2015-02-23 Thread Richard Hipp
On 2/23/15, Evans, Randall  wrote:
> Can the incremental BLOB functions (sqlite_blob_open(), sqlite_blob_read(),
> etc) access BLOB column data defined in a SQLite virtual table? If it
> matters, I am only interested in read-only access at this time.

no.

>
> If the answer is yes, is there any facility in virtual table support for
> xColumn or any other method that will expose to the virtual table module the
> positioning/length values supplied as the 3rd and 4th arguments of the
> sqlite_blob_read() function (N bytes and offset values)?

There would have to be, in order for incremental blob I/O to be
supported on virtual tables.  The absence of such a method is one
reason why the answer above is "no".

>
>
> Randy Evans
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
D. Richard Hipp
drh at sqlite.org


[sqlite] Using incremental BLOB functions against a BLOB column in a virtual table

2015-02-23 Thread Evans, Randall
Can the incremental BLOB functions (sqlite_blob_open(), sqlite_blob_read(), 
etc) access BLOB column data defined in a SQLite virtual table? If it matters, 
I am only interested in read-only access at this time.

If the answer is yes, is there any facility in virtual table support for 
xColumn or any other method that will expose to the virtual table module the 
positioning/length values supplied as the 3rd and 4th arguments of the 
sqlite_blob_read() function (N bytes and offset values)?


Randy Evans


[sqlite] Backup API and WAL

2015-02-23 Thread R.Smith

On 2015-02-23 04:54 AM, Donald Shepherd wrote:
> On Mon Feb 23 2015 at 1:41:31 PM Simon Slavin  wrote:
>
>> On 22 Feb 2015, at 11:15pm, Donald Shepherd 
>> wrote:
>>
>>> If I use the backup API to create a copy of an SQLite database that uses
>>> Write-Ahead Logging, will the resulting copy reflect the contents of both
>>> the base database file and the -wal file?
>> Until a transaction is COMMITted, it's not part of the database.  Because
>> the program could decide to ROLLBACK instead.
>>
> My understanding of WAL is that even if a transaction is COMMITted it will
> sit in the -wal file until a checkpoint occurs, i.e. by default when the
> -wal file reaches 4 MB.  As a result that transaction will only be present
> in the copied SQLite database if the backup API takes into account the
> contents of both files.
>
> Further reading led me to a reference stating that under the covers the
> backup API is treated the same as any other reader, so I take that to mean
> that it looks at both files and compiles the copy from the two.

The WAL file is part and parcel of the database. Whatever database copy 
gets created by the BACKUP API will contain ALL current committed data 
in the database. For this to be true, it need not maintain the exact 
file structure, meaning the resulting database may be smaller (like when 
VACUUM was run) and will not have content-carrying WAL files with it 
yet. None of this matters because the reflected data in the new DB file 
will be exactly what is in the current state of the original database - 
precisely /how/ that original database used files to store that data is 
irrelevant.

Typically you only need the exact data state of a database. If you need 
to copy the exact file structure along with the exact data, then you 
should copy the specific files after all transactions were closed and 
all write-locks released. I highly doubt anyone has ever needed this 
unless you are making a program that tries to recover or read SQLite3 
files outside of a DB connection.





[sqlite] sqlite vfs and wal mode

2015-02-23 Thread Dan Kennedy
On 02/23/2015 12:42 PM, J Decker wrote:
> I see; the first part...
>
> " result of the pragma or the error message if the pragma fails"  I missed
> the or part... or rather missed the part before the or.
>
> On Sun, Feb 22, 2015 at 8:13 PM, J Decker  wrote:
>
>> So now that I have the added complexity of my own vfs in which to make a
>> sqlite vfs... I'm having some issues.
>>
>> Hmm...
>> One of the first things I do is 'pragma journal_mode=WAL'
>> I return sqlite_ok; but the result has 0 columns, whereas my command line
>> tool returns a column 'journal_mode' and a row 'WAL'..
>>
>> is WAL somehow dependant on the VFS?

Only in that sqlite3_io_methods.iVersion needs to be 2 or greater. i.e. 
you need to implement the xShmXXX() methods.

>>
>> I was just going to note, that although I'm setting wall, and it does 3
>> probes to see if the wal file exists... and probes a lot actually - though
>> I guess it's assuming other processes are going to be manipulating the
>> file? (is there a compile option to disable that, and assume it's the only
>> one with access to the database?)

If you set "PRAGMA locking_mode=EXCLUSIVE" it won't do that. Of course, 
then you're limited to at most one sqlite3* handle.

Or, it will stop probing if it is actually in wal mode.

Dan.





[sqlite] Consuming Visual studio extension SDKs in a remote build

2015-02-23 Thread Joe Mistachkin

Saurav Sarkar wrote:
>
> Does the build machines need to have the same version of SQLite SDKs
> installed manually in order to resolve the dependency ?
> 

I'm not exactly sure how versioning works for the VSIX mechanism; however,
I think they use exact matching on the version number.

>
> There can be multiple project in my TFS collection which can refer to
> separate version of VSIX files.
> 

Disclaimer: I've never personally used TFS.

> 
> Both versions can not co exist together.
> What happens then ?
> 

I'm not sure why not.  The VSIX itself has complete version information
and should end up getting installed into a named directory that contains
the version number itself within it.  That being said, maybe some special
setup is required for TFS (which I know almost nothing about).

--
Joe Mistachkin



[sqlite] Database connection from within Visual Studio 2010

2015-02-23 Thread Joe Mistachkin

Tom Demler wrote:
>
> connect to an SQLite database using Visual Studio 2010 Premium. I've
> downloaded and run sqlite-netFx40-setup-x64-2010-1.0.94.0.exe.
> 

Only the bundled x86 packages have design-time support.  Please download
and install:


https://system.data.sqlite.org/downloads/1.0.94.0/sqlite-netFx40-setup-bundl
e-x86-2010-1.0.94.0.exe

--
Joe Mistachkin



[sqlite] unreached code in sqlite3.c?

2015-02-23 Thread Nico Williams
On Thu, Feb 12, 2015 at 8:58 AM, Doug Currie  wrote:
> Well, if TERM_VNULL is 0, then the code is truly unreachable, so I wouldn't
> call it a compiler bug.

Agreed.  But since this usage is so common, the compiler ought to have
a switch to turn off warnings for this particular sort of case, which
is (exp) & 0.  Or perhaps even not warn about this sub-case of
unreachable code ever.

The problem for the compiler writer is that it's relatively easy to
generally detect unreachable code using an AST or intermediate
representation, but by then it might be too late to note that this is
a use-case that should not be warned about.

Nico
--


[sqlite] Database connection from within Visual Studio 2010

2015-02-23 Thread Tom Demler
I'm trying to add the capability to do development of applications that
connect to an SQLite database using Visual Studio 2010 Premium. I've
downloaded and run sqlite-netFx40-setup-x64-2010-1.0.94.0.exe. I selected a
custom install and made sure that all options were selected. I believe that
all the components have been installed but the integration with Visual
Studio doesn't seem to be there. What do I have to do to have the option of
an SQLite database when adding a connection to the data connections in
Visual Studio?



I've done a fair amount of C# development using Visual Studio but little in
the way of database work. I'm sure this question has been asked before but
the mailing list archive doesn't appear to be searchable and a search of the
SQLite.org site for this topic seems to only yield links to the download
page.



Any help will be greatly appreciated.



Thanks





[sqlite] Backup API and WAL

2015-02-23 Thread Igor Tandetnik
On 2/22/2015 6:15 PM, Donald Shepherd wrote:
> If I use the backup API to create a copy of an SQLite database that uses
> Write-Ahead Logging, will the resulting copy reflect the contents of both
> the base database file and the -wal file?

The data that a particular sqlite3_backup_step sees is the same data 
that a regular SELECT issued on the same connection would see; it 
reflects all changes made by any committed transactions. Some of that 
data may be physically located in the main DB file, and some of it in 
the WAL file.
-- 
Igor Tandetnik



[sqlite] Repost: Having problems with Entity Framework code first db creation

2015-02-23 Thread Mersahin
I have the same problem on these conditions
--> .net 2013 +updates you said. 
--> EF 6.1.2 
--> 1.0.95.0   

also 

--> .net 2015 CTP
--> EF 6.1.2 
--> 1.0.95.0   

both of them return exception such as 
"Unable to determine the provider name for provider factory of type
'System.Data.SQLite.SQLiteFactory'. Make sure that the ADO.NET provider is
installed or registered in the application config."

and also there is nothing change when entity framework updated to 6.1.3
beta. 



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Repost-Having-problems-with-Entity-Framework-code-first-db-creation-tp80375p80682.html
Sent from the SQLite mailing list archive at Nabble.com.


[sqlite] Backup API and WAL

2015-02-23 Thread Donald Shepherd
On Mon Feb 23 2015 at 1:41:31 PM Simon Slavin  wrote:

>
> On 22 Feb 2015, at 11:15pm, Donald Shepherd 
> wrote:
>
> > If I use the backup API to create a copy of an SQLite database that uses
> > Write-Ahead Logging, will the resulting copy reflect the contents of both
> > the base database file and the -wal file?
>
> Until a transaction is COMMITted, it's not part of the database.  Because
> the program could decide to ROLLBACK instead.
>

My understanding of WAL is that even if a transaction is COMMITted it will
sit in the -wal file until a checkpoint occurs, i.e. by default when the
-wal file reaches 4 MB.  As a result that transaction will only be present
in the copied SQLite database if the backup API takes into account the
contents of both files.

Further reading led me to a reference stating that under the covers the
backup API is treated the same as any other reader, so I take that to mean
that it looks at both files and compiles the copy from the two.


[sqlite] Backup API and WAL

2015-02-23 Thread Simon Slavin

On 22 Feb 2015, at 11:15pm, Donald Shepherd  
wrote:

> If I use the backup API to create a copy of an SQLite database that uses
> Write-Ahead Logging, will the resulting copy reflect the contents of both
> the base database file and the -wal file?

Until a transaction is COMMITted, it's not part of the database.  Because the 
program could decide to ROLLBACK instead.

Simon.