querybuilder
querybuilder copied to clipboard
Add option of WITH (NOLOCK)
Hello. SqlKata already has FromRaw method to allow write queries WITH (NOLOCK) operation but it's something needed to be fluent and doesn't need to write manually all the methods.
Maybe one suggestion could be add this option in the compiler similar to :
compiler = Compilers.Get<SqlServerCompiler>(EngineCodes.SqlServer);
compiler.UseLegacyPagination = true;
But using a new property:
compiler = Compilers.Get<SqlServerCompiler>(EngineCodes.SqlServer);
compiler.UseLegacyPagination = true;
compiler.UseNoLock = true;
This functionality will be very helpful, in my current case in doing queries only for reporting so we don't want to block any record and also this data changes frequently.
Thanks for your great work!
I accept @Shurpop and (Nolock) is very important for Sql server. Nowly i use it with FromRaw but its not good way. If change database to pg it will raise an error. So this compiler option have to be compiler based (sql server pg etc...)
See my comment here.
@ahmad-moussawi Any possibility of adding this feature in sqlkata? Would be really useful.