AREL- SQL CREATE TABLE statement replication











up vote
-1
down vote

favorite












guys, I was recently working on a project and I find a necessity to create a bunch of tables. I could use ActiveRecord of course but my concern here is AREL. I went through couples of blogs but couldn't find appropriate examples. If anybody could help I would be thankful.










share|improve this question






















  • Your question is not very clear, what do you want to do with AREL when creating tables? Why not use ActiveRecord::Migration.create_table? It'd be great if you can provide more context of your need.
    – Blue Smith
    Nov 17 at 16:41










  • Hi! Blue Smith the thing is I am associated with a project that deals with creating our own ORM sorts of thing. Like ActiveRecord for instance so I need to be able to convert my plain SQL into AREL query and Vice-versa. It would be helpful if someone could provide me with example codes regarding CRUD functionalities with AREL.
    – Sumit Gautam
    2 days ago








  • 1




    I think rubydoc.info/github/rails/arel is the most informative document about Arel. You can use Arel nodes, e.g. Arel::Nodes::InsertStatement to populate SQL query. You can find some good examples like this gist.github.com/janko-m/d76a138cf4cc1d1ecaab
    – Blue Smith
    18 hours ago

















up vote
-1
down vote

favorite












guys, I was recently working on a project and I find a necessity to create a bunch of tables. I could use ActiveRecord of course but my concern here is AREL. I went through couples of blogs but couldn't find appropriate examples. If anybody could help I would be thankful.










share|improve this question






















  • Your question is not very clear, what do you want to do with AREL when creating tables? Why not use ActiveRecord::Migration.create_table? It'd be great if you can provide more context of your need.
    – Blue Smith
    Nov 17 at 16:41










  • Hi! Blue Smith the thing is I am associated with a project that deals with creating our own ORM sorts of thing. Like ActiveRecord for instance so I need to be able to convert my plain SQL into AREL query and Vice-versa. It would be helpful if someone could provide me with example codes regarding CRUD functionalities with AREL.
    – Sumit Gautam
    2 days ago








  • 1




    I think rubydoc.info/github/rails/arel is the most informative document about Arel. You can use Arel nodes, e.g. Arel::Nodes::InsertStatement to populate SQL query. You can find some good examples like this gist.github.com/janko-m/d76a138cf4cc1d1ecaab
    – Blue Smith
    18 hours ago















up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











guys, I was recently working on a project and I find a necessity to create a bunch of tables. I could use ActiveRecord of course but my concern here is AREL. I went through couples of blogs but couldn't find appropriate examples. If anybody could help I would be thankful.










share|improve this question













guys, I was recently working on a project and I find a necessity to create a bunch of tables. I could use ActiveRecord of course but my concern here is AREL. I went through couples of blogs but couldn't find appropriate examples. If anybody could help I would be thankful.







sql ruby-on-rails ruby activerecord arel






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 17 at 13:30









Sumit Gautam

418




418












  • Your question is not very clear, what do you want to do with AREL when creating tables? Why not use ActiveRecord::Migration.create_table? It'd be great if you can provide more context of your need.
    – Blue Smith
    Nov 17 at 16:41










  • Hi! Blue Smith the thing is I am associated with a project that deals with creating our own ORM sorts of thing. Like ActiveRecord for instance so I need to be able to convert my plain SQL into AREL query and Vice-versa. It would be helpful if someone could provide me with example codes regarding CRUD functionalities with AREL.
    – Sumit Gautam
    2 days ago








  • 1




    I think rubydoc.info/github/rails/arel is the most informative document about Arel. You can use Arel nodes, e.g. Arel::Nodes::InsertStatement to populate SQL query. You can find some good examples like this gist.github.com/janko-m/d76a138cf4cc1d1ecaab
    – Blue Smith
    18 hours ago




















  • Your question is not very clear, what do you want to do with AREL when creating tables? Why not use ActiveRecord::Migration.create_table? It'd be great if you can provide more context of your need.
    – Blue Smith
    Nov 17 at 16:41










  • Hi! Blue Smith the thing is I am associated with a project that deals with creating our own ORM sorts of thing. Like ActiveRecord for instance so I need to be able to convert my plain SQL into AREL query and Vice-versa. It would be helpful if someone could provide me with example codes regarding CRUD functionalities with AREL.
    – Sumit Gautam
    2 days ago








  • 1




    I think rubydoc.info/github/rails/arel is the most informative document about Arel. You can use Arel nodes, e.g. Arel::Nodes::InsertStatement to populate SQL query. You can find some good examples like this gist.github.com/janko-m/d76a138cf4cc1d1ecaab
    – Blue Smith
    18 hours ago


















Your question is not very clear, what do you want to do with AREL when creating tables? Why not use ActiveRecord::Migration.create_table? It'd be great if you can provide more context of your need.
– Blue Smith
Nov 17 at 16:41




Your question is not very clear, what do you want to do with AREL when creating tables? Why not use ActiveRecord::Migration.create_table? It'd be great if you can provide more context of your need.
– Blue Smith
Nov 17 at 16:41












Hi! Blue Smith the thing is I am associated with a project that deals with creating our own ORM sorts of thing. Like ActiveRecord for instance so I need to be able to convert my plain SQL into AREL query and Vice-versa. It would be helpful if someone could provide me with example codes regarding CRUD functionalities with AREL.
– Sumit Gautam
2 days ago






Hi! Blue Smith the thing is I am associated with a project that deals with creating our own ORM sorts of thing. Like ActiveRecord for instance so I need to be able to convert my plain SQL into AREL query and Vice-versa. It would be helpful if someone could provide me with example codes regarding CRUD functionalities with AREL.
– Sumit Gautam
2 days ago






1




1




I think rubydoc.info/github/rails/arel is the most informative document about Arel. You can use Arel nodes, e.g. Arel::Nodes::InsertStatement to populate SQL query. You can find some good examples like this gist.github.com/janko-m/d76a138cf4cc1d1ecaab
– Blue Smith
18 hours ago






I think rubydoc.info/github/rails/arel is the most informative document about Arel. You can use Arel nodes, e.g. Arel::Nodes::InsertStatement to populate SQL query. You can find some good examples like this gist.github.com/janko-m/d76a138cf4cc1d1ecaab
– Blue Smith
18 hours ago



















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53351706%2farel-sql-create-table-statement-replication%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53351706%2farel-sql-create-table-statement-replication%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Ottavio Pratesi

Tricia Helfer

15 giugno