hekireki 0.43.0 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/activerecord.ts
4
4
  registerGenerator("activerecord");
5
5
  export {};
package/dist/bin/ajv.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/ajv.ts
4
4
  registerGenerator("ajv");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/arktype.ts
4
4
  registerGenerator("arktype");
5
5
  export {};
package/dist/bin/atlas.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/atlas.ts
4
4
  registerGenerator("atlas");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/django.ts
4
4
  registerGenerator("django");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/drizzle.ts
4
4
  registerGenerator("drizzle");
5
5
  export {};
package/dist/bin/ecto.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/ecto.ts
4
4
  registerGenerator("ecto");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/efcore.ts
4
4
  registerGenerator("efcore");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/effect.ts
4
4
  registerGenerator("effect");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/eloquent.ts
4
4
  registerGenerator("eloquent");
5
5
  export {};
package/dist/bin/er.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/er.ts
4
4
  registerGenerator("er");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/exposed.ts
4
4
  registerGenerator("exposed");
5
5
  export {};
package/dist/bin/gorm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/gorm.ts
4
4
  registerGenerator("gorm");
5
5
  export {};
@@ -6,7 +6,7 @@ import { Console, Data, Effect, Schema } from "effect";
6
6
  import path from "node:path";
7
7
  import { CliError, Command, Flag } from "effect/cli";
8
8
  // package.json
9
- var version = "0.43.0";
9
+ var version = "0.45.0";
10
10
  // src/schema/path.ts
11
11
  /** Where Prisma looks for a schema when neither the command nor prisma.config.ts names one. */
12
12
  const DEFAULT_SCHEMA_PATHS = ["prisma/schema.prisma", "schema.prisma"];
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/kysely.ts
4
4
  registerGenerator("kysely");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/openapi.ts
4
4
  registerGenerator("openapi");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/pydantic.ts
4
4
  registerGenerator("pydantic");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/sea-orm.ts
4
4
  registerGenerator("sea-orm");
5
5
  export {};
package/dist/bin/seed.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/seed.ts
4
4
  registerGenerator("seed");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/sqlalchemy.ts
4
4
  registerGenerator("sqlalchemy");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/typebox.ts
4
4
  registerGenerator("typebox");
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/valibot.ts
4
4
  registerGenerator("valibot");
5
5
  export {};
package/dist/bin/zod.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as registerGenerator } from "../bin-Bs0hPt0P.js";
2
+ import { t as registerGenerator } from "../bin-DGGtXAJh.js";
3
3
  // src/bin/zod.ts
4
4
  registerGenerator("zod");
5
5
  export {};
@@ -270,6 +270,7 @@ const RUBY_TOP_LEVEL_CONSTANTS = new Set(`
270
270
  const RAILS_RESERVED_NAMES = new Set(`abort
271
271
  abstract_class
272
272
  accepts_nested_attributes_for
273
+ act_on_ignored_order
273
274
  acts_like
274
275
  adapter_class
275
276
  add_autosave_association_callbacks
@@ -288,10 +289,12 @@ after_touch
288
289
  after_update
289
290
  after_update_commit
290
291
  after_validation
292
+ aggregate_column
291
293
  aggregate_reflections
292
294
  alias_attribute
293
295
  alias_attribute_method_definition
294
296
  alias_method
297
+ alias_tracker
295
298
  aliases_by_attribute_name
296
299
  all
297
300
  all_timestamp_attributes_in_model
@@ -300,9 +303,20 @@ allow_destroy
300
303
  ancestors
301
304
  and
302
305
  annotate
306
+ annotate_values
303
307
  append_to_connected_to_stack
308
+ apply_finish_limit
309
+ apply_join_dependency
310
+ apply_limits
304
311
  apply_pending_attribute_modifications
305
312
  apply_scoping
313
+ apply_start_limit
314
+ arel
315
+ arel_column
316
+ arel_column_aliases_from_hash
317
+ arel_column_with_table
318
+ arel_columns
319
+ arel_columns_from_hash
306
320
  arel_table
307
321
  around_create
308
322
  around_destroy
@@ -315,6 +329,7 @@ assert_valid_transaction_action
315
329
  association_cached
316
330
  association_foreign_key_changed
317
331
  association_valid
332
+ async
318
333
  async_average
319
334
  async_count
320
335
  async_count_by_sql
@@ -366,6 +381,9 @@ automatically_invert_plural_associations
366
381
  autosaving_belongs_to_for
367
382
  average
368
383
  base_class
384
+ batch_condition
385
+ batch_on_loaded_relation
386
+ batch_on_unloaded_relation
369
387
  becomes
370
388
  before_commit
371
389
  before_committed
@@ -377,17 +395,41 @@ before_validation
377
395
  belongs_to
378
396
  belongs_to_required_by_default
379
397
  benchmark
398
+ bind_attribute
380
399
  binding
381
400
  blank
382
401
  block_given
383
402
  build
403
+ build_arel
404
+ build_batch_orders
405
+ build_bound_sql_literal
406
+ build_case_for_value_position
407
+ build_cast_value
384
408
  build_column_serializer
409
+ build_count_subquery
385
410
  build_default_constraint
386
411
  build_default_scope
387
412
  build_explain_clause
413
+ build_from
414
+ build_having_clause
415
+ build_join_buckets
416
+ build_join_dependencies
417
+ build_joins
388
418
  build_mangled_name
419
+ build_named_bound_sql_literal
420
+ build_order
421
+ build_select
422
+ build_subquery
423
+ build_where_clause
424
+ build_with
425
+ build_with_expression_from_value
426
+ build_with_join_node
427
+ build_with_value_from_hash
389
428
  cache
429
+ cache_key
430
+ cache_key_with_version
390
431
  cache_timestamp_format
432
+ cache_version
391
433
  cache_versioning
392
434
  cached_find_by
393
435
  cached_find_by_statement
@@ -399,10 +441,13 @@ catch
399
441
  cattr_accessor
400
442
  cattr_reader
401
443
  cattr_writer
444
+ chain
402
445
  changed
403
446
  changed_for_autosave
404
447
  check_model_columns
405
448
  check_record_limit
449
+ chunk
450
+ chunk_while
406
451
  class
407
452
  class_attribute
408
453
  class_eval
@@ -413,18 +458,26 @@ class_variables
413
458
  clear_query_caches_for_current_thread
414
459
  clear_reflections_cache
415
460
  clone
461
+ collect
462
+ collect_concat
416
463
  collecting_queries_for_explain
417
464
  collection_cache_key
418
465
  collection_cache_versioning
419
466
  column_defaults
420
467
  column_for_attribute
421
468
  column_names
469
+ column_references
422
470
  columns
423
471
  columns_hash
424
472
  combine_signed_id_purposes
425
473
  committed
474
+ compact
475
+ compact_blank
476
+ compare_values_for_order
426
477
  composed_of
427
478
  composite_query_constraints_list
479
+ compute_cache_key
480
+ compute_cache_version
428
481
  compute_table_name
429
482
  compute_type
430
483
  concern
@@ -449,6 +502,8 @@ const_missing
449
502
  const_set
450
503
  const_source_location
451
504
  constants
505
+ construct_join_dependency
506
+ construct_relation_for_exists
452
507
  content_columns
453
508
  count
454
509
  count_by_sql
@@ -456,14 +511,17 @@ counter_cached_association_names
456
511
  create
457
512
  create_or_find_by
458
513
  create_with
514
+ create_with_value
459
515
  current_preventing_writes
460
516
  current_role
461
517
  current_scope
518
+ current_scope_restoring_block
462
519
  current_shard
463
520
  current_time_from_proper_timezone
464
521
  current_transaction
465
522
  custom_inspect_method_defined
466
523
  custom_validation_context
524
+ cycle
467
525
  decorate_attributes
468
526
  decrement
469
527
  decrement_counter
@@ -508,18 +566,32 @@ destroy_association_async_batch_size
508
566
  destroy_association_async_job
509
567
  destroy_by
510
568
  destroyed
569
+ detect
511
570
  deterministic_encrypted_attributes
512
571
  discriminate_class_for_record
513
572
  display
514
573
  distinct
574
+ distinct_value
575
+ drop
576
+ drop_while
515
577
  dup
516
578
  duplicable
579
+ each
580
+ each_cons
581
+ each_entry
582
+ each_join_dependencies
583
+ each_slice
584
+ each_with_index
585
+ each_with_object
517
586
  eager_load
587
+ eager_load_values
518
588
  eagerly_generate_alias_attribute_methods
589
+ encode_with
519
590
  encrypt_attribute
520
591
  encrypted_attribute
521
592
  encrypted_attributes
522
593
  encrypts
594
+ entries
523
595
  enum
524
596
  enum_for
525
597
  enumerate_columns_in_select_statements
@@ -532,35 +604,60 @@ except
532
604
  excluding
533
605
  exec
534
606
  exec_explain
607
+ exec_main_query
608
+ exec_queries
609
+ execute_grouped_calculation
610
+ execute_simple_calculation
535
611
  exit
612
+ explain
536
613
  extend
537
614
  extended
538
615
  extending
616
+ extending_values
617
+ extensions
539
618
  extract_associated
619
+ extract_table_name_from
540
620
  fail
541
621
  false
542
622
  fifth
623
+ filter
543
624
  filter_attributes
625
+ filter_map
544
626
  find
627
+ find_all
545
628
  find_by
546
629
  find_by_sql
547
630
  find_by_token_for
548
631
  find_each
549
632
  find_in_batches
633
+ find_index
634
+ find_last
635
+ find_nth
636
+ find_nth_from_last
637
+ find_nth_with_limit
638
+ find_one
550
639
  find_or_create_by
551
640
  find_or_initialize_by
552
641
  find_signed
553
642
  find_sole_by
643
+ find_some
644
+ find_some_ordered
554
645
  find_sti_class
646
+ find_take
647
+ find_take_with_limit
648
+ find_with_ids
555
649
  first
556
650
  first_or_create
557
651
  first_or_initialize
652
+ flat_map
653
+ flattened_args
558
654
  fork
559
655
  format
560
656
  forty_two
561
657
  fourth
562
658
  freeze
563
659
  from
660
+ from_clause
564
661
  frozen
565
662
  full_table_name_prefix
566
663
  full_table_name_suffix
@@ -582,7 +679,11 @@ gets
582
679
  global_current_scope
583
680
  global_previous_schemes_for
584
681
  global_variables
682
+ grep
683
+ grep_v
585
684
  group
685
+ group_by
686
+ group_values
586
687
  has_and_belongs_to_many
587
688
  has_attribute
588
689
  has_changes_to_save
@@ -597,6 +698,7 @@ has_secure_token
597
698
  has_transactional_callbacks
598
699
  hash
599
700
  having
701
+ having_clause
600
702
  hook_attribute_type
601
703
  human_attribute_name
602
704
  i18n_scope
@@ -607,6 +709,8 @@ immutable_strings_by_default
607
709
  implicit_order_column
608
710
  in
609
711
  in_batches
712
+ in_groups
713
+ in_groups_of
610
714
  in_order_of
611
715
  include
612
716
  include_relation_methods
@@ -614,8 +718,13 @@ include_root_in_json
614
718
  included
615
719
  included_modules
616
720
  includes
721
+ includes_values
722
+ including
617
723
  increment
618
724
  increment_counter
725
+ index
726
+ index_by
727
+ index_with
619
728
  inheritance_column
620
729
  inherited
621
730
  initialize
@@ -626,6 +735,7 @@ initialize_find_by_cache
626
735
  initialize_generated_modules
627
736
  initialize_load_schema_monitor
628
737
  initialize_relation_delegate_cache
738
+ inject
629
739
  insert
630
740
  insert_all
631
741
  inspect
@@ -644,6 +754,7 @@ instance_variables
644
754
  instance_variables_to_inspect
645
755
  instantiate
646
756
  instantiate_instance_of
757
+ instantiate_records
647
758
  internal_metadata_table_name
648
759
  invalid
649
760
  inverse_polymorphic_association_changed
@@ -653,29 +764,47 @@ iterator
653
764
  itself
654
765
  j
655
766
  jj
767
+ join
768
+ joined_includes_values
656
769
  joins
770
+ joins_values
657
771
  kind_of
772
+ klass
658
773
  lambda
659
774
  last
775
+ lazy
660
776
  lease_connection
661
777
  left_joins
662
778
  left_outer_joins
779
+ left_outer_joins_values
780
+ length
663
781
  limit
782
+ limit_value
783
+ limited_count
664
784
  load
785
+ load_async
786
+ load_records
665
787
  load_schema
788
+ loaded
666
789
  local_stored_attributes
667
790
  local_variables
668
791
  lock
669
792
  lock_optimistically
793
+ lock_value
670
794
  locking_column
671
795
  locking_enabled
672
796
  logger
673
797
  lookup_ancestors
798
+ lookup_cast_type_from_join_dependencies
799
+ lookup_table_klass_from_join_dependencies
674
800
  loop
801
+ map
675
802
  marked_for_destruction
676
803
  mattr_accessor
677
804
  mattr_reader
678
805
  mattr_writer
806
+ max
807
+ max_by
679
808
  maximum
680
809
  merge
681
810
  method
@@ -685,7 +814,12 @@ method_removed
685
814
  method_undefined
686
815
  method_visibility
687
816
  methods
817
+ min
818
+ min_by
688
819
  minimum
820
+ minmax
821
+ minmax_by
822
+ model
689
823
  model_name
690
824
  module_eval
691
825
  module_exec
@@ -709,18 +843,26 @@ normalized_reflections
709
843
  normalizes
710
844
  object_id
711
845
  offset
846
+ offset_value
712
847
  only
713
848
  only_columns
714
849
  open
850
+ operation_over_aggregate_column
715
851
  optimizer_hints
852
+ optimizer_hints_values
716
853
  or
717
854
  order
855
+ order_column
856
+ order_values
857
+ ordered_relation
718
858
  override_accessors_to_preserve_original
719
859
  p
720
860
  param_delimiter
721
861
  partial_inserts
722
862
  partial_updates
863
+ partition
723
864
  pending_attribute_modifications
865
+ perform_calculation
724
866
  persisted
725
867
  pick
726
868
  pk_attribute
@@ -733,13 +875,17 @@ pp
733
875
  predicate_builder
734
876
  predicate_for_validation_context
735
877
  preload
878
+ preload_associations
879
+ preload_values
736
880
  prepend
737
881
  prepend_option
738
882
  prepended
883
+ preprocess_order_args
739
884
  presence
740
885
  presence_in
741
886
  present
742
887
  preserve_original_encrypted
888
+ pretty_print
743
889
  previously_new_record
744
890
  previously_persisted
745
891
  primary_abstract_class
@@ -754,6 +900,8 @@ private_constant
754
900
  private_instance_methods
755
901
  private_methods
756
902
  proc
903
+ process_select_args
904
+ process_with_args
757
905
  prohibit_shard_swapping
758
906
  protected
759
907
  protected_environments
@@ -784,10 +932,15 @@ readline
784
932
  readlines
785
933
  readonly
786
934
  readonly_attributes
935
+ readonly_value
936
+ record_cursor_values
787
937
  record_timestamps
938
+ records
788
939
  redefine_method
789
940
  redefine_singleton_method
941
+ reduce
790
942
  references
943
+ references_values
791
944
  refinements
792
945
  reflect_on_aggregation
793
946
  reflect_on_all_aggregations
@@ -796,10 +949,13 @@ reflect_on_all_autosave_associations
796
949
  reflect_on_association
797
950
  reflections
798
951
  regroup
952
+ reject
799
953
  reject_new_record
800
954
  relation
801
955
  relation_delegate_class
956
+ relation_with
802
957
  release_connection
958
+ reload
803
959
  reload_schema_from_cache
804
960
  remove_class_variable
805
961
  remove_connection
@@ -810,6 +966,7 @@ remove_possible_method
810
966
  remove_possible_singleton_method
811
967
  render_bind
812
968
  reorder
969
+ reordering_value
813
970
  replace_bind_variable
814
971
  replace_bind_variables
815
972
  replace_named_bind_variables
@@ -817,6 +974,7 @@ require
817
974
  require_dependency
818
975
  require_relative
819
976
  reselect
977
+ reset
820
978
  reset_callbacks
821
979
  reset_column_information
822
980
  reset_counters
@@ -825,6 +983,7 @@ reset_locking_column
825
983
  reset_primary_key
826
984
  reset_sequence_name
827
985
  reset_table_name
986
+ resolve_arel_attributes
828
987
  resolve_attribute_name
829
988
  resolve_config_for_connection
830
989
  resolve_type_name
@@ -833,11 +992,22 @@ respond_to_missing
833
992
  respond_to_without_attributes
834
993
  restore_attribute
835
994
  retrieve_connection
995
+ reverse
996
+ reverse_each
997
+ reverse_order
998
+ reverse_order_value
999
+ reverse_sql_order
836
1000
  rewhere
1001
+ rindex
837
1002
  rolledback
1003
+ rotate
838
1004
  ruby2_keywords
839
1005
  run_commit_callbacks_on_first_saved_instances_in_transaction
840
1006
  run_validations
1007
+ sample
1008
+ sanitize_for_mass_assignment
1009
+ sanitize_forbidden_attributes
1010
+ sanitize_order_arguments
841
1011
  sanitize_sql
842
1012
  sanitize_sql_array
843
1013
  sanitize_sql_for_assignment
@@ -854,10 +1024,16 @@ scheme_for
854
1024
  scope
855
1025
  scope_attributes
856
1026
  scope_for_association
1027
+ scope_for_create
857
1028
  scope_registry
1029
+ scoping
858
1030
  second
859
1031
  second_to_last
860
1032
  select
1033
+ select_association_list
1034
+ select_for_count
1035
+ select_named_joins
1036
+ select_values
861
1037
  self
862
1038
  send
863
1039
  sequence_name
@@ -871,6 +1047,7 @@ set_trace_func
871
1047
  shard_keys
872
1048
  shard_selector
873
1049
  should_record_timestamps
1050
+ shuffle
874
1051
  signed_id_verifier
875
1052
  signed_id_verifier_secret
876
1053
  silence_redefinition_of_method
@@ -880,12 +1057,23 @@ singleton_method_added
880
1057
  singleton_method_removed
881
1058
  singleton_method_undefined
882
1059
  singleton_methods
1060
+ size
883
1061
  skip_callback
1062
+ skip_preloading_value
1063
+ skip_query_cache_if_necessary
1064
+ skip_query_cache_value
884
1065
  skip_time_zone_conversion_for_attributes
885
1066
  sleep
1067
+ slice
1068
+ slice_after
1069
+ slice_before
1070
+ slice_when
886
1071
  sole
1072
+ sort
1073
+ sort_by
887
1074
  source_attribute_from_preserved_attribute
888
1075
  spawn
1076
+ split
889
1077
  sprintf
890
1078
  srand
891
1079
  sti_class_for
@@ -900,6 +1088,8 @@ strict_loading_all
900
1088
  strict_loading_by_default
901
1089
  strict_loading_mode
902
1090
  strict_loading_n_plus_one_only
1091
+ strict_loading_value
1092
+ structurally_incompatible_values_for
903
1093
  subclass_from_attributes
904
1094
  subclasses
905
1095
  sum
@@ -908,10 +1098,14 @@ suppress
908
1098
  symbol_column_to_string
909
1099
  syscall
910
1100
  system
1101
+ table
911
1102
  table_name
912
1103
  table_name_prefix
913
1104
  table_name_suffix
1105
+ tables_in_string
914
1106
  take
1107
+ take_while
1108
+ tally
915
1109
  tap
916
1110
  test
917
1111
  then
@@ -930,11 +1124,20 @@ timestamp_attributes_for_create
930
1124
  timestamp_attributes_for_create_in_model
931
1125
  timestamp_attributes_for_update
932
1126
  timestamp_attributes_for_update_in_model
1127
+ to_a
1128
+ to_ary
933
1129
  to_enum
1130
+ to_formatted_s
1131
+ to_fs
1132
+ to_h
934
1133
  to_json
935
1134
  to_param
936
1135
  to_query
937
1136
  to_s
1137
+ to_sentence
1138
+ to_set
1139
+ to_sql
1140
+ to_xml
938
1141
  to_yaml
939
1142
  toggle
940
1143
  token_definitions
@@ -947,8 +1150,11 @@ trap
947
1150
  trigger_transactional_callbacks
948
1151
  true
949
1152
  try
1153
+ type_cast_calculated_value
1154
+ type_cast_pluck_values
950
1155
  type_caster
951
1156
  type_condition
1157
+ type_for
952
1158
  type_for_attribute
953
1159
  type_for_column
954
1160
  uncached
@@ -956,7 +1162,9 @@ undecorated_table_name
956
1162
  undef_method
957
1163
  undefine_attribute_methods
958
1164
  undefined_instance_methods
1165
+ uniq
959
1166
  unscope
1167
+ unscope_values
960
1168
  unscoped
961
1169
  untrace_var
962
1170
  update
@@ -969,6 +1177,7 @@ using
969
1177
  valid
970
1178
  validate
971
1179
  validate_column_size
1180
+ validate_order_args
972
1181
  validates
973
1182
  validates_absence_of
974
1183
  validates_acceptance_of
@@ -988,8 +1197,12 @@ validates_with
988
1197
  validating_belongs_to_for
989
1198
  validators
990
1199
  validators_on
1200
+ values
1201
+ values_for_queries
991
1202
  warn
992
1203
  where
1204
+ where_clause
1205
+ where_values_hash
993
1206
  while_preventing_writes
994
1207
  will_be_destroyed
995
1208
  will_save_change_to_attribute
@@ -998,11 +1211,13 @@ with_connection
998
1211
  with_pool_transaction_isolation_level
999
1212
  with_recursive
1000
1213
  with_role_and_shard
1214
+ with_values
1001
1215
  without
1002
1216
  writer_method
1003
1217
  yaml_encoder
1004
1218
  yaml_tag
1005
- yield_self`.split("\n"));
1219
+ yield_self
1220
+ zip`.split("\n"));
1006
1221
  /**
1007
1222
  * The class each model is written as: its name in PascalCase, or where Ruby or Rails already has
1008
1223
  * a constant of that name at the top level, that name with `Record` after it (`Monitor` is
@@ -1525,27 +1740,49 @@ function activeRecordModels(models, allModels, enums, provider) {
1525
1740
  return attribute(f.type === "Json" ? `-> { ${literal} }` : literal);
1526
1741
  });
1527
1742
  const enumLines = model.fields.filter((f) => f.kind === "enum" && !f.isList).reduce((acc, f) => {
1743
+ const column = f.dbName ?? f.name;
1528
1744
  const values = (enumMap.get(f.type) ?? []).map((v) => ({
1529
1745
  key: makeSnakeCase(v.name),
1530
1746
  name: v.name,
1531
1747
  stored: v.dbName ?? v.name
1532
1748
  }));
1533
- const pairs = values.map((v) => `${symbolKey(v.key)}: "${v.stored}"`).join(", ");
1534
- const conflicts = values.some((v) => acc.seenKeys.has(v.key) || RAILS_RESERVED_NAMES.has(v.key));
1535
1749
  const defaultValue = values.find((v) => v.name === f.default);
1750
+ if (RAILS_RESERVED_NAMES.has(pluralize$1(column))) return {
1751
+ lines: [
1752
+ ...acc.lines,
1753
+ ...typeof f.default === "string" && defaultValue !== void 0 ? [rubyCall("attribute", [`:${column}`], [`default: "${defaultValue.stored}"`])] : [],
1754
+ rubyCall("validates", [`:${column}`], [`inclusion: { in: ${rubyArray(values.map((v) => `"${v.stored}"`))}${f.isRequired ? "" : ", allow_nil: true"} }`])
1755
+ ],
1756
+ taken: acc.taken
1757
+ };
1758
+ const pairs = values.map((v) => `${symbolKey(v.key)}: "${v.stored}"`).join(", ");
1759
+ const affix = [
1760
+ {
1761
+ option: [],
1762
+ name: (key) => key
1763
+ },
1764
+ {
1765
+ option: ["prefix: true"],
1766
+ name: (key) => `${column}_${key}`
1767
+ },
1768
+ {
1769
+ option: ["suffix: true"],
1770
+ name: (key) => `${key}_${column}`
1771
+ }
1772
+ ].find(({ name }) => values.every((v) => !acc.taken.has(name(v.key)) && !RAILS_RESERVED_NAMES.has(name(v.key))));
1536
1773
  const opts = [
1537
1774
  ...typeof f.default === "string" && defaultValue !== void 0 ? [`default: :${symbolKey(defaultValue.key)}`] : [],
1538
- ...conflicts ? ["prefix: true"] : [],
1775
+ ...affix === void 0 ? ["scopes: false", "instance_methods: false"] : affix.option,
1539
1776
  f.isRequired ? "validate: true" : "validate: { allow_nil: true }"
1540
1777
  ];
1541
- for (const v of values) acc.seenKeys.add(v.key);
1778
+ if (affix !== void 0) for (const v of values) acc.taken.add(affix.name(v.key));
1542
1779
  return {
1543
- lines: [...acc.lines, rubyCall("enum", [`:${f.dbName ?? f.name}`, `{ ${pairs} }`], opts)],
1544
- seenKeys: acc.seenKeys
1780
+ lines: [...acc.lines, rubyCall("enum", [`:${column}`, `{ ${pairs} }`], opts)],
1781
+ taken: acc.taken
1545
1782
  };
1546
1783
  }, {
1547
1784
  lines: [],
1548
- seenKeys: /* @__PURE__ */ new Set()
1785
+ taken: /* @__PURE__ */ new Set()
1549
1786
  }).lines;
1550
1787
  const foreignKeyFields = new Set(model.fields.flatMap((f) => f.kind === "object" ? f.relationFromFields ?? [] : []));
1551
1788
  const compositeKeyFields = new Set(model.primaryKey?.fields);
@@ -13755,8 +13992,8 @@ function generateM2MEntity(leftModel, rightModel, relationName, allModels, serde
13755
13992
  const rightFk = isSelf ? "b" : `${makeSnakeCase(sortedRight)}_id`;
13756
13993
  const leftCol = isSelf ? "A" : makePascalCase(`${makeSnakeCase(sortedLeft)}Id`);
13757
13994
  const rightCol = isSelf ? "B" : makePascalCase(`${makeSnakeCase(sortedRight)}Id`);
13758
- const leftVariant = isSelf ? "A" : sortedLeft;
13759
- const rightVariant = isSelf ? "B" : sortedRight;
13995
+ const leftVariant = isSelf ? "A" : makePascalCase(sortedLeft);
13996
+ const rightVariant = isSelf ? "B" : makePascalCase(sortedRight);
13760
13997
  const leftType = pkRustType(sortedLeft, allModels);
13761
13998
  const rightType = pkRustType(sortedRight, allModels);
13762
13999
  const leftKey = makePascalCase(allModels.find((m) => m.name === sortedLeft)?.fields.find((f) => f.isId)?.name ?? "id");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hekireki",
3
- "version": "0.43.0",
3
+ "version": "0.45.0",
4
4
  "description": "Hekireki is a code generator from Prisma schema to validation schemas, ORM models, OpenAPI and ER diagrams, with a Studio for your schema and its data",
5
5
  "keywords": [
6
6
  "activerecord",