Smartpersistencelayer3.1 officially released

Source: Internet
Author: User
Tags informix spl

Smartpersistencelayer 3.1 officially released

After a period of effort, smartpersistencelayer finally completed the modification and testing. During this period, I would like to thank some netizens for their suggestions and support, and especially asilas for their final testing.
The release of spl3.1 is divided:
Release of spl3.1 DLL: The release type of SPL is DLL. You only need to download the DLL and reference it. If you already have a SPL environment, you only need to overwrite the DLL of spl3.1. Download spl3.1dll

Note: The SPL has been upgraded to 3.1.0.5, and the "real-time commit" function for transactions has been added. For details about downloading, refer to: spl3.1.0.5 upgrade-enhanced the "real-time commit" function for transactions.
For details about the "real-time commit" function of a transaction, see smartpersistencelayer3.1 (10) --- Advanced Transaction Processing

The demo source code of spl3.1 is released. :To make it easier for everyone to get started, Spl3.1 Simultaneous release at the time of release Demo The source code Installation Package introduces the use of some SPL and the correspondingSource codeThis is suitable for SPL users who are new to SPL. After using the installation package, netadvantage does not need to be installed and can be used after installation. 1 2 (Check "installation instructions" before installation ")
Note: When this demo is installed, the netadvantage client project of ig_common is automatically generated. If netadvantage already exists on the machine, ig_common will be uninstalled when the demo is uninstalled, this will cause netadvantage to be unavailable. You can back up ig_common in advance.
Smartrobot3.1CodeGenerator release : This smartrobot3.1 is the code generator for spl3.1.
(Now the source code of the robot has been published, See here )
Brief Introduction to smartrobot3.1:
No special instructions for use, it is very simple to use, as long
1) set first: database connection settings. The namespace can be used by default. The storage path of the generated object-class files is set.
2) Click "" to load the database table information.
3) Select the expected table and modify the ing relationship on the right side (it is recommended that you do not need to modify it). Click "lightning" to apply it (this will be saved to the memory ), click other tables to perform the same operation. (Note: "select" and "Apply" each table you need.
4) Click Generate code file under "file" to generate the object class. Click Save XML to generate the ing file.

Spl3.1 modification log :
After this period of modification,SPL finally rose 3.1, which revised some bugs and added some new features on the basis of 3.0, such as "timestamp", clone, and "Multi-account sets:
1. Support for Informix Databases
When connecting to Informix, in the configuration file databasemap. XML, datatype = "Informix ".

2.Added the retrievecriteria specified display field function:

Retrievecriteria RC = New Retrievecriteria ( Typeof (Studententity ));
RC. addselect (studententity. _ name );
RC. asdatatable ();

Use addselect (string entityattributename) or
Addselect (string entityattributename, string aliasname) can be used to specify the field value to be displayed. If one or more fields are used, all fields are displayed by default!

 

 

 

 

 

 

 

 

3.Added the "TOP" feature of oracle.,
For Oracle databases, SPL generates rownum <= n to obtain the first N records (retrievecriteria and query are added ).

4.Implemented the timestamp Function
If a column is defined as timestamp = "true", the data type is string, for example:

The corresponding fields are also defined in the corresponding database. The type is also character type, the length is more than 20 and cannot be blank. In this way, when the entityobject is inserted, the SPL will generate a now. ticks automatically inserts this field as the timestamp and compares it with the timestamp during update. If it is correct, it will be updated. If it is incorrect, it will not be updated successfully, this can be determined by returning "Number of affected items.
The timestamp is also determined during the delete operation, and the success and failure are also determined by "Number of affected items.
Because the database does not throw an exception even if the update and delete operations fail, but the number of affected items is 0. Therefore, we can determine the number of affected items.
The timestamp value is also updated during updatecriteria, but the problem is that for batch update, each timestamp cannot be compared. For the concept and implementation mechanism of Timestamp, refer to myArticle: Spl3.1 (8) --- concurrent processing

5.Timestamp support is also added to the transaction.
Added the isforcecommit attribute in transaction: flase: Do not force commit. It means to roll back the entire transaction when the entity save () or delete () returns false, this is used for concurrency processing. True: Forced commit means to ignore the false state returned by the entity save () and delete (), because sometimes this is allowed by the business. The default value is false, that is, concurrency control is required. You can also manually set it to true to forcibly execute commit.

Transaction t = New Transaction ();
T. add ..
Bool Result = T. Process ();

Determine the result to determine whether the execution is successful. If it is false, it means that a concurrency error is encountered in the transaction processing, you can re-submit the reminder and control the stored data to the memory in the transaction. When the concurrent generation of the transaction is incorrect, the data stored in the memory will be cleared, this ensures that no data has been roolback in the memory.

 

 

 

 

 

 

 

 

6.Added the object clone function.
Object classes must be identified as serializable: for example:

[Serializable]
Public   Class Suppliersentity: entityobject
{..}  

Then you can use the deepclone () method of the object:
Suppliersentity supplier2 = (suppliersentity) Supplier. deepclone ();
This requires "[serializable]" for the object class, which can be generated using the newly released smartrobot for spl3.1 code generation tool.

 

 

 

 

 

 

 

 

7.The addattributeforupdate method of updatecriteria is enhanced.
Previously, only string fields can be updated:

Public   Void Addattributeforupdate ( String Attributename, String Attributevalue)

Force Type update is allowed now:

Public   Void Addattributeforupdate ( String Attributename, Object Attributevalue)

 

 

 

 

 

 

 

 

8.Support for multiple sets of books
Starting from spl3.1, the multi-set of books has been repaired and expanded. For details about the "Multi-set of books" function, see spl3.1 (9) --- multi-set of books Processing

9.Added execution without returning execution SQL statement
Query added

Int Processsqlnonquery ( " SQL " , " DB " )

Is used to execute SQL statements that do not return datatable

For more information about SPL, see SPL column: http://www.cnblogs.com/tintown/category/12787.html

 

 

 

 

 

 

 

Authorization instructions: This SPL is released in the form of DLL, which is free of charge. There is no restriction information in the DLL.
It is free of charge and is not responsible for project losses caused by SPL bugs.
Accept bug handling, but do not promise to be handled.
SPL does not expose source code.

Modify remarks:
For a friend who downloaded it before January 26, April 12, please download it again and modify the judgment condition in the transaction processing area.

The system has been upgraded to spl3.2.0.1, visit: http://tintown.cnblogs.com/archive/2005/11/08/271629.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.