Comments (7)
Hi, thanks for an idea. But I'm not sure what's the use case? If you need output string to work with, why won't you use the JSON format?
Also this approach seems a bit complex. Maybe instead setting ENV["RUBY_PG_EXTRAS_NO_COLORS"] = true
would disable the colorize
method?
from ruby-pg-extras.
Also, in addition to disabling colors with an ENV variable you could add a new in_format
option e.g. ascii
.
from ruby-pg-extras.
I just want the table output as strings to be stored in files etc and not to spend time parsing json etc.
and my monkeypatch is not proposed implementation, just something I did fast.
from ruby-pg-extras.
and another usecase is to for example have a sinatra etc route like
get "/table_info" do
PgExtras.table_info
end
again, much easier to output text instead of json+parse
from ruby-pg-extras.
and, my monkeypatch is "that complex" because the pgextras code doesnt already have that ":ascii" format which would then be used by :table.
from ruby-pg-extras.
like, instead, :table is formatting+puts in a one go, then it could be composer of :ascii+puts
anyway, just saying that pgextras could be refactored. I'm already good with my monkeypatch.
from ruby-pg-extras.
Ok. I don't really see an urgent need for this feature, so if you don't feel like implementing it I'll close the issues for now.
from ruby-pg-extras.
Related Issues (11)
- pg_buffercache inspection HOT 3
- License issue? HOT 2
- All Locks "age" accuracy and including `pg_stat_activity.application_name` HOT 1
- Customizing queries, ignore schemas HOT 1
- Dependency on unsupported filesize gem HOT 1
- Feature request: Partial indexes for columns with high % of the same value HOT 1
- Exception: undefined method `fetch' for nil:NilClass (when no sslinfo installed) HOT 2
- Incorporating pg_stat_monitor support? HOT 1
- auto_explain feature support HOT 1
- `null_indexes` query breaks when logical replication is enabled HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-pg-extras.