Skip to content

Commit 323c3d3

Browse files
committed
modify createtable definition
1 parent 81cf3ee commit 323c3d3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

solidity-example/solidity-TableTxs.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ contract DBTest {
55
* @param tableName eg: "test1"
66
* @param raw eg: "[{\"field\":\"id\", \"type\" : \"int\", \"length\" : 11, \"PK\" : 1, \"NN\" : 1, \"UQ\" : 1}, { \"field\":\"account\", \"type\" : \"varchar\" }, { \"field\":\"age\", \"type\" : \"int\" }]"
77
*/
8-
function create(string tableName, string raw) public returns(bool) {
9-
return msg.sender.create(tableName, raw);
8+
function create(string tableName, string raw) public{
9+
bool ret = msg.sender.create(tableName, raw);
10+
require(ret,"create table failed");
1011
}
1112
/*
1213
* @param tableName eg: "test1"

0 commit comments

Comments
 (0)