I am using Microsoft Enterprise Library IRowMapper for getting data and mapping to result set, but is there any possibility of using IRowMapper for inserting data?
Related
I am working on datastore datasource for apache-spark based on spark datasource V2 api. I was able to implement using hard-coded single entity but couldn't generalize it. Either I need to infer entity schema and translate entity record into Spark Row or read entity record as json and let the user translate into scala product (datastore java client is REST based so the payload is being pulled as json). I could see "entity.properties" as json key-values from within IntelliJ debugger which includes everything I need (column name, value, type etc.) but I can't use entity.properties due to access restrictions. Appreciate any ideas.
fixed by switching to low level API https://github.com/GoogleCloudPlatform/google-cloud-datastore
full source for spark-datastore-connector https://github.com/sgireddy/spark-datastore-connector
I am developing an API using ASP.Net WEB API + Odata to query and filter those data. But rather than using entity framework to retrieve data,i am using ADO.Net to get data from Stored Procedures.
Its working fine but to apply Odata filtering first i have to retrieve
all the records from the database. If the table cotains more than 1
million records then the server will just hang.
This is a sample code i am using,
List<ApplicationProduct> res = applicationBL.GetApplicationProducts(key, SyndicateKey);
if (res.Count > 0)
{
Request.ODataProperties().TotalCount = res.Count();
GenarateNextLink(key, res.Count, Convert.ToString(Request.RequestUri).Contains("$top"));
SetCacheDuration(1);
return Ok(res.AsQueryable());
}
So i have to find a way to generate the query dynamically so filters are applied first and then we dont have to load all the records from the database. Is it possible using OData ? Or is there any other way?
Thank You.
I need to read data from existing database is it possible using
compile "org.grails.plugins:db-reverse-engineer:4.0.0"?
My operations are: user should read data from existing table, create new record, create new coulmn, edit coulmn name, edit records.
View format will be in grid like xml grid.
Which technology is the best for these operations in grails, I have plan to work on javascript using jaxrs, is it good to do?
DB Reverse Engineering Plugin (org.grails.plugins:db-reverse-engineer:4.0.0) allows you to generate domain classes using existing DB. After you generate them - just use GORM to perform CRUD operations. You can read about GORM here
You can implement REST api in Grails using standart ways, check this answer to get high level understanding. If you need jaxrs- there is a plugin for that.
Using EF3.5 with Visual Studio 2010 (cannot upgrade to EF4 at this point - don't ask!).
Wanting to create a stored procedure that aggregates some fields from some related tables and materialize the result of the stored procedure as a custom "entity". This custom entity would be "read only". I set up the custom entity, the stored procedure, and function import. When I build my Entity project, I get the following:
Error 35 Error 3027:
No mapping specified for the following
EntitySet/AssociationSet -
MyCustomEntitySet
It looks like it wants a table mapping defined for my custom entity, however, I would not have one in this case since it aggregates the data over several tables (and filters out some unneccessary data).
Is it possible to map a custom entity to a stored procedure? Is it possible to do so in a way where the "Update Model From Database" functionality will not break the custom entity or stored proc/function import mapping?
TIA!
We used to get around this by creating a view in the db - the view never actually gets used if you map to stored procedures but it does enable auto-creation of the correct mappings in the entity.
Typically for fairly straight forward procs you can copy/paste the sql to generate the view too - saves some time.
I am using Entity Framework now and using a stored procedure to populate my entity.
Where there is no problem with populating my entity, but when i trying to bind the result to a gridview control with "Enable Paging" set to true, it gives an error saying
"The data source does not support server-side data paging."
I am using stored procedure because one of the table column is FullTextIndexed, and there is a requirement to be able to search on that field.
Can anyone tell me how the paging would work in this situation?
I don't have a lot of experiences using the DataSource controls. I usually handle my own data retrieval / binding. Having said that I would allow the stored procedure to return only the records that are being requested (ie. 10-12 for page 2).