anyone know of a simple way to search a blob of text from a list of keywords in one fell swoop, without having to iterate through each keyword and perform an individual search? Ex.

s keywords="This,blob,text"

s text = "This is a sample blob of text"

i text[keywords w "hit"

0 2
0 194

Anyone know if it's possible using cache objectscript (or something else maybe) to reference an object property using a variable? For example:

s obj={}

s obj.prop1="hello"

s var="prop1"

w obj.var <== which would result in a reference to obj.prop1 and write out "hello"

0 7
0 294

Is there a way to lock at the record level? I know that you can lock at the table level:

&sql(UNLOCK mytest IN EXCLUSIVE MODE)

but am unable to find a way to lock just at the record/row level.

Would this also affect a SELECT statement done on the record?

0 1
0 362
Question
· Jul 17, 2018
Cache Dynamic SQL Pagination

Would like to know if there is an alternative or better way to paginate through a dataset using dynamic SQL than what I am using below. The problem is that as the potential pool of data gets larger, this code slows down to the point of not being useable. In analyzing each line of code below, it appears the slow down is related to the initial rset.%Next() iteration. Is there anything available which does not require a subquery/%VID such as a simple LIMIT/OFFSET?

My code is similar to :

s sql=##class(%SQL.Statement).%New()

1 25
3 2.7K