File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -726,6 +726,7 @@ ChainsqlAPI.prototype.beginTran = function () {
726726 this . transaction = true ;
727727 return ;
728728 }
729+ throw chainsqlError ( "connect is undefine or connect.address is undefine" )
729730}
730731
731732function handleCommit ( ChainSQL , object , resolve , reject ) {
@@ -1366,6 +1367,27 @@ ChainsqlAPI.prototype.modifySchema = function(schemaInfo){
13661367 return this ;
13671368} ;
13681369
1370+ ChainsqlAPI . prototype . deleteSchema = function ( schemaInfo ) {
1371+
1372+ let bValid = ( schemaInfo !== undefined )
1373+ && ( schemaInfo . SchemaID !== undefined )
1374+
1375+ if ( ! bValid ) {
1376+ throw new Error ( "Invalid deleteSchema parameter" ) ;
1377+ }
1378+
1379+ var schemaDeleteTxJson = {
1380+ Account : this . connect . address ,
1381+ SchemaID : schemaInfo . SchemaID ,
1382+ TransactionType : 'SchemaDelete'
1383+ } ;
1384+
1385+ // 修改子链
1386+ this . schemaModifyTx = true ;
1387+ this . payment = schemaDeleteTxJson ;
1388+ return this ;
1389+ } ;
1390+
13691391function callback ( data , callback ) {
13701392
13711393}
You can’t perform that action at this time.
0 commit comments