-
Notifications
You must be signed in to change notification settings - Fork 16
SQL logging
xcesco edited this page Nov 30, 2017
·
1 revision
For default Kripton allows to monitor SQL operation simply reading logcat. An example of logcat during SQL execution.
AbstractDataSource, openWritableDatabase (line 442): database OPEN READ_AND_WRITE_OPENED (connections: 0)
CityDaoImpl, insert (line 139): INSERT INTO city (name) VALUES (:name)
CityDaoImpl, insert (line 148): ==> :name = 'Venezia' (java.lang.String)
PersonDaoImpl, insert (line 161): INSERT INTO person (city_id, name, surname) VALUES (:city_id, :name, :surname)
PersonDaoImpl, insert (line 170): ==> :city_id = '15' (java.lang.Long)
PersonDaoImpl, insert (line 170): ==> :name = 'Tony' (java.lang.String)
PersonDaoImpl, insert (line 170): ==> :surname = 'Manero' (java.lang.String)
PersonDaoImpl, listForCity (line 69): select person.* from person inner join city on city.id=person.city_id where person.city_id=?
PersonDaoImpl, listForCity (line 74): ==> param0: '15'
PersonDaoImpl, listForCity (line 82): Rows found: 1
AbstractDataSource, close (line 221): database CLOSED (READ_AND_WRITE_OPENED) (connections: 0)
Usually you can see on logcat:
- database open and close
- SQL operation
- SQL arguments
- DDL execution
Log boilerplate-code is generate by Kripton. Generation is controlled by @BindDataSource#log attribute (true for log generation, false to avoid code generation).
- Introduction
- Goals & Features
- Kotlin
- Immutable or Mutable Pojo
- Annotation Processor Args
- Credits
- Articles
- Benchmarks
- Setup
- Tutorial
- Usage
- Dependencies and inspirations
- Stackoverflow
- Documentation
- SQL logging
- Data source options
- Indices
- SQL Type adapter
- Global SQL Type adapter
- Constraints
- Live data: welcome Architectural components!!
- Paged Live data
- Dynamic parts
- Transactional and batch operations
- Async Transactional and batch operations
- Global transaction
- Support for immutable POJO
- Generate Content provider
- Generate Database schema generation
- Database migration
- BindSqlColumn
- BindContentProvider
- BindContentProviderEntry
- BindContentProviderPath
- BindDao
- BindDaoMany2Many
- BindDataSource
- BindDataSourceOptions
- BindDataSourceUpdateTask
- BindIndex
- BindSqlRelation
- BindSqlAdapter
- BindSqlChildSelect
- BindSqlDelete
- BindSqlDynamicOrderBy
- BindSqlDynamicWhere
- BindSqlDynamicWhereParams
- BindSqlInsert
- BindSqlPageSize
- BindSqlParam
- BindSqlSelect
- BindSqlUpdate
- BindSqlType
- BindSqlTransaction