14 Commits

Author SHA1 Message Date
c4d3eb1cd0 Remove support for Google Spanner database. (#105846)
* Remove support for Google Spanner database.
2025-05-23 11:35:59 +02:00
bf918976b2 Chore: Add snowflake xorm tag (#104300)
* add tag handler for snowflake ids

* add snowflake generator

* fill snowflake id back to the bean

* table driven test, mockable snowflake generator

* use math/rand/v2

* snowflake without time.sleep

* more explicit bitwise modulo

* rename snowflake to randomid
2025-05-06 21:12:11 +02:00
1d180c0611 Chore: Clean up unused parts of xorm/core (#104260)
* remove unused part of xorm

* remove onlytodb and onlyfromdb tags

* only keep snapemapper, since we always assumed it is the only one available in xorm
2025-04-22 11:37:07 +02:00
512df0091a Alerting: Add a button to try out the new list page (#103855)
* Add user-facing feature toggle functionality for the new alerting list view

- Implemented `useFeatureToggle` hook to manage feature toggles using local storage.
- Added unit tests for `useFeatureToggle` to verify behavior for various toggle states.
- Updated `RuleList` components to utilize the new feature toggle for alerting list view.
- Introduced `RuleListPageTitle` component to handle toggling between list views with a badge indicator.

* Add tests

* Fix imports and remove unused code

* Add a new feature flag for list v2 preview button

* Hide v2 preview button behind the new feature flag

* Update list v2 feature toggle stage

* Alerting: List view feature toggle button PR review (#104161)

* Add test for undefined feature toggles case

* Tweak tests to use test utils and user

* Add i18n for toggle button and tweak props spreading

* Update translations

---------

Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
2025-04-22 10:50:34 +02:00
047f5edae9 Chore: Add xorm.io/core into xorm (#103700)
* add xorm.io/core into xorm

* update workspace

* format imports

* update workspace
2025-04-16 08:58:50 +02:00
ca14ca70de xorm: Move for loop that finds inserted columns outside of iteration over all values. (#102700)
* Move for loop that finds inserted columns outside of iteration over all values.
2025-03-25 16:22:34 +01:00
9858e40a02 Spanner: Add trivial sequence number generator. (#101777)
* Add trivial sequence number generator.
2025-03-10 17:37:44 +01:00
0ce67dad74 Spanner: support for lastInsertId (#101770)
* Support for returning inserted ID in Spanner.
* Convert bytes to string when storing them into text column.
2025-03-10 15:59:06 +01:00
9e690bd620 Spanner support enhancements (#101634)
* Adds ability to run integration tests against spanner (by using GRAFANA_TEST_DB=spanner env variable. SPANNER_DB variable then specifies database to use: spannertest, emulator or string like /projects/<project>/instances/<instance>/databases/<db>)
* Adds feature to migration dialects to create database from a snapshot, instead of running individual migrations.
* Adds first version of Spanner snapshot, prepared from "OSS" migrations.
* Uses generated bit-reversed-positive values instead of auto_increment. (As an experiment)
2025-03-06 16:11:20 +01:00
165bca6417 Chore: Add initial/experimental xorm spanner driver (#101398)
* make it build and start

* run some migrations

* add build tags, remove log

* remove unused code

* revert go.mod changes

* move initialisation into dialect file

* update workspace

* update workspace once again

* clean up dependencies

* further cleanup

* Address some review feedback.

* Fix go.sum.

---------

Co-authored-by: Peter Štibraný <pstibrany@gmail.com>
2025-03-03 17:02:10 +01:00
025b2f3011 Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
a3a0c01301 [xorm] Remove some unused functions && mssql related logics (#60788)
* remove some unused functions

* more

* put back the pakcage replace
2022-12-28 22:23:25 -05:00
29276581d2 [xorm] Remove cache from xorm (#60770)
[xorm] remove cache from xorm
2022-12-27 10:48:49 -05:00
572e5a76ef [xorm] add xorm as package into grafana (#60678)
* add xorm and xorm/core as package

* remove mssql and oracle as driver

* fix some typo

* remove unittest

* remove some cache

* restore the removed part

* remove logfile
2022-12-26 17:45:21 +08:00