@@ -20,8 +20,9 @@ const IMMUDB_PWD: string = (process.env.IMMUDB_PWD as string || 'immudb');
2020
2121( async ( ) => {
2222 try {
23- const randString : string = `${ Math . floor ( Math . random ( ) * Math . floor ( 100000 ) ) } ` ;
24- const randNumber : number = + randString ;
23+ const randNumber = 1
24+ const randString : string = `test${ randNumber } ` ;
25+
2526 let index : any ;
2627
2728 // Instantiate the client
@@ -104,13 +105,13 @@ const IMMUDB_PWD: string = (process.env.IMMUDB_PWD as string || 'immudb');
104105 const res7 = await client . txById ( {
105106 tx : index
106107 } )
107- console . log ( 'success: byIndex ' , res7 ) ;
108+ console . log ( 'success: txById ' , res7 ) ;
108109
109110 // // safely return an element by index
110111 const res8 = await client . verifiedTxById ( {
111112 tx : index
112113 } )
113- console . log ( 'success: bySafeIndex ' , res8 ) ;
114+ console . log ( 'success: verifiedTxById ' , res8 ) ;
114115
115116 // fetch history for the item having the
116117 // specified key
@@ -120,7 +121,6 @@ const IMMUDB_PWD: string = (process.env.IMMUDB_PWD as string || 'immudb');
120121 limit : 0 ,
121122 desc : false ,
122123 sincetx : randNumber
123-
124124 } )
125125 console . log ( 'success: history' , res9 ) ;
126126
@@ -151,11 +151,11 @@ const IMMUDB_PWD: string = (process.env.IMMUDB_PWD as string || 'immudb');
151151
152152 // iterate over a sorted set
153153 const res12 = await client . zAdd ( {
154- set : randString ,
155- key : '10' ,
154+ set : '10' ,
155+ key : randString ,
156156 score : 5 ,
157157 } )
158- console . log ( 'success: zScan ' , res12 ) ;
158+ console . log ( 'success: zAdd ' , res12 ) ;
159159
160160 // execute a batch read
161161 const res14 = await client . getAll ( {
0 commit comments