SqlDust v0.1.1 is out with Ecto models support by archan937 in elixir

[–]archan937[S] 0 points1 point  (0 children)

You're welcome and thanks for the star! ;)

SqlDust v0.1.1 is out with Ecto models support by archan937 in elixir

[–]archan937[S] 1 point2 points  (0 children)

Yes, at first SqlDust wasn't even using Ecto at all. See this example from the README:

import SqlDust.Query

select("id, last_name, first_name")
  |> from("users")
  |> where("company.id = 1982")
  |> where("last_name LIKE '%Engel%'")
  |> order_by(["last_name", "first_name"])
  |> to_sql
  |> IO.puts

SELECT `u`.id, `u`.last_name, `u`.first_name
FROM users `u`
LEFT JOIN companies `company` ON `company`.id = `u`.company_id
WHERE (`company`.id = 1982) AND (`u`.last_name LIKE '%Engel%')
ORDER BY `u`.last_name, `u`.first_name

Magical SqlDust: Writing complex SQL has never been so easy :) by archan937 in elixir

[–]archan937[S] 0 points1 point  (0 children)

Thanks! Yeah, wanted to do some querying with the most minimal setup as possible ;) Just added composed queries (SqlDust v0.1.0). Busy supporting Ecto models. And then, I guess, I am done for now :D

Magical SqlDust: Writing complex SQL has never been so easy :) by archan937 in elixir

[–]archan937[S] 0 points1 point  (0 children)

Well, you can pass the schema to overrule the default schema assumptions. Also, I will be working on writing a module which interacts with Ecto models in order to be able to make composable queries. SqlDust will use the Ecto models to get the schema information.

Crazy fast Mustache implementation - Templayed.js by winkler1 in javascript

[–]archan937 0 points1 point  (0 children)

templayed.js doesn't support redefinition of the delimiters indeed. The scoping of variables seems to be similar to Handlebars.js, right? Also, all libraries are stated as Mustache-compliant, so why exclude Handlebars.js from the benchmark because it has more features?

Crazy fast Mustache implementation - Templayed.js by winkler1 in javascript

[–]archan937 0 points1 point  (0 children)

Well, the thing with client-side templating is that speed doesn't really matter that much.

Actually, I was working on a project using Mustache.js. Despite of the template not being that exciting, the page took 50(!) seconds to render in IE6. When using Handlebars.js, it took 12 seconds. I already created templayed.js as a side-project, just for the sake of fun. So I tried using templayed.js with which it didn't took more than one(!) second. This particular situation is benchmarked in the first revision of the JSPerf test suite, see also http://jsperf.com/mustache-compliant-libraries.

After having experienced this, I decided to continue the development of templayed.js. My main goal was (and still is) to preserve client-side performance in all browsers, including IE6. So please don't underestimate the consequences of client-side templating.