Net::G...Sqlite(3pm)

πŸ“¦ version 1.07, in ubuntu jammy

πŸ’– Net::G...Sqlite β€” User Contributed Perl Documentation πŸ’–

okay bestie, pull up a chair, we're talking about Net::Google::SafeBrowsing2::Sqlite, a Perl module living its best life in the User Contributed Perl Documentation collection. it's giving "storage backend" and honestly? iconic. πŸŽ€


✨ NAME ✨

Net::Google::SafeBrowsing2::Sqlite β€” Sqlite as back-end storage for the Google Safe Browsing v2 database. she stores things. that's her whole job. periodt. πŸ’…


🌸 SYNOPSIS 🌸

use Net::Google::SafeBrowsing2::Sqlite;

my $storage = Net::Google::SafeBrowsing2::Sqlite->new(file => 'google-v2.db');
...
$storage->close();

literally that's it. three lines and you're a whole storage girlie. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

this is an implementation of Net::Google::SafeBrowsing2::Storage using Sqlite. no cap, it just plugs right in. 🫢


πŸ’… CONSTRUCTOR πŸ’…

πŸŽ€ new()

creates a Net::Google::SafeBrowsing2::Sqlite object. main character energy, fr fr. πŸ‘‘

my $storage = Net::Google::SafeBrowsing2::Sqlite->new(file => 'google-v2.db');

⭐ Arguments

  • file β€” Required. the file where the database lives. like, you gotta tell her where to keep her stuff, bestie. πŸ“
  • keep_all β€” Optional. set it to 1 to keep old information (such as expiring full hashes) hanging around in the database. defaults to 0 (which means delete). so if you want the old receipts kept, say so. otherwise she's cleaning house. 🧹

🌈 PUBLIC FUNCTIONS 🌈

see Net::Google::SafeBrowsing2::Storage for a complete list of public functions. go read that one too, i'm not gatekeeping. πŸ“š

πŸ’– close()

cleans up old full hashes, and closes the connection to the database. tidy queen behavior. ✨

$storage->close();

πŸ”₯ CHANGELOG πŸ”₯

  • 0.2 β€” adds the close() function to clean up old full hashes, and to close the connection to the database cleanly.

also adds a table and function to store and retrieve the Message Authentication Code (MAC) key. πŸ”‘

and in some environments, the module was trying to re-create existing tables. fixed β€” big thank you to Luis Alberto Perez. 🫢

  • 0.3 β€” fixed typos in the documentation. (a glow-up for the docs, we love to see it.) πŸ“
  • 0.4 β€” journalization is disabled. this speeds up updates by about 10x. TEN. TIMES. πŸ’€
  • 0.5 β€” now uses the base class Net::Google::SafeBrowsing2::DBI. inheritance slay. πŸ‘‘
  • 0.6 β€” now uses the more efficient add_chunk_a and add_chunk_s functions. efficient queen. ⚑
  • 0.7 β€” adds the keep_all option to keep expired full hashes. useful for debugging. πŸ›
  • 0.8 β€” the s_chunks_unique index was created at the wrong place. thanks to colinmkeith. πŸ’–

🧚 SEE ALSO 🧚

  • see Net::Google::SafeBrowsing2 for handling Google Safe Browsing v2. πŸ‘€
  • see Net::Google::SafeBrowsing2::Storage for the list of public functions. πŸ“‹
  • see Net::Google::SafeBrowsing2::MySQL for a back-end using Sqlite. (yes bestie, that's exactly what it says. i'm just the messenger. πŸ™ˆ)
  • Google Safe Browsing v2 API: <http://code.google.com/apis/safebrowsing/developers_guide_v2.html> 🌐

🌸 AUTHOR 🌸

Julien Sobrier, <jsobrier@zscaler.com> or <julien@sobrier.net> β€” shoutout to the author, absolute legend. 🫑


Copyright (C) 2011 by Julien Sobrier

this library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. free software, we stan. 🌈


this page is from the User Contributed Perl Documentation set, and the version/date on the tin is perl v5.32.0 dated 2021-01-07. πŸ’– thanks for reading, bestie, now go close your database connection. πŸŽ€βœ¨πŸ¦‹
πŸ“¦ where this page comes from