This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
map_suite_sqlite [2015/08/31 07:56] admin |
map_suite_sqlite [2015/09/28 03:27] (current) admin [SQLite Dependencies] |
||
---|---|---|---|
Line 32: | Line 32: | ||
<code csharp> | <code csharp> | ||
// We need to add an API to create a table and spatial index at once. | // We need to add an API to create a table and spatial index at once. | ||
+ | SqliteFeatureSource.CreateTable(@"Data Source = C:\sampledata\austin_streets.sqlite; Version = 3;","sample_table_name",new SqliteColumn[] { new SqliteColumn("name", SqliteColumnType.Text)},GeographyUnit.DecimalDegree); | ||
+ | </code> | ||
+ | ==== Create a New View ==== | ||
+ | <code csharp> | ||
+ | // We create the view based on the View SQL passed in. We will create the view as well as build the spatial index based on the record in the view. | ||
+ | SqliteFeatureSource.CreateView(@"Data Source = C:\sampledata\austin_streets.sqlite; Version = 3;", "MajorRoads", "CREATE VIEW MajorRoads AS SELECT * austin_streets where road_type='major';", "id", GeographyUnit.DecimalDegree); | ||
</code> | </code> | ||
- | |||
==== Opening a Database ==== | ==== Opening a Database ==== | ||
<code csharp> | <code csharp> | ||
Line 139: | Line 144: | ||
===== SQLite Dependencies ===== | ===== SQLite Dependencies ===== | ||
- | We use the unmanaged implementation of SQLite provided by the creators via a NuGet package. Specifically, we use the package ‘System.Data.SQLite Core (x86/x64)’ because it has no other dependencies and supports both 32 and 64 bit application. When you add a reference to our SQLiteExtension, it will require you to add a reference to this NuGet package from your main application so that the unmanaged assemblies are included in the bin. As they are copied to the bin we support x-copy deployment and avoid potential conflict with other instances of SQLite that may exist on the machine. The specific package we use is the {{Is there a missing word here?|error}} It is currently not suitable for a fully managed deployment. If you have such an application, please let us know and we can consider another approach for your specific project. | + | We use the unmanaged implementation of SQLite provided by the creators via a NuGet package. Specifically, we use the package ‘System.Data.SQLite Core (x86/x64)’ because it has no other dependencies and supports both 32 and 64 bit application. When you add a reference to our SQLiteExtension, it will require you to add a reference to this NuGet package from your main application so that the unmanaged assemblies are included in the bin. As they are copied to the bin we support x-copy deployment and avoid potential conflict with other instances of SQLite that may exist on the machine. The specific package we use is the {{Is there a missing word here?|Template:Is there a missing word here?}} It is currently not suitable for a fully managed deployment. If you have such an application, please let us know and we can consider another approach for your specific project. |
https://www.nuget.org/packages/System.Data.SQLite.Core/ | https://www.nuget.org/packages/System.Data.SQLite.Core/ | ||
===== Management Tools ===== | ===== Management Tools ===== | ||
- | If you want to explore the data outside of Map Suite you can use any number of open and closed source tools to examine SQLite. Below is a link to a list of the most popular tools. | + | If you want to explore the data outside of Map Suite you can use any number of open and closed source tools to examine SQLite. Below is a link to a list of the most popular tools. |
- | + | \\ | |
http://www.sqlite.org/cvstrac/wiki?p=ManagementTools | http://www.sqlite.org/cvstrac/wiki?p=ManagementTools | ||
A nice portable option is Database Browser Portable at the link below. | A nice portable option is Database Browser Portable at the link below. | ||
- | |||
http://portableapps.com/apps/development/database_browser_portable | http://portableapps.com/apps/development/database_browser_portable | ||