NOW_STR() in DSL Queries

Hi All,

I’m using dsl queries in java to execute n1ql statements.
Now, I’m need to update a date attribute to the current system date in DSL queries.

General Query:

UPDATE bucket_name SET attr1=value1,attr2=val2 WHERE condition;

I want the above query to be translated to DSL query and to set dateAttribute to current system date.
what should be given as value to set it?
Or how to use NOW_STR() in the query?

update(bucket_name).set(x("attr1 = “value1"”),(x("dateAttr= ")))

Please tell me how to achieve this.

how about this

UPDATE bucket_name SET attr1=value1,dateAttr=NOW_STR() WHERE condition;

Hi @atom_yang

I want this query in DSL query format which can be used in java.