selectProvider

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

selectProvider

charleymorganinchina
What is the difference between #{} in selectprovider and #{} in xml?

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: selectProvider

Guy Rouillier-2
------ Original Message ------
To: "mybatis-user" <[hidden email]>
Sent: 11/29/2018 3:15:40 AM
Subject: selectProvider

What is the difference between #{} in selectprovider and #{} in xml?


They mean the same thing, they are parameter placeholders.  The SelectProvider simply supplies the SQL SELECT statement that you would otherwise type by hand in the XML file.  The rest of the MyBatis framework remains the same.

--
Guy Rouillier


--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: selectProvider

charleymorganinchina
image.pngI want to pass item to #{} and get the item's Member variables,but it's Incorrect,right?

Guy Rouillier <[hidden email]> 于2018年11月29日周四 下午4:26写道:
------ Original Message ------
To: "mybatis-user" <[hidden email]>
Sent: 11/29/2018 3:15:40 AM
Subject: selectProvider

What is the difference between #{} in selectprovider and #{} in xml?


They mean the same thing, they are parameter placeholders.  The SelectProvider simply supplies the SQL SELECT statement that you would otherwise type by hand in the XML file.  The rest of the MyBatis framework remains the same.

--
Guy Rouillier


--
You received this message because you are subscribed to a topic in the Google Groups "mybatis-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mybatis-user/6RPqsNQmu_A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re[2]: selectProvider

Guy Rouillier-2
I'm having trouble reading your inline images, even using an on-screen magnifier.  But the SQL does not appear to be correct.  The code has a FOR loop over attributes, and inside the loop is a SELECT statement.  That means if there are (for example) 3 elements in your attributes list, the FOR loop is going to generate 3 SELECT statements, separated by commas, which is invalid SQL.

--
Guy Rouillier

------ Original Message ------
From: "莫昌廉" <[hidden email]>
Sent: 11/29/2018 3:35:02 AM
Subject: Re: selectProvider

image.pngI want to pass item to #{} and get the item's Member variables,but it's Incorrect,right?

Guy Rouillier <[hidden email]> 于2018年11月29日周四 下午4:26写道:
------ Original Message ------
To: "mybatis-user" <[hidden email]>
Sent: 11/29/2018 3:15:40 AM
Subject: selectProvider

What is the difference between #{} in selectprovider and #{} in xml?


They mean the same thing, they are parameter placeholders.  The SelectProvider simply supplies the SQL SELECT statement that you would otherwise type by hand in the XML file.  The rest of the MyBatis framework remains the same.

--
Guy Rouillier


--
You received this message because you are subscribed to a topic in the Google Groups "mybatis-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mybatis-user/6RPqsNQmu_A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Re[2]: selectProvider

charleymorganinchina
sorry,I cut screen by computor,so I don't know you will have trouble. The  SELECT can be called multiple times, parameters will also be added to the SELECT clause.

Guy Rouillier <[hidden email]> 于2018年11月29日周四 下午4:53写道:
I'm having trouble reading your inline images, even using an on-screen magnifier.  But the SQL does not appear to be correct.  The code has a FOR loop over attributes, and inside the loop is a SELECT statement.  That means if there are (for example) 3 elements in your attributes list, the FOR loop is going to generate 3 SELECT statements, separated by commas, which is invalid SQL.

--
Guy Rouillier

------ Original Message ------
From: "莫昌廉" <[hidden email]>
Sent: 11/29/2018 3:35:02 AM
Subject: Re: selectProvider

I want to pass item to #{} and get the item's Member variables,but it's Incorrect,right?

Guy Rouillier <[hidden email]> 于2018年11月29日周四 下午4:26写道:
------ Original Message ------
To: "mybatis-user" <[hidden email]>
Sent: 11/29/2018 3:15:40 AM
Subject: selectProvider

What is the difference between #{} in selectprovider and #{} in xml?


They mean the same thing, they are parameter placeholders.  The SelectProvider simply supplies the SQL SELECT statement that you would otherwise type by hand in the XML file.  The rest of the MyBatis framework remains the same.

--
Guy Rouillier


--
You received this message because you are subscribed to a topic in the Google Groups "mybatis-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mybatis-user/6RPqsNQmu_A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "mybatis-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mybatis-user/6RPqsNQmu_A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

image.png (47K) Download Attachment
image.png (47K) Download Attachment