Ngugi1 / sqlite-net

Automatically exported from code.google.com/p/sqlite-net
0 stars 0 forks source link

Support for Equals #38

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
One occassionally has to use Equals() instead of == especially when using 
generics.

E.g.
http://stackoverflow.com/questions/390900/cant-operator-be-applied-to-generic-ty
pes-in-c

This was fixed by adding the lines:

else if (call.Method.Name == "Equals" && args.Length == 1)
{
  sqlCall = CompileExpr(call.Object, queryArgs).CommandText + " == " + args[0].CommandText;
}

to like 1368 of the code in function:
private CompileResult CompileExpr (Expression expr, List<object> queryArgs)

Original issue reported on code.google.com by nara...@sainaney.com on 5 Aug 2011 at 4:54