Firebird Generator Guide: A guide on how and when to use generators in Firebird
back the transaction (!). Don’t even think of something like “OK, when I rollback, I can just do GEN_ID(mygen,-1) afterwards to set it back to 4”. This may work most of the time, but is unsafe because changed the value in between. For the same reason it doesn’t make sense to get the current value with GEN_ID(mygen,0) and then increment the value on the client side. Chapter 2. Generator Basics 6 Chapter in client SQL: SELECT GEN_ID( GeneratorName, increment ) FROM RDB$DATABASE; DML statements in PSQL (Procedural SQL, available in stored procedures and triggers): intvar = GEN_ID( GeneratorName, increment0 码力 | 20 页 | 169.00 KB | 1 年前3Firebird 2.5 Language Reference
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 8.8.1. GEN_ID(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ◦ Although generator values are stored as 64-bit integers, a Dialect 1 client request, SELECT GEN_ID (MyGen, 1), for example, will return the generator value truncated to 32 bits. • Dialect 2 is available sequence Expression for obtaining the next value of a specified generator (sequence). The internal GEN_ID() function does the same. Chapter 4. Common Language Elements 51 4.1.1. Constants A constant0 码力 | 521 页 | 2.30 MB | 1 年前3firebird 40 language reference
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 8.8.1. GEN_ID(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ◦ Although generator values are stored as 64-bit integers, a Dialect 1 client request, SELECT GEN_ID (MyGen, 1), for example, will return the generator value truncated to 32 bits. • Dialect 2 is available value of a specified generator (sequence). The internal Chapter 4. Common Language Elements 70 GEN_ID() function does the same. AT expression Expression to change the time zone of a datetime. 4.10 码力 | 778 页 | 3.43 MB | 1 年前3firebird isql
=================================== AS BEGIN if (new.cust_no is null) then new.cust_no = gen_id(cust_no_gen, 1); END ============================================================================= AS Chapter 19. Isql Show commands 70 BEGIN if (new.cust_no is null) then new.cust_no = gen_id(cust_no_gen, 1); END =============================================================================0 码力 | 76 页 | 369.92 KB | 1 年前3Firebird Null Guide: NULL behaviour and pitfalls in Firebird SQL
following built-in functions return NULL if at least one argument is NULL: • CAST() • EXTRACT() • GEN_ID() • SUBSTRING() • UPPER() • LOWER() • BIT_LENGTH() • CHAR[ACTER]_LENGTH() • OCTET_LENGTH() 0.0, EXTRACT from a NULL date would crash the server. Fixed in 1.0.2. • If the first argument to GEN_ID is a valid generator name and the second argument is NULL, the named generator keeps its current0 码力 | 69 页 | 479.63 KB | 1 年前3Firebird Internals: Inside a Firebird Database
================== 5009 RANDOM_SEQ_4994 SQL> SELECT GEN_ID(RANDOM_SEQ_4994, 0) CON> FROM RDB$DATABASE; GEN_ID ===================== 0 SQL> SHELL; tux> ls0 码力 | 63 页 | 261.00 KB | 1 年前3PyMuPDF 1.24.2 Documentation
maximum storables cache size Tools.store_size current storables cache size Class API class Tools gen_id() A convenience method returning a unique positive integer which will increase by 1 on every invocation fullcopy_page() (Document method), 242 fullSector draw_sector, 304, 365 G gamma_with() (Pixmap method), 336 gen_id() (Tools method), 400 get_area() (IRect method), 268 get_area() (Rect method), 357 get_attribute_value()0 码力 | 565 页 | 6.84 MB | 1 年前3
共 7 条
- 1