forked from anykeyh/clear
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add contributors, add debugging infos in the manual
- Loading branch information
Yacine Petitprez
committed
Jul 3, 2018
1 parent
eb9f653
commit 68ea6ed
Showing
5 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## Core developer | ||
|
||
- Yacine Petitprez ([email protected]) | ||
|
||
## Thanks to | ||
|
||
- 007lva ([email protected]) | ||
- Jeremy Woertink ([email protected]) | ||
- Matthias Zauner ([email protected]) | ||
- Russ Smith ([email protected]) | ||
- Troy A. Sornson ([email protected]) | ||
|
||
For contributing to a better ~world~ ORM. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#### Inspection | ||
|
||
We've reimplemented `inspect` on models, to offer debugging insights: | ||
|
||
```text | ||
pp post # => #<Post:0x10c5f6720 | ||
@attributes={}, | ||
@cache= | ||
#<Clear::Model::QueryCache:0x10c6e8100 | ||
@cache={}, | ||
@cache_activation=Set{}>, | ||
@content_column= | ||
"...", | ||
@errors=[], | ||
@id_column=38, | ||
@persisted=true, | ||
@published_column=true, | ||
@read_only=false, | ||
@title_column="Lorem ipsum torquent inceptos"*, | ||
@user_id_column=5> | ||
``` | ||
|
||
In this case, the `*` means a column is changed and the object is dirty and must | ||
be saved on the database. | ||
|
||
#### SQL Logging | ||
|
||
Clear is offering SQL logging tools, with SQL syntax colorizing in your terminal. | ||
For activation, simply setup the logger to `DEBUG` level | ||
|
||
``` | ||
Clear.logger.level = ::Logger::DEBUG | ||
``` | ||
|
||
Also, Clear will log all query made, and when exception will show you the last query | ||
in your terminal. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters