Re: [sqlite] [System.Data.SQLite] Nuget 3 support

2016-06-18 Thread Joe Mistachkin

Jann Roder wrote:
>
> Nuget 3 now seems to have much better support for native libraries.
>

I'd really like to use this for System.Data.SQLite.

I suspect this will require a great deal of investigation, refactoring,
and debugging.

It's too late in the release cycle for 1.0.102.0 for this.  I'll look
into it for 1.0.103.0.

--
Joe Mistachkin

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


Re: [sqlite] sqlite3_column_origin_name for INSERT and UPDATE

2016-06-18 Thread Jean-Christophe Deschamps



My first instinct is to add a Units column to any table with a
measurement.  The value in Units would be a foreign key to a Units
table.  Another table, Conversions, could hold conversion factors.



In addition to what jkl said, I'd like to point out that if you may 
someday find yourself forced to deal with many units you'll have to 
make the unit column homogenous. Easy example is mixing cm/s, km/h and 
miles/day.


In one of my SQLite DB I have to deal with almost all SI units and a 
few more exotic, plus input and output values with prefies (kilo, deci, 
micro, ...). To maintain consistency I express every value in SI units 
and store the unit in dimensional form in its own column. I had to add 
dimensionless non-units like radian and steradian, which are now 
disregarded by the SI system but are needed to maintain semantic 
consistency.


So for instance I convert pressure inputs expressed in Pa, mmHg or bar 
to their equivalent SI value in kg m^-1 s^-2 and store the values along 
dimensional unit in L^-1 M T^-2. Now I can safely proceed to any needed 
computation without worrying to avoid mixing apples and chairs, then 
convert the result into expected practical unit, say megapounds per barn.


Of course your use case may not require that much precaution.

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


Re: [sqlite] about Precompiled Binaries for Android

2016-06-18 Thread Dan Kennedy

On 06/18/2016 07:06 AM, 风 wrote:

hi,


sqlite.org provided the Precompiled Binaries for Android(*.aar),
where to download the source code ?  (.java, jni)


http://www.sqlite.org/android/doc/trunk/www/index.wiki

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


Re: [sqlite] sqlite3_column_origin_name for INSERT and UPDATE

2016-06-18 Thread Simon Slavin
Don't depend on column names.  The ability to get a column name is not a 
fundamental part of the SQL specification.  There is no standard for the text 
of column names, or for disambiguating names which occur in two different 
tables.

If you need to specify the units of a measurement, store them in their own 
column.  Or create a standard which stores measurements as text in the format

quantityunit

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


Re: [sqlite] sqlite3_column_origin_name for INSERT and UPDATE

2016-06-18 Thread James K. Lowden
On Fri, 17 Jun 2016 19:59:56 +0200
Rapin Patrick  wrote:

> 2016-06-17 18:24 GMT+02:00 James K. Lowden :
> 
> > You are encoding type information in the name.  If you move the type
> > information into the data, SQLite can manage the unit dimension.
> > You could use a CHECK constraint to require that speed was in m/s,
> > or a trigger to make it so.
> 
> That would indeed be an option. I suppose that you mean to use a
> string like "2.34 m/s" or a BLOB of typically 9 bytes (a 'double' and
> a unit enum).

My first instinct is to add a Units column to any table with a
measurement.  The value in Units would be a foreign key to a Units
table.  Another table, Conversions, could hold conversion factors.  

That would support multiple units for a given column in a table or,
with a trigger, enforce (and coerce) all values in a column to use a
single unit.  It would also permit arbitrary conversion in SELECT,
simply by reference to the Conversions.  

A more sophisticated DBMS would have stored procedures for inserts,
user-defined types, and INFOMATION_SCHEMA.  With those, you could
define a type domain for each measurement. You could forgo the Units
column, and instead use just a Units parameter.  The stored procedure
would look up the units for the measurement's domain, and apply the any
conversion or reject the insert.  That seems be roughly what you're
doing with your C++ wrapper.  

> But this would slightly increase the database size, and slow down
> access due to formatting / parsing.

I doubt you would notice.  

> In addition, my approach had the big advantage to being backward
> compatible: older versions of our application would just ignore the
> column unit type, and read/write regular 'double'.

If I were working with you, I would object to the requirement that the
column names encode anything.  I would want the units expressed
explicitly in the database, however they might be applied or enforced.
>From an application-programming perspective, I would prefer to treat
the column names as opaque identifiers.  Rather than parsing them for
"x_per_y", I'd prefer to look up the units by column name.  

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


Re: [sqlite] about Precompiled Binaries for Android

2016-06-18 Thread Simon Slavin

On 18 Jun 2016, at 1:06am, 风  wrote:

> sqlite.org provided the Precompiled Binaries for Android(*.aar), 
> where to download the source code ?  (.java, jni)

These binaries are compiled from the same C source code that the other 
libraries come from.  There is no Java version of SQLite.

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


[sqlite] about Precompiled Binaries for Android

2016-06-18 Thread ??
hi,


sqlite.org provided the Precompiled Binaries for Android(*.aar), 
where to download the source code ?  (.java, jni)


thanks!


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


[sqlite] about Precompiled Binaries for Android

2016-06-18 Thread ??
hi,


sqlite.org provided the Precompiled Binaries for Android(*.aar), 
where to download the source code ?  (.java, jni)


thanks!


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


[sqlite] [System.Data.SQLite] Nuget 3 support

2016-06-18 Thread Jann Roder
Hi,
I recently migrated two of our solutions to nuget 3. Nuget 3 now seems to have 
much better support for native libraries. Unfortunately it is incompatible with 
the way the SQLite package currently does things. I had to manually call the 
traget that copies the interop libraries in my .csproj files.

I was wondering what your plans are with regards to supporting nuget 3? From 
what I have seen it appears to be difficult to have a package that needs to 
install native libraries that works with nuget 2 AND 3. I believe in nuget 3 
none of the custom copy targets should be necessary anymore.

Jann






Winton Capital Management Limited (“Winton”) is a limited company registered in 
England and Wales with its registered offices at 16 Old Bailey, London, EC4M 
7EG (Registered Company No. 3311531). Winton is authorised and regulated by the 
Financial Conduct Authority in the United Kingdom, registered as an investment 
adviser with the US Securities and Exchange Commission, registered with the US 
Commodity Futures Trading Commission and a member of the National Futures 
Association in the United States.

This communication, including any attachments, is confidential and may be 
privileged. This email is for use by the intended recipient only. If you 
receive it in error, please notify the sender and delete it. You should not 
copy or disclose all or any part of this email.

This email does not constitute an offer or solicitation and nothing contained 
in this email constitutes, and should not be construed as, investment advice. 
Prospective investors should request offering materials and consult their own 
advisers with respect to investment decisions and inform themselves as to 
applicable legal requirements, exchange control regulations and taxes in the 
countries of their citizenship, residence or domicile. Past performance is not 
indicative of future results.

Winton takes reasonable steps to ensure the accuracy and integrity of its 
communications, including emails. However Winton accepts no liability for any 
materials transmitted. Emails are not secure and cannot be guaranteed to be 
error free. Winton handles personal information in accordance with its privacy 
notice.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users