Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Per-Åke Minborg
    @minborg
    :-) Thanks!
    vishnu2497
    @vishnu2497

    Hi @minborg

    i am having some set of data and i want to store it to the Database.For this purpose what kind of operation we have to do?

    is there any way to store whole list at a same time?

    Per-Åke Minborg
    @minborg
    Yes. As described here https://speedment.github.io/speedment-doc/crud.html#create-with-persist you can apply the persister() to a stream of entities. For example, myFilmList.forEach(films.persister())). If performance is important, do the updates in a transaction as described here https://speedment.github.io/speedment-doc/crud.html#transactions
    vishnu2497
    @vishnu2497
    Thanks @minborg
    Is there any operation for truncate the whole table in the Database..Because in the document it is saying like only remove some rows based on the condition. @minborg
    Per-Åke Minborg
    @minborg
    You can remove all rows in a table by streaming in a transaction as described https://speedment.github.io/speedment-doc/crud.html#transactions If performance is important, it is probably best to do this via SQL (e.g. DELETE FROM sometable)
    There is no specific way of trunkating a table i Speedment.
    Sreeja
    @sreejaepuri
    Hi @minborg
    Sreeja
    @sreejaepuri
    is it possible to pass a list through speedment for retrieving data?
    Per-Åke Minborg
    @minborg
    Hi @sreejaepuri Can you elaborate a bot more. Do you mean that you have, for example, a list of id:s and then you want to retrieve some entities with those id:s?
    Sreeja
    @sreejaepuri
    i am having list of id's and i want those id only to be retrieved from the DB. (Instead of whole table only selected Rows)
    We can also done by using filter,But for applying filter it takes whole data from DB. That's why is there any option like that......
    Per-Åke Minborg
    @minborg
    Yes you can! There is a predicate called in() that is perfect for that. See https://speedment.github.io/speedment-doc/predicate.html#in
    .filter(Film.ID.in(myIdSet)) for example.
    Put the id:s in a Set rather than in a List
    (you can use a List if you want, bus Set gives better performance)
    Sreeja
    @sreejaepuri
    But at the time of filter only it will compare all the data from db with the given predicate right
    or otherwise it will take only that particular records from db?
    Per-Åke Minborg
    @minborg
    If you add the filter to your stream, Speedment will render an SQL query like SELECT … FROM file WHERE (id in (1, 6, 7, 2, 7))
    So it will only take those particular records from the db.
    You can see exactly what is sent to the database by adding .withLogging(LogType.STREAM) to your application bulder.
    Sreeja
    @sreejaepuri
    Thank u so much @minborg
    Per-Åke Minborg
    @minborg
    Speedment 3.2.0 is imminent. It will provide support for the Java Module System (JPMS) and allow small custom JREs to run efficently in the cloud!
    vishnu2497
    @vishnu2497
    Hi @minborg

    I am having a list of data and the size of the list is 100000.

    using the persist we have to store one by one data,is there any operation to perform whole list insert to db at same time?

    Per-Åke Minborg
    @minborg
    Use transactions to speed up the inserts as described here: https://speedment.github.io/speedment-doc/crud.html#transactions
    Per-Åke Minborg
    @minborg
    @vishnu2497 There is a project called MapStruct that you can use for mapping between different entities. https://github.com/mapstruct/mapstruct
    Per-Åke Minborg
    @minborg
    Speedment 3.2.0 is released now. It contains support for the Java Module System (JPMS) which can be used to write efficent micro services.
    vishnu2497
    @vishnu2497
    Thanks @minborg for suggesting MapStruct.I am having a question that i have 200000 records and using transaction/Persist it stores 1000 records/second.If is there any better way to increase the speed of storing or otherwise is there any better way to use transaction effectively to increase the data storing into Db?
    Per-Åke Minborg
    @minborg
    If the order is not significant you can divide your 200,000 records into say 8 parts and have 8 threads do the work in parallel.
    Each thread has its own transaction.
    vishnu2497
    @vishnu2497
    Hi @minborg is there any method that act for both save and upadate the records into db
    Per-Åke Minborg
    @minborg
    @vishnu2497 Hi again! You mean you do not know if it exists and if it does, it shall be updated, otherwise inserted?
    vishnu2497
    @vishnu2497
    ya exactly @minborg
    Per-Åke Minborg
    @minborg
    We will introduce merge and merger in the coming 3.2.2 release.
    gbuyle
    @gbuyle
    Hi, I would like to "register" for a free licence with my company email address. But I can't, the registration page doesn't accept my email address "gbuyle@cibg.brussels".
    Could you adapte the registration page.
    Per-Åke Minborg
    @minborg
    I will check out what might be the problem. Also, I will contact you on the provided main and furnish you with a license.
    Per-Åke Minborg
    @minborg
    @gbuyle I have sent a mail now. Let me know if it woks out for you!
    gbuyle
    @gbuyle
    Hi, I was reading one of your articles at DZone, about imperative style vs. declarative style and Speedment was mentioned. I was curious to known what is Speedment and if it is a valid replacement for Hibernate. I am convinced and I would like to present it at our company as part of knowledge sharing.Hopefully I can convinced my company (development department) to use it in further development projects.
    Per-Åke Minborg
    @minborg
    @gbuyle Interesting. I think declarative coding has many benefits. Let me know how it goes and what you think about Speedment.
    gbuyle
    @gbuyle
    I have received you email with the Free licence, but temporarily I have registered with my google account.
    Per-Åke Minborg
    @minborg
    okay. If you need another license, please contact me.
    Sreeja
    @sreejaepuri

    Hi @minborg

    when 3.2.2 release will come.....

    Is there any alternative for merge is available for now?

    Per-Åke Minborg
    @minborg
    We are looking into this right now. I can give you an answer tomorrow when it will be available.
    gbuyle
    @gbuyle
    Hi @minborg, is it possible to download or generate or receive the Speedment User guide in PDF?
    julgus
    @julgus
    Hi @gbuyle, we currently don't provide the manual in its entirety as a PDF. Although I found a very effective plugin for Chrome that can render individual chapters to PDF in a very simple manner. I've described how it's done here: https://speedment.github.io/speedment-doc/index.html#pdf-rendering-of-the-documentation
    vishnu2497
    @vishnu2497
    Hi
    is it possible to connect Speedment with Cassandra DB?
    Per-Åke Minborg
    @minborg
    Its in the road-map.
    vishnu2497
    @vishnu2497
    Thanks for the information.. @minborg