1 /* 2 * Copyright (C) 2019, HuntLabs 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 */ 17 18 module hunt.database.base.impl.SqlResultBase; 19 20 import hunt.database.base.SqlResult; 21 22 import hunt.collection.List; 23 import hunt.Exceptions; 24 25 import std.array; 26 import std.variant; 27 28 /** 29 * 30 */ 31 abstract class SqlResultBase(T, R) : SqlResult!(T) { // extends SqlResultBase!(T, R) 32 33 int _updated; 34 string[] _columnNames; 35 int _size; 36 R _next; 37 38 Variant[string] properties; 39 // override 40 // string[] columnsNames() { 41 // return _columnNames; 42 // } 43 44 void columnsNames(string[] v) { 45 this._columnNames = v; 46 } 47 48 // override 49 // int rowCount() { 50 // return _updated; 51 // } 52 53 // void rowCount(int v) { 54 // this._updated = v; 55 // } 56 57 // override 58 // int size() { 59 // return _size; 60 // } 61 62 void size(int v) { 63 this._size = v; 64 } 65 66 // override 67 // R next() { 68 // return _next; 69 // } 70 71 void next(R v) { 72 this._next = v; 73 } 74 75 override string toString() { 76 return super.toString(); 77 } 78 }