Skip to content

Commit e644fbd

Browse files
committed
add new sample
1 parent 82a5ad7 commit e644fbd

File tree

21 files changed

+198
-5
lines changed

21 files changed

+198
-5
lines changed

samples/database-v1/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ android {
1010

1111
defaultConfig {
1212
minSdkVersion 8
13-
packageName 'com.sqliteassethelper.example'
13+
packageName 'com.example.sqliteassethelper'
1414
targetSdkVersion 19
1515
versionCode 1
1616
versionName '1.0'

samples/database-v1/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.sqliteassethelper.example"
3+
package="com.example.sqliteassethelper"
44
android:versionCode="1"
55
android:versionName="1.0" >
66

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
buildscript {
2+
repositories {
3+
mavenCentral()
4+
}
5+
dependencies {
6+
classpath 'com.android.tools.build:gradle:0.7.+'
7+
}
8+
}
9+
apply plugin: 'android'
10+
11+
repositories {
12+
mavenCentral()
13+
}
14+
15+
android {
16+
compileSdkVersion 19
17+
buildToolsVersion "19.0.0"
18+
19+
defaultConfig {
20+
minSdkVersion 8
21+
targetSdkVersion 19
22+
versionCode 3
23+
versionName "3.0"
24+
}
25+
buildTypes {
26+
release {
27+
runProguard false
28+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
29+
}
30+
}
31+
}
32+
33+
dependencies {
34+
compile project(':library')
35+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /Applications/Android Studio.app/sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the ProGuard
5+
# include property in project.properties.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.example.sqliteassethelper">
3+
4+
<application android:allowBackup="true"
5+
android:label="@string/app_name"
6+
android:icon="@drawable/ic_launcher">
7+
<activity
8+
android:label="@string/app_name"
9+
android:name="com.example.MainActivity" >
10+
<intent-filter >
11+
<action android:name="android.intent.action.MAIN" />
12+
13+
<category android:name="android.intent.category.LAUNCHER" />
14+
</intent-filter>
15+
</activity>
16+
</application>
17+
18+
</manifest>
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- nothing
2+
INSERT INTO temp VALUES ("this;that;11");
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
-- add a FullNames column to Employees
2+
ALTER TABLE "Employees" RENAME TO 'Employees_ME_TMP';
3+
CREATE TABLE "Employees" (
4+
"EmployeeID" int NOT NULL,
5+
"LastName" varchar(20) NOT NULL,
6+
"FirstName" varchar(10) NOT NULL,
7+
"Title" varchar(30),
8+
"TitleOfCourtesy" varchar(25),
9+
"BirthDate" timestamp,
10+
"HireDate" timestamp,
11+
"Address" varchar(60),
12+
"City" varchar(15),
13+
"Region" varchar(15),
14+
"PostalCode" varchar(10),
15+
"Country" varchar(15),
16+
"HomePhone" varchar(24),
17+
"Extension" varchar(4),
18+
"Photo" blob,
19+
"Notes" text,
20+
"ReportsTo" int,
21+
"PhotoPath" varchar(255),
22+
"FullName" varchar(150),
23+
PRIMARY KEY ("EmployeeID")
24+
);
25+
INSERT INTO "Employees" ("EmployeeID", "LastName", "FirstName", "Title", "TitleOfCourtesy", "BirthDate", "HireDate", "Address", "City", "Region", "PostalCode", "Country", "HomePhone", "Extension", "Photo", "Notes", "ReportsTo", "PhotoPath", "FullName") SELECT "EmployeeID", "LastName", "FirstName", "Title", "TitleOfCourtesy", "BirthDate", "HireDate", "Address", "City", "Region", "PostalCode", "Country", "HomePhone", "Extension", "Photo", "Notes", "ReportsTo", "PhotoPath", "FirstName" || ' ' || "LastName" FROM "Employees_ME_TMP";
26+
DROP TABLE "Employees_ME_TMP";
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- nothing
2+
CREATE TABLE temp (a TEXT);
3+
INSERT INTO temp VALUES ("this;that;9");

0 commit comments

Comments
 (0)