I want to create statement names "INSERTINTOTABLE1STMT" as explained in the following url but it fails with below exception in the create statement line. "DEL", "REDISQL.CREATEDB" and "REDISQL.EXEC" commands are just working fine.
https://redisql.redbeardlab.com/references/#redisqlexec_statement
System.ArgumentOutOfRangeException: "Specified argument was out of the range of valid values. (Parameter 'Command 'REDISQL.CREATE_STATEMENT' exceeds library limit of 23 bytes')"
at StackExchange.Redis.CommandBytes..ctor(String value) in /_/src/StackExchange.Redis/CommandBytes.cs:line 109\n at StackExchange.Redis.CommandMap.GetBytes(String command) in /_/src/StackExchange.Redis/CommandMap.cs:line 181\n at StackExchange.Redis.RedisDatabase.ExecuteMessage..ctor(CommandMap map, Int32 db, CommandFlags flags, String command, ICollection1 args) in /_/src/StackExchange.Redis/RedisDatabase.cs:line 3720\n at StackExchange.Redis.RedisDatabase.Execute(String command, ICollection1 args, CommandFlags flags) in /_/src/StackExchange.Redis/RedisDatabase.cs:line 1203\n at StackExchange.Redis.RedisDatabase.Execute(String command, Object[] args) in /_/src/StackExchange.Redis/RedisDatabase.cs:line 1200\n at deneme.Program.Main(String[] args) in /Users/serhatonal/Projects/deneme/deneme/Program.cs:23
ConnectionMultiplexer muxer = ConnectionMultiplexer.Connect("127.0.0.1:6380");
IDatabase conn = muxer.GetDatabase();
conn.Execute("DEL", "DB");
conn.Execute("REDISQL.CREATE_DB", "DB");
conn.Execute("REDISQL.EXEC", "DB", "CREATE TABLE TABLE1(A INT, B TEXT);");
conn.Execute("REDISQL.EXEC", "DB", "CREATE TABLE TABLE2(A INT, B TEXT);");
conn.Execute("REDISQL.CREATE_STATEMENT", "DB", "INSERTINTOTABLE1STMT", "INSERT INTO TABLE1 VALUES(?1,?2)");
conn.Execute("REDISQL.EXEC_STATEMENT", "DB", "INSERTINTOTABLE1STMT", 1, "Value1" );
I provided some more info on SO: https://stackoverflow.com/a/66297146/869271
Just to clarify: I will fix the 23 byte problem ASAP. Kinda flat on my back with a positive covid result currently, so it won't be "today".
Just to clarify: I will fix the 23 byte problem ASAP. Kinda flat on my back with a positive covid result currently, so it won't be "today".
Happy to hear that it'll be fixed soon. BTW Get well soon
@mgravell super sorry to hear you got COVID. I hear it can be quite tiring! Hoping for a fast recovery!
@mgravell speedy recovery !!
@mgravell Hello, do you have any update on this issue? I'm also getting it when trying to use the "Scan" command.
Thanks!
Thanks for the reminder; will try and do this tomorrow
On Wed, 24 Mar 2021, 17:06 Santiago Topham, @.*>
wrote:
@mgravell https://github.com/mgravell Hello, do you have any update on
this issue? I'm also getting it when trying to use the "Scan" command.
Thanks!—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/StackExchange/StackExchange.Redis/issues/1692#issuecomment-806000760,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAEHMFGTQIIXELYZAJCRB3TFILXPANCNFSM4X24ZC6A
.
@mgravell thank you!!
Right; I've bumped the length by 64 bits, to 31 - this should solve the immediate failure - but we should really make this unrestricted (which is a larger piece of work)
@santiagotopham can you clarify in what scenario you're seeing a problem here with scan ? that should work just fine; are you sure you're not trying to pass multiple values as the command? i.e. in an operation like SCAN 0 MATCH 'Foo*' COUNT 100, the command is just SCAN - but it also has 5 arguments. Also note: you shouldn't need to implement SCAN yourself - it is encapsulated by iteration APIs on IServer
@mgravell Thank you, I was going the wrong way about using this, I was able to solve my problem by using the server instead.
@mgravell Just to answer your question, I was using "scan 0 count 1000 match foo*" when I got the error, but also got it when using it like your example.
@santiagotopham if you are using Execute, then I'm very very sure that if you do db.Execute("scan", 0, "count", 1000, "match", "foo*") - it will work just fine; but again, scan is fully implemented inside the library - you should never have to do it manually.
@mgravell Sorry for the late response, I was using the library the wrong way. I have rechecked the documentation. Thank you for the tips.
Most helpful comment
Just to clarify: I will fix the 23 byte problem ASAP. Kinda flat on my back with a positive covid result currently, so it won't be "today".