Skip to content

Commit 36eb859

Browse files
committed
1.4.1
1 parent b7c8649 commit 36eb859

File tree

10 files changed

+36
-48
lines changed

10 files changed

+36
-48
lines changed

.idea/codeStyles/Project.xml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.idea/gradle.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 14 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ allprojects {
1414
Add the dependency
1515
```
1616
dependencies {
17-
implementation 'com.github.p32929:AndroidEasySQL-Library:1.4.0'
17+
implementation 'com.github.p32929:AndroidEasySQL-Library:1.4.1'
1818
}
1919
```
2020

@@ -36,12 +36,12 @@ After that you can do:
3636
### Initialization, Set Table Name, Add columns, altogether:
3737

3838
```
39-
EasyDB easyDB = EasyDB.init(this, "TEST") // "TEST" is the name of the DATABASE
40-
.setTableName("DEMO TABLE") // You can ignore this line if you want
41-
.addColumn(new Column("C1", new String[]{"text", "unique"}))
42-
.addColumn(new Column("C2", new String[]{"text", "not null"}))
43-
.addColumn(new Column("C3", new String[]{"text"}))
44-
.doneTableColumn();
39+
EasyDB easyDB = EasyDB.init(this, "TEST") // TEST is the name of the DATABASE
40+
.setTableName("DEMO TABLE") // You can ignore this line if you want
41+
.addColumn("C1", "text") // Contrains like "text", "unique", "not null" are not case sensitive
42+
.addColumn("C2", "text", "unique")
43+
.addColumn("C3", "text", "unique", "not null")
44+
.doneTableColumn();
4545
```
4646

4747
or

androideasysql-library/build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ android {
88
targetSdkVersion 27
99
versionCode 1
1010
versionName "1.0"
11-
1211
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13-
1412
}
1513

1614
buildTypes {

androideasysql-library/src/main/java/p32929/androideasysql_library/EasyDB.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,12 @@ public EasyDB addColumn(Column column) {
293293
return this;
294294
}
295295

296+
public EasyDB addColumn(String columnName, String... columnDataTypes) {
297+
Column column = new Column(columnName, columnDataTypes);
298+
columns.add(column);
299+
return this;
300+
}
301+
296302
public EasyDB doneTableColumn() {
297303
SQL = " CREATE TABLE " + TABLE_NAME + " ( ID INTEGER PRIMARY KEY AUTOINCREMENT, ";
298304
for (int i = 0; i < columns.size(); i++) {

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ dependencies {
2525
testImplementation 'junit:junit:4.12'
2626
androidTestImplementation 'com.android.support.test:runner:1.0.2'
2727
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
28-
compile project(path: ':androideasysql-library')
28+
implementation project(path: ':androideasysql-library')
2929
}

app/src/main/java/p32929/databaseeasier/MainActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ protected void onCreate(Bundle savedInstanceState) {
3838

3939
easyDB = EasyDB.init(this, "TEST") // TEST is the name of the DATABASE
4040
.setTableName("DEMO TABLE") // You can ignore this line if you want
41-
.addColumn(new Column("C1", "text"))
42-
.addColumn(new Column("C2", "text", "unique"))
41+
.addColumn("C1", "text")
42+
.addColumn("C2", "text", "unique")
4343
.doneTableColumn();
4444

4545
buttonShow.setOnClickListener(new View.OnClickListener() {

build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ buildscript {
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.0.1'
11-
10+
classpath 'com.android.tools.build:gradle:3.4.2'
1211

1312
// NOTE: Do not place your application dependencies here; they belong
1413
// in the individual module build.gradle files
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Jul 08 11:30:43 BDT 2018
1+
#Sun Jan 12 15:47:27 BDT 2020
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

0 commit comments

Comments
 (0)