| 1 | // Code generated by 'yaegi extract database/sql'. DO NOT EDIT. |
| 2 | |
| 3 | //go:build go1.22 |
| 4 | // +build go1.22 |
| 5 | |
| 6 | package stdlib |
| 7 | |
| 8 | import ( |
| 9 | "database/sql" |
| 10 | "reflect" |
| 11 | ) |
| 12 | |
| 13 | func init() { |
| 14 | Symbols["database/sql/sql"] = map[string]reflect.Value{ |
| 15 | // function, constant and variable definitions |
| 16 | "Drivers": reflect.ValueOf(sql.Drivers), |
| 17 | "ErrConnDone": reflect.ValueOf(&sql.ErrConnDone).Elem(), |
| 18 | "ErrNoRows": reflect.ValueOf(&sql.ErrNoRows).Elem(), |
| 19 | "ErrTxDone": reflect.ValueOf(&sql.ErrTxDone).Elem(), |
| 20 | "LevelDefault": reflect.ValueOf(sql.LevelDefault), |
| 21 | "LevelLinearizable": reflect.ValueOf(sql.LevelLinearizable), |
| 22 | "LevelReadCommitted": reflect.ValueOf(sql.LevelReadCommitted), |
| 23 | "LevelReadUncommitted": reflect.ValueOf(sql.LevelReadUncommitted), |
| 24 | "LevelRepeatableRead": reflect.ValueOf(sql.LevelRepeatableRead), |
| 25 | "LevelSerializable": reflect.ValueOf(sql.LevelSerializable), |
| 26 | "LevelSnapshot": reflect.ValueOf(sql.LevelSnapshot), |
| 27 | "LevelWriteCommitted": reflect.ValueOf(sql.LevelWriteCommitted), |
| 28 | "Named": reflect.ValueOf(sql.Named), |
| 29 | "Open": reflect.ValueOf(sql.Open), |
| 30 | "OpenDB": reflect.ValueOf(sql.OpenDB), |
| 31 | "Register": reflect.ValueOf(sql.Register), |
| 32 | |
| 33 | // type definitions |
| 34 | "ColumnType": reflect.ValueOf((*sql.ColumnType)(nil)), |
| 35 | "Conn": reflect.ValueOf((*sql.Conn)(nil)), |
| 36 | "DB": reflect.ValueOf((*sql.DB)(nil)), |
| 37 | "DBStats": reflect.ValueOf((*sql.DBStats)(nil)), |
| 38 | "IsolationLevel": reflect.ValueOf((*sql.IsolationLevel)(nil)), |
| 39 | "NamedArg": reflect.ValueOf((*sql.NamedArg)(nil)), |
| 40 | "NullBool": reflect.ValueOf((*sql.NullBool)(nil)), |
| 41 | "NullByte": reflect.ValueOf((*sql.NullByte)(nil)), |
| 42 | "NullFloat64": reflect.ValueOf((*sql.NullFloat64)(nil)), |
| 43 | "NullInt16": reflect.ValueOf((*sql.NullInt16)(nil)), |
| 44 | "NullInt32": reflect.ValueOf((*sql.NullInt32)(nil)), |
| 45 | "NullInt64": reflect.ValueOf((*sql.NullInt64)(nil)), |
| 46 | "NullString": reflect.ValueOf((*sql.NullString)(nil)), |
| 47 | "NullTime": reflect.ValueOf((*sql.NullTime)(nil)), |
| 48 | "Out": reflect.ValueOf((*sql.Out)(nil)), |
| 49 | "RawBytes": reflect.ValueOf((*sql.RawBytes)(nil)), |
| 50 | "Result": reflect.ValueOf((*sql.Result)(nil)), |
| 51 | "Row": reflect.ValueOf((*sql.Row)(nil)), |
| 52 | "Rows": reflect.ValueOf((*sql.Rows)(nil)), |
| 53 | "Scanner": reflect.ValueOf((*sql.Scanner)(nil)), |
| 54 | "Stmt": reflect.ValueOf((*sql.Stmt)(nil)), |
| 55 | "Tx": reflect.ValueOf((*sql.Tx)(nil)), |
| 56 | "TxOptions": reflect.ValueOf((*sql.TxOptions)(nil)), |
| 57 | |
| 58 | // interface wrapper definitions |
| 59 | "_Result": reflect.ValueOf((*_database_sql_Result)(nil)), |
| 60 | "_Scanner": reflect.ValueOf((*_database_sql_Scanner)(nil)), |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | // _database_sql_Result is an interface wrapper for Result type |
| 65 | type _database_sql_Result struct { |
| 66 | IValue interface{} |
| 67 | WLastInsertId func() (int64, error) |
| 68 | WRowsAffected func() (int64, error) |
| 69 | } |
| 70 | |
| 71 | func (W _database_sql_Result) LastInsertId() (int64, error) { return W.WLastInsertId() } |
| 72 | func (W _database_sql_Result) RowsAffected() (int64, error) { return W.WRowsAffected() } |
| 73 | |
| 74 | // _database_sql_Scanner is an interface wrapper for Scanner type |
| 75 | type _database_sql_Scanner struct { |
| 76 | IValue interface{} |
| 77 | WScan func(src any) error |
| 78 | } |
| 79 | |
| 80 | func (W _database_sql_Scanner) Scan(src any) error { return W.WScan(src) } |