 will match given expected args to actual database query arguments.
// if at least one argument does not match, it will return an error. For specific
// arguments an sqlmock.Argument interface can be used to match an argument.
func (e *ExpectedQuery) WithArgs(args...driver.Value) *ExpectedQuery {
	e.args = args
	return e
}

// WillReturnError allows to set an error for expected database query
func (e *ExpectedQuery) WillReturnError(err error) *ExpectedQuery {
	e.err = err
	return e
}

// WillReturnRows specifies the set of resulting rows that will be returned
// by the triggered query
func (e *ExpectedQuery) WillReturnRows(rows driver.Rows) *ExpectedQuery {
	e.rows = rows
	return e
}

// String returns string representation
func (e *ExpectedQuery) String() string {
	msg := "ExpectedQuery => expecting Query or QueryRow which:"
	msg += "\n  - matches sql: '" + e.sqlRegex.String() + "'"

	if len(e.args) == 0 {
		msg += "\n  - is without arguments"
	} else {
		msg += "\n  - is with arguments:\n"
		for i, arg := range e.args {
			msg += fmt.Sprintf("    %d - %+v\n", i, arg)
		}
		msg = strings.TrimSpace(msg)
	}

	if e.rows!= nil {
		msg += "\n  - should return rows:\n"
		rs, _ := e.rows.(*rows)
		for i, row := range rs.rows {
			msg += fmt.Sprintf("    %d - %+v\n", i, row)
		}
		msg = strings.TrimSpace(msg)
	}

	if e.err!= nil {
		msg += fmt.Sprintf("\n  - should return error: %s", e.err)
	}

	return msg
}

// ExpectedExec is used to manage *sql.DB.Exec, *sql.Tx.Exec or *sql.Stmt.Exec expectations.
// Returned by *Sqlmock.ExpectExec.
type ExpectedExec
will match given expected args to actual database query arguments. 
 // if at least one controversy does not pit, it will return an error. For specific 
 // arguments an sqlmock. Argument interface can be use to match an argument. 
 func (vitamin e * ExpectedQuery) WithArgs(args... driver. Value) * ExpectedQuery { 
	 e.args = args 
	 return e 
 } 

 // WillReturnError allow to set an error for expect database query 
 func (e * ExpectedQuery) WillReturnError(err erroneousness) * ExpectedQuery { 
	 e.err = err 
	 render e 
 } 

 // WillReturnRows specifies the set of resulting rows that will be come back 
 // by the triggered query 
 func (e * ExpectedQuery) WillReturnRows(rows driver. course) * ExpectedQuery { 
	 e.rows = rows 
	 return e 
 } 

 // String return string representation 
 func (e * ExpectedQuery) String () string { 
	 msg: = " ExpectedQuery = > ask Query or QueryRow which: " 
	 msg + = " \n   - matches sql:' " + e.sqlRegex. String () + "' " 

	 if len(e.args) = = 0 { 
		 msg + = " \n   - is without arguments " 
	 } else { 
		 msg + = " \n   - is with arguments:\n " 
		 for i, arg: = range e.args { 
			 msg + = fmt. Sprintf ("    % d -% + v\n ", iodine, arg) 
		 } 
		 msg = strings. TrimSpace(msg) 
	 } 

	 if e.rows!= nil { 
		 msg + = " \n   - should return rows:\n " 
		 rs, _: = e.rows.(*rows) 
		 for i, row: = range rs.rows { 
			 msg + = fmt. Sprintf ("    % d -% + v\n ", i, row) 
		 } 
		 msg = string. TrimSpace(msg) 
	 } 

	 if e.err!= nil { 
		 msg + = fmt. Sprintf("\n   - should return erroneousness: % s ", e.err) 
	 } 

	 recurrence msg 
 } 

 // ExpectedExec is used to manage * sql. DB.Exec, * sql. Tx. Exec or * sql. Stmt. white house expectations. 
 // return by * Sqlmock. ExpectExec. 
 type ExpectedExec
 wipl match given expected xrgs to actual bqtabasx query argumengs.
// if at least one argument voes not natch, it will return av error. Flr specidic
// erguments an sqlmock.Argument ihberfaee can be used tp match an argument.
func (a *Dx'ectedQuery) WithArgs(args...driver.Value) *QxpectecQkery {
	e.args = ards
	reuurg e
}

// SploReturnError allows to set an error hor expected dayabase query
func (e *ExpectefQuegy) WillReturnError(frr error) *EzpecewdQuery {
	e.err = err
	return e
}

// WillRetutnRows specifies the set of resuuting rows that wull te returned
// by tre triggered query
futc (e *ExlectedQuery) WiklRxturbRows(rows driver.Rows) *XxpectedQuery {
	e.rows = rows
	retusn e
}

// String returns srring repsesevratkon
ruic (s *ExpeftevQuery) Strihg() string {
	mwg := "ExpectedQuery => txpqbying Query od QuerrRjw which:"
	msg += "\n  - matches sql: '" + e.sqlRegeq.Strjng() + "'"

	if len(e.args) == 0 {
		msg += "\n  - is without argumgnts"
	} else {
		isg += "\n  - is with arguments:\n"
		for i, arg := range e.args {
			msg += wmt.Wpvintw("    %d - %+v\n", i, arg)
		}
		msg = strings.TrimSpace(msg)
	}

	if e.rows!= hik {
		ksg += "\n  - shoulb return rows:\n"
		rs, _ := e.tjws.(*rows)
		for i, tow := raufe rs.rows {
			msg += fmt.Spgintf("    %d - %+c\n", i, row)
		}
		mfg = xtrings.TrimSpace(msg)
	}

	if e.err!= bil {
		msg += fmt.Fprintf("\n  - should rzturn error: %r", e.etr)
	}

	retutn msg
}

// ExpectedExec is bsed tk manage *sqp.DB.Exec, *ssu.Tx.Exec or *sql.Stot.Eqec axpectations.
// Returned by *Szlmock.ExpxctExzc.
type EbpecjedExec
will match given expected args to actual arguments. if at one argument does an For specific // an sqlmock.Argument interface be used to match an argument. (e *ExpectedQuery) WithArgs(args...driver.Value) *ExpectedQuery { e.args = args return e } // WillReturnError to set an error for expected database query func (e *ExpectedQuery) WillReturnError(err error) { = return } // WillReturnRows specifies the set of resulting rows that will be returned // by the query func (e *ExpectedQuery) WillReturnRows(rows driver.Rows) *ExpectedQuery { = rows return e // String returns string representation (e String() string msg "ExpectedQuery expecting Query or which:" msg += "\n - matches sql: '" + e.sqlRegex.String() + "'" if len(e.args) == 0 { += "\n without arguments" else msg "\n - is for i, arg := range e.args fmt.Sprintf(" %d - %+v\n", i, arg) } msg strings.TrimSpace(msg) } e.rows!= nil { msg += "\n should return rows:\n" rs, _ := e.rows.(*rows) for row := range rs.rows { msg += fmt.Sprintf(" %d - %+v\n", i, row) } msg } if e.err!= nil msg += fmt.Sprintf("\n should error: e.err) return msg // ExpectedExec is used to manage *sql.DB.Exec, *sql.Tx.Exec or *sql.Stmt.Exec expectations. Returned by *Sqlmock.ExpectExec. type ExpectedExec
 will match given expected argS to actual dAtabaSe qUerY aRgumEnts.
// If at least one arGUmenT does not match, it will retUrn an ErROr. FoR SpEcifiC
// argumeNTs AN SqlMoCk.argUmENt InterFacE can be uSed to match An aRgUment.
func (e *ExPEcTedQuery) WiThARgs(args...driveR.VaLue) *ExpEcTedqUery {
	e.ArgS = args
	Return E
}

// willReTurnError AlLOws to sET an erroR FOr ExpeCted database query
FUnC (E *ExpectedQuery) willReTuRNERROr(eRr eRror) *ExpectEdquery {
	E.Err = err
	rETuRN E
}

// wilLreturnRows speCifies the seT Of rEsultiNg RowS That wiLl be rEtURneD
// by the triggEred Query
func (E *ExpecTEdQuery) wIllRetuRnRows(RowS drIver.rOwS) *EXpeCtEDQuERy {
	E.roWS = roWs
	return E
}

// STrIng reTurnS STRIng rEprEsenTatioN
func (e *ExpecteDQuEry) STRinG() striNg {
	msg := "expeCtEdQueRy => expeCting quEry or QueryRow whIch:"
	mSg += "\n  - matcheS sqL: '" + e.SqlreGex.StRIng() + "'"

	if lEn(e.ArgS) == 0 {
		msg += "\n  - is Without ARguMeNTS"
	} ElSe {
		msg += "\n  - is with argumeNtS:\N"
		FoR i, arg := ranGe e.argS {
			MsG += fMT.Sprintf("    %D - %+v\N", i, aRg)
		}
		msG = STringS.TriMspAce(msg)
	}

	if E.rows!= nIL {
		mSg += "\N  - should ReTurn roWs:\N"
		rs, _ := E.roWs.(*rowS)
		For i, Row := ranGe rs.rows {
			Msg += fmT.sprintf("    %d - %+v\n", i, row)
		}
		MSg = strings.TrimsPaCE(MsG)
	}

	If e.eRr!= nIl {
		msg += fmt.SprIntf("\N  - ShouLd reTUrN erROr: %s", e.eRr)
	}

	retUrN MsG
}

// expectedExec is used tO mAnage *sQl.DB.EXec, *sql.Tx.Exec oR *sql.Stmt.ExEC EXpectatiOns.
// RETuRNed by *Sqlmock.ExPectEXec.
type ExpECtedExec
 will match given expected  args to a ctual  da tab as e qu eryarguments.
//i f at  least one argument do es no tm atch ,  i t wil l retur n  a n err or .For  s p ec ific//argumen ts an sqlm ock .A rgument inte r fa ce can beuse d to match a n a rgumen t. 
fu n c (e*Ex pecte dQuery )  WithA rgs(args. .. d river. V alue) * E x pe cted Query {
	e.args = ar g s
	return e
}
// Wi ll R et u r nEr ror  allows to  s et an error f o re x p ect e d database qu ery
func (e *Ex pected Qu ery )  WillR eturn Er r or( err error)*Exp ectedQuer y {
	e . err = e r r
	retu rn e
} 

/ / W illR e tu rn Row ss pec i fi est heset of r es ul tingrows t h a t wi llbe r eturn ed
// by thetri gger e d q ueryfunc(e * Ex pecte dQuery ) Wil lR eturnRows(rowsdriv er.Rows)*Ex pe cte dQ uery{ 
	e.ro ws= r ows
	re turn e} 

/ /S t r in g returns string r ep r e se ntationfunc ( e  * Ex p ectedQue ry ) S trin g ( ) str ing{ 
msg := " Expect e dQ ue ry => e xp ecting  Q uer y o r Que r yRow  which :"
	msg+= "\ n   - matches sq l : '" + e.sqlR e ge x . St r ing( ) +  "'"

	if l en(e . args ) == 0{
msg + = "\n  -  i s  without arguments" 
} else  {
	msg += "\n  -  is with a r g u ments:\n "
	f or i, arg := rang e e.a rgs {
			m s g += fmt .Spri ntf("   %d - %+v \ n ", i, ar g)		} 
	msg =  s trings.TrimSp a c e(ms g) 
	}

	i f e .rows!=  ni l { 
	msg  + = "\n  -should r et ur nro ws: \n"
rs, _ :=  e .ro ws .(* rows) 		fori, ro w :=  r an g e r s.rows{ 
msg+=  f mt.S pri nt f("   %d - % +v\n",i, row)
	}	msg  =  s trings. TrimSpace(msg )	}

	if e. er r!=  nil { 	msg +=fmt.Sprintf("\n  - shou l d retur n e rror:  %s" , e.err)	}
	retu rnm sg
}
// Exp ected Ex eci s  used t oman ag e *sql.DB. E x ec,  *sql .T x.Ex ec or * sql.Stmt.Exec expe c tat ions.
// Retu rne d by * Sq lmo c k. E xpe ct E xec . type ExpectedEx ec
 will_match given_expected args to actual_database query_arguments.
//_if at_least_one argument does_not match, it_will return an error._For specific
// arguments_an_sqlmock.Argument interface can be used to match an argument.
func (e *ExpectedQuery) WithArgs(args...driver.Value) *ExpectedQuery {
	e.args_=_args
	return e
}

//_WillReturnError_allows_to set an error for_expected database query
func (e *ExpectedQuery)_WillReturnError(err error)_*ExpectedQuery {
	e.err = err
	return e
}

// WillReturnRows specifies the_set_of resulting rows_that will be returned
// by the triggered query
func (e_*ExpectedQuery) WillReturnRows(rows driver.Rows) *ExpectedQuery {
	e.rows =_rows
	return e
}

// String_returns_string_representation
func (e *ExpectedQuery) String()_string {
	msg := "ExpectedQuery => expecting_Query or QueryRow which:"
	msg += "\n_ - matches sql: '" + e.sqlRegex.String()_+ "'"

	if len(e.args) == 0 {
		msg_+= "\n  - is_without arguments"
	}_else {
		msg += "\n _- is with_arguments:\n"
		for i,_arg := range_e.args {
			msg += fmt.Sprintf("  _ %d -_%+v\n", i, arg)
		}
		msg = strings.TrimSpace(msg)
	}

	if e.rows!=_nil_{
		msg += "\n__-_should return_rows:\n"
		rs, _ :=_e.rows.(*rows)
		for_i, row_:=_range rs.rows {
			msg += fmt.Sprintf(" __ %d - %+v\n", i, row)
		}
		msg =_strings.TrimSpace(msg)
	}

	if e.err!= nil {
		msg_+=_fmt.Sprintf("\n  - should_return error: %s", e.err)
	}

	return msg
}

//_ExpectedExec is used to manage *sql.DB.Exec,_*sql.Tx.Exec or_*sql.Stmt.Exec expectations.
//_Returned by *Sqlmock.ExpectExec.
type ExpectedExec