Skip to content

Commit

Permalink
Merge pull request #150 from amitshekhariitbhu/development
Browse files Browse the repository at this point in the history
Fix query & class not found error
  • Loading branch information
amitshekhariitbhu committed Mar 7, 2019
2 parents d14adf9 + cfdf936 commit 1cb6137
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Change Log
==========

Version 1.0.6 *(2019-03-07)*
----------------------------

* Fix: Fix query error
* Fix: Fix DebugDb class not found error


Version 1.0.5 *(2019-02-18)*
----------------------------

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
Add this to your app's build.gradle

```groovy
debugImplementation 'com.amitshekhar.android:debug-db:1.0.5'
debugImplementation 'com.amitshekhar.android:debug-db:1.0.6'
```

Using the Android Debug Database with encrypted database

```groovy
debugImplementation 'com.amitshekhar.android:debug-db-encrypt:1.0.5'
debugImplementation 'com.amitshekhar.android:debug-db-encrypt:1.0.6'
```

Use `debugImplementation` so that it will only compile in your debug build and not in your release build.
Expand Down
2 changes: 1 addition & 1 deletion debug-db-base/debug-db-base-upload.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def siteUrl = 'https://github.com/amitshekhariitbhu/Android-Debug-Database'
def gitUrl = 'https://github.com/amitshekhariitbhu/Android-Debug-Database.git'

group = "com.amitshekhar.android"
version = '1.0.5'
version = '1.0.6'

install {
repositories.mavenInstaller {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,25 @@ public static TableDataResponse getTableData(SQLiteDB db, String selectQuery, St

tableData.isSuccessful = true;
tableData.rows = new ArrayList<>();

String[] columnNames = cursor.getColumnNames();

List<TableDataResponse.TableInfo> tableInfoListModified = new ArrayList<>();

for (String columnName : columnNames) {
for (TableDataResponse.TableInfo tableInfo : tableData.tableInfos) {
if (columnName.equals(tableInfo.title)) {
tableInfoListModified.add(tableInfo);
break;
}
}
}

if (tableData.tableInfos.size() != tableInfoListModified.size()) {
tableData.tableInfos = tableInfoListModified;
tableData.isEditable = false;
}

if (cursor.getCount() > 0) {

do {
Expand Down
2 changes: 1 addition & 1 deletion debug-db-encrypt/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {
}

dependencies {
implementation project(':debug-db-base')
api project(':debug-db-base')
implementation 'net.zetetic:android-database-sqlcipher:3.5.9'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
Expand Down
2 changes: 1 addition & 1 deletion debug-db-encrypt/debug-db-encrypt-upload.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def siteUrl = 'https://github.com/amitshekhariitbhu/Android-Debug-Database'
def gitUrl = 'https://github.com/amitshekhariitbhu/Android-Debug-Database.git'

group = "com.amitshekhar.android"
version = '1.0.5'
version = '1.0.6'

install {
repositories.mavenInstaller {
Expand Down
2 changes: 1 addition & 1 deletion debug-db/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {
}

dependencies {
implementation project(':debug-db-base')
api project(':debug-db-base')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
Expand Down
2 changes: 1 addition & 1 deletion debug-db/debug-db-upload.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def siteUrl = 'https://github.com/amitshekhariitbhu/Android-Debug-Database'
def gitUrl = 'https://github.com/amitshekhariitbhu/Android-Debug-Database.git'

group = "com.amitshekhar.android"
version = '1.0.5'
version = '1.0.6'

install {
repositories.mavenInstaller {
Expand Down

0 comments on commit 1cb6137

Please sign in to comment.