Method | Plugin-GraphQL | Plugin-Axios |
---|---|---|
Read multiple | Model.fetch(filter) |
Model.$fetch() |
Read single | Model.fetch(id) |
Model.$get() |
Create | record.$persist() , Model.persist() |
Model.$create() |
Update | record.$push() , Model.push() |
Model.$update() |
Delete | record.$destroy() , Model.destroy() |
Model.$delete() |
Model related custom | Model.customQuery() |
? |
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
import { Model as ORMModel } from '@vuex-orm/core'; | |
/** | |
* Wrapper for models to provide model level convenience methods for interacting with the store and persistence. | |
* Will be built into vuex-orm in the future. See https://github.com/vuex-orm/vuex-orm/issues/60 | |
* | |
* Requires the inflected npm package. | |
*/ | |
export default class Model extends ORMModel { | |
/** |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test Site</title> | |
<style> | |
h1, h2, h3, h4, h5, h6 { | |
page-break-after: avoid; | |
page-break-inside: avoid; | |
orphans: 3; | |
widows: 3; |
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
$ parts install zsh | |
=> Extracting archive... | |
=> Installing... | |
=> Activating... | |
=> Installed zsh 5.0.5 | |
$ parts install vlc | |
=> Extracting archive... | |
=> Compiling... |
Used https://github.com/dakull/ruby-simple-benchmarks/ for benchmarking
> ruby --version
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
> time ruby bm_gc_mb.rb
user system total real
0.200000 0.010000 0.210000 ( 0.208676)
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
% git diff | |
diff --git a/Gemfile b/Gemfile | |
index 2019cae..381869a 100644 | |
--- a/Gemfile | |
+++ b/Gemfile | |
@@ -33,7 +33,8 @@ gem 'omniauth-github' | |
gem "gitlab_git", "~> 4.0.0.pre" | |
# Ruby/Rack Git Smart-HTTP Server Handler | |
-gem 'gitlab-grack', '~> 2.0.0.pre', require: 'grack' |
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
class Test | |
private def foo | |
3.times do | |
puts "hello world" | |
end | |
end | |
private def bar | |
end | |
end |
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
class Test | |
def foo | |
3.times do | |
puts "hello world" | |
end | |
end | |
private def bar | |
end | |
end |
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
Char Unicode | |
------------------------------ | |
Ä, ä \u00c4, \u00e4 | |
Ö, ö \u00d6, \u00f6 | |
Ü, ü \u00dc, \u00fc | |
ß \u00df |