Error while getting schema in for mysql

2016-07-06 Thread Arunkumar Pillai
Hi I'm trying to list all table names from a schema I'm getting the following error String connectionURL = "jdbc:mysql://localhost:3306"; String userName = "user"; String password = "pass"; DataContext dataContext = DataContextFactory.createJdbcDataContext(conne

How to get list of all schemas and tables present in the database

2016-07-05 Thread Arunkumar Pillai
Hi How to get list of all schemas using apache metamodel ? The database may be any ? How to get list of all tables for the selected schemas? -- Thanks and Regards Arun

Re: [VOTE] Apache Metamodel release 4.5.2

2016-03-21 Thread Arunkumar Pillai
+ 1 On Mon, Mar 21, 2016 at 3:19 PM, Pesu, Claudia < claudia.p...@humaninference.com> wrote: > +1 > > > > *From:* Alessandro Portosa [mailto:alessandro.port...@eng.it] > *Sent:* 21. marts 2016 09:56 > *To:* dev@metamodel.apache.org > *Subject:* Re: [VOTE] Apache Metamodel release 4.5.2 > > > > +1

Re: [VOTE] Apache Metamodel release 4.5.1

2016-02-09 Thread Arunkumar Pillai
+1 On Tue, Feb 9, 2016 at 10:15 PM, Ankit Kumar wrote: > +1 > > Regards > Ankit > > > On 09 Feb 2016, at 15:33, Alberto Rodriguez wrote: > > > > +1 > > > > 2016-02-09 15:20 GMT+01:00 Tomasz Guziałek : > > > >> +1 > >> > >> Pozdrawiam / Regards / Med venlig hilsen > >> Tomasz Guziałek > >> > >>

any road map for returning auto generated key

2016-02-09 Thread Arunkumar Pillai
Hi Is there any road map for returning auto generated key? it is only thing which stops moving completely to apache meta model. -- Thanks and Regards Arun

Re: Batch insert using Apache metamodel

2016-02-05 Thread Arunkumar Pillai
Thanks Kasper On Fri, Feb 5, 2016 at 12:00 PM, Kasper Sørensen < i.am.kasper.soren...@gmail.com> wrote: > That looks correct. You're inserting it in one go. > Consider BatchUpdateScript instead of UpdateScript if it's just a big bulk > like this. > Den 05/02/2016 5.2

Re: Batch insert using Apache metamodel

2016-02-04 Thread Arunkumar Pillai
e inside an UpdateScript - then everything is > happening in one big bulk/transaction. If the loop is outside then you're > likely to suffer under a very chatty (and non-transactional) interaction > with the DB. > > Kasper > > 2016-02-04 5:22 GMT+01:00 Arunkumar Pillai : &g

Batch insert using Apache metamodel

2016-02-03 Thread Arunkumar Pillai
Hi Do we have any better way to insert multiple records together. current i'm using loop? Please suggest if there any better ways -- Thanks and Regards Arun

Re: [VOTE] Apache Metamodel release 4.5.0

2015-12-14 Thread Arunkumar Pillai
+1 On Mon, Dec 14, 2015 at 10:32 PM, Tomasz Guziałek wrote: > +1 > > Pozdrawiam / Regards / Med venlig hilsen > Tomasz Guziałek > > 2015-12-14 16:51 GMT+01:00 Ankit Kumar : > > > +1 > > > > ~Ankit > > > > > On 14 Dec 2015, at 12:48, Du Krøger, Dennis > > wrote: > > > > > > +1 > > > > > > -O

Returning Auto Generated key when inserting

2015-12-09 Thread Arunkumar Pillai
Hi Please suggest a method to return auto generated key. I know it is big change in current meta model. I'm able to execute all other queries using apache metamodel. Only returning generated key is pending. This is a web application. so returning last generated key also not recommended to use. --

Re: How to use joins using apache meta modes

2015-12-06 Thread Arunkumar Pillai
; > Try > > > writing your query in such a manner: > > > > > > > > > > > > dataContext.query().from("tableA").and("tableB").selectAll().where("joinColumnFromA").eq("joinColumnFromB").executeQuery(); > > > > &

Re: How to use joins using apache meta modes

2015-12-06 Thread Arunkumar Pillai
ontext.query().from("tableA").and("tableB").selectAll().where("joinColumnFromA").eq("joinColumnFromB").executeQuery(); > > > > Pozdrawiam / Regards / Med venlig hilsen > > Tomasz Guziałek > > > > 2015-12-04 11:19 GMT+01:00 A

How to use joins using apache meta modes

2015-12-04 Thread Arunkumar Pillai
Please help in executing the following queries SELECT a.id as ID, a.a_name as a_NAME ,b.user_name FROM TB_a a inner join TB_b b on b.id = a.id WHERE a.active = 1 I'm not finding any examples for joins or directly converting the sql queries to meta model query -- Thanks and Regar

Re: Help in Inserting current Timestamp

2015-12-04 Thread Arunkumar Pillai
Thanks for the quick respone On Fri, Dec 4, 2015 at 2:16 PM, Du Krøger, Dennis < dennis.dukro...@humaninference.com> wrote: > Unless you need the server time, you can just provide it with "new Date()" > > -Original Message- > From: Arunkumar Pillai [mailto:aru

Help in Inserting current Timestamp

2015-12-04 Thread Arunkumar Pillai
Hi is there any way to insert the current date time using apache meta model. like we give now() in mysql and postgresql My code def run(callback: UpdateCallback): Unit = { val table: Table = schema.getTableByName("TABLE_NAME") callback.insertInto(table).value("id",id).value("CurrentT

Re: Need Help in retrieving columns having NULL Values

2015-11-25 Thread Arunkumar Pillai
umn1.toString >} >if (column2 != null) { > val column2StrVal = column2.toString >} > } > > BTW I also fixed indexes in the getValue calls - there were two times 0. I > hope that helps! > > Pozdrawiam / Regards / Med venlig hilse

Need Help in retrieving columns having NULL Values

2015-11-24 Thread Arunkumar Pillai
Hi I'm using select query to fetch records and my code is as follows val connection = DB.getConnection() val dataContext:DataContext = DataContextFactory.createJdbcDataContext(connection) var query:Query = dataContext.query().from("TABLE_NAME").select("COLUMN1").select("COLUMN2").toQuer

auto generated key and getting null value from database

2015-11-24 Thread Arunkumar Pillai
Hi I'm not able to get the auto generated value from insert statement and also if column has null value row.getValues is throwing error. Also how to pass multiple parameters to compiled Query