| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Push scale to type objects
|
| |
| |
| |
| |
| |
| | |
Ideally types will be usable without having to specify a sql type
string, so we should keep the information related to parsing them on the
adapter or another object.
|
|\ \
| |/
|/| |
Rename `stack` to `queue`
|
| |
| |
| |
| |
| |
| |
| | |
Because it is used as a queue (FIFO), not as a stack (LIFO).
* http://en.wikipedia.org/wiki/Stack_(abstract_data_type)
* http://en.wikipedia.org/wiki/Queue_(data_structure)
|
|\ \
| | |
| | | |
Move `extract_precision` onto type objects
|
|/ / |
|
|\ \
| | |
| | | |
Remove unnecessary `Hash#to_a` call
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Inspired by https://github.com/rails/rails/commit/931ee4186b877856b212b0085cd7bd7f6a4aea67
```ruby
def stat(num)
start = GC.stat(:total_allocated_object)
num.times { yield }
total_obj_count = GC.stat(:total_allocated_object) - start
puts "#{total_obj_count / num} allocations per call"
end
h = { 'x' => 'y' }
stat(100) { h. each { |pair| pair } }
stat(100) { h.to_a.each { |pair| pair } }
__END__
1 allocations per call
2 allocations per call
```
|
|\ \
| | |
| | | |
Use `break` instead of `next` in AD::Journey::Formatter#match_route
|
| |/
| |
| |
| |
| |
| | |
The array is sorted in descending order, so there is no point in
iterating further if we met a negative item - all the rest will be
negative too.
|
|\ \
| | |
| | | |
Use the generic type map for all PG type registrations
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We're going to want all of the benefits of the type map object for
registrations, including block registration and real aliasing. Moves
type name registrations to the adapter, and aliases the OIDs to the
named types
|
|\ \ \
| | | |
| | | | |
Allow additional arguments to be used during type map lookups
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Determining things like precision and scale in postgresql will require
the given blocks to take additional arguments besides the OID.
- Adds the ability to handle additional arguments to `TypeMap`
- Passes the column type to blocks when looking up PG types
|
|\ \ \
| | | |
| | | | |
[Guides] Do not gsub non ASCII characters in header anchor.
|
| | | | |
|
| |_|/
|/| |
| | |
| | | |
It was changed by mistake at c5d64b2b86aa42f57881091491ee289b3c489c7e.
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
|\ \
| |/
|/| |
Form full URI as string to be parsed in Rack::Test.
|
|/
|
|
| |
There are performance gains to be made by avoiding URI setter methods.
|
|\
| |
| |
| | |
Fixed a problem where `sum` used with a `group` was not returning a Hash.
|
| |
| |
| |
| | |
with a grouping was not returning a Hash.
|
| |
| |
| | |
Most recent change should be moved to the top
|
|\ \
| | |
| | | |
Documentation: Rename Posts to Articles
|
|/ / |
|
|\ \
| | |
| | | |
Move extract_scale to decimal type
|
| | |
| | |
| | |
| | |
| | |
| | | |
The only type that has a scale is decimal. There's a special case where
decimal columns with 0 scale are type cast to integers if the scale is
not specified. Appears to only affect schema dumping.
|
|\ \ \
| | | |
| | | | |
Move PG OID types to their own files
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
As we promote these classes to first class concepts, these classes are
starting to gain enough behavior to warrant being moved into their own
files. Many of them will become quite large as we move additional
behavior to the type objects.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
so tht I don't go totally insane with THsi crazy hash driven
development. why is Everything a hash? Why do people think hashes in
hashes with random keys is a Good API? You can't find things or
deprecate them or control access whatsoever, you just have to hope that
everyone is like "oh, you want to change that? that's cool! we all know
it's hashes so go for it!"
The End.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
The optimized and non-optimized path share more code now without
significant performance degretation
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Example:
x = [1,2,3,4]
y = [3,2,1]
def test x, y
hash = {}
x.zip(y) { |k,v| hash[k] = v }
hash
end
def test2 x, y
Hash[x.zip(y)]
end
def test3 x, y
x.zip(y).each_with_object({}) { |(k,v),hash| hash[k] = v }
end
def stat num
start = GC.stat(:total_allocated_object)
num.times { yield }
total_obj_count = GC.stat(:total_allocated_object) - start
puts "#{total_obj_count / num} allocations per call"
end
stat(100) { test(x,y) }
stat(100) { test2(x,y) }
stat(100) { test3(x,y) }
__END__
2 allocations per call
7 allocations per call
8 allocations per call
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
khusnetdinov/fix_typo_guides_active_support_instrumentation
Fix typo guides/source/active_support_instrumentation.md [ci-skip]
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
fixes in active record query for reorder in rails guides
|
| | |_|/ /
| |/| | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Rename `oid_type` to `cast_type` to make PG columns consistent with abstract columns
|
|/ / / / |
|