@@ -72,66 +72,5 @@ describe('optic-update lockForUpdate tests', function() {
7272
7373 } ) ;
7474
75- it ( 'test with uri column specified' , function ( done ) {
76- const options = serverConfiguration . serverVersion <= 11.1 ? null :
77- { 'update' : true } ;
78- db . rows . query ( op . fromDocUris ( '/optic/test/musician1.json' ) . lockForUpdate ( op . col ( 'uri' ) ) , options ) . then ( ( res ) => {
79- try {
80- res . rows . length . should . equal ( 1 ) ;
81- done ( ) ;
82- } catch ( e ) {
83- done ( e ) ;
84- }
85- } ) . catch ( e => done ( e ) ) ;
86- } ) ;
87-
88- it ( 'test with fromParam with custom uri' , function ( done ) {
89- const rows = [ { myUri : '/optic/test/musician1.json' } ] ;
90- const outputCols = [ { "column" : "myUri" , "type" : "string" , "nullable" : false } ] ;
91- const options = serverConfiguration . serverVersion <= 11.1 ? null :
92- { 'update' : true } ;
93- db . rows . query ( op . fromParam ( 'bindingParam' , null , outputCols ) . lockForUpdate ( op . col ( 'myUri' ) ) , options , { bindingParam : rows } ) . then ( ( res ) => {
94- try {
95- res . rows . length . should . equal ( 1 ) ;
96- done ( ) ;
97- } catch ( e ) {
98- done ( e ) ;
99- }
100- } ) . catch ( e => done ( e ) ) ;
101- } ) ;
102-
103- it ( 'test with fromParam with qualified uri column' , function ( done ) {
104- const rows = [ { myUri : '/optic/test/musician1.json' } ] ;
105- const outputCols = [ { "column" : "myUri" , "type" : "string" , "nullable" : false } ] ;
106- const options = serverConfiguration . serverVersion <= 11.1 ? null :
107- { 'update' : true } ;
108- db . rows . query ( op . fromParam ( 'bindingParam' , "myQualifier" , outputCols ) . lockForUpdate ( op . viewCol ( 'myQualifier' , 'myUri' ) ) ,
109- options , { bindingParam : rows } ) . then ( ( res ) => {
110- try {
111- res . rows . length . should . equal ( 1 ) ;
112- done ( ) ;
113- } catch ( e ) {
114- done ( e ) ;
115- }
116- } ) . catch ( e => done ( e ) ) ;
117- } ) ;
118-
119- it ( 'test with fromParam with custom uri and array response' , function ( done ) {
120- const rows = [ { myUri : '/optic/test/musician1.json' } ] ;
121- const outputCols = [ { "column" : "myUri" , "type" : "string" , "nullable" : false } ] ;
122- const options = { 'structure' : 'array' } ;
123- if ( serverConfiguration . serverVersion > 11.1 ) {
124- options . update = true ;
125- }
126- db . rows . query ( op . fromParam ( 'bindingParam' , null , outputCols ) . lockForUpdate ( op . col ( 'myUri' ) ) , options , { bindingParam : rows } ) . then ( ( res ) => {
127- try {
128- res [ 0 ] [ 0 ] . name . should . equal ( 'myUri' ) ;
129- res [ 1 ] [ 0 ] . value . should . equal ( '/optic/test/musician1.json' ) ;
130- done ( ) ;
131- } catch ( e ) {
132- done ( e ) ;
133- }
134- } ) . catch ( e => done ( e ) ) ;
135- } ) ;
13675 } ) ;
13776} ) ;
0 commit comments