SQLAlchemy HiLo PK Generator
There are two flavors of the HiLo generator, HiLoGenerator and RowPerTableHiLoGenerator. HiLoGenerator will create a single column table to keep track of the hi value:
CREATE TABLE single_hilo (
next_hi BIGINT NOT NULL
)
RowPerTableHiLoGenerator will create a two column table to keep track of the hi value per table per row:
CREATE TABLE row_per_table_hilo (
table_name VARCHAR(255) NOT NULL,
next_hi BIGINT NOT NULL,
PRIMARY KEY (table_name)
)
You can use them in your models like any other Sequence:
class Entity(Base):
id = Column(BigInteger(), HiLoGenerator(), primary_key=True)
...
or
class Entity(Base):
id = Column(BigInteger(), RowPerTableHiLoGenerator(), primary_key=True)
...
Metadata
Release files for sqlalchemy-hilo 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sqlalchemy-hilo-0.1.2.tar.gz | 2.9 kB | Without provenance | Details for sqlalchemy-hilo-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sqlalchemy_hilo-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for sqlalchemy_hilo-0.1.2-py3-none-any.whl |
Total release size: 7.1 kB
Release files / sqlalchemy-hilo-0.1.2.tar.gz
| Download URL | sqlalchemy-hilo-0.1.2.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7d37ec6e5d87da8690da4692f062c0d76bdb1dd615dc12af2d04c2778b69f05d
|
|
BLAKE2b-256 checksum How to use checksums |
8efd36e8ae56a4793bf71bc9b544ba283e1693b6b2588c98c6e590ff4aaff4ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / sqlalchemy_hilo-0.1.2-py3-none-any.whl
| Download URL | sqlalchemy_hilo-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ef7a31cf69e4760346bf4948691a2a6254334568ac1c2bcc8988c05b878f721
|
|
BLAKE2b-256 checksum How to use checksums |
745825b643b32b43675322850d2939ddf14ab7484fe7d32050c2de1228f22c4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sqlalchemy-hilo 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.