Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I am seeing "truncated" inside Web SQL in Chrome DevTools when using Stetho

Tags:

android

stetho

I am using Stheto to inspect the database in my Android app, but I am seeing "truncated" in all my columns when there are a lot of objects in the table. How can I see them all?

like image 757
Sree Avatar asked Apr 04 '16 02:04

Sree


1 Answers

The reason for this is the limit inside Stetho. In the class

com.facebook.stetho.inspector.protocol.module.Database

https://github.com/facebook/stetho/blob/36aa5bd356d9cf5893b9424b06a83dda9ec5e44f/stetho/src/main/java/com/facebook/stetho/inspector/protocol/module/Database.java

There is this info -

  /**
   * The protocol doesn't offer an efficient means of pagination or anything like that so
   * we'll just cap the result list to some arbitrarily large number that I think folks will
   * actually need in practice.
   * <p>
   * Note that when this limit is exceeded, a dummy row will be introduced that indicates
   * truncation occurred.
   */
  private static final int MAX_EXECUTE_RESULTS = 250;

So if you really need a bigger number, you could change the source code of the library, and add a different Max.

like image 55
Mikelis Kaneps Avatar answered Nov 14 '22 13:11

Mikelis Kaneps