Giter VIP home page Giter VIP logo

sqlite4unity3d's Introduction

Average time to resolve an issue Percentage of issues still open

What's this?

When I started with Unity3d development I needed to use SQLite in my project and it was very hard to me to find a place with simple instructions on how to make it work. All I got were links to paid solutions on the Unity3d's Assets Store and a lot of different and complicated tutorials.

At the end, I decided that there should be a simpler way and I created SQLite4Unity3d, a plugin that helps you to use SQLite in your Unity3d projects in a clear and easy way and works in iOS, Mac, Android and Windows projects.

It uses the great sqlite-net library as a base so you will have Linq besides sql. For a further reference on what possibilities you have available with this library I encourage you to visit its github repository.

*Note: SQLite4Unity3d uses only the synchronous part of sqlite-net, so all the calls to the database are synchronous.

If you want to know more about why I created this plugin you can read more here.

The fast track

All you have to do to start using it in your project:

  1. Download this zip, extract its content and copy the resulting folder to your Assets/Plugins folder. It contains the dlls that Unity3d will need to access sqlite.
  2. Copy the SQLite.cs file into your scripts folder.
  3. Don’t forget to copy your SQLite database file in your Assets/StreamingAssets folder if you’re shipping one.
  4. You’re done! Now you can get access to your database using sqlite-net. ;P

Example

If you want to try it I've uploaded a small example that you will be able to find in the "Example" folder. Download the folder and open it with Unity3d to give it a try. It contains classes that will help you to start.

Android particularities

Android configuration and deployment is very straight forward. Take a look at the following video if you want to get a picture on how to proceed:

UWP

iOS particularities

As you may know iOS doesn't allow JIT compilation so, generally speaking, you will have to be very careful when you use reflection in your code. For a more deeper explanation of this issue please refer to Google but making it short: you cannot create dynamic objects using reflection. How is this affecting SQLite4Unity3d? Well, prior to this version you couldn't use very complicated queries. Now, for basic queries you will have iOS support. In case you stumble uppon a JIT compilation error it's time to use the old sql syntax.

Check this video to know how to proceed with iOS deployment:

UWP

Windows particularities

In general you won't find any issues with Android and iOS. For Windows versions, please take a look at the the video below for more details on how to proceed:

UWP

Acknowledgements

This project is based on the work of:

sqlite4unity3d's People

Contributors

biggianthead avatar bryant1410 avatar gauthierlb avatar javilumbrales avatar jwittner avatar oruban avatar pokehanai avatar robertohuertasm avatar takukobayashi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sqlite4unity3d's Issues

SQLiteException

SQLiteException: near ")": syntax error
SQLite4Unity3d.SQLite3.Prepare2 (IntPtr db, System.String query)
SQLite4Unity3d.PreparedSqlLiteInsertCommand.Prepare ()
SQLite4Unity3d.PreparedSqlLiteInsertCommand.ExecuteNonQuery (System.Object[] source)
SQLite4Unity3d.SQLiteConnection.Insert (System.Object obj, System.String extra, System.Type objType)
My table has a simple string ("33-66", "44-88" because SQLite net doesn't support multiple primary columns..).

Update a specific Value in table

I connected my table with unity. I am getting all the data from the tables. But now i wanted to update the row values or a specific value from a row. How can i do it? I couldnt figure that out.

How I update a specific item

Hi
So I have a table name "situacion" and have this columns

public int situacionID { get; set; }
    public string historia { get; set; }
    public string emocion { get; set; }
    public bool tarjeta { get; set; }``

I want to update "tarjeta" from false to true using "situacionID" as the reference, something like this: UPDATE situacion SET tarjeta = true WHERE situacionID = 6;

I make this in the DataServise archive, but I dont know how to put the condition to "situacionID"

public situacion update_tarjeta(){
        var p = new situacion{
            tarjeta = true,
        };
        _connection.Update (p);
        return p;

English it not my first language so I hope you understadn my crappy english.

WebGL

Is there any way to get this to work with WebGL? I've been looking around but haven't found a way to do it yet.

Platform support?

You mention that the plugin works for android, iOS and Windows projects... on which target platforms does it work? On which has it been tested?

LINK error when building for UWP with IL2CPP in Master configuration

After adding "SQLite for Universal Windows Platform" to the references, apps will build for UWP while in the Debug or Release configuration, but not under the Master configuration.

The error that occurs is: "LNK1181: cannot open input file 'sqlite3.lib'"

This is an issue because some of .net is excluded in non-IL2CPP builds for UWP, and Unity games will only pass Microsoft's certification when built with the Master configuration in visual studio. This issue can be reproduced with the example project in the repository.

Unity 5.3 Windows example scene SQLiteException no such table: Person

For Windows x86 and x86_64 build this plugin appears to not be working
SQLiteException no such table: Person
when running scene "ExistingDBScript"
Works in the editor just fine.
This is under Windows 10 and Unity 5.3.1f1
CreateDBFromScript scene seems to work fine in editor and build.
issue

Mono path[0] = 'E:/@Documents/Unity Repos/SQLite4Unity3d/Example_unity5/Build/test2/test2_Data/Managed'
Mono path[1] = 'E:/@Documents/Unity Repos/SQLite4Unity3d/Example_unity5/Build/test2/test2_Data/Mono'
Mono config path = 'E:/@Documents/Unity Repos/SQLite4Unity3d/Example_unity5/Build/test2/test2_Data/Mono/etc'
PlayerConnection initialized from E:/@Documents/Unity Repos/SQLite4Unity3d/Example_unity5/Build/test2/test2_Data (debug = 0)
PlayerConnection initialized network socket : 0.0.0.0 55421
Multi-casting "[IP] 192.168.1.7 [Port] 55421 [Flags] 3 [Guid] 1554696270 [EditorId] 267894875 [Version] 1048832 [Id] WindowsPlayer(Big_Daddy) [Debug] 1" to [225.0.0.222:54997]...
Waiting for connection from host on [192.168.1.7:55421]...
PlayerConnection accepted from [192.168.1.7] handle:0x2c8
Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56270
PlayerConnection already initialized - listening to [192.168.1.7:55421]
Initialize engine version: 5.3.1f1 (cc9cbbcc37b4)
GfxDevice: creating device client; threaded=1
Direct3D:
    Version:  Direct3D 11.0 [level 11.0]
    Renderer: AMD Radeon HD 5800 Series (ID=0x689e)
    Vendor:   ATI
    VRAM:     2023 MB
Begin MonoManager ReloadAssembly
Platform assembly: E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\UnityEngine.dll (this message is harmless)
Loading E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\UnityEngine.dll into Unity Child Domain
Platform assembly: E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\Assembly-CSharp.dll (this message is harmless)
Loading E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\Assembly-CSharp.dll into Unity Child Domain
Platform assembly: E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\UnityEngine.UI.dll (this message is harmless)
Loading E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\UnityEngine.UI.dll into Unity Child Domain
Platform assembly: E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\UnityEngine.Networking.dll (this message is harmless)
Loading E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\UnityEngine.Networking.dll into Unity Child Domain
Platform assembly: E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\SQLite4Unity3d.dll (this message is harmless)
Loading E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\SQLite4Unity3d.dll into Unity Child Domain
Platform assembly: E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\UnityEngine.Networking.dll (this message is harmless)
Loading E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\UnityEngine.Networking.dll into Unity Child Domain
Platform assembly: E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\UnityEngine.UI.dll (this message is harmless)
Loading E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\UnityEngine.UI.dll into Unity Child Domain
- Completed reload, in  0.268 seconds
Platform assembly: E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\System.Core.dll (this message is harmless)
Platform assembly: E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Build\test2\test2_Data\Managed\System.dll (this message is harmless)
desktop: 1920x1080 60Hz; virtual: 3840x1080 at 0,0
<RI> Initializing input.

<RI.Hid> Failed to create device file:
 2 The system cannot find the file specified.


(Filename: C:/buildslave/unity/build/PlatformDependent/Win/RawInput.cpp Line: 54)

<RI> Input initialized.

<RI> Initialized touch support.

UnloadTime: 1.290177 ms
Final PATH: C:/Users/BigDaddy/AppData/LocalLow/DefaultCompany/Example_unity5/existing.db
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
DataService:.ctor(String) (at E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Assets\Scripts\DataService.cs:53)
ExistingDBScript:Start() (at E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Assets\Scripts\ExistingDBScript.cs:11)

(Filename: E:/@Documents/Unity Repos/SQLite4Unity3d/Example_unity5/Assets/Scripts/DataService.cs Line: 53)

SQLiteException: no such table: Person
  at SQLite4Unity3d.SQLite3.Prepare2 (IntPtr db, System.String query) [0x00000] in <filename unknown>:0 
  at SQLite4Unity3d.SQLiteCommand.Prepare () [0x00000] in <filename unknown>:0 
  at SQLite4Unity3d.SQLiteCommand+<ExecuteDeferredQuery>d__0`1[Person].MoveNext () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.List`1[Person].AddEnumerable (IEnumerable`1 enumerable) [0x0001a] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:128 
  at System.Collections.Generic.List`1[Person]..ctor (IEnumerable`1 collection) [0x00025] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:65 
  at System.Linq.Enumerable.ToList[Person] (IEnumerable`1 source) [0x00000] in <filename unknown>:0 
  at SQLite4Unity3d.SQLiteCommand.ExecuteQuery[Person] () [0x00000] in <filename unknown>:0 
  at SQLite4Unity3d.TableQuery`1[Person].GetEnumerator () [0x00000] in <filename unknown>:0 
  at ExistingDBScript.ToConsole (IEnumerable`1 people) [0x00000] in E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Assets\Scripts\ExistingDBScript.cs:28 
  at ExistingDBScript.Start () [0x00012] in E:\@Documents\Unity Repos\SQLite4Unity3d\Example_unity5\Assets\Scripts\ExistingDBScript.cs:14 

(Filename: /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs Line: 128)

Setting up 1 worker threads for Enlighten.
  Thread -> id: 1f0 -> priority: 1 
Waiting for finish

EDIT: I think I found the issue. File.Copy is to slow or not executing properly. I get a copy of the file in the persistentDataPath, but it is empty (0 bytes). Not exactly sure why that's happening, but I'll see if I can figure it out. If you have any ideas I'd love to hear it. Maybe there needs to be a callback for the file copy process.

Primary Key column results always 0?

Whenever I query my database for all (or any) entries in a table, I'm able to see all data in each column of each row except for the primary key column, which is always 0 in each entry. Loading the database into a viewer (DB Browser for SQLite) I see the values are there.

The column is configured as "INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL".

Is there something specific to SQLite that does not let me view the values of this column when configured this way, or do I need to pass something specific in a query to see this data?

Unique support?

I'm looking through the code and while I see some functions (sp. InsertOrReplace) that work with Unique constraints, I am not able to set any column to be Unique. Is this just unimplemented, or am I missing something?

[Unique]
string name = "unique";

String escape

Hi there.

I would like to know if there is a function that escapes simple quotes from queries and if it does exists, how to use it, because I have not found it (yet).

If this does not exists, it would be great if you could implement it!

Thanks. #

[Feature request] Make serialized variable name case-insensitive

There doesn't seem to be a way to do this currently and the majority of the support I give to clients using this is they get the case wrong on column names. They're used to SQL just not being case sensitive, but of course C# is. So it would be great if there was an option to ignore case on the serialized/reflected values.

Thanks! This is a solid product!

"insert into" not work in Android

var q = ds.con.Execute("insert into STATISTIC (data, domande) values ('ZZZ', 3)");

this command work fine on pc not work on android

Unity5 breaks Windows Phone compatibility

Apparently Community.CsharpSqlite.WP7 dll is not supported by Unity 5. I don't really see why this is happening as I keep getting an error like this:

Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.

Certainly, something must have changed in Unity 5 regarding Windows Phone so I'll have to investigate for a while and see if I can solve it.

Meanwhile, if you want to deploy to WP use the 4.x versions.

Indexing on iOS causes JIT compile problem

I’m getting an exception when running on an iOS device if I add [Indexed] to an int column. The Exception occurs when I call CreateTable() on the ISQLiteConnection. If I remove the [Indexed] flag, the JIT exception goes away.

ExecutionEngineException: Attempting to JIT compile method 'System.Linq.OrderedEnumerable`1<SQLite4Unity3d.SQLiteConnection/IndexedColumn>:GetEnumerator ()' while running with --aot-only.

Is there a way to solve these JIT problems with System.Linq and iOS? Or must I live without indexes for iOS?

I’m using Unity 5.0.1f1 with Xcode 6.3.1.

I have not fully integrated SQLite4Unity3d into my app and I’m worried that if I go down this route if I’ll have future problems with JIT on iOS?

Thanks

Unity 5 plugins colliding

When I try to Build your Example Unity project to Xcode for iOS, I get this error about colliding plugins:

Plugin 'sqlite3.dll' is used from several locations:
Assets/Plugins/x86_64/sqlite3.dll would be copied to /sqlite3.dll
Assets/Plugins/x86/sqlite3.dll would be copied to /sqlite3.dll
Please fix plugin settings and try again.

UnityEditor.Modules.DefaultPluginImporterExtension:CheckFileCollisions(String)
UnityEditorInternal.PluginsHelper:CheckFileCollisions(BuildTarget) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Plugins/PluginsHelper.cs:25)
UnityEditor.HostView:OnGUI()

I can remove one of the sqlite3.dll files from the plugin folder, but I want to make sure that it runs on 32bit or 64bit iOS devices. Any idea on what to do?

Love your project. I'm excited to be able to use sqlite for iOS, Windows Phone and Android. Thank you so much for creating SQLite4Unityd3d!!!

Proplem with Android 6.0

Hello.
i have been used this flugin for my project on unity 5.2.2 and its working on android OS smaller 5.0.
Recently i just bought a new device that run on Android 6.0. then i got proplem with null data on android 6.0.
-So do you have any idea about this bug?
Thanks.

Failed to load 'sqlite3.dll' on UWP (HoloLens)

I'm trying to get my Unity App running on my HoloLens. In editor everything is working fine. I can even build my solution for UWP.
But when i try to start the app on my HoloLens or Emulator it crashes and says:
"Failed to load 'sqlite3.dll', expected x86 architecture, but was Unknown architecture. You must recompile your plugin for x86 architecture."
Any idea whats wrong?

DllNotFoundException: libSQLite3.so

On some android tablets I have a System.DllNotFoundException: libSQLite3.so exception.
After some testing it seems that the processor on the problem tablet is an Atom x86 so I think that libsqlite3.so must be compiled for ARM and that's causing the failure. Could you create a libsqlite.so version for devices with Intel cpu?

Problem tablets:

  • Samsung Galaxy Tab 3
  • Kindle Fire HD

Plugins colliding with each other when trying to build Android apk

Found plugins with same names and architectures, Assets/Plugins/x64/sqlite3.dll () and Assets/Plugins/x86/sqlite3.dll (). Assign different architectures or delete the duplicate.
UnityEditor.AndroidPluginImporterExtension:CheckFileCollisions(String)
UnityEditorInternal.PluginsHelper:CheckFileCollisions(BuildTarget) (at C:/buildslave/unity/build/Editor/Mono/Plugins/PluginsHelper.cs:25)
UnityEditor.HostView:OnGUI()

Single quotes around column names in SQL statement do not work

A statement such as "Select 'thumbnailfilename' AS 'tFileName' from products where ..." will return the column name instead of the column data every time. The result is always the string "thumbnailfilename" regardless of the data contained in the "thumbnailfilename" column. If you instead use backquotes, it works as intended.

Does it support WebGL?

I was looking at the DataService.cs file and didn't find a condition to create the database file if in WebGL deployment.
The expected behaviour for WebGL is in the else directive? I tryied to run my Unity project and the console warned that the specified file could not be found.

How did you compile libsqlite3.so?

Hi Roberto,

Your plugin works really great. I'm just wondering how you compiled libsqlite3.so from sqlite3.dll? Just for my future knowledge.

Thanks,
Tim

Select Query

Hello Every One. I am new to unity and sqlite. How to perform select query with where constraint. Please reply as soon as possible.

Avoid using intermediate vars instead object properties in Expressions ( for Where(), Get())

TableQuery.Where and Get methods takes Expression, analyze it and build SQL “where” sentence. Some kind of expressions works on Android but don’t work on iOS. Let’s use classical example with Employee and Department tables (http://www.oracle.com/ocom/groups/public/@otn/documents/digitalasset/513145.jpg). We have 2 corresponded classes with needed attributes. Code:

var dep = connection.Table<Department>().Where(d => d.Name ==blabla).First();
int count = connection.Table<Employee>().Where(e => e.Department_ID == dep.Department_ID).Count();

This code will work on Android, but wil not on iOS due to problems with AOT compilation in CompileExpr method. To fix it on iOS you can:

var dep = connection.Table().Where(d => d.Name ==blabla).First();
int depId = dep.Department_ID;
int count = connection.Table().Where(e => e.Department_ID == depId).Count();

It works! And there are question: can we avoid using intermediate var for compability with AOT compilation on iOS?

May be upgrade to latest SQLiteNet version would solve the problem?

iOS Support for arm7 and arm64

Please not consider this thing as an issue, I have a question in mind so that asking here.

Whether this plugin support arm64 and arm7 both architecture or not?
At present I can able to build project successfully but it may be possible at submission time apple will reject this thing.

So I am confuse about this, use this plugin in actual project or not!!!
Please reply me for this so that I can continue my work.

sqlite3.dll not found on iOS 10 (Xcode 8.3.2) with Unity 2017 beta

I am trying out the example scene in a fresh project using Unity 2017 beta. My test device is running iOS10 and the version of Xcode I am using is 8.3.2

When running the project, I got a the following error:
DllNotFoundException : Unable to load DLL 'sqlite3': The specified module could not be found.

[Android] How to update new sqlite in StreamingAssets folder ?

I going to ship my product with pre-defined database in Assets/StreamingAssets. However, when I update application with new database (install the update from App store, but not delete and reinstall), the pre-defined sqlite is not update. (it still use old database).
How can I get my data updated? (without delete and reinstall app on phone)

Thank you

Consider the possibility to avoid the use of interfaces

You have added interfaces for SQLiteNet classes: ISQLiteConnection, ITableQuery … Using interfaces is good practice, but in this lib we have some troubles with them and I don’t see why we need to use them. Problems again relates to using interfaces and generic methods with iOS aot-only compilation. Below the code from my project:

nextDbLevel = connection.Table<DbLevel>().
Where().
OrderBy(l => l.Number).
First();

It works on Android but don’t on iOS. To fix I need use explicit cast to hint AOT compiler generate necessary native code:

var nextDbLevels = (TableQuery<DbLevel>) connection.Table<DbLevel>().Where();
nextDbLevel = nextDbLevels.OrderBy(l => l.Number).First();

Ok, but if we need cast to TableQuery<> what is advantages of using ITableQuery<>? I try to deleted all interfaces and now I can use lib without casting, it looks better.

Hi. I'm having trouble with the insert on the ipad

Hi. I'm having trouble with the insert on the ipad.
Flies with trace:
SQLiteException: IOError
at SQLite4Unity3d.PreparedSqlLiteInsertCommand.ExecuteNonQuery (System.Object[] source) [0x00000] in :0
at SQLite4Unity3d.SQLiteConnection.Insert (System.Object obj, System.String extra, System.Type objType) [0x00000] in :0

example model:

using UnityEngine;
using SQLite4Unity3d;

public class Image {
[PrimaryKey]
public int id { get; set; }
public int page_id { get; set; }
public string path { get; set; }
}

example metod in DataService.cs:

public void SaveImage(Image i){
_connection.InsertOrReplace (i);
}

Thanks!

No public way to determine if a connection is open

I thought of either accessing _open or comparing Handle to NullHandle to determine if a connection is open, but both of those options aren't publicly available. I'm not sure if I'm going about this the wrong way.

DllNotFoundException: Assets/Plugins/x64/sqlite3.dll

unity5.3.3f1
DllNotFoundException: Assets/Plugins/x64/sqlite3.dll
SQLite4Unity3d.SQLiteConnection..ctor (System.String databasePath, SQLiteOpenFlags openFlags, Boolean storeDateTimeAsTicks) (at Assets/Core/Script/DataMgr/SQLite.cs:228)
DataService..ctor (System.String DatabaseName) (at Assets/Core/Script/DataMgr/DataService.cs:93)

WebGL(Not work)

Hi!)
Mac Os
Unity3d 5.1.2
x86 sqlite.dll
Error
http://monosnap.com/image/E9L67gaO03VtV7RIuzXhCxqhCjYz3b

need to build with DLOPEN_SUPPORT=1 to get dlopen support in asm.js
localhost/:34 need to build with DLOPEN_SUPPORT=1 to get dlopen support in asm.jsModule.printErr @ localhost/:34
localhost/:34 warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demanglingModule.printErr @ localhost/:34
UnityConfig.js:76 Invoking error handler due to
Uncaught abort("need to build with DLOPEN_SUPPORT=1 to get dlopen support in asm.js") at Error
at jsStackTrace (http://localhost:53253/Release/Main.js:1187:13)
at stackTrace (http://localhost:53253/Release/Main.js:1204:22)
at abort (http://localhost:53253/Release/Main.js:3697320:44)
at _dlopen (http://localhost:53253/Release/Main.js:6371:7)
at __ZN6il2cpp2os13LibraryLoader18LoadDynamicLibraryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE il2cpp::os::LibraryLoader::LoadDynamicLibrary?S(undefined?N?&)
at __ZN6il2cpp2vm14PlatformInvoke7ResolveERK16PInvokeArguments il2cpp::vm::PlatformInvoke::Resolve(PInvokeArguments?&)
at __Z30il2cpp_codegen_resolve_pinvokeIPFiPhPiiiEET_PKcS6_20Il2CppCallConvention13Il2CppCharSetib undefined il2cpp_codegen_resolve_pinvoke<undefined?F?, int, unsigned char, int*, int, int>?T()
at _m6209 (http://localhost:53253/Release/Main.js:3003603:9)
at _m2815 (http://localhost:53253/Release/Main.js:3003494:9)
at _m58 (http://localhost:53253/Release/Main.js:2560966:2)
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.
:53253/Release/Main.js:10502 Uncaught abort("need to build with DLOPEN_SUPPORT=1 to get dlopen support in asm.js") at Error
at jsStackTrace (http://localhost:53253/Release/Main.js:1187:13)
at stackTrace (http://localhost:53253/Release/Main.js:1204:22)
at abort (http://localhost:53253/Release/Main.js:3697320:44)
at _dlopen (http://localhost:53253/Release/Main.js:6371:7)
at __ZN6il2cpp2os13LibraryLoader18LoadDynamicLibraryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE il2cpp::os::LibraryLoader::LoadDynamicLibrary?S(undefined?N?&)
at __ZN6il2cpp2vm14PlatformInvoke7ResolveERK16PInvokeArguments il2cpp::vm::PlatformInvoke::Resolve(PInvokeArguments?&)
at __Z30il2cpp_codegen_resolve_pinvokeIPFiPhPiiiEET_PKcS6_20Il2CppCallConvention13Il2CppCharSetib undefined il2cpp_codegen_resolve_pinvoke<undefined?F?, int, unsigned char, int*, int, int>?T()
at _m6209 (http://localhost:53253/Release/Main.js:3003603:9)
at _m2815 (http://localhost:53253/Release/Main.js:3003494:9)
at _m58 (http://localhost:53253/Release/Main.js:2560966:2)
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

README doesn't state Mac support but it works fine

Just in case some folks are discouraged from using this because it doesn't explicitly state that it works on Mac. I have been testing with this and it works just fine (as you'd expect with iOS support).

Thanks for a useful plugin!

sqlite.net praeclarum more powerfull fork

I just got errors while trying to use composite primary keys.
Found out that there is a more powerfull cross platform fork of sqlite.net

https://github.com/softlion/SQLite.Net-PCL
Supports composite primary keys among other improvements

and these platforms

  • Win32 (bundles sqlite binaries for windows, works on both x86 and x64 automatically) (very well tested)
  • XamarinIOS and XamarinIOS.Unified
  • XamarinAndroid
  • WindowsPhone8 (contributed by Nick Cipollina, thanks!)
  • WinRT (Windows 8 and Windows Phone 8.1+) (contributed by Nick Cipollina and Micah Lewis, thanks!)
  • Generic (net4 project without any sqlite3 binaries, requires sqlite installed in the OS) (contributed by James Ottaway)

and is being developed since jan 2014

looks pretty nice what do you think 👍 ?

How to Specify a foreign key constraint?

I need to create a column with foreign key constraint,i have tried to make a table like #this

public class Student
{
[ForeignKey]
public int Id{ get; set; }
public string Name { get; set; }
}
This does not work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.