If these IDs are actually strings can't you treat them as such in your data. I guess you are not trying to do any numeric operations like < or >
ChartMan On Tue, Sep 14, 2010 at 12:02 AM, Ben Burleson <[email protected]>wrote: > I found that the conversion happens when I parse the ID string into a > double, required by the NumberValue constructor. I'm still curious if > there is an easier way to construct a WHERE clause for a > SqlDataSourceHelper query. > > On Sep 13, 2:43 pm, Ben Burleson <[email protected]> wrote: > > I have successfully queried a MySQL database from my data source > > servlet, but it's not clear how to construct a custom query > > programatically. > > > > Say the table has three columns, ID, Timestamp, and Value. I want to > > get all rows with a given ID. I tried to build a query to pass to > > SqlDataSourceHelper.executeQuery(), and add a ColumnValueFilter to the > > query, but the NumberValue used to construct the ColumnValueFilter > > takes liberty to convert the value for comparison. > > > > In one example, the ID is 7480866925479195136, but the query that gets > > constructed and sent to MySQL is: > > SELECT * FROM TABLE WHERE (ID=7.4808669254791956E18) > > > > Is there a way to keep the NumberValue as a 64-bit int rather than a > > double? (The ID has to be 64-bit, I don't have control over that.) > > > > Or is there another way to approach this? A simpler way to query a > > MySQL database with SqlDataSourceHelper? I don't want to build a > > DataTable result by hand, but maybe that's the only option? > > > > Thanks, > > Ben > > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-visualization-api%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-visualization-api?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
